Skip to content

correctly set __package__ in a module in a zip file - #609

Closed
marcelotduarte wants to merge 1 commit into
masterfrom
zipimport
Closed

marcelotduarte wants to merge 1 commit into
masterfrom
zipimport

Conversation

@marcelotduarte

@marcelotduarte marcelotduarte commented Mar 1, 2020 •

Copy link
Copy Markdown
Owner

zipimport set __package__ as None, then change it; the code was based on new zipimport for Python 3.8 (python/cpython#6809) and adapted to set __package__

A small sample:

# test.py
import pikepdf
print(pikepdf.__package__, pikepdf.__version__)

Edit:
This PR has no dependency
ONLY the sample needs PR #608 and this PR to work.
Edit2: I use this PR with success, but in a test with a sample of pyside2 I have issues. I'll investigate it.

…package__ as None, then change it; the code was based on new zipimport for py38 and adapted to set __package__
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant