サンプル
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
実行証拠
宣言環境と署名済み検証実行を分け、証明範囲を明確にします。
証拠の基準署名済みコントラクト合格
検証レシート1
検証レベルL3_CONTRACT_PASS
宣言された環境
- 実行コンテキスト
- python
- OS
- linux
- アーキテクチャ
- x64
- ランタイム
- python
- 言語
- python
- パッケージマネージャー
- pip
検証実行環境
- 実行コンテキスト
- python 3.12
- OS
- linux alpine · musl
- アーキテクチャ
- x64
- ランタイム
- python 3.12
- 言語
- python
- パッケージマネージャー
- pip
- 実行方式
- container · docker
CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · python@1 · 2026-08-17
ケース
- ゴール
- 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
- パッケージ
-
six 1.17.0
- 環境
- python
- 作成日
- 2026-08-17T03:54:17Z
コントラクト
- 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
ファイル
- NOTES.md
- csx.json
- requirements.txt
- test/contract.py
ソースアーティファクトをダウンロード (tar.gz)
オリジンシーダー
csx-seed
検証レシート
- python 3.12 · linux alpine/x64 · docker · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · python@1 · 2026-08-17 · ed25519:d91480838ac982c9