-
-
Notifications
You must be signed in to change notification settings - Fork 32k
bpo-32075: Expose ZipImporter Type Object in the include header files. #4470
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This should hopefully allow subclassing the zipimporter class outside of the Python layer as well.
Seems on Windows compile fails for some reason when in Python.h on a module.
Should be the last of my ZipImporter clinic problems.
extern "C" { | ||
#endif | ||
|
||
PyAPI_DATA(PyTypeObject) PyZipImporter_Type; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This and the rest of the file shouldn't be part of the stable ABI.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But then how would someone be able to subclass or subtype the zip importer in their C code?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Relying only on the stable ABI is an opt-in thing when you build an extension, so leaving this out of it won't prevent it from being available overall, just in a certain instance.
I personally don't have time to review and contemplate the ramifications of this, but I would suggest that any changes not be part of the stable ABI. |
zipimport have been rewritten in pure Python (bpo-25711). |
This should hopefully allow subclassing the zipimporter class outside of
the Python layer as well.
See the issue at bpo for more information as to why this needs exposed in the include files.
https://bugs.python.org/issue32075