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-149879: Fix test_strptime on Cygwin by vstinner · Pull Request #150438 · python/cpython

Conversation

@vstinner

@vstinner vstinner commented May 26, 2026 •
edited by bedevere-app Bot
Loading

Uh oh!

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

Copy link
Copy Markdown
Member

Skip my_MM and or_IN locales on multiple tests, since the tests fail on Cygwin.

  • Issue: Enhance Cygwin support #149879

Sorry, something went wrong.

Uh oh!

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

All reactions
@vstinner
pythongh-149879: Fix test_strptime on Cygwin
1dc0bd0
Skip my_MM and or_IN locales on multiple tests, since the tests fail
on Cygwin.
@vstinner
vstinner requested review from StanFromIreland and pganssle as code owners May 26, 2026 00:11
@vstinner vstinner added the skip news label May 26, 2026
@bedevere-app bedevere-app Bot added the tests Tests in the Lib/test dir label May 26, 2026
@bedevere-app bedevere-app Bot mentioned this pull request May 26, 2026
Enhance Cygwin support #149879
Closed
@bedevere-app bedevere-app Bot added the awaiting core review label May 26, 2026
@vstinner

vstinner commented May 26, 2026

Copy link
Copy Markdown
Member Author

Cygwin uses the newlib C library. Multiple test_strptime tests with my_MM and or_IN locales.

Details
======================================================================
ERROR: test_date_locale (test.test_strptime.StrptimeTests.test_date_locale) (locale='my_MM')
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/vstinner/cpython/Lib/test/support/__init__.py", line 1156, in wrapper
    func(self, *args, **kwargs)
    ~~~~^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/vstinner/cpython/Lib/test/test_strptime.py", line 555, in test_date_locale
    self.roundtrip('%x', slice(0, 3), time.localtime(now))
    ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/vstinner/cpython/Lib/test/test_strptime.py", line 304, in roundtrip
    strp_output = _strptime._strptime_time(strf_output, fmt)
  File "/home/vstinner/cpython/Lib/_strptime.py", line 812, in _strptime_time
    tt = _strptime(data_string, format)[0]
         ~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^
  File "/home/vstinner/cpython/Lib/_strptime.py", line 574, in _strptime
    raise ValueError("time data %r does not match format %r" %
                     (data_string, format))
ValueError: time data '20၂၆ မေ ၂၆ အင်္ဂါ' does not match format '%x'

======================================================================
ERROR: test_date_locale (test.test_strptime.StrptimeTests.test_date_locale) (locale='or_IN')
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/vstinner/cpython/Lib/test/support/__init__.py", line 1156, in wrapper
    func(self, *args, **kwargs)
    ~~~~^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/vstinner/cpython/Lib/test/test_strptime.py", line 555, in test_date_locale
    self.roundtrip('%x', slice(0, 3), time.localtime(now))
    ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/vstinner/cpython/Lib/test/test_strptime.py", line 304, in roundtrip
    strp_output = _strptime._strptime_time(strf_output, fmt)
  File "/home/vstinner/cpython/Lib/_strptime.py", line 812, in _strptime_time
    tt = _strptime(data_string, format)[0]
         ~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^
  File "/home/vstinner/cpython/Lib/_strptime.py", line 574, in _strptime
    raise ValueError("time data %r does not match format %r" %
                     (data_string, format))
ValueError: time data '୨୬-୫-୨୬' does not match format '%x'

======================================================================
ERROR: test_date_locale2 (test.test_strptime.StrptimeTests.test_date_locale2) (locale='my_MM')
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/vstinner/cpython/Lib/test/support/__init__.py", line 1156, in wrapper
    func(self, *args, **kwargs)
    ~~~~^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/vstinner/cpython/Lib/test/test_strptime.py", line 575, in test_date_locale2
    self.roundtrip('%x', slice(0, 3), (1900, 1, 1, 0, 0, 0, 0, 1, 0))
    ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/vstinner/cpython/Lib/test/test_strptime.py", line 304, in roundtrip
    strp_output = _strptime._strptime_time(strf_output, fmt)
  File "/home/vstinner/cpython/Lib/_strptime.py", line 812, in _strptime_time
    tt = _strptime(data_string, format)[0]
         ~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^
  File "/home/vstinner/cpython/Lib/_strptime.py", line 574, in _strptime
    raise ValueError("time data %r does not match format %r" %
                     (data_string, format))
ValueError: time data '19၀၀ ဇန် ၀၀၀၁ တနင်္လာ' does not match format '%x'

======================================================================
ERROR: test_date_time_locale (test.test_strptime.StrptimeTests.test_date_time_locale) (locale='my_MM')
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/vstinner/cpython/Lib/test/support/__init__.py", line 1156, in wrapper
    func(self, *args, **kwargs)
    ~~~~^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/vstinner/cpython/Lib/test/test_strptime.py", line 517, in test_date_time_locale
    self.roundtrip('%c', slice(0, 6), time.localtime(now))
    ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/vstinner/cpython/Lib/test/test_strptime.py", line 304, in roundtrip
    strp_output = _strptime._strptime_time(strf_output, fmt)
  File "/home/vstinner/cpython/Lib/_strptime.py", line 812, in _strptime_time
    tt = _strptime(data_string, format)[0]
         ~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^
  File "/home/vstinner/cpython/Lib/_strptime.py", line 574, in _strptime
    raise ValueError("time data %r does not match format %r" %
                     (data_string, format))
ValueError: time data '20၂၆ မေ ၂၆ အင်္ဂါ ၀၁:၄၈:၀၁ နံနက်' does not match format '%c'

======================================================================
ERROR: test_date_time_locale (test.test_strptime.StrptimeTests.test_date_time_locale) (locale='or_IN')
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/vstinner/cpython/Lib/test/support/__init__.py", line 1156, in wrapper
    func(self, *args, **kwargs)
    ~~~~^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/vstinner/cpython/Lib/test/test_strptime.py", line 517, in test_date_time_locale
    self.roundtrip('%c', slice(0, 6), time.localtime(now))
    ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/vstinner/cpython/Lib/test/test_strptime.py", line 304, in roundtrip
    strp_output = _strptime._strptime_time(strf_output, fmt)
  File "/home/vstinner/cpython/Lib/_strptime.py", line 812, in _strptime_time
    tt = _strptime(data_string, format)[0]
         ~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^
  File "/home/vstinner/cpython/Lib/_strptime.py", line 574, in _strptime
    raise ValueError("time data %r does not match format %r" %
                     (data_string, format))
ValueError: time data '୨୬ ମେ ୨୬ ୧:୪୮:୧ AM' does not match format '%c'

======================================================================
ERROR: test_date_time_locale2 (test.test_strptime.StrptimeTests.test_date_time_locale2) (locale='my_MM')
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/vstinner/cpython/Lib/test/support/__init__.py", line 1156, in wrapper
    func(self, *args, **kwargs)
    ~~~~^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/vstinner/cpython/Lib/test/test_strptime.py", line 544, in test_date_time_locale2
    self.roundtrip('%c', slice(0, 6), (1900, 1, 1, 0, 0, 0, 0, 1, 0))
    ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/vstinner/cpython/Lib/test/test_strptime.py", line 304, in roundtrip
    strp_output = _strptime._strptime_time(strf_output, fmt)
  File "/home/vstinner/cpython/Lib/_strptime.py", line 812, in _strptime_time
    tt = _strptime(data_string, format)[0]
         ~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^
  File "/home/vstinner/cpython/Lib/_strptime.py", line 574, in _strptime
    raise ValueError("time data %r does not match format %r" %
                     (data_string, format))
ValueError: time data '19၀၀ ဇန် ၀၀၀၁ တနင်္လာ ၁၂:၀၀:၀၀ နံနက်' does not match format '%c'

======================================================================
ERROR: test_time_locale (test.test_strptime.StrptimeTests.test_time_locale) (locale='or_IN')
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/vstinner/cpython/Lib/test/support/__init__.py", line 1156, in wrapper
    func(self, *args, **kwargs)
    ~~~~^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/vstinner/cpython/Lib/test/test_strptime.py", line 600, in test_time_locale
    self.roundtrip('%X', pos, time.localtime(now))
    ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/vstinner/cpython/Lib/test/test_strptime.py", line 304, in roundtrip
    strp_output = _strptime._strptime_time(strf_output, fmt)
  File "/home/vstinner/cpython/Lib/_strptime.py", line 812, in _strptime_time
    tt = _strptime(data_string, format)[0]
         ~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^
  File "/home/vstinner/cpython/Lib/_strptime.py", line 574, in _strptime
    raise ValueError("time data %r does not match format %r" %
                     (data_string, format))
ValueError: time data '୧:୪୮:୧ AM' does not match format '%X'

----------------------------------------------------------------------
Ran 60 tests in 1.686s

FAILED (errors=7, skipped=19)
All reactions

Sorry, something went wrong.

Uh oh!

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

@vstinner

vstinner commented May 26, 2026

Copy link
Copy Markdown
Member Author

"Tests / Sanitizers / UBSan" failed, but the failure is unrelated to this change.

0:03:01 load avg: 8.06 mem: 128.1 MiB [ 69/503/1] test.test_multiprocessing_fork.test_processes failed (1 error) (43.9 sec) -- running (1): test.test_multiprocessing_forkserver.test_manager (30.9 sec)
Warning -- Dangling processes: {<Process name='Process-152' pid=22369 parent=20628 started daemon>}
Warning -- Dangling processes: {<Process name='Process-152' pid=22369 parent=20628 started daemon>}
test test.test_multiprocessing_fork.test_processes failed -- Traceback (most recent call last):
  File "/home/runner/work/cpython/cpython/Lib/contextlib.py", line 116, in inner
    return func(*args, **kwds)
  File "/home/runner/work/cpython/cpython/Lib/test/_test_multiprocessing.py", line 649, in test_interrupt
    exitcode = self._kill_process(multiprocessing.Process.interrupt)
  File "/home/runner/work/cpython/cpython/Lib/contextlib.py", line 116, in inner
    return func(*args, **kwds)
  File "/home/runner/work/cpython/cpython/Lib/test/_test_multiprocessing.py", line 630, in _kill_process
    self.assertEqual(join(), None)
                     ~~~~^^
  File "/home/runner/work/cpython/cpython/Lib/test/_test_multiprocessing.py", line 303, in __call__
    return self.func(*args, **kwds)
           ~~~~~~~~~^^^^^^^^^^^^^^^
  File "/home/runner/work/cpython/cpython/Lib/multiprocessing/process.py", line 156, in join
    res = self._popen.wait(timeout)
  File "/home/runner/work/cpython/cpython/Lib/multiprocessing/popen_fork.py", line 44, in wait
    return self.poll(os.WNOHANG if timeout == 0.0 else 0)
           ~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/work/cpython/cpython/Lib/multiprocessing/popen_fork.py", line 28, in poll
    pid, sts = os.waitpid(self.pid, flag)
               ~~~~~~~~~~^^^^^^^^^^^^^^^^
  File "/home/runner/work/cpython/cpython/Lib/test/_test_multiprocessing.py", line 626, in handler
    raise RuntimeError('join took too long: %s' % p)
RuntimeError: join took too long: <Process name='Process-152' pid=22369 parent=20628 started daemon>
All reactions

Sorry, something went wrong.

Uh oh!

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

@vstinner
vstinner merged commit f500e4e into python:main May 26, 2026
95 of 97 checks passed

Uh oh!

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

@vstinner
vstinner deleted the test_strptime branch May 26, 2026 02:25
@bedevere-app bedevere-app Bot removed the awaiting core review label May 26, 2026
@StanFromIreland

StanFromIreland commented May 26, 2026

Copy link
Copy Markdown
Member

Oh, I would have liked a solution that covers some more platforms, since I know Solaris has similar issues with its system libraries.

All reactions

Sorry, something went wrong.

Uh oh!

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

@vstinner

vstinner commented May 26, 2026

Copy link
Copy Markdown
Member Author

The skip_cygwin_locale() function can be renamed to skip_broken_locale() and adapted to skip other locales on other platforms.

All reactions

Sorry, something went wrong.

Uh oh!

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@pganssle pganssle Awaiting requested review from pganssle pganssle is a code owner
@StanFromIreland StanFromIreland Awaiting requested review from StanFromIreland StanFromIreland is a code owner

Uh oh!

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

Assignees

No one assigned

Labels

skip news tests Tests in the Lib/test dir

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.

2 participants

@vstinner @StanFromIreland
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 01402520 — 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.