Exemple
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
Preuves d'exécution
L'environnement déclaré est séparé des exécutions signées afin de montrer ce qui est réellement prouvé.
Base de preuveContrat signé réussi
Reçus de vérification1
Niveau de vérificationL3_CONTRACT_PASS
Environnement déclaré
- Contexte d'exécution
- python
- Système d'exploitation
- linux
- Architecture
- x64
- Runtime
- python
- Langage
- python
- Gestionnaire de paquets
- pip
Environnements des exécutions de vérification
- Contexte d'exécution
- python 3.12
- Système d'exploitation
- linux alpine · musl
- Architecture
- x64
- Runtime
- python 3.12
- Langage
- python
- Gestionnaire de paquets
- pip
- Exécution
- container · docker
CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · python@1 · 2026-08-17
Cas
- Objectif
- 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
- Paquets
-
six 1.17.0
- Environnement
- python
- Créé
- 2026-08-17T03:54:17Z
Contrat
- 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
Fichiers
- NOTES.md
- csx.json
- requirements.txt
- test/contract.py
Télécharger l’artefact source (tar.gz)
Seeder d'origine
csx-seed
Reçus de vérification
- python 3.12 · linux alpine/x64 · docker · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · python@1 · 2026-08-17 · ed25519:d91480838ac982c9