Skip to content

gh-132413: Check if datetime current state is not NULL - #136321

Closed
sergey-miryanov wants to merge 2 commits into
python:mainfrom
sergey-miryanov:gh-132413-fix-datetime-get-current-state
Closed

sergey-miryanov wants to merge 2 commits into
python:mainfrom
sergey-miryanov:gh-132413-fix-datetime-get-current-state

Conversation

@sergey-miryanov

@sergey-miryanov sergey-miryanov commented Jul 5, 2025 •

Copy link
Copy Markdown
Contributor

If it is a NULL then interpreter shutting down and we can do nothing

- if it is NULL then interpeter shuting down
@sergey-miryanov

Copy link
Copy Markdown
Contributor Author

@neonene I cherry-picked and squashed your commits with test. If you don't like this - I will revert/remove it.

@StanFromIreland

Copy link
Copy Markdown
Member

I presume it was closed because of this PR they opened, #136152, which seems like a more concrete approach.

@sergey-miryanov

sergey-miryanov commented Jul 5, 2025 •

Copy link
Copy Markdown
Contributor Author

I presume it was closed because of this PR they opened, #136152, which seems like a more concrete approach.

Ough! My oversight! Thanks!

@StanFromIreland

Copy link
Copy Markdown
Member

Looking deeper that one is also most likely superseded by #136189

@sergey-miryanov

Copy link
Copy Markdown
Contributor Author

Looking deeper that one is also most likely superseded by #136189

IIUC #136189 doesn't solve #132413 by now.

@sergey-miryanov

Copy link
Copy Markdown
Contributor Author

Closing in favor of #136152

@neonene

neonene commented Jul 5, 2025

Copy link
Copy Markdown
Contributor

This solution raises a ImportError rather than a crash, which is a breaking change. And the test needs to check stderr (subprocess exits with OK). I think this PR could be used as a last resort when the issue get stuck.

@sergey-miryanov

Copy link
Copy Markdown
Contributor Author

This solution raises a ImportError rather than a crash, which is a breaking change.

Yeah, but I believe that exception (swallowed in this case) better than a crash. But I hope your PR will be approved and merged soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

3 participants