Uh oh!
There was an error while loading. Please reload this page.
bpo-1635741: Enhance _datetime error handling - #23139
Conversation
koubaa
commented
Nov 4, 2020
@vstinner please review |
vstinner
left a comment
There was a problem hiding this comment.
Please mention the modified module name in the PR title.
I suggest to canghe the PR title to "Enhance _datetime error handling" or "Refactor _datetime error handling", since this change is not directly related to multi-phase init. I'm not sure that we can soon convert this module to the multi-phase init because of the PyCapsule C API.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
vstinner
commented
Nov 4, 2020
You wrote the wrong bpo number in the PR title. |
pganssle
commented
Nov 4, 2020
@koubaa Can you provide a TL;DR of why this change is useful or necessary? |
vstinner
commented
Nov 4, 2020
https://bugs.python.org/issue1635741 describes the overall goal: better embed Python in application. One side of the issue is to ensure that an extension module releases all its resources at Python exit. |
8910cc2 to
04889eaCompareUh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
04889ea to
ae49eafCompare
vstinner
left a comment
There was a problem hiding this comment.
Be careful with preprocessor traps :-( https://gcc.gnu.org/onlinedocs/cpp/Macro-Pitfalls.html
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
koubaa
commented
Nov 20, 2020
Thanks again for sharing this, I easily forget them. |
vstinner
commented
Nov 20, 2020
Oh, me tee! I got exactly the same issue than you a few days ago :-D |
vstinner
commented
Nov 20, 2020
Thanks, I merged your PR. I checked manually for refleak using the following test run with "./python -m test (...) -R 3:3": I didn't notice any refleak. |
vstinner
commented
Nov 20, 2020
Hum, I'm not sure that my manual test is relevant, since _datetime doesn't use multiphase init yet. But it leaks, I don't expect issues with Refleaks buildbots. |
This helps prepare for multiphase init (PEP 489)
https://bugs.python.org/issue1635741