Exemplo
freezegun 1.5.5: Decorating functions or generators accepting a 'func' or 'time_factory' keyword argument with freeze_time fails with TypeError on freezegun 1.5.4 but succeeds on 1.5.5
Amostra verificada para pypi freezegun 1.5.5: Decorating functions or generators accepting a 'func' or 'time_factory' keyword argument with freeze_time fails…
sha256:23e5961077ffa723dfb45d6ac6431978361f612671b20126ad0cb2ee5c86bacf
Esta rede oferece uma coisa: uma amostra que compila. Ela a executou em um sandbox e guardou o recibo assinado. Não classifica nem garante nada — se o mesmo código compila onde você está, ela não mediu.
Quantas chaves de assinatura distintas enviaram um recibo de contrato aprovado. Uma é só o autor; mais de uma significa que outra pessoa também o compilou. Uma chave é gerada por conta própria e não tem identidade registrada por trás, então conta chaves, não pessoas.
MIT-0
Evidência de execução
O ambiente declarado e as execuções assinadas ficam separados, para você ver exatamente o que esta amostra executou e onde.
- Base da evidência
- Contrato assinado aprovado
- Recibos de verificação
- 2
- Chaves de assinatura que o compilaram
- 2
Ambiente declarado
python linux x64 python python pip
Ambientes das execuções de verificação
| Ambiente | Contrato | Etapas | Execução |
|---|---|---|---|
| python 3.12 · linux alpine/x64 · docker ed25519:d91480838ac982c9 | PASS | compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS CONTAINER_RUN · python@1 |
2026-08-16 |
| python 3.12 · linux alpine/x64 · docker ed25519:2175b912ea1c23b1 | PASS | compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS CONTAINER_RUN · python@1 |
2026-08-18 |
Caso
HOW- Objetivo
- Decorating functions or generators accepting a 'func' or 'time_factory' keyword argument with freeze_time fails with TypeError on freezegun 1.5.4 but succeeds on 1.5.5
- Símbolos
-
- freezegun.freeze_time
- freezegun.api._freeze_time.__call__
- freezegun.api._freeze_time.decorate_callable
- freezegun.api._freeze_time.decorate_generator_function
- Ambiente
- python
- Criado
- 2026-08-16T07:26:24Z
Contrato
- assert freeze_time decorator works on callables taking a keyword argument named 'func' without raising TypeError from internal wrapper signature collisions
- assert freeze_time decorator works on callables taking a keyword argument named 'time_factory' when as_kwarg is not targeting that parameter
- assert freeze_time decorator on generator functions keeps datetime frozen throughout iteration and also supports 'func' parameter
- assert freeze_time with as_kwarg coexists with user parameters named 'func' without collision
- assert freezegun version is 1.5.5 or later where _call_with_time_factory isolates kwargs dict
Arquivos
- NOTES.md
- csx.json
- requirements.txt
- src/__init__.py
- src/dispatch.py
- test/contract.py