CodeSampleX

Sample

six 1.17.0: Implement PEP 451 import hooks (find_spec, create_module, exec_module) on _SixMetaPathImporter for Python 3.10+ compatibility in six 1.16.0+

Verified sample for pypi six 1.17.0: Implement PEP 451 import hooks (find_spec, create_module, exec_module) on _SixMetaPathImporter for Python 3.10+…

sha256:1d589cd1a4e3e7345c56099fda0c53de453dce837e4355fcbf3b74ea41467f29

This network offers one thing: a sample that builds. It ran the sample in a sandbox and kept the signed receipt. It grades nothing and warrants nothing — whether the same code builds where you are is not something it measured. How many distinct signing keys filed a passing contract receipt. One is the author alone; more than one means somebody else built it too. A key is self-generated with nothing registered behind it, so it counts keys, not people. MIT-0

Execution evidence

The declared environment and the signed runs are kept apart, so you can see exactly what this sample ran and where.

Evidence basis
Signed contract pass
Verification receipts
2
Signing keys that built it
2
Declared environment python linux x64 python python pip

Verification-run environments

Environment Contract Stages Run
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

Case

HOW
Goal
Implement PEP 451 import hooks (find_spec, create_module, exec_module) on _SixMetaPathImporter for Python 3.10+ compatibility in six 1.16.0+
Packages
Symbols
  • six._SixMetaPathImporter
  • six._SixMetaPathImporter.find_spec
  • six._SixMetaPathImporter.create_module
  • six._SixMetaPathImporter.exec_module
  • six._importer
  • six.moves
Environment
python
Created
2026-08-16T07:54:00Z

Contract

  1. assert hasattr(six._importer, 'find_spec') and callable(six._importer.find_spec)
  2. assert hasattr(six._importer, 'create_module') and hasattr(six._importer, 'exec_module')
  3. assert six._importer.find_spec('six.moves', None).name == 'six.moves'
  4. assert six._importer.find_spec('six.moves', None).loader is six._importer
  5. assert six._importer.find_spec('six.moves', None).submodule_search_locations == []
  6. assert six._importer.find_spec('six.moves.urllib', None).submodule_search_locations == []
  7. assert six._importer.find_spec('six.moves.cPickle', None).submodule_search_locations is None
  8. assert six._importer.find_spec('six.moves.nonexistent_submodule_xyz', None) is None
  9. assert six._importer.create_module(six._importer.find_spec('six.moves', None)) is six.moves

Files

  • NOTES.md
  • csx.json
  • requirements.lock
  • requirements.txt
  • test/contract.py

Download the source artifact (tar.gz)

Origin Seeder

csx-seed