gh-117398: Add multiphase support to _datetime#119373
Conversation
|
@ericsnowcurrently: this works nice for a single test run, but obviously fails if we're running ref-leak tests (the reload reinitializes the singletons in the global state). |
Sorry, something went wrong.
|
One way to fix reloading is to use an initialization guard. |
Sorry, something went wrong.
|
thank you for doing this! |
Sorry, something went wrong.
ericsnowcurrently
left a comment
There was a problem hiding this comment.
LGTM
Sorry, something went wrong.
|
@ericsnowcurrently @erlend-aasland Are we sure this won't segfault in the case I described in #117398 (comment) ? (acquire a capsule reference, reload the module, use the capsule with the reloaded module) The addition of the |
Sorry, something went wrong.
|
This is an incomplete first step of a series of multiple PRs. Eric and I propose to handle the encapsulated C API last. The scenario you describe will probably segfault for now. |
Sorry, something went wrong.
|
FTR, the test guard was added because running with |
Sorry, something went wrong.
|
Actually, the scenario you are describing is what happens when you do a ref-leak run of the C API test: the |
Sorry, something went wrong.
This comment was marked as outdated.
This comment was marked as outdated.
This is minimal support. Subinterpreters are not supported yet. That will be addressed in a later change. (cherry picked from commit 3e8b609) Co-authored-by: Erlend E. Aasland <erlend@python.org> Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️Hi! The buildbot AMD64 FreeBSD 3.13 has failed when building commit d58ebf0. What do you need to do:
You can take a look at the buildbot page here: https://buildbot.python.org/all/#builders/1491/builds/93 Failed tests:
Failed subtests:
Summary of the results of the build (if available): == Click to see traceback logsTraceback (most recent call last):
File "/buildbot/buildarea/3.13.ware-freebsd/build/Lib/threading.py", line 1039, in _bootstrap_inner
self.run()
~~~~~~~~^^
File "/buildbot/buildarea/3.13.ware-freebsd/build/Lib/concurrent/futures/process.py", line 354, in run
p = self.processes.pop(result_item.exit_pid)
KeyError: 26371
Traceback (most recent call last):
File "/buildbot/buildarea/3.13.ware-freebsd/build/Lib/multiprocessing/forkserver.py", line 277, in main
code = _serve_one(child_r, fds,
unused_fds,
old_handlers)
File "/buildbot/buildarea/3.13.ware-freebsd/build/Lib/multiprocessing/forkserver.py", line 317, in _serve_one
code = spawn._main(child_r, parent_sentinel)
File "/buildbot/buildarea/3.13.ware-freebsd/build/Lib/multiprocessing/spawn.py", line 132, in _main
self = reduction.pickle.load(from_parent)
File "/buildbot/buildarea/3.13.ware-freebsd/build/Lib/multiprocessing/synchronize.py", line 115, in __setstate__
self._semlock = _multiprocessing.SemLock._rebuild(*state)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory
Timeout (0:20:00)!
Thread 0x000000083361b300 (most recent call first):
File "/buildbot/buildarea/3.13.ware-freebsd/build/Lib/threading.py", line 359 in wait
File "/buildbot/buildarea/3.13.ware-freebsd/build/Lib/multiprocessing/queues.py", line 249 in _feed
File "/buildbot/buildarea/3.13.ware-freebsd/build/Lib/threading.py", line 990 in run
File "/buildbot/buildarea/3.13.ware-freebsd/build/Lib/threading.py", line 1039 in _bootstrap_inner
File "/buildbot/buildarea/3.13.ware-freebsd/build/Lib/threading.py", line 1010 in _bootstrap
Traceback (most recent call last):
File "/buildbot/buildarea/3.13.ware-freebsd/build/Lib/test/datetimetester.py", line 98, in test_utc_alias
self.assertIs(UTC, timezone.utc)
~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
AssertionError: datetime.timezone(datetime.timedelta(0)) is not datetime.timezone.utc
|
Sorry, something went wrong.
⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️Hi! The buildbot x86-64 MacOS Intel NoGIL 3.13 has failed when building commit d58ebf0. What do you need to do:
You can take a look at the buildbot page here: https://buildbot.python.org/all/#builders/1449/builds/81 Failed tests:
Failed subtests:
Summary of the results of the build (if available): == Click to see traceback logsTraceback (most recent call last):
File "/Users/ec2-user/buildbot/buildarea/3.13.itamaro-macos-intel-aws.nogil/build/Lib/test/datetimetester.py", line 98, in test_utc_alias
self.assertIs(UTC, timezone.utc)
~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
AssertionError: datetime.timezone(datetime.timedelta(0)) is not datetime.timezone.utc
|
Sorry, something went wrong.
⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️Hi! The buildbot AMD64 Debian root 3.13 has failed when building commit d58ebf0. What do you need to do:
You can take a look at the buildbot page here: https://buildbot.python.org/all/#builders/1441/builds/82 Failed tests:
Failed subtests:
Summary of the results of the build (if available): == Click to see traceback logsTraceback (most recent call last):
File "/root/buildarea/3.13.angelico-debian-amd64/build/Lib/test/datetimetester.py", line 98, in test_utc_alias
self.assertIs(UTC, timezone.utc)
~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
AssertionError: datetime.timezone(datetime.timedelta(0)) is not datetime.timezone.utc
|
Sorry, something went wrong.
⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️Hi! The buildbot wasm32-wasi 3.13 has failed when building commit d58ebf0. What do you need to do:
You can take a look at the buildbot page here: https://buildbot.python.org/all/#builders/1502/builds/83 Failed tests:
Failed subtests:
Summary of the results of the build (if available): == Click to see traceback logsTraceback (most recent call last):
File "/Lib/test/datetimetester.py", line 98, in test_utc_alias
self.assertIs(UTC, timezone.utc)
~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
AssertionError: datetime.timezone(datetime.timedelta(0)) is not datetime.timezone.utc
|
Sorry, something went wrong.
⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️Hi! The buildbot AMD64 Windows10 3.13 has failed when building commit d58ebf0. What do you need to do:
You can take a look at the buildbot page here: https://buildbot.python.org/all/#builders/1501/builds/78 Failed tests:
Failed subtests:
Summary of the results of the build (if available): == Click to see traceback logsTraceback (most recent call last):
File "D:\buildarea\3.13.bolen-windows10\build\Lib\test\datetimetester.py", line 98, in test_utc_alias
self.assertIs(UTC, timezone.utc)
~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
AssertionError: datetime.timezone(datetime.timedelta(0)) is not datetime.timezone.utc
|
Sorry, something went wrong.
⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️Hi! The buildbot AMD64 RHEL7 LTO 3.13 has failed when building commit d58ebf0. What do you need to do:
You can take a look at the buildbot page here: https://buildbot.python.org/all/#builders/1505/builds/71 Failed tests:
Failed subtests:
Summary of the results of the build (if available): == Click to see traceback logsTraceback (most recent call last):
File "/home/buildbot/buildarea/3.13.cstratak-RHEL7-x86_64.lto/build/Lib/test/datetimetester.py", line 98, in test_utc_alias
self.assertIs(UTC, timezone.utc)
~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
AssertionError: datetime.timezone(datetime.timedelta(0)) is not datetime.timezone.utc
|
Sorry, something went wrong.
⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️Hi! The buildbot s390x RHEL7 LTO 3.13 has failed when building commit d58ebf0. What do you need to do:
You can take a look at the buildbot page here: https://buildbot.python.org/all/#builders/1390/builds/68 Failed tests:
Failed subtests:
Summary of the results of the build (if available): == Click to see traceback logsTraceback (most recent call last):
File "/home/dje/cpython-buildarea/3.13.edelsohn-rhel-z.lto/build/Lib/test/datetimetester.py", line 98, in test_utc_alias
self.assertIs(UTC, timezone.utc)
~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
AssertionError: datetime.timezone(datetime.timedelta(0)) is not datetime.timezone.utc
|
Sorry, something went wrong.
⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️Hi! The buildbot s390x RHEL8 LTO 3.13 has failed when building commit d58ebf0. What do you need to do:
You can take a look at the buildbot page here: https://buildbot.python.org/all/#builders/1458/builds/67 Failed tests:
Failed subtests:
Summary of the results of the build (if available): == Click to see traceback logsTraceback (most recent call last):
File "/home/dje/cpython-buildarea/3.13.edelsohn-rhel8-z.lto/build/Lib/test/datetimetester.py", line 98, in test_utc_alias
self.assertIs(UTC, timezone.utc)
~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
AssertionError: datetime.timezone(datetime.timedelta(0)) is not datetime.timezone.utc
|
Sorry, something went wrong.
⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️Hi! The buildbot AMD64 RHEL8 LTO + PGO 3.13 has failed when building commit d58ebf0. What do you need to do:
You can take a look at the buildbot page here: https://buildbot.python.org/all/#builders/1503/builds/63 Failed tests:
Failed subtests:
Summary of the results of the build (if available): == Click to see traceback logsTraceback (most recent call last):
File "/home/buildbot/buildarea/3.13.cstratak-RHEL8-x86_64.lto-pgo/build/Lib/test/datetimetester.py", line 98, in test_utc_alias
self.assertIs(UTC, timezone.utc)
~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
AssertionError: datetime.timezone(datetime.timedelta(0)) is not datetime.timezone.utc
|
Sorry, something went wrong.
⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️Hi! The buildbot AMD64 RHEL8 FIPS Only Blake2 Builtin Hash 3.13 has failed when building commit d58ebf0. What do you need to do:
You can take a look at the buildbot page here: https://buildbot.python.org/all/#builders/1455/builds/77 Failed tests:
Failed subtests:
Summary of the results of the build (if available): == Click to see traceback logsTraceback (most recent call last):
File "/home/buildbot/buildarea/3.13.cstratak-RHEL8-fips-x86_64.no-builtin-hashes-except-blake2/build/Lib/test/datetimetester.py", line 98, in test_utc_alias
self.assertIs(UTC, timezone.utc)
~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
AssertionError: datetime.timezone(datetime.timedelta(0)) is not datetime.timezone.utc
|
Sorry, something went wrong.
⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️Hi! The buildbot AMD64 RHEL8 LTO 3.13 has failed when building commit d58ebf0. What do you need to do:
You can take a look at the buildbot page here: https://buildbot.python.org/all/#builders/1383/builds/64 Failed tests:
Failed subtests:
Summary of the results of the build (if available): == Click to see traceback logsTraceback (most recent call last):
File "/home/buildbot/buildarea/3.13.cstratak-RHEL8-x86_64.lto/build/Lib/test/datetimetester.py", line 98, in test_utc_alias
self.assertIs(UTC, timezone.utc)
~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
AssertionError: datetime.timezone(datetime.timedelta(0)) is not datetime.timezone.utc
|
Sorry, something went wrong.
⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️Hi! The buildbot AMD64 Ubuntu Shared 3.13 has failed when building commit d58ebf0. What do you need to do:
You can take a look at the buildbot page here: https://buildbot.python.org/all/#builders/1450/builds/73 Failed tests:
Failed subtests:
Summary of the results of the build (if available): == Click to see traceback logsTraceback (most recent call last):
File "/srv/buildbot/buildarea/3.13.bolen-ubuntu/build/Lib/test/datetimetester.py", line 98, in test_utc_alias
self.assertIs(UTC, timezone.utc)
~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
AssertionError: datetime.timezone(datetime.timedelta(0)) is not datetime.timezone.utc
|
Sorry, something went wrong.
⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️Hi! The buildbot AMD64 Fedora Stable 3.13 has failed when building commit d58ebf0. What do you need to do:
You can take a look at the buildbot page here: https://buildbot.python.org/all/#builders/1498/builds/53 Failed tests:
Failed subtests:
Summary of the results of the build (if available): == Click to see traceback logsTraceback (most recent call last):
File "/home/buildbot/buildarea/3.13.cstratak-fedora-stable-x86_64/build/Lib/test/datetimetester.py", line 98, in test_utc_alias
self.assertIs(UTC, timezone.utc)
~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
AssertionError: datetime.timezone(datetime.timedelta(0)) is not datetime.timezone.utc
|
Sorry, something went wrong.
⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️Hi! The buildbot ARM64 MacOS M1 NoGIL 3.13 has failed when building commit d58ebf0. What do you need to do:
You can take a look at the buildbot page here: https://buildbot.python.org/all/#builders/1408/builds/66 Failed tests:
Failed subtests:
Summary of the results of the build (if available): == Click to see traceback logsTraceback (most recent call last):
File "/Users/ec2-user/buildbot/buildarea/3.13.itamaro-macos-arm64-aws.macos-with-brew.nogil/build/Lib/test/datetimetester.py", line 98, in test_utc_alias
self.assertIs(UTC, timezone.utc)
~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
AssertionError: datetime.timezone(datetime.timedelta(0)) is not datetime.timezone.utc
|
Sorry, something went wrong.
⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️Hi! The buildbot aarch64 RHEL8 LTO + PGO 3.13 has failed when building commit d58ebf0. What do you need to do:
You can take a look at the buildbot page here: https://buildbot.python.org/all/#builders/1451/builds/60 Failed tests:
Failed subtests:
Summary of the results of the build (if available): == Click to see traceback logsTraceback (most recent call last):
File "/home/buildbot/buildarea/3.13.cstratak-RHEL8-aarch64.lto-pgo/build/Lib/test/datetimetester.py", line 98, in test_utc_alias
self.assertIs(UTC, timezone.utc)
~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
AssertionError: datetime.timezone(datetime.timedelta(0)) is not datetime.timezone.utc
|
Sorry, something went wrong.
⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️Hi! The buildbot aarch64 RHEL8 LTO 3.13 has failed when building commit d58ebf0. What do you need to do:
You can take a look at the buildbot page here: https://buildbot.python.org/all/#builders/1393/builds/60 Failed tests:
Failed subtests:
Summary of the results of the build (if available): == Click to see traceback logsTraceback (most recent call last):
File "/home/buildbot/buildarea/3.13.cstratak-RHEL8-aarch64.lto/build/Lib/test/datetimetester.py", line 98, in test_utc_alias
self.assertIs(UTC, timezone.utc)
~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
AssertionError: datetime.timezone(datetime.timedelta(0)) is not datetime.timezone.utc
|
Sorry, something went wrong.
⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️Hi! The buildbot AMD64 Fedora Stable Clang 3.13 has failed when building commit d58ebf0. What do you need to do:
You can take a look at the buildbot page here: https://buildbot.python.org/all/#builders/1479/builds/53 Failed tests:
Failed subtests:
Summary of the results of the build (if available): == Click to see traceback logsTraceback (most recent call last):
File "/home/buildbot/buildarea/3.13.cstratak-fedora-stable-x86_64.clang/build/Lib/test/datetimetester.py", line 98, in test_utc_alias
self.assertIs(UTC, timezone.utc)
~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
AssertionError: datetime.timezone(datetime.timedelta(0)) is not datetime.timezone.utc
|
Sorry, something went wrong.
⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️Hi! The buildbot aarch64 Fedora Stable 3.13 has failed when building commit d58ebf0. What do you need to do:
You can take a look at the buildbot page here: https://buildbot.python.org/all/#builders/1506/builds/64 Failed tests:
Failed subtests:
Summary of the results of the build (if available): == Click to see traceback logsTraceback (most recent call last):
File "/home/buildbot/buildarea/3.13.cstratak-fedora-stable-aarch64/build/Lib/test/datetimetester.py", line 98, in test_utc_alias
self.assertIs(UTC, timezone.utc)
~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
AssertionError: datetime.timezone(datetime.timedelta(0)) is not datetime.timezone.utc
|
Sorry, something went wrong.
⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️Hi! The buildbot aarch64 Fedora Stable Clang 3.13 has failed when building commit d58ebf0. What do you need to do:
You can take a look at the buildbot page here: https://buildbot.python.org/all/#builders/1456/builds/65 Failed tests:
Failed subtests:
Summary of the results of the build (if available): == Click to see traceback logsTraceback (most recent call last):
File "/home/buildbot/buildarea/3.13.cstratak-fedora-stable-aarch64.clang/build/Lib/test/datetimetester.py", line 98, in test_utc_alias
self.assertIs(UTC, timezone.utc)
~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
AssertionError: datetime.timezone(datetime.timedelta(0)) is not datetime.timezone.utc
|
Sorry, something went wrong.
⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️Hi! The buildbot s390x Fedora Clang 3.13 has failed when building commit d58ebf0. What do you need to do:
You can take a look at the buildbot page here: https://buildbot.python.org/all/#builders/1476/builds/54 Failed tests:
Failed subtests:
Summary of the results of the build (if available): == Click to see traceback logsTraceback (most recent call last):
File "/home/dje/cpython-buildarea/3.13.edelsohn-fedora-z.clang/build/Lib/test/datetimetester.py", line 98, in test_utc_alias
self.assertIs(UTC, timezone.utc)
~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
AssertionError: datetime.timezone(datetime.timedelta(0)) is not datetime.timezone.utc
|
Sorry, something went wrong.
…ythongh-119373) (pythongh-119636)" This reverts commit d58ebf0.
⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️Hi! The buildbot AMD64 Fedora Stable LTO + PGO 3.13 has failed when building commit d58ebf0. What do you need to do:
You can take a look at the buildbot page here: https://buildbot.python.org/all/#builders/1426/builds/55 Failed tests:
Failed subtests:
Summary of the results of the build (if available): == Click to see traceback logsTraceback (most recent call last):
File "/home/buildbot/buildarea/3.13.cstratak-fedora-stable-x86_64.lto-pgo/build/Lib/test/datetimetester.py", line 98, in test_utc_alias
self.assertIs(UTC, timezone.utc)
~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
AssertionError: datetime.timezone(datetime.timedelta(0)) is not datetime.timezone.utc
|
Sorry, something went wrong.
⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️Hi! The buildbot AMD64 Fedora Stable LTO 3.13 has failed when building commit d58ebf0. What do you need to do:
You can take a look at the buildbot page here: https://buildbot.python.org/all/#builders/1490/builds/51 Failed tests:
Failed subtests:
Summary of the results of the build (if available): == Click to see traceback logsTraceback (most recent call last):
File "/home/buildbot/buildarea/3.13.cstratak-fedora-stable-x86_64.lto/build/Lib/test/datetimetester.py", line 98, in test_utc_alias
self.assertIs(UTC, timezone.utc)
~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
AssertionError: datetime.timezone(datetime.timedelta(0)) is not datetime.timezone.utc
|
Sorry, something went wrong.
⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️Hi! The buildbot s390x Fedora LTO + PGO 3.13 has failed when building commit d58ebf0. What do you need to do:
You can take a look at the buildbot page here: https://buildbot.python.org/all/#builders/1511/builds/54 Failed tests:
Failed subtests:
Summary of the results of the build (if available): == Click to see traceback logsTraceback (most recent call last):
File "/home/dje/cpython-buildarea/3.13.edelsohn-fedora-z.lto-pgo/build/Lib/test/datetimetester.py", line 98, in test_utc_alias
self.assertIs(UTC, timezone.utc)
~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
AssertionError: datetime.timezone(datetime.timedelta(0)) is not datetime.timezone.utc
|
Sorry, something went wrong.
⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️Hi! The buildbot aarch64 Fedora Stable LTO + PGO 3.13 has failed when building commit d58ebf0. What do you need to do:
You can take a look at the buildbot page here: https://buildbot.python.org/all/#builders/1433/builds/65 Failed tests:
Failed subtests:
Summary of the results of the build (if available): == Click to see traceback logsTraceback (most recent call last):
File "/home/buildbot/buildarea/3.13.cstratak-fedora-stable-aarch64.lto-pgo/build/Lib/test/datetimetester.py", line 98, in test_utc_alias
self.assertIs(UTC, timezone.utc)
~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
AssertionError: datetime.timezone(datetime.timedelta(0)) is not datetime.timezone.utc
|
Sorry, something went wrong.
edited by bedevere-app
Bot
LoadingUh oh!
There was an error while loading. Please reload this page.
Copy link Copy MarkdownSorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.