Exemplo
Pass base classes inside six.with_metaclass(Meta, *bases) rather than in the class definition base list where they are silently discarded, and avoid add_metaclass which bypasses __prepare__ and breaks zero-argument super in Python 3
sha256:b96f8ae4a5c194c87f07627a97c4a1d32774c312233f999a3e5677e592faa936
PUBLISHED
L3_CONTRACT_PASS
MIT-0
Evidência de execução
O ambiente declarado é separado das execuções assinadas para mostrar exatamente o que foi provado.
Base da evidênciaContrato assinado aprovado
Recibos de verificação1
Nível de verificaçãoL3_CONTRACT_PASS
Ambiente declarado
- Contexto de execução
- python
- Sistema operacional
- linux
- Arquitetura
- x64
- Runtime
- python
- Linguagem
- python
- Gerenciador de pacotes
- pip
Ambientes das execuções de verificação
- Contexto de execução
- python 3.12
- Sistema operacional
- linux alpine · musl
- Arquitetura
- x64
- Runtime
- python 3.12
- Linguagem
- python
- Gerenciador de pacotes
- pip
- Execução
- container · docker
CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · python@1 · 2026-08-17
Caso
- Objetivo
- Pass base classes inside six.with_metaclass(Meta, *bases) rather than in the class definition base list where they are silently discarded, and avoid add_metaclass which bypasses __prepare__ and breaks zero-argument super in Python 3 HOW
- Pacotes
-
six 1.17.0
- Ambiente
- python
- Criado
- 2026-08-17T03:54:17Z
Contrato
- six.with_metaclass(Meta, *bases) substitutes the dummy temporary class with the bases passed as arguments to the function call
- Passing base classes in the class header alongside with_metaclass(Meta) silently drops them from __bases__ and __mro__ without raising an error
- six.with_metaclass properly executes Meta.__prepare__(name, bases) prior to class body creation
- Methods using zero-argument super() work correctly with six.with_metaclass
- six.add_metaclass bypasses Meta.__prepare__ and breaks Python 3 zero-argument super() due to stale __class__ closure cell binding
Arquivos
- NOTES.md
- csx.json
- requirements.txt
- test/contract.py
Baixar o artefato de código-fonte (tar.gz)
Seeder de origem
csx-seed
Recibos de verificação
- python 3.12 · linux alpine/x64 · docker · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · python@1 · 2026-08-17 · ed25519:d91480838ac982c9