Title: test_date_locale2 fails on AIX · Issue #139624 · python/cpython · GitHub
Open Graph Title: test_date_locale2 fails on AIX · Issue #139624 · python/cpython
X Title: test_date_locale2 fails on AIX · Issue #139624 · python/cpython
Description: Bug report Bug description: AIX's strptime implementation exhibits different behavior for 2-digit year interpretation compared to other platforms. The expected behavior should interpret 2-digit years 00-68 as 2000-2068 and 69-99 as 1969-...
Open Graph Description: Bug report Bug description: AIX's strptime implementation exhibits different behavior for 2-digit year interpretation compared to other platforms. The expected behavior should interpret 2-digit yea...
X Description: Bug report Bug description: AIX's strptime implementation exhibits different behavior for 2-digit year interpretation compared to other platforms. The expected behavior should interpret 2-digit...
Opengraph URL: https://github.com/python/cpython/issues/139624
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"test_date_locale2 fails on AIX","articleBody":"# Bug report\n\n### Bug description:\n\nAIX's `strptime` implementation exhibits different behavior for 2-digit year interpretation compared to other platforms. The expected behavior should interpret 2-digit years 00-68 as 2000-2068 and 69-99 as 1969-1999, but AIX appears to use different cutoff logic\n\n```python\n-bash-4.2$ ./python -m test test_strptime -m test_date_locale2 -v\n== CPython 3.15.0a0 (main, Oct 5 2025, 21:17:47) [GCC 8.3.0]\n== AIX-2-00FA9D314C00-powerpc-32bit big-endian\n== Python build: debug\n== cwd: /python/pdev/cpython-main/build/test_python_worker_5309142æ\n== CPU count: 16\n== encodings: locale=ISO8859-1 FS=utf-8\n== resources: all test resources are disabled, use -u option to unskip tests\n\nUsing random seed: 2760767720\n0:00:00 Run 1 test sequentially in a single process\n0:00:00 [1/1] test_strptime\ntest_date_locale2 (test.test_strptime.StrptimeTests.test_date_locale2) ...\n test_date_locale2 (test.test_strptime.StrptimeTests.test_date_locale2) (locale='en_US') ... FAIL\n test_date_locale2 (test.test_strptime.StrptimeTests.test_date_locale2) (locale='fr_FR') ... skipped \"no locale 'fr_FR'\"\n test_date_locale2 (test.test_strptime.StrptimeTests.test_date_locale2) (locale='de_DE') ... skipped \"no locale 'de_DE'\"\n test_date_locale2 (test.test_strptime.StrptimeTests.test_date_locale2) (locale='ja_JP') ... skipped \"no locale 'ja_JP'\"\n test_date_locale2 (test.test_strptime.StrptimeTests.test_date_locale2) (locale='eu_ES') ... skipped \"no locale 'eu_ES'\"\n test_date_locale2 (test.test_strptime.StrptimeTests.test_date_locale2) (locale='ar_AE') ... skipped \"no locale 'ar_AE'\"\n test_date_locale2 (test.test_strptime.StrptimeTests.test_date_locale2) (locale='my_MM') ... skipped \"no locale 'my_MM'\"\n test_date_locale2 (test.test_strptime.StrptimeTests.test_date_locale2) (locale='shn_MM') ... skipped \"no locale 'shn_MM'\"\n test_date_locale2 (test.test_strptime.StrptimeTests.test_date_locale2) (locale='lzh_TW') ... skipped \"no locale 'lzh_TW'\"\n\n======================================================================\nFAIL: test_date_locale2 (test.test_strptime.StrptimeTests.test_date_locale2) (locale='en_US')\n----------------------------------------------------------------------\nTraceback (most recent call last):\n File \"/python/pdev/cpython-main/Lib/test/support/__init__.py\", line 1045, in wrapper\n func(self, *args, **kwargs)\n ~~~~^^^^^^^^^^^^^^^^^^^^^^^\n File \"/python/pdev/cpython-main/Lib/test/test_strptime.py\", line 576, in test_date_locale2\n self.roundtrip('%x', slice(0, 3), (1900, 1, 1, 0, 0, 0, 0, 1, 0))\n ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File \"/python/pdev/cpython-main/Lib/test/test_strptime.py\", line 306, in roundtrip\n self.assertEqual(strp_output[position], time_tuple[position],\n ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n \"testing of %r format failed; %r -> %r != %r\" %\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n (fmt, strf_output, strp_output[position],\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n time_tuple[position]))\n ^^^^^^^^^^^^^^^^^^^^^^\nAssertionError: Tuples differ: (2000, 1, 1) != (1900, 1, 1)\n\nFirst differing element 0:\n2000\n1900\n\n- (2000, 1, 1)\n? ^^\n\n+ (1900, 1, 1)\n? ^^\n : testing of '%x' format failed; '01/01/00' -> (2000, 1, 1) != (1900, 1, 1)\n\n----------------------------------------------------------------------\nRan 1 test in 0.022s\n\nFAILED (failures=1, skipped=8)\ntest test_strptime failed\n0:00:00 [1/1/1] test_strptime failed (1 failure)\n\n== Tests result: FAILURE ==\n\n1 test failed:\n test_strptime\n\nTotal duration: 561 ms\nTotal tests: run=1 (filtered) failures=1 skipped=8\nTotal test files: run=1/1 (filtered) failed=1\nResult: FAILURE\n```\n\n### Environment\n- AIX Version: 7200-05-05-2245 (AIX 7.2 TL5 SP5)\n\nI think updating the test suite to skip problematic locales on AIX for the %x format test, similar to the existing Solaris(https://github.com/python/cpython/pull/125785) workaround, would be a good choice.\n\n\n### CPython versions tested on:\n\nCPython main branch, 3.15, 3.14, 3.13\n\n### Operating systems tested on:\n\nOther\n\n\u003c!-- gh-linked-prs -->\n### Linked PRs\n* gh-139625\n* gh-139644\n* gh-139645\n\u003c!-- /gh-linked-prs -->\n","author":{"url":"https://github.com/furkanonder","@type":"Person","name":"furkanonder"},"datePublished":"2025-10-05T19:12:54Z","url":"https://github.com/python/cpython/issues/139624"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:c5c28bc8-3e37-35bd-417a-13b0e662cd1d |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A5C8:240CD1:42A9FAD:549F511:6B022C43 |
| html-safe-nonce | 553d7a92ef9c3ebf929e1b4f0595df3be76b8a06c7f9367f0ddde0f35ede0218 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBNUM4OjI0MENEMTo0MkE5RkFEOjU0OUY1MTE6NkIwMjJDNDMiLCJ2aXNpdG9yX2lkIjoiMTIxMzE4ODA5MTM0MDUwMzcxIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 24511608803e1891dba603ef8f19241658c24208424fe2cf0e87836a0ebb60bc |
| hovercard-subject-tag | issue:3485082032 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/cpython/139624/issue_layout |
| twitter:image | https://opengraph.githubassets.com/e159d1399c1c9c39cf2ca0360138cca2d6230e56447d26eb64b09fbbe53e12eb/python/cpython/issues/139624 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/e159d1399c1c9c39cf2ca0360138cca2d6230e56447d26eb64b09fbbe53e12eb/python/cpython/issues/139624 |
| og:image:alt | Bug report Bug description: AIX's strptime implementation exhibits different behavior for 2-digit year interpretation compared to other platforms. The expected behavior should interpret 2-digit yea... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | furkanonder |
| hostname | github.com |
| expected-hostname | github.com |
| None | 87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456 |
| turbo-cache-control | no-preview |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 423dbb54c5e7bfecc838eb387c1435eb3d0e760d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width