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-129483: Make `TestLocalTimeDisambiguation`'s time format locale independent by gkirchou · Pull Request #142193 · python/cpython

Conversation

@gkirchou

@gkirchou gkirchou commented Dec 2, 2025 •
edited by bedevere-app Bot
Loading

Uh oh!

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

Copy link
Copy Markdown
Contributor

Test with:

./configure --enable-optimizations --with-lto
make -s -j $(nproc);
  • Issue: Python 3.13.1 test_datetime failures #129483

Sorry, something went wrong.

Uh oh!

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

All reactions
@note35
Force TestLocalTimeDisambiguation to run on LC_ALL=C
31a11cd
@gkirchou
gkirchou requested review from abalkin and pganssle as code owners December 2, 2025 15:23
@bedevere-app

This comment was marked as resolved.

Sign in to view
@bedevere-app bedevere-app Bot mentioned this pull request Dec 2, 2025
Python 3.13.1 test_datetime failures #129483
Closed
@bedevere-app bedevere-app Bot added the awaiting review label Dec 2, 2025
StanFromIreland
StanFromIreland reviewed Dec 2, 2025
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.

IMO making the tests locale independent would be a better solution than this (i.e. just replace %c with our desired order).

Sorry, something went wrong.

Uh oh!

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

All reactions
@note35
Change to update %c to the exact time format.
b596d08
@bedevere-app

This comment was marked as resolved.

Sign in to view
@gkirchou gkirchou changed the title gh-129483: Force TestLocalTimeDisambiguation to run on LC_ALL=C gh-129483: Clarify TestLocalTimeDisambiguation's time format Dec 3, 2025
@gkirchou

gkirchou commented Dec 3, 2025

Copy link
Copy Markdown
Contributor Author

IMO making the tests locale independent would be a better solution than this (i.e. just replace %c with our desired order).

Addressed

All reactions

Sorry, something went wrong.

Uh oh!

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

@gkirchou
gkirchou requested a review from StanFromIreland December 3, 2025 01:19
@StanFromIreland StanFromIreland added the skip news label Dec 3, 2025
@StanFromIreland StanFromIreland changed the title gh-129483: Clarify TestLocalTimeDisambiguation's time format gh-129483: Make TestLocalTimeDisambiguation's time format locale independent Dec 3, 2025
StanFromIreland
StanFromIreland approved these changes Dec 3, 2025
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, thanks!

Sorry, something went wrong.

Uh oh!

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

All reactions
@bedevere-app bedevere-app Bot added awaiting core review and removed awaiting review labels Dec 3, 2025
@gkirchou
Merge branch 'main' into pythongh-129483
7636bf5
@python-cla-bot

python-cla-bot Bot commented Dec 3, 2025 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown

All commit authors signed the Contributor License Agreement.

CLA signed

All reactions

Sorry, something went wrong.

Uh oh!

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

vstinner
vstinner approved these changes Dec 3, 2025
View reviewed changes

@vstinner vstinner 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.

All reactions
@bedevere-app bedevere-app Bot added awaiting merge and removed awaiting core review labels Dec 3, 2025
@gkirchou
Merge branch 'main' into pythongh-129483
5d1a2eb
@pganssle
pganssle merged commit 8392095 into python:main Dec 4, 2025
44 checks passed

Uh oh!

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

@bedevere-app bedevere-app Bot removed the awaiting merge label Dec 4, 2025
@pganssle

pganssle commented Dec 4, 2025

Copy link
Copy Markdown
Member

This is failing in 3.13, right? So we should backport it? Anyone know how far back it is causing issues?

All reactions

Sorry, something went wrong.

Uh oh!

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

@vstinner vstinner added the needs backport to 3.14 bugs and security fixes label Dec 4, 2025
@miss-islington-app

miss-islington-app Bot commented Dec 4, 2025

Copy link
Copy Markdown

Thanks @gkirchou for the PR, and @pganssle for merging it 🌮🎉.. I'm working now to backport this PR to: 3.14.
🐍🍒⛏🤖

All reactions

Sorry, something went wrong.

Uh oh!

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

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Dec 4, 2025
@gkirchou @note35 @miss-islington
pythongh-129483: Make TestLocalTimeDisambiguation's time format loc…
ad17608
…ale independent (pythonGH-142193)

