Skip to content

Conversation

@rwgk
Copy link
Collaborator

@rwgk rwgk commented Jun 10, 2023

Description

Enable all testing (test_embed) and pip install setuptools for Setuptools helpers test (setuptools is not longer installed by default: https://docs.python.org/3.12/whatsnew/3.12.html#removed).

First time all testing succeeds with Python 3.12!

Suggested changelog entry:

@rwgk rwgk added the python dev Working on development versions of Python label Jun 10, 2023
@rwgk
Copy link
Collaborator Author

rwgk commented Jun 10, 2023

@henryiii

All unit tests (pytest & test_embed) work with Python 3.12.0b2, except the very last test in upstream.yml:

Setuptools helpers tests
...
tests/extra_setuptools/test_setuphelper.py FFFFFF                        [100%]
...
>               raise CalledProcessError(retcode, process.args,
                                         output=stdout, stderr=stderr)
E               subprocess.CalledProcessError: Command '['/opt/hostedtoolcache/Python/3.12.0-beta.2/x64/bin/python', 'setup.py', 'build_ext', '--inplace']' returned non-zero exit status 1.
...

/opt/hostedtoolcache/Python/3.12.0-beta.2/x64/lib/python3.12/subprocess.py:571: CalledProcessError
----------------------------- Captured stderr call -----------------------------
Traceback (most recent call last):
  File "/tmp/pytest-of-runner/pytest-0/test_simple_setup_py_11_False_0/setup.py", line 4, in <module>
    from setuptools import setup, Extension
ModuleNotFoundError: No module named 'setuptools'

@henryiii
Copy link
Collaborator

Setuptools is no longer installed by default in 3.12. It’s just another library like any other.

Comment on lines -245 to -246
env:
SETUPTOOLS_USE_DISTUTILS: stdlib
Copy link
Collaborator

Choose a reason for hiding this comment

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

Testing this - this is invalid in 3.12, there is no stdlib distutils, and we shouldn't be using before that either. Just looking to see what fails.

Copy link
Collaborator

Choose a reason for hiding this comment

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

FYI, I expect this was to build numpy before wheels were available.

@rwgk
Copy link
Collaborator Author

rwgk commented Jun 10, 2023

Ignoring two PyPy test_iostream flakes.

@rwgk rwgk marked this pull request as ready for review June 10, 2023 17:13
@rwgk rwgk merged commit 0e43fcc into pybind:master Jun 10, 2023
@rwgk rwgk deleted the py312b2 branch June 10, 2023 17:14
@github-actions github-actions bot added the needs changelog Possibly needs a changelog entry label Jun 10, 2023
@rwgk rwgk removed the needs changelog Possibly needs a changelog entry label Jun 10, 2023
rwgk added a commit to rwgk/pybind11clif that referenced this pull request Jun 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

python dev Working on development versions of Python

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants