GH-84976: Create Lib/_pydatetime to optimize import datetime when C implementation is available#103637
Merged
Yhg1s merged 2 commits intopython:mainfrom May 3, 2023
Merged
GH-84976: Create Lib/_pydatetime to optimize import datetime when C implementation is available#103637Yhg1s merged 2 commits intopython:mainfrom
Yhg1s merged 2 commits intopython:mainfrom
Conversation
e369bc7 to
33dd738
Compare
Member
Author
Member
Author
|
Even though it doesn't seem to help us cherry-pick, I would feel a bit more comfortable if I could merge this into @Yhg1s As RM for 3.12, I think you are the right person to ask — is it possible to merge this into |
33dd738 to
8139805
Compare
8139805 to
937b144
Compare
This breaks the tests, but we are keeping it as a separate commit so that the move operation and editing of the moved files are separate, for a cleaner history.
Without the change to the reprs, pure-python classes would have a repr of `datetime._pydatetime.time`, etc.
Member
|
FYI, I've merged the two commits with rebase (not squashing), so they are two separate commits in the main branch, which hopefully makes future backports easier. |
Member
|
Nice :-) |
ngnpope
reviewed
May 24, 2023
hauntsaninja
added a commit
to hauntsaninja/cpython
that referenced
this pull request
May 25, 2023
This was mistakenly dropped in python#103637 Noticed when updating typeshed for Python 3.12
pganssle
pushed a commit
that referenced
this pull request
May 25, 2023
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this pull request
Jun 23, 2023
pythongh-84796: Add back UTC to datetime.__all__ This was mistakenly dropped in pythonGH-103637 Noticed when updating typeshed for Python 3.12 (cherry picked from commit 076b620) Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
From the discussion on stack overflow, #84976 and #99090, no one can find a way to do this that allows clean cherry-picks, but also no one can explain why it's not possible, but at this point it's not worth delaying any more. We rarely need to backport things into
datetime.py, and in those rare cases we can do it manually. If it suddenly becomes very common, we can maybe special-case it in Miss Islington.