GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — gh-148085: `datetime` cache `time` module lookups by maurycy · Pull Request #148088 · python/cpython

Conversation

@maurycy

@maurycy maurycy commented Apr 4, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

See gh-148085 for more details.

Please see Links to previous discussion of this feature section in the gh-148085. My understanding is that only @ericsnowcurrently's work in gh-119810 made this possible and clean.

Benchmark

Benchmark main-c50d6cd datetime-cache-time-module-lookups-ae32bfd
datetime.timetuple 260 ns 124 ns: 2.10x faster
datetime.strftime 784 ns 517 ns: 1.52x faster
date.timetuple 258 ns 124 ns: 2.08x faster
Geometric mean (ref) 1.88x faster

For:

import pyperf, datetime

r = pyperf.Runner()
dt = datetime.datetime(2026, 4, 4, 12, 30, 45)
d = datetime.date(2026, 4, 4)

r.bench_func("datetime.timetuple", dt.timetuple)
r.bench_func("datetime.strftime", dt.strftime, "%Y-%m-%d")
r.bench_func("date.timetuple", d.timetuple)

For:

2026-04-04T14:17:02.794335000+0200 maurycy@gimel /Users/maurycy/work/cpython-main (main c50d6cd) % ./python.exe -c "import sysconfig; print(sysconfig.get_config_var('CONFIG_ARGS'))"
'--enable-optimizations' '--with-lto'
[127] 2026-04-04T14:17:24.011667000+0200 maurycy@gimel /Users/maurycy/src/github.com/maurycy/cpython (datetime-cache-time-module-lookups a49f862) % ./python.exe -c "import sysconfig; print(sysconfig.get_config_var('CONFIG_ARGS'))"
'--enable-optimizations' '--with-lto'

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

adamchainz reacted with thumbs up emoji eendebakpt reacted with eyes emoji
All reactions
  • 👍 1 reaction
  • 👀 1 reaction
maurycy added 4 commits April 4, 2026 14:24
@maurycy
simple caching
36c494b
@maurycy
news
48e9ea1
@maurycy
oops, lint
ae32bfd
@maurycy
lazy
7e7b739
@maurycy
maurycy requested review from StanFromIreland and pganssle as code owners April 4, 2026 12:53
@bedevere-app bedevere-app Bot added the awaiting review label Apr 4, 2026
@bedevere-app bedevere-app Bot mentioned this pull request Apr 4, 2026
datetime: cache module lookups (2x faster) #148085
Closed
@maurycy
i thought it existed... ok, now. no warnings?
cd247ca
StanFromIreland
StanFromIreland reviewed Apr 4, 2026
View reviewed changes

@StanFromIreland StanFromIreland left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't have a precedent for lazy caching, I think it's always eager? I'm worried this might cause issues, historically datetime and caching hasn't worked out.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread Misc/NEWS.d/next/Library/2026-04-04-14-25-43.gh-issue-148085.o97yTo.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

@maurycy

maurycy commented Apr 4, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor Author

@StanFromIreland We do:

https://github.com/python/cpython/blob/dea4083aa95/Modules/arraymodule.c#L2561

https://github.com/python/cpython/blob/dea4083aa95/Modules/_decimal/_decimal.c#L3699

I copied my approach from there. I'm OK with moving to init_state(), somehow PEP 810 set the tone.

I believe the reason why it didn't work is that it relied on a global variable, instead of per-interpreter module. I left a note in #148085 in the previous discussions feature section.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@maurycy
mv to library
2f3dbe0
StanFromIreland
StanFromIreland reviewed Apr 4, 2026
View reviewed changes
Comment thread Modules/_datetimemodule.c Resolved

Uh oh!

There was an error while loading. Please reload this page.

StanFromIreland
StanFromIreland reviewed Apr 4, 2026
View reviewed changes
Comment thread Modules/_datetimemodule.c Resolved

Uh oh!

There was an error while loading. Please reload this page.

@picnixz

picnixz commented Apr 4, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

I remember there were issues with datetime and the capsule API so be careful there. Likewise, if you do per-state caching, it may break existing hooks (removing the module from sys.modules will not make it reload I think)

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@maurycy
stan is right; just call PyTime_Time directly?
d3944fe
@maurycy

maurycy commented Apr 6, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor Author

Likewise, if you do per-state caching, it may break existing hooks (removing the module from sys.modules will not make it reload I think)

How real of a concern is this?

I've grepped the code and I think we already tend to break monkey-patching:

cpython/Modules/_pickle.c

Line 371 in fbdbea9