* Change to update %c to the exact time format.

---------
(cherry picked from commit 8392095)

Co-authored-by: Kir Chou <[email protected]>
Co-authored-by: Kir Chou <[email protected]>
@bedevere-app

bedevere-app Bot commented Dec 4, 2025

Copy link
Copy Markdown

GH-142258 is a backport of this pull request to the 3.14 branch.

All reactions

Sorry, something went wrong.

Uh oh!

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

@bedevere-app bedevere-app Bot removed the needs backport to 3.14 bugs and security fixes label Dec 4, 2025
@vstinner vstinner added the needs backport to 3.13 only security fixes label Dec 4, 2025
@miss-islington-app

miss-islington-app Bot commented Dec 4, 2025

Copy link
Copy Markdown

Thanks @gkirchou for the PR, and @pganssle for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13.
🐍🍒⛏🤖

All reactions

Sorry, something went wrong.

Uh oh!

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

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Dec 4, 2025
@gkirchou @note35 @miss-islington
pythongh-129483: Make TestLocalTimeDisambiguation's time format loc…
055a806
…ale independent (pythonGH-142193)

* Change to update %c to the exact time format.

---------
(cherry picked from commit 8392095)

Co-authored-by: Kir Chou <[email protected]>
Co-authored-by: Kir Chou <[email protected]>
@bedevere-app

bedevere-app Bot commented Dec 4, 2025

Copy link
Copy Markdown

GH-142259 is a backport of this pull request to the 3.13 branch.

All reactions

Sorry, something went wrong.

Uh oh!

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

@bedevere-app bedevere-app Bot removed the needs backport to 3.13 only security fixes label Dec 4, 2025
@vstinner

vstinner commented Dec 4, 2025

Copy link
Copy Markdown
Member

This is failing in 3.13, right? So we should backport it? Anyone know how far back it is causing issues?

Right, the issue was reported on Python 3.13.1. We should backport the change to 3.13 and 3.14 branches. Other branches no longer accept bugfixes.

All reactions

Sorry, something went wrong.

Uh oh!

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

vstinner pushed a commit that referenced this pull request Dec 4, 2025
@miss-islington @gkirchou @note35
[3.13] gh-129483: Make TestLocalTimeDisambiguation's time format lo…
e68066e
…cale independent (GH-142193) (#142259)

gh-129483: Make `TestLocalTimeDisambiguation`'s time format locale independent (GH-142193)

* Change to update %c to the exact time format.

---------
(cherry picked from commit 8392095)

Co-authored-by: Kir Chou <[email protected]>
Co-authored-by: Kir Chou <[email protected]>
vstinner pushed a commit that referenced this pull request Dec 4, 2025
@miss-islington @gkirchou @note35
[3.14] gh-129483: Make TestLocalTimeDisambiguation's time format lo…
88e1f69
…cale independent (GH-142193) (#142258)

gh-129483: Make `TestLocalTimeDisambiguation`'s time format locale independent (GH-142193)

* Change to update %c to the exact time format.

---------
(cherry picked from commit 8392095)

Co-authored-by: Kir Chou <[email protected]>
Co-authored-by: Kir Chou <[email protected]>
@bedevere-bot

bedevere-bot commented Dec 4, 2025

Copy link
Copy Markdown

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot s390x Fedora Stable LTO + PGO 3.13 (tier-3) has failed when building commit e68066e.

What do you need to do:

  1. Don't panic.
  2. Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/#/builders/1633/builds/552) and take a look at the build logs.
  4. Check if the failure is related to this commit (e68066e) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/#/builders/1633/builds/552

Summary of the results of the build (if available):

Click to see traceback logs
remote: Enumerating objects: 5, done.        
remote: Counting objects:  20% (1/5)        
remote: Counting objects:  40% (2/5)        
remote: Counting objects:  60% (3/5)        
remote: Counting objects:  80% (4/5)        
remote: Counting objects: 100% (5/5)        
remote: Counting objects: 100% (5/5), done.        
remote: Total 5 (delta 4), reused 4 (delta 4), pack-reused 0 (from 0)        
From https://github.com/python/cpython
 * branch                    3.13       -> FETCH_HEAD
Note: switching to 'e68066eb0957f5cad8e8959ea8f3f681bfda0994'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

  git switch -c <new-branch-name>

Or undo this operation with:

  git switch -

Turn off this advice by setting config variable advice.detachedHead to false

HEAD is now at e68066eb095 [3.13] gh-129483: Make `TestLocalTimeDisambiguation`'s time format locale independent (GH-142193) (#142259)
Switched to and reset branch '3.13'

find: ‘build’: No such file or directory
find: ‘build’: No such file or directory
find: ‘build’: No such file or directory
find: ‘build’: No such file or directory
make[2]: [Makefile:3127: clean-retain-profile] Error 1 (ignored)
In function ‘hashtable_key_from_2_strings’,
    inlined from ‘_extensions_cache_find_unlocked’ at Python/import.c:1264:17:
Python/import.c:1177:5: warning: ‘strncpy’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation]
 1177 |     strncpy(key, str1_data, str1_len);
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Python/import.c:1163:27: note: length computed here
 1163 |     Py_ssize_t str1_len = strlen(str1_data);
      |                           ^~~~~~~~~~~~~~~~~
test_denial_of_service_prevented_int_to_str (test.test_int.IntStrDigitLimitsTests.test_denial_of_service_prevented_int_to_str)
Regression test: ensure we fail before performing O(N**2) work. ... ok
test_denial_of_service_prevented_str_to_int (test.test_int.IntStrDigitLimitsTests.test_denial_of_service_prevented_str_to_int)
Regression test: ensure we fail before performing O(N**2) work. ... ok
test_disabled_limit (test.test_int.IntStrDigitLimitsTests.test_disabled_limit) ... ok
test_int_from_other_bases (test.test_int.IntStrDigitLimitsTests.test_int_from_other_bases) ... ok
test_int_max_str_digits_is_per_interpreter (test.test_int.IntStrDigitLimitsTests.test_int_max_str_digits_is_per_interpreter) ... ok
test_max_str_digits (test.test_int.IntStrDigitLimitsTests.test_max_str_digits) ... ok
test_max_str_digits_edge_cases (test.test_int.IntStrDigitLimitsTests.test_max_str_digits_edge_cases)
Ignore the +/- sign and space padding. ... ok
test_power_of_two_bases_unlimited (test.test_int.IntStrDigitLimitsTests.test_power_of_two_bases_unlimited)
The limit does not apply to power of 2 bases. ... ok
test_sign_not_counted (test.test_int.IntStrDigitLimitsTests.test_sign_not_counted) ... ok
test_underscores_ignored (test.test_int.IntStrDigitLimitsTests.test_underscores_ignored) ... ok
test_denial_of_service_prevented_int_to_str (test.test_int.IntSubclassStrDigitLimitsTests.test_denial_of_service_prevented_int_to_str)
Regression test: ensure we fail before performing O(N**2) work. ... ok
test_denial_of_service_prevented_str_to_int (test.test_int.IntSubclassStrDigitLimitsTests.test_denial_of_service_prevented_str_to_int)
Regression test: ensure we fail before performing O(N**2) work. ... FAIL
test_disabled_limit (test.test_int.IntSubclassStrDigitLimitsTests.test_disabled_limit) ... ok
test_int_from_other_bases (test.test_int.IntSubclassStrDigitLimitsTests.test_int_from_other_bases) ... ok
test_int_max_str_digits_is_per_interpreter (test.test_int.IntSubclassStrDigitLimitsTests.test_int_max_str_digits_is_per_interpreter) ... ok
test_max_str_digits (test.test_int.IntSubclassStrDigitLimitsTests.test_max_str_digits) ... ok
test_max_str_digits_edge_cases (test.test_int.IntSubclassStrDigitLimitsTests.test_max_str_digits_edge_cases)
Ignore the +/- sign and space padding. ... ok
test_power_of_two_bases_unlimited (test.test_int.IntSubclassStrDigitLimitsTests.test_power_of_two_bases_unlimited)
The limit does not apply to power of 2 bases. ... ok
test_sign_not_counted (test.test_int.IntSubclassStrDigitLimitsTests.test_sign_not_counted) ... ok
test_underscores_ignored (test.test_int.IntSubclassStrDigitLimitsTests.test_underscores_ignored) ... ok
test_basic (test.test_int.IntTestCases.test_basic) ... ok
test_error_message (test.test_int.IntTestCases.test_error_message) ... ok
test_int_base_bad_types (test.test_int.IntTestCases.test_int_base_bad_types)
Not integer types are not valid bases; issue16772. ... ok
test_int_base_indexable (test.test_int.IntTestCases.test_int_base_indexable) ... ok
test_int_base_limits (test.test_int.IntTestCases.test_int_base_limits)
Testing the supported limits of the int() base parameter. ... ok
test_int_memoryview (test.test_int.IntTestCases.test_int_memoryview) ... ok
test_int_returns_int_subclass (test.test_int.IntTestCases.test_int_returns_int_subclass) ... ok
test_int_subclass_with_index (test.test_int.IntTestCases.test_int_subclass_with_index) ... ok
test_int_subclass_with_int (test.test_int.IntTestCases.test_int_subclass_with_int) ... ok
test_intconversion (test.test_int.IntTestCases.test_intconversion) ... ok
test_invalid_signs (test.test_int.IntTestCases.test_invalid_signs) ... ok
test_issue31619 (test.test_int.IntTestCases.test_issue31619) ... ok
test_keyword_args (test.test_int.IntTestCases.test_keyword_args) ... ok
test_no_args (test.test_int.IntTestCases.test_no_args) ... ok
test_non_numeric_input_types (test.test_int.IntTestCases.test_non_numeric_input_types) ... ok
test_small_ints (test.test_int.IntTestCases.test_small_ints) ... ok
test_string_float (test.test_int.IntTestCases.test_string_float) ... ok
test_underscores (test.test_int.IntTestCases.test_underscores) ... ok
test_unicode (test.test_int.IntTestCases.test_unicode) ... ok
test_pylong_int_divmod (test.test_int.PyLongModuleTests.test_pylong_int_divmod) ... ok
test_pylong_int_to_decimal (test.test_int.PyLongModuleTests.test_pylong_int_to_decimal) ... ok
test_pylong_int_to_decimal_2 (test.test_int.PyLongModuleTests.test_pylong_int_to_decimal_2) ... skipped "resource 'cpu' is not enabled"
test_pylong_misbehavior_error_path_from_str (test.test_int.PyLongModuleTests.test_pylong_misbehavior_error_path_from_str) ... ok
test_pylong_misbehavior_error_path_to_str (test.test_int.PyLongModuleTests.test_pylong_misbehavior_error_path_to_str) ... ok
test_pylong_roundtrip (test.test_int.PyLongModuleTests.test_pylong_roundtrip) ... ok
test_pylong_str_to_int (test.test_int.PyLongModuleTests.test_pylong_str_to_int) ... ok

======================================================================
FAIL: test_denial_of_service_prevented_str_to_int (test.test_int.IntSubclassStrDigitLimitsTests.test_denial_of_service_prevented_str_to_int)
Regression test: ensure we fail before performing O(N**2) work.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.13.cstratak-fedora-stable-s390x.lto-pgo/build/Lib/test/test_int.py", line 740, in test_denial_of_service_prevented_str_to_int
    self.assertLessEqual(sw_fail_extra_huge.seconds, sw_convert.seconds/2)
    ~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: 0.09443029399999858 not less than or equal to 0.022935383500000128

----------------------------------------------------------------------
Ran 46 tests in 1.140s

FAILED (failures=1, skipped=1)
test test_int failed
make: *** [Makefile:906: profile-run-stamp] Error 2
All reactions

Sorry, something went wrong.

Uh oh!

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

StanFromIreland pushed a commit to StanFromIreland/cpython that referenced this pull request Dec 6, 2025
@gkirchou @note35 @StanFromIreland
pythongh-129483: Make TestLocalTimeDisambiguation's time format loc…
09f2c90
…ale independent (python#142193)

* Change to update %c to the exact time format.

---------

Co-authored-by: Kir Chou <[email protected]>
@gkirchou
gkirchou deleted the gh-129483 branch December 8, 2025 04:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

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

Uh oh!

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

Assignees

No one assigned

Labels

skip news

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.

6 participants

@gkirchou @pganssle @vstinner @bedevere-bot @StanFromIreland @note35
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.