imports.ImportMember
One `.import/` member that passed hygiene, ready for placement.
One .import/ member that passed hygiene, ready for placement.
Attributes
attributenamestrThe original zip name, echoed in refusals.
attributekindImportKindThe declared kind.
attributeoriginOriginThe declared origin; advisory, placement never reads it.
attributerelPurePosixPathThe path below .import/<kind>/.
attributepartstuple[str, ...]rel's components.
attributesizeintThe uncompressed size, from the zip header.
attributeinfozipfile.ZipInfo= field(repr=False, compare=False)The zip entry.
attribute_zfOptional[zipfile.ZipFile]= field(default=None, repr=False, compare=False)Functions
funchead(self, n) -> bytesRead the start of the member, for a hook that sniffs content.
Only valid inside preflight, while its archive is open.
Raises
RuntimeError: When the member was built without an open archive, or its archive is closed.MemberReadError: When the member's data cannot be read.
paramselfparamnintBytes wanted; clamped to HEAD_MAX_BYTES.
Returns
bytesUp to n bytes from the start of the member.
func__init__(self, name, kind, origin, rel, parts, size, info, _zf=None) -> NoneparamselfparamnamestrparamkindImportKindparamoriginOriginparamrelPurePosixPathparampartstuple[str, ...]paramsizeintparaminfozipfile.ZipInfoparam_zfOptional[zipfile.ZipFile]= NoneReturns
None