st->codecs_encode = PyImport_ImportModuleAttrString("codecs", "encode");

cpython/Modules/arraymodule.c

Line 2562 in fbdbea9

state->array_reconstructor = PyImport_ImportModuleAttrString(

cpython/Modules/_zoneinfo.c

Line 2765 in fbdbea9

state->_tzpath_find_tzfile =

cpython/Modules/_asynciomodule.c

Line 4257 in fbdbea9

state->asyncio_mod = PyImport_ImportModule("asyncio");

cpython/Modules/_decimal/_decimal.c

Line 3700 in fbdbea9

state->PyDecimal = PyImport_ImportModuleAttrString("_pydecimal", "Decimal");

I definitely do not want to cause any regression, but this seems to be a pattern, and the performance gain (on repeated runs) is real.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@picnixz

picnixz commented Apr 6, 2026

Copy link
Copy Markdown
Member

I would say it could break in tests. It's not uncommon to patch time-related modules when working with datetime I'd say. I honestly don't know if this is a real issue but I just wanted you to be aware of this possibility. In the past, I added NEWS entries indicating that imports were changed for performance reason just for users to know that the reference is no more local/global. In this case, it'd be easy to fix if someone first mock time, and then import datetime instead of doing the other way around.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@htjworld

htjworld commented Apr 7, 2026

Copy link
Copy Markdown
Contributor

Hi @maurycy , great work on this.

Since this module declares Py_MOD_GIL_NOT_USED, I was wondering about the lazy init pattern in a free-threaded build. If two threads enter build_struct_time concurrently with st->time_struct_time == NULL, both would call PyImport_ImportModuleAttrString and one overwrite would leave a reference with an incremented refcount that never gets decref'd.

I noticed arraymodule.c and _decimal.c have the same pattern, so maybe this is just accepted. But _asynciomodule.c initializes eagerly in module_init() which avoids this structurally. Was lazy chosen deliberately here over eager init in init_state()?

maurycy reacted with eyes emoji
All reactions
  • 👀 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

maurycy added 2 commits April 7, 2026 17:34
@maurycy
revert lazy
33c64f2
@maurycy
news
ff27dc4
@maurycy

maurycy commented Apr 7, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor Author

@picnixz Thank you, improved the NEWS entry: ff27dc4.

@htjworld Thank you. I think you're 100% right and all lazy import caches should use CAS.

I believe this is the correct pattern:

cpython/Modules/_sre/sre.c

Lines 1173 to 1188 in 7e0a0be

PyObject *func = FT_ATOMIC_LOAD_PTR(module_state->compile_template);
if (func == NULL) {
func = PyImport_ImportModuleAttrString("re", "_compile_template");
if (func == NULL) {
return NULL;
}
#ifdef Py_GIL_DISABLED
PyObject *other_func = NULL;
if (!_Py_atomic_compare_exchange_ptr(&module_state->compile_template, &other_func, func)) {
Py_DECREF(func);
func = other_func;
}
#else
Py_XSETREF(module_state->compile_template, func);
#endif
}

@picnixz Do you think this is indeed the correct pattern, and https://github.com/python/cpython/blob/dea4083aa95/Modules/arraymodule.c#L2561-L2567 and https://github.com/python/cpython/blob/dea4083aa95/Modules/_decimal/_decimal.c#L3699 are prone?

Probably even:

https://github.com/python/cpython/blame/a0c57a8d17eb0f5c4e620d83a13a47cf4d85e76f/Python/crossinterp.c#L593

cpython/Python/crossinterp.c

Line 609 in a0c57a8

state->pickle.loads = loads; // owns the reference

cpython/Objects/genericaliasobject.c

Line 580 in a0c57a8

if (alias->parameters == NULL) {

cpython/Objects/genericaliasobject.c

Line 844 in a0c57a8

if (alias->parameters == NULL) {

I no longer think lazy is not worth the complexity. I've reverted it in 33c64f2.

cc @StanFromIreland

htjworld reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@maurycy
maurycy requested a review from StanFromIreland April 8, 2026 04:26
StanFromIreland
StanFromIreland reviewed Apr 8, 2026
View reviewed changes
Comment thread Modules/_datetimemodule.c Resolved

Uh oh!

There was an error while loading. Please reload this page.

maurycy added 2 commits April 8, 2026 11:08
@maurycy
mv the comment
056cf08
@maurycy
mea culpa!
e00aa62
@maurycy
maurycy requested a review from StanFromIreland April 12, 2026 12:24
@maurycy maurycy mentioned this pull request Apr 26, 2026
arraymodule, _decimal: possible lazy import caches reference leaks in free-threaded builds #149006
Open
@maurycy

maurycy commented May 14, 2026

Copy link
Copy Markdown
Contributor Author

@StanFromIreland A friendly ping :-)

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@StanFromIreland

StanFromIreland commented May 14, 2026

Copy link
Copy Markdown
Member

Hi @maurycy, sorry for the delay, however I'm reluctant to merge this. It would (probably) break freezegun and other such packages that depend on the monkey-patching. @pganssle what do you think?

Also CC'ing @bblommers

maurycy and bblommers reacted with heart emoji
All reactions
  • ❤️ 2 reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@maurycy

maurycy commented May 14, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor Author

Hi @maurycy, sorry for the delay, however I'm reluctant to merge this. It would (probably) break freezegun and other such packages that depend on the monkey-patching. @pganssle what do you think?

Also CC'ing @bblommers

Thank you! Great point. No rush. I've prepared a simple regression test:

import freezegun
import time_machine
import datetime
import os
import time

os.environ["TZ"] = "UTC"
time.tzset()

FROZEN = datetime.datetime(2010, 6, 15, 12, 0, 0)
DATE = datetime.date(2010, 6, 15)

with freezegun.freeze_time(FROZEN):
    assert datetime.date.today() == DATE
    assert datetime.datetime.now() == FROZEN
    assert datetime.datetime.today() == FROZEN
    assert DATE.strftime("%Y-%m-%d %A") == "2010-06-15 Tuesday"
    assert DATE.timetuple().tm_year == 2010
print("freezegun: ok")

with time_machine.travel(FROZEN, tick=False):
    assert datetime.datetime.now() == FROZEN
    assert DATE.strftime("%Y-%m-%d %A") == "2010-06-15 Tuesday"
    assert datetime.date.today() == DATE
    assert datetime.datetime.today() == FROZEN
print("time-machine: ok")

And I've got news for you 😂

2026-05-14T11:42:52.278765000+0200 maurycy@gimel /Users/maurycy/work/cpython (datetime-cache-time-module-lookups e00aa62?) % uv run --with freezegun --with time-machine --python 3.11 /tmp/czasumierzenie.py
freezegun: ok
time-machine: ok
2026-05-14T11:42:52.820308000+0200 maurycy@gimel /Users/maurycy/work/cpython (datetime-cache-time-module-lookups e00aa62?) % uv run --with freezegun --with time-machine --python 3.12 /tmp/czasumierzenie.py
freezegun: ok
time-machine: ok
2026-05-14T11:43:01.349321000+0200 maurycy@gimel /Users/maurycy/work/cpython (datetime-cache-time-module-lookups e00aa62?) % uv run --with freezegun --with time-machine --python 3.13 /tmp/czasumierzenie.py
freezegun: ok
time-machine: ok
2026-05-14T11:43:03.558151000+0200 maurycy@gimel /Users/maurycy/work/cpython (datetime-cache-time-module-lookups e00aa62?) % uv run --with freezegun --with time-machine --python 3.14 /tmp/czasumierzenie.py
freezegun: ok
time-machine: ok
2026-05-14T11:43:05.601936000+0200 maurycy@gimel /Users/maurycy/work/cpython (datetime-cache-time-module-lookups e00aa62?) % uv run --with freezegun --with time-machine --python 3.15 /tmp/czasumierzenie.py
freezegun: ok
Traceback (most recent call last):
  File "/tmp/czasumierzenie.py", line 24, in <module>
    assert datetime.date.today() == DATE
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError

Using git bisect:

2026-05-14T11:55:58.141343000+0200 maurycy@gimel /Users/maurycy/src/github.com/maurycy/cpython  (git)-[v3.15.0a6~249|bisect]?- % cat /tmp/bisekt.sh 
#!/usr/bin/env bash
set -u
cd "$(git rev-parse --show-toplevel)"
make -j"$(nproc)" >/tmp/bisect-build.log 2>&1
PY=./python.exe
[ -x "$PY" ] || exit 125
uv run --with freezegun --with time-machine --python "$PY" /tmp/czasumierzenie.py
2026-05-14T11:56:43.035141000+0200 maurycy@gimel /Users/maurycy/src/github.com/maurycy/cpython (main b6854c5?) % git bisect start main fc3e22a06c9~1 -- Modules/_datetimemodule.c
Bisecting: 3 revisions left to test after this (roughly 2 steps)
[f5685a266b252455e03ef8e6055eaf4007ec749d] gh-80620: Support negative timestamps on windows in `time.gmtime`, `time.localtime`, and `datetime` module (#143463)
2026-05-14T11:57:32.147048000+0200 maurycy@gimel /Users/maurycy/src/github.com/maurycy/cpython  (git)-[v3.15.0a6~249|bisect]?- % git bisect run /tmp/bisekt.sh                                   
running '/tmp/bisekt.sh'
freezegun: ok
Traceback (most recent call last):
  File "/tmp/czasumierzenie.py", line 24, in <module>
    assert datetime.date.today() == DATE
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError
Bisecting: 0 revisions left to test after this (roughly 1 step)
[49fb46f555881c9f2d20ca87c8187c8718217c77] gh-139774: use relaxed atomics for datetime hashes (#139775)
running '/tmp/bisekt.sh'
freezegun: ok
Traceback (most recent call last):
  File "/tmp/czasumierzenie.py", line 24, in <module>
    assert datetime.date.today() == DATE
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError
Bisecting: 0 revisions left to test after this (roughly 0 steps)
[fc3e22a06c9b7c93ee379b5554a40a275745e15f] gh-88473: Implement fast path in date.today() for date types (#130980)
running '/tmp/bisekt.sh'
freezegun: ok
Traceback (most recent call last):
  File "/tmp/czasumierzenie.py", line 24, in <module>
    assert datetime.date.today() == DATE
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError
fc3e22a06c9b7c93ee379b5554a40a275745e15f is the first bad commit
commit fc3e22a06c9b7c93ee379b5554a40a275745e15f
Author: Stan Ulbrych <[email protected]>
Date:   2025-09-16 10:28:54 +0100

    gh-88473: Implement fast path in date.today() for date types (#130980)
    
    Co-authored-by: Bénédikt Tran <[email protected]>

 .../2025-03-08-17-07-00.gh-issue-88473.qg23g8.rst  |  3 ++
 Modules/_datetimemodule.c                          | 34 +++++++++++++++-------
 2 files changed, 26 insertions(+), 11 deletions(-)
 create mode 100644 Misc/NEWS.d/next/Library/2025-03-08-17-07-00.gh-issue-88473.qg23g8.rst
bisect found first bad commit
2026-05-14T12:01:43.310131000+0200 maurycy@gimel /Users/maurycy/src/github.com/maurycy/cpython  (git)-[bisect/bad|bisect]?- % 

And it's... fc3e22a (cc @picnixz)

cc @adamchainz

ref #130980
ref adamchainz/time-machine#610
ref adamchainz/time-machine#618

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@pganssle

pganssle commented May 16, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

Hi @maurycy, sorry for the delay, however I'm reluctant to merge this. It would (probably) break freezegun and other such packages that depend on the monkey-patching. @pganssle what do you think?

FWIW I don't think we can be beholden to how these mocking libraries work. These kinds of libraries is that they are often digging around in the internal implementation details to get themselves to work, so the nature of the beast is that they need to keep up if we break stuff (though if it's basically free for us to not break something then obviously we shouldn't break it just to break it).

If doing something that is a real improvement to the code as it is used makes it impossible to write a library of this type, my intuition is that instead of avoiding breaking them forever, we should shift gears to injecting hooks into the library to give a blessed "we won't break you" abstraction to mocking libraries, but I'm guessing it won't come to that.

StanFromIreland, maurycy, adamchainz, and eendebakpt reacted with thumbs up emoji
All reactions
  • 👍 4 reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@StanFromIreland

StanFromIreland commented May 16, 2026

Copy link
Copy Markdown
Member

These kinds of libraries is that they are often digging around in the internal implementation details to get themselves to work, so the nature of the beast is that they need to keep up if we break stuff

Yes, however, they are quite prominent nowadays, so I think we should give them some consideration. Although I think they could simply switch to using pydatetime to avoid this, so it's not the end of the world.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@adamchainz

adamchainz commented May 16, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

FWIW I don't think we can be beholden to how these mocking libraries work.

💯 feel free to break time-machine, as long as it's possible to still mock something. I'll fix it up!

But also: this PR will not break it, afaict. time-machine monkey-patches C-level function pointers, which aren't moving around here :)

StanFromIreland reacted with thumbs up emoji maurycy reacted with heart emoji
All reactions
  • 👍 1 reaction
  • ❤️ 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

StanFromIreland
StanFromIreland reviewed May 16, 2026
View reviewed changes

@StanFromIreland StanFromIreland left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some last little nits.

Technically it is possible for time.strftime to be missing (if HAVE_STRFTIME is false), and now datetime would fail to import. However, we don’t currently support (and I’m not aware of) any such platforms.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread Misc/NEWS.d/next/Library/2026-04-04-14-25-43.gh-issue-148085.o97yTo.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Modules/_datetimemodule.c Resolved

Uh oh!

There was an error while loading. Please reload this page.

maurycy added 2 commits May 17, 2026 11:04
@maurycy
do not lie in the news
170a3f0
@maurycy
line below
7751fc6
@maurycy
maurycy requested a review from StanFromIreland May 17, 2026 09:06
@read-the-docs-community

read-the-docs-community Bot commented May 17, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Documentation build overview

📚 cpython-previews | 🛠️ Build #34278579 | 📁 Comparing e206500 against main (1cbe035)

  🔍 Preview build  

186 files changed · ± 182 modified · - 4 deleted

± Modified

  • glossary.html
  • index.html
  • c-api/allocation.html
  • c-api/buffer.html
  • c-api/bytes.html
  • c-api/code.html
  • c-api/concrete.html
  • c-api/descriptor.html
  • c-api/dict.html
  • c-api/exceptions.html
  • and 172 more...

- Deleted

  • c-api/sentinel.html
  • c-api/slots.html
  • deprecations/soft-deprecations.html
  • whatsnew/3.16.html
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@github-actions

github-actions Bot commented Aug 19, 2026

Copy link
Copy Markdown

This PR is stale because it has been open for 90 days with no activity.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@github-actions github-actions Bot added the stale Stale PR or inactive for long period of time. label Aug 19, 2026
StanFromIreland
StanFromIreland reviewed Aug 28, 2026
View reviewed changes

@StanFromIreland StanFromIreland left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry it took so long.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

maurycy reacted with heart emoji
All reactions
  • ❤️ 1 reaction
Comment thread Misc/NEWS.d/next/Library/2026-04-04-14-25-43.gh-issue-148085.o97yTo.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Modules/_datetimemodule.c Resolved

Uh oh!

There was an error while loading. Please reload this page.

maurycy and others added 2 commits August 28, 2026 16:17
@maurycy @StanFromIreland
Update Misc/NEWS.d/next/Library/2026-04-04-14-25-43.gh-issue-148085.o…
75f3992
…97yTo.rst

Co-authored-by: Stan Ulbrych <[email protected]>
@maurycy @StanFromIreland
Update Modules/_datetimemodule.c
bab8283
Co-authored-by: Stan Ulbrych <[email protected]>
StanFromIreland
StanFromIreland reviewed Aug 28, 2026
View reviewed changes
Comment thread Modules/_datetimemodule.c Resolved

Uh oh!

There was an error while loading. Please reload this page.

@maurycy
fix
e206500
@StanFromIreland StanFromIreland added the 🔨 test-with-refleak-buildbots Test PR w/ refleak buildbots; report in status section label Aug 28, 2026
@bedevere-bot

bedevere-bot commented Aug 28, 2026

Copy link
Copy Markdown

🤖 New build scheduled with the buildbot fleet by @StanFromIreland for commit e206500 🤖

Results will be shown at:

https://buildbot.python.org/all/#/grid?branch=refs%2Fpull%2F148088%2Fmerge

If you want to schedule another build, you need to add the 🔨 test-with-refleak-buildbots label again.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-bot bedevere-bot removed the 🔨 test-with-refleak-buildbots Test PR w/ refleak buildbots; report in status section label Aug 28, 2026
StanFromIreland
StanFromIreland approved these changes Aug 28, 2026
View reviewed changes

@StanFromIreland StanFromIreland left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

maurycy reacted with heart emoji
All reactions
  • ❤️ 1 reaction
@bedevere-app bedevere-app Bot added awaiting merge and removed awaiting review labels Aug 28, 2026
@StanFromIreland
StanFromIreland merged commit a11ab09 into python:main Aug 29, 2026
72 of 74 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app bedevere-app Bot removed the awaiting merge label Aug 29, 2026
@maurycy
maurycy deleted the datetime-cache-time-module-lookups branch August 30, 2026 20:29
clin1234 pushed a commit to clin1234/cpython that referenced this pull request Sep 12, 2026
@maurycy @StanFromIreland @clin1234
pythongh-148085: datetime cache time module lookups (python#148088)
f6fe855
Co-authored-by: Stan Ulbrych <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@StanFromIreland StanFromIreland StanFromIreland approved these changes
@pganssle pganssle Awaiting requested review from pganssle pganssle is a code owner

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

stale Stale PR or inactive for long period of time.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

7 participants

@maurycy @picnixz @htjworld @StanFromIreland @pganssle @adamchainz @bedevere-bot
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.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.