Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 33.9k
bpo-40077: Convert _elementtree types to heap types#23428
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
bpo-40077: Convert _elementtree types to heap types #23428
Uh oh!
There was an error while loading. Please reload this page.
Conversation
erlend-aasland commented Nov 20, 2020 • edited by bedevere-bot
Loading Uh oh!
There was an error while loading. Please reload this page.
edited by bedevere-bot
Uh oh!
There was an error while loading. Please reload this page.
erlend-aasland commented Nov 20, 2020 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
@corona10 would you mind taking a look at this, when I've sorted out the CI failures? |
Uh oh!
There was an error while loading. Please reload this page.
tiran commented Nov 21, 2020
Tests are failing because subinterpreter re-initialized etree types. You either have to add an |
erlend-aasland commented Nov 21, 2020
Ah, thanks, @tiran! I modified the |
Uh oh!
There was an error while loading. Please reload this page.
9d7b90b to 5f584aaCompareThis PR is stale because it has been open for 30 days with no activity. |
5f584aa to 9210a36Compareerlend-aasland commented Jan 11, 2021 • edited by bedevere-bot
Loading Uh oh!
There was an error while loading. Please reload this page.
edited by bedevere-bot
Uh oh!
There was an error while loading. Please reload this page.
Ref. leaks are now fixed (commit 9210a36): Rebased onto master & force-pushed; hope that's ok. Ready for review, @tiran. |
erlend-aasland commented Feb 1, 2021 • edited by bedevere-bot
Loading Uh oh!
There was an error while loading. Please reload this page.
edited by bedevere-bot
Uh oh!
There was an error while loading. Please reload this page.
FYI, all of these types follow the GC protocol, as described in bpo-42972. (cc. @vstinner@shihai1991) |
vstinner commented Feb 1, 2021
I dislike the temporary situation where we create new heap types but don't clear them at exit. Would it be possible to write a first PR to convert the _elementtree extension to multiphase init? And maybe also prepare the code for having per module types (having a module state)? (same PR or a different PR) For example, create a state which contains pointers to the static types, and ensure that static types are no longer referenced directly. |
erlend-aasland commented Feb 1, 2021
I agree.
No problem. I'll create a new PR for multiphase init (bpo 1635741). If it's not too large a change, I'll include module state as well. |
erlend-aasland commented Feb 5, 2021
I did some fiddling with this today, and the problem is that we've already got a (partial) module state, and it often uses
What do you think? |
https://bugs.python.org/issue40077