fontlab_glyport.adaptation_entries · declarations 001
Back to fontlab_glyport.adaptation_entries
PY311_MAGIC
module-attribute
PY311_MAGIC
PYC_MAGIC
module-attribute
PYC_MAGIC
archive_inventory
archive_inventory(path: str | Path) -> tuple[ArchiveMember, ...]
Every member with its kind and bytecode version, foreign bytecode included.
Only unreadable archives and unsafe member paths raise; nothing is extracted.
archive_members
archive_members(path: Path) -> tuple[tuple[str, bytes], ...]
Read/validate all members before publishing; filenames never imply ABI.
check_pyc
check_pyc(data: bytes, name: str = 'bytecode') -> str
Check the 16-byte PEP 552 header without unmarshalling foreign code.
choose_archive
choose_archive(paths, version: str = '3.11') -> Path | None
The first archive whose bytecode is all version by magic (names ignored).
pyc_version
pyc_version(data: bytes) -> str | None
The CPython release whose bytecode magic starts data, if known.
read_code
read_code(path: Path) -> CodeType
Compile source or load checked 3.11 bytecode on a 3.11 interpreter only.
unpack_archive
unpack_archive(path: str | Path, destination: str | Path) -> Path
Extract validated members to a new directory; originals remain untouched.