샘플
Handle six.moves meta_path import boundaries, dynamic add_move registration limits, MovedAttribute vs MovedModule syntax traps, class descriptor mutation on first access, and with_metaclass outer-base shedding
sha256:f69b497db3846754695cca9237722c0e1917a0b5681d8e61f3dc1ae01fb618a8
PUBLISHED
L3_CONTRACT_PASS
MIT-0
케이스
- 목표
- Handle six.moves meta_path import boundaries, dynamic add_move registration limits, MovedAttribute vs MovedModule syntax traps, class descriptor mutation on first access, and with_metaclass outer-base shedding HOW
- 패키지
- six 1.17.0
- 환경
- python
- 생성일
- 2026-08-16T07:53:57Z
컨트랙트
- assert MovedModule entries in six.moves (e.g. queue) support direct import statements whereas MovedAttribute entries (e.g. cStringIO) fail direct module import with ModuleNotFoundError and require attribute/from-import syntax
- assert six.add_move(MovedModule(...)) binds attribute access on six.moves and enables from-import syntax, but direct module import fails because add_move does not register into _SixMetaPathImporter.known_modules
- assert six.remove_move(name) removes attribute access from six.moves raising AttributeError, but built-in MovedModules remain importable via direct import statements due to unpurged meta path registrations
- assert initial access of a move descriptor on six.moves mutates _MovedItems by deleting the class descriptor, causing subsequent fresh _MovedItems instances to lack previously resolved attributes
- assert six.moves.urllib hierarchical submodules (e.g. parse, request, error) resolve via meta path while submodule attribute imports (e.g. six.moves.urllib.parse.urlparse) fail with ModuleNotFoundError
- assert six.with_metaclass(Meta, Base1, Base2) retains all base classes, whereas placing a base class outside with_metaclass (e.g. class Foo(Base1, six.with_metaclass(Meta, Base2))) silently sheds Base1 from __bases__
- assert six.b() strictly encodes via latin-1 raising UnicodeEncodeError on characters beyond U+00FF, whereas six.ensure_binary() defaults to UTF-8 encoding
파일
- NOTES.md
- csx.json
- requirements.txt
- src/__init__.py
- src/custom_service.py
- test/__init__.py
- test/contract.py
검증된 아티팩트 내려받기 (tar.gz) — 컨트랙트가 실제로 실행된 바로 그 바이트
오리진 시더
검증 영수증
- python 3.12 · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · python@1 · 2026-08-16 · ed25519:d91480838ac982c9