bpo-1635741: port pyexpat to multi-phase init (PEP 489)#22222
Conversation
|
@vstinner @corona10 @shihai1991 please review. There's PyCapsule_New usage but the capsule methods did not depend on any globals so it isn't a concern in this case. |
Sorry, something went wrong.
|
compile warning in here: |
Sorry, something went wrong.
Oops, I forgot to add this to the type slots. Should be fixed now |
Sorry, something went wrong.
|
Maybe it would be simpler to extract changes which add error handling to the exec function, and write a second PR to convert the module to multi-phase init. Since the existing code basically has no code to handle errors :-( You can rename pyexpat_exec() to PyInit_pyexpat() and just add Py_DECREF(m) in "goto error". |
Sorry, something went wrong.
|
I would prefer to get PR #22489 merged before this one, to ease review ;-) |
Sorry, something went wrong.
bf06df6 to
c483618
Compare
November 7, 2020 02:07
|
@vstinner rebased and I think ready to go. Please review |
Sorry, something went wrong.
c483618 to
5262887
Compare
November 15, 2020 17:32
|
Shouldn't |
Sorry, something went wrong.
|
@shihai1991 made expat_CAPI per module instance in commit 7c83eaa. I merged the PR, thanks @koubaa!
Hum. It doesn't contain anything dynamically allocated. It's a static array of static data. I don't think that we have to make it per instance. |
Sorry, something went wrong.
https://bugs.python.org/issue1635741