8000 gh-132413: Check if datetime current state is not NULL by sergey-miryanov · Pull Request #136321 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

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

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

sergey-miryanov
Copy link
Contributor
@sergey-miryanov sergey-miryanov commented Jul 5, 2025

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
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
Member

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

@sergey-miryanov
Copy link
Contributor Author
sergey-miryanov commented Jul 5, 2025

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
Member

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

@sergey-miryanov
Copy link
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
Contributor Author

Closing in favor of #136152

@neonene
Copy link
Contributor
neonene commented Jul 5, 2025

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
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0