Skip to content

gh-141563: Add missing cast to _PyDateTime_IMPORT() - #144667

Merged
vstinner merged 1 commit into
python:mainfrom
vstinner:test_datetime_capi
Feb 10, 2026
Merged

vstinner merged 1 commit into
python:mainfrom
vstinner:test_datetime_capi

Conversation

@vstinner

@vstinner vstinner commented Feb 10, 2026 •

Copy link
Copy Markdown
Member

Fix compilation on C++.

Add test on PyDateTime_IMPORT in test_cext and test_cppext.

Fix compilation on C++.

Add test on PyDateTime_IMPORT in test_cext and test_cppext.

@kumaraditya303 kumaraditya303 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM, thanks!

@vstinner
vstinner enabled auto-merge (squash) February 10, 2026 14:45
@vstinner
vstinner merged commit 3dadc22 into python:main Feb 10, 2026
49 checks passed
@vstinner
vstinner deleted the test_datetime_capi branch February 10, 2026 14:47
@bedevere-bot

Copy link
Copy Markdown

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

Hi! The buildbot AMD64 CentOS9 NoGIL 3.x (tier-1) has failed when building commit 3dadc22.

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/1609/builds/4836) and take a look at the build logs.
  4. Check if the failure is related to this commit (3dadc22) 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/1609/builds/4836

Failed tests:

  • test_cext

Failed subtests:

  • test_build_opaque_pyobject - test.test_cext.TestPublicCAPI.test_build_opaque_pyobject

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

==

Click to see traceback logs
Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.x.itamaro-centos-aws.nogil/build/Lib/test/test_cext/__init__.py", line 121, in test_build_opaque_pyobject
    self.check_build('_test_limited_opaque_cext', limited=True,
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                     opaque_pyobject=True)
                     ^^^^^^^^^^^^^^^^^^^^^
  File "/home/buildbot/buildarea/3.x.itamaro-centos-aws.nogil/build/Lib/test/test_cext/__init__.py", line 44, in check_build
    self._check_build(extension_name, python_exe,
    ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                      std=std, limited=limited,
                      ^^^^^^^^^^^^^^^^^^^^^^^^^
                      opaque_pyobject=opaque_pyobject)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/buildbot/buildarea/3.x.itamaro-centos-aws.nogil/build/Lib/test/test_cext/__init__.py", line 88, in _check_build
    run_cmd('Install', cmd)
    ~~~~~~~^^^^^^^^^^^^^^^^
  File "/home/buildbot/buildarea/3.x.itamaro-centos-aws.nogil/build/Lib/test/test_cext/__init__.py", line 69, in run_cmd
    subprocess.run(cmd, check=True, env=env)
    ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/buildbot/buildarea/3.x.itamaro-centos-aws.nogil/build/Lib/subprocess.py", line 576, in run
    raise CalledProcessError(retcode, process.args,
                             output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['/home/buildbot/buildarea/3.x.itamaro-centos-aws.nogil/build/build/test_python_2527956æ/tempcwd/env/bin/python', '-X', 'dev', '-m', 'pip', 'install', '--no-build-isolation', '/home/buildbot/buildarea/3.x.itamaro-centos-aws.nogil/build/build/test_python_2527956æ/tempcwd/pkg', '-v']' returned non-zero exit status 1.


Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.x.itamaro-centos-aws.nogil/build/Lib/test/support/__init__.py", line 947, in gc_collect
    gc.collect()
    ~~~~~~~~~~^^
ResourceWarning: unclosed file <_io.FileIO name=10 mode='wb' closefd=True>


Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.x.itamaro-centos-aws.nogil/build/Lib/test/test_cext/__init__.py", line 121, in test_build_opaque_pyobject
    self.check_build('_test_limited_opaque_cext', limited=True,
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                     opaque_pyobject=True)
                     ^^^^^^^^^^^^^^^^^^^^^
  File "/home/buildbot/buildarea/3.x.itamaro-centos-aws.nogil/build/Lib/test/test_cext/__init__.py", line 44, in check_build
    self._check_build(extension_name, python_exe,
    ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                      std=std, limited=limited,
                      ^^^^^^^^^^^^^^^^^^^^^^^^^
                      opaque_pyobject=opaque_pyobject)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/buildbot/buildarea/3.x.itamaro-centos-aws.nogil/build/Lib/test/test_cext/__init__.py", line 88, in _check_build
    run_cmd('Install', cmd)
    ~~~~~~~^^^^^^^^^^^^^^^^
  File "/home/buildbot/buildarea/3.x.itamaro-centos-aws.nogil/build/Lib/test/test_cext/__init__.py", line 69, in run_cmd
    subprocess.run(cmd, check=True, env=env)
    ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/buildbot/buildarea/3.x.itamaro-centos-aws.nogil/build/Lib/subprocess.py", line 576, in run
    raise CalledProcessError(retcode, process.args,
                             output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['/home/buildbot/buildarea/3.x.itamaro-centos-aws.nogil/build/build/test_python_2451648æ/tempcwd/env/bin/python', '-X', 'dev', '-m', 'pip', 'install', '--no-build-isolation', '/home/buildbot/buildarea/3.x.itamaro-centos-aws.nogil/build/build/test_python_2451648æ/tempcwd/pkg', '-v']' returned non-zero exit status 1.
@vstinner

Copy link
Copy Markdown
Member Author

Oops, I didn't run all test_cext/test_cppext locally, and as usual, I messed up the tests :-( I wrote #144673 to fix test_cext/test_cppext.

@vstinner

Copy link
Copy Markdown
Member Author

(And as usual, test_cext/test_cppext are not run in GitHub Actions since they are too slow: they require the cpu test resource.)

@bedevere-bot

Copy link
Copy Markdown

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

Hi! The buildbot AMD64 FreeBSD 3.x (tier-3) has failed when building commit 3dadc22.

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/1223/builds/8106) and take a look at the build logs.
  4. Check if the failure is related to this commit (3dadc22) 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/1223/builds/8106

Failed tests:

  • test_cext
  • test_cppext

Failed subtests:

  • test_build_limited - test.test_cppext.TestPublicCAPI.test_build_limited
  • test_build_limited - test.test_cext.TestPublicCAPI.test_build_limited
  • test_build_limited_cpp03 - test.test_cppext.TestPublicCAPI.test_build_limited_cpp03
  • test_build_limited_c11 - test.test_cext.TestPublicCAPI.test_build_limited_c11
  • test_build_opaque_pyobject - test.test_cext.TestPublicCAPI.test_build_opaque_pyobject

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

==

Click to see traceback logs
Traceback (most recent call last):
  File "/buildbot/buildarea/3.x.ware-freebsd/build/Lib/test/test_cppext/__init__.py", line 96, in test_build_limited_cpp03
    self.check_build('_test_limited_cpp03ext', std='c++03', limited=True)
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/buildbot/buildarea/3.x.ware-freebsd/build/Lib/test/test_cppext/__init__.py", line 36, in check_build
    self._check_build(extension_name, python_exe,
    ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                      std=std, limited=limited)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/buildbot/buildarea/3.x.ware-freebsd/build/Lib/test/test_cppext/__init__.py", line 74, in _check_build
    run_cmd('Install', cmd)
    ~~~~~~~^^^^^^^^^^^^^^^^
  File "/buildbot/buildarea/3.x.ware-freebsd/build/Lib/test/test_cppext/__init__.py", line 55, in run_cmd
    subprocess.run(cmd, check=True, env=env)
    ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/buildbot/buildarea/3.x.ware-freebsd/build/Lib/subprocess.py", line 576, in run
    raise CalledProcessError(retcode, process.args,
                             output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['/buildbot/buildarea/3.x.ware-freebsd/build/build/test_python_37590æ/tempcwd/env/bin/python', '-X', 'dev', '-m', 'pip', 'install', '--no-build-isolation', '/buildbot/buildarea/3.x.ware-freebsd/build/build/test_python_37590æ/tempcwd/pkg', '-v']' returned non-zero exit status 1.


Traceback (most recent call last):
  File "/buildbot/buildarea/3.x.ware-freebsd/build/Lib/test/test_cppext/__init__.py", line 100, in test_build_limited
    self.check_build('_testcppext_limited', limited=True)
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/buildbot/buildarea/3.x.ware-freebsd/build/Lib/test/test_cppext/__init__.py", line 36, in check_build
    self._check_build(extension_name, python_exe,
    ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                      std=std, limited=limited)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/buildbot/buildarea/3.x.ware-freebsd/build/Lib/test/test_cppext/__init__.py", line 74, in _check_build
    run_cmd('Install', cmd)
    ~~~~~~~^^^^^^^^^^^^^^^^
  File "/buildbot/buildarea/3.x.ware-freebsd/build/Lib/test/test_cppext/__init__.py", line 55, in run_cmd
    subprocess.run(cmd, check=True, env=env)
    ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/buildbot/buildarea/3.x.ware-freebsd/build/Lib/subprocess.py", line 576, in run
    raise CalledProcessError(retcode, process.args,
                             output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['/buildbot/buildarea/3.x.ware-freebsd/build/build/test_python_38384æ/tempcwd/env/bin/python', '-X', 'dev', '-m', 'pip', 'install', '--no-build-isolation', '/buildbot/buildarea/3.x.ware-freebsd/build/build/test_python_38384æ/tempcwd/pkg', '-v']' returned non-zero exit status 1.


Traceback (most recent call last):
  File "/buildbot/buildarea/3.x.ware-freebsd/build/Lib/test/support/__init__.py", line 947, in gc_collect
    gc.collect()
    ~~~~~~~~~~^^
ResourceWarning: unclosed file <_io.FileIO name=11 mode='wb' closefd=True>


Traceback (most recent call last):
  File "/buildbot/buildarea/3.x.ware-freebsd/build/Lib/test/test_cext/__init__.py", line 110, in test_build_limited
    self.check_build('_test_limited_cext', limited=True)
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/buildbot/buildarea/3.x.ware-freebsd/build/Lib/test/test_cext/__init__.py", line 44, in check_build
    self._check_build(extension_name, python_exe,
    ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                      std=std, limited=limited,
                      ^^^^^^^^^^^^^^^^^^^^^^^^^
                      opaque_pyobject=opaque_pyobject)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/buildbot/buildarea/3.x.ware-freebsd/build/Lib/test/test_cext/__init__.py", line 88, in _check_build
    run_cmd('Install', cmd)
    ~~~~~~~^^^^^^^^^^^^^^^^
  File "/buildbot/buildarea/3.x.ware-freebsd/build/Lib/test/test_cext/__init__.py", line 69, in run_cmd
    subprocess.run(cmd, check=True, env=env)
    ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/buildbot/buildarea/3.x.ware-freebsd/build/Lib/subprocess.py", line 576, in run
    raise CalledProcessError(retcode, process.args,
                             output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['/buildbot/buildarea/3.x.ware-freebsd/build/build/test_python_38385æ/tempcwd/env/bin/python', '-X', 'dev', '-m', 'pip', 'install', '--no-build-isolation', '/buildbot/buildarea/3.x.ware-freebsd/build/build/test_python_38385æ/tempcwd/pkg', '-v']' returned non-zero exit status 1.


Traceback (most recent call last):
  File "/buildbot/buildarea/3.x.ware-freebsd/build/Lib/test/test_cext/__init__.py", line 114, in test_build_limited_c11
    self.check_build('_test_limited_c11_cext', limited=True, std='c11')
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/buildbot/buildarea/3.x.ware-freebsd/build/Lib/test/test_cext/__init__.py", line 44, in check_build
    self._check_build(extension_name, python_exe,
    ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                      std=std, limited=limited,
                      ^^^^^^^^^^^^^^^^^^^^^^^^^
                      opaque_pyobject=opaque_pyobject)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/buildbot/buildarea/3.x.ware-freebsd/build/Lib/test/test_cext/__init__.py", line 88, in _check_build
    run_cmd('Install', cmd)
    ~~~~~~~^^^^^^^^^^^^^^^^
  File "/buildbot/buildarea/3.x.ware-freebsd/build/Lib/test/test_cext/__init__.py", line 69, in run_cmd
    subprocess.run(cmd, check=True, env=env)
    ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/buildbot/buildarea/3.x.ware-freebsd/build/Lib/subprocess.py", line 576, in run
    raise CalledProcessError(retcode, process.args,
                             output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['/buildbot/buildarea/3.x.ware-freebsd/build/build/test_python_38385æ/tempcwd/env/bin/python', '-X', 'dev', '-m', 'pip', 'install', '--no-build-isolation', '/buildbot/buildarea/3.x.ware-freebsd/build/build/test_python_38385æ/tempcwd/pkg', '-v']' returned non-zero exit status 1.


Traceback (most recent call last):
  File "/buildbot/buildarea/3.x.ware-freebsd/build/Lib/test/test_cext/__init__.py", line 121, in test_build_opaque_pyobject
    self.check_build('_test_limited_opaque_cext', limited=True,
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                     opaque_pyobject=True)
                     ^^^^^^^^^^^^^^^^^^^^^
  File "/buildbot/buildarea/3.x.ware-freebsd/build/Lib/test/test_cext/__init__.py", line 44, in check_build
    self._check_build(extension_name, python_exe,
    ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                      std=std, limited=limited,
                      ^^^^^^^^^^^^^^^^^^^^^^^^^
                      opaque_pyobject=opaque_pyobject)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/buildbot/buildarea/3.x.ware-freebsd/build/Lib/test/test_cext/__init__.py", line 88, in _check_build
    run_cmd('Install', cmd)
    ~~~~~~~^^^^^^^^^^^^^^^^
  File "/buildbot/buildarea/3.x.ware-freebsd/build/Lib/test/test_cext/__init__.py", line 69, in run_cmd
    subprocess.run(cmd, check=True, env=env)
    ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/buildbot/buildarea/3.x.ware-freebsd/build/Lib/subprocess.py", line 576, in run
    raise CalledProcessError(retcode, process.args,
                             output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['/buildbot/buildarea/3.x.ware-freebsd/build/build/test_python_38385æ/tempcwd/env/bin/python', '-X', 'dev', '-m', 'pip', 'install', '--no-build-isolation', '/buildbot/buildarea/3.x.ware-freebsd/build/build/test_python_38385æ/tempcwd/pkg', '-v']' returned non-zero exit status 1.


Traceback (most recent call last):
  File "/buildbot/buildarea/3.x.ware-freebsd/build/Lib/test/test_cppext/__init__.py", line 100, in test_build_limited
    self.check_build('_testcppext_limited', limited=True)
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/buildbot/buildarea/3.x.ware-freebsd/build/Lib/test/test_cppext/__init__.py", line 36, in check_build
    self._check_build(extension_name, python_exe,
    ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                      std=std, limited=limited)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/buildbot/buildarea/3.x.ware-freebsd/build/Lib/test/test_cppext/__init__.py", line 74, in _check_build
    run_cmd('Install', cmd)
    ~~~~~~~^^^^^^^^^^^^^^^^
  File "/buildbot/buildarea/3.x.ware-freebsd/build/Lib/test/test_cppext/__init__.py", line 55, in run_cmd
    subprocess.run(cmd, check=True, env=env)
    ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/buildbot/buildarea/3.x.ware-freebsd/build/Lib/subprocess.py", line 576, in run
    raise CalledProcessError(retcode, process.args,
                             output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['/buildbot/buildarea/3.x.ware-freebsd/build/build/test_python_37590æ/tempcwd/env/bin/python', '-X', 'dev', '-m', 'pip', 'install', '--no-build-isolation', '/buildbot/buildarea/3.x.ware-freebsd/build/build/test_python_37590æ/tempcwd/pkg', '-v']' returned non-zero exit status 1.


Traceback (most recent call last):
  File "/buildbot/buildarea/3.x.ware-freebsd/build/Lib/test/test_cppext/__init__.py", line 96, in test_build_limited_cpp03
    self.check_build('_test_limited_cpp03ext', std='c++03', limited=True)
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/buildbot/buildarea/3.x.ware-freebsd/build/Lib/test/test_cppext/__init__.py", line 36, in check_build
    self._check_build(extension_name, python_exe,
    ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                      std=std, limited=limited)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/buildbot/buildarea/3.x.ware-freebsd/build/Lib/test/test_cppext/__init__.py", line 74, in _check_build
    run_cmd('Install', cmd)
    ~~~~~~~^^^^^^^^^^^^^^^^
  File "/buildbot/buildarea/3.x.ware-freebsd/build/Lib/test/test_cppext/__init__.py", line 55, in run_cmd
    subprocess.run(cmd, check=True, env=env)
    ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/buildbot/buildarea/3.x.ware-freebsd/build/Lib/subprocess.py", line 576, in run
    raise CalledProcessError(retcode, process.args,
                             output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['/buildbot/buildarea/3.x.ware-freebsd/build/build/test_python_38384æ/tempcwd/env/bin/python', '-X', 'dev', '-m', 'pip', 'install', '--no-build-isolation', '/buildbot/buildarea/3.x.ware-freebsd/build/build/test_python_38384æ/tempcwd/pkg', '-v']' returned non-zero exit status 1.


Traceback (most recent call last):
  File "/buildbot/buildarea/3.x.ware-freebsd/build/Lib/test/test_cext/__init__.py", line 114, in test_build_limited_c11
    self.check_build('_test_limited_c11_cext', limited=True, std='c11')
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/buildbot/buildarea/3.x.ware-freebsd/build/Lib/test/test_cext/__init__.py", line 44, in check_build
    self._check_build(extension_name, python_exe,
    ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                      std=std, limited=limited,
                      ^^^^^^^^^^^^^^^^^^^^^^^^^
                      opaque_pyobject=opaque_pyobject)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/buildbot/buildarea/3.x.ware-freebsd/build/Lib/test/test_cext/__init__.py", line 88, in _check_build
    run_cmd('Install', cmd)
    ~~~~~~~^^^^^^^^^^^^^^^^
  File "/buildbot/buildarea/3.x.ware-freebsd/build/Lib/test/test_cext/__init__.py", line 69, in run_cmd
    subprocess.run(cmd, check=True, env=env)
    ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/buildbot/buildarea/3.x.ware-freebsd/build/Lib/subprocess.py", line 576, in run
    raise CalledProcessError(retcode, process.args,
                             output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['/buildbot/buildarea/3.x.ware-freebsd/build/build/test_python_37730æ/tempcwd/env/bin/python', '-X', 'dev', '-m', 'pip', 'install', '--no-build-isolation', '/buildbot/buildarea/3.x.ware-freebsd/build/build/test_python_37730æ/tempcwd/pkg', '-v']' returned non-zero exit status 1.


Traceback (most recent call last):
  File "/buildbot/buildarea/3.x.ware-freebsd/build/Lib/test/test_cext/__init__.py", line 121, in test_build_opaque_pyobject
    self.check_build('_test_limited_opaque_cext', limited=True,
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                     opaque_pyobject=True)
                     ^^^^^^^^^^^^^^^^^^^^^
  File "/buildbot/buildarea/3.x.ware-freebsd/build/Lib/test/test_cext/__init__.py", line 44, in check_build
    self._check_build(extension_name, python_exe,
    ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                      std=std, limited=limited,
                      ^^^^^^^^^^^^^^^^^^^^^^^^^
                      opaque_pyobject=opaque_pyobject)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/buildbot/buildarea/3.x.ware-freebsd/build/Lib/test/test_cext/__init__.py", line 88, in _check_build
    run_cmd('Install', cmd)
    ~~~~~~~^^^^^^^^^^^^^^^^
  File "/buildbot/buildarea/3.x.ware-freebsd/build/Lib/test/test_cext/__init__.py", line 69, in run_cmd
    subprocess.run(cmd, check=True, env=env)
    ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/buildbot/buildarea/3.x.ware-freebsd/build/Lib/subprocess.py", line 576, in run
    raise CalledProcessError(retcode, process.args,
                             output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['/buildbot/buildarea/3.x.ware-freebsd/build/build/test_python_37730æ/tempcwd/env/bin/python', '-X', 'dev', '-m', 'pip', 'install', '--no-build-isolation', '/buildbot/buildarea/3.x.ware-freebsd/build/build/test_python_37730æ/tempcwd/pkg', '-v']' returned non-zero exit status 1.


Traceback (most recent call last):
  File "/buildbot/buildarea/3.x.ware-freebsd/build/Lib/test/test_cext/__init__.py", line 110, in test_build_limited
    self.check_build('_test_limited_cext', limited=True)
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/buildbot/buildarea/3.x.ware-freebsd/build/Lib/test/test_cext/__init__.py", line 44, in check_build
    self._check_build(extension_name, python_exe,
    ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                      std=std, limited=limited,
                      ^^^^^^^^^^^^^^^^^^^^^^^^^
                      opaque_pyobject=opaque_pyobject)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/buildbot/buildarea/3.x.ware-freebsd/build/Lib/test/test_cext/__init__.py", line 88, in _check_build
    run_cmd('Install', cmd)
    ~~~~~~~^^^^^^^^^^^^^^^^
  File "/buildbot/buildarea/3.x.ware-freebsd/build/Lib/test/test_cext/__init__.py", line 69, in run_cmd
    subprocess.run(cmd, check=True, env=env)
    ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/buildbot/buildarea/3.x.ware-freebsd/build/Lib/subprocess.py", line 576, in run
    raise CalledProcessError(retcode, process.args,
                             output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['/buildbot/buildarea/3.x.ware-freebsd/build/build/test_python_37730æ/tempcwd/env/bin/python', '-X', 'dev', '-m', 'pip', 'install', '--no-build-isolation', '/buildbot/buildarea/3.x.ware-freebsd/build/build/test_python_37730æ/tempcwd/pkg', '-v']' returned non-zero exit status 1.
@vstinner

Copy link
Copy Markdown
Member Author

Sadly, the fix doesn't work on Windows: #144677 follow-up should fix Windows.

thunder-coding pushed a commit to thunder-coding/cpython that referenced this pull request Feb 15, 2026
)

Fix compilation on C++.

Add test on PyDateTime_IMPORT in test_cext and test_cppext.
brijkapadia pushed a commit to brijkapadia/cpython that referenced this pull request Feb 28, 2026
)

Fix compilation on C++.

Add test on PyDateTime_IMPORT in test_cext and test_cppext.
ljfp pushed a commit to ljfp/cpython that referenced this pull request Apr 25, 2026
)

Fix compilation on C++.

Add test on PyDateTime_IMPORT in test_cext and test_cppext.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

3 participants