-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Python 2 removal part 1: tests (C++ code is intentionally ~untouched) (…
…#3688) * `#error BYE_BYE_GOLDEN_SNAKE` * Removing everything related to 2.7 from ci.yml * Commenting-out Centos7 * Removing `PYTHON: 27` from .appveyor.yml * "PY2" removal, mainly from tests. C++ code is not touched. * Systematic removal of `u` prefix from `u"..."` and `u'...'` literals. Collateral cleanup of a couple minor other things. * Cleaning up around case-insensitive hits for `[^a-z]py.*2` in tests/. * Removing obsolete Python 2 mention in compiling.rst * Proper `#error` for Python 2. * Using PY_VERSION_HEX to guard `#error "PYTHON 2 IS NO LONGER SUPPORTED.` * chore: bump pre-commit * style: run pre-commit for pyupgrade 3+ * tests: use sys.version_info, not PY * chore: more Python 2 removal * Uncommenting Centos7 block (PR #3691 showed that it is working again). * Update pre-commit hooks * Fix pre-commit hook * refactor: remove Python 2 from CMake * refactor: remove Python 2 from setup code * refactor: simplify, better static typing * feat: fail with nice messages * refactor: drop Python 2 C++ code * docs: cleanup for Python 3 * revert: intree revert: intree * docs: minor touchup to py2 statement Co-authored-by: Henry Schreiner <[email protected]> Co-authored-by: Aaron Gokaslan <[email protected]>
- Loading branch information
1 parent
46dcd9b
commit 6493f49
Showing
102 changed files
with
530 additions
and
1,335 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,7 +25,6 @@ jobs: | |
matrix: | ||
runs-on: [ubuntu-latest, windows-2022, macos-latest] | ||
python: | ||
- '2.7' | ||
- '3.5' | ||
- '3.6' | ||
- '3.9' | ||
|
@@ -49,13 +48,9 @@ jobs: | |
python: '3.6' | ||
args: > | ||
-DPYBIND11_FINDPYTHON=ON | ||
- runs-on: macos-latest | ||
python: 'pypy-2.7' | ||
# Inject a couple Windows 2019 runs | ||
- runs-on: windows-2019 | ||
python: '3.9' | ||
- runs-on: windows-2019 | ||
python: '2.7' | ||
|
||
name: "🐍 ${{ matrix.python }} • ${{ matrix.runs-on }} • x64 ${{ matrix.args }}" | ||
runs-on: ${{ matrix.runs-on }} | ||
|
@@ -168,22 +163,6 @@ jobs: | |
- name: Interface test | ||
run: cmake --build build2 --target test_cmake_build | ||
|
||
# Eventually Microsoft might have an action for setting up | ||
# MSVC, but for now, this action works: | ||
- name: Prepare compiler environment for Windows 🐍 2.7 | ||
if: matrix.python == 2.7 && runner.os == 'Windows' | ||
uses: ilammy/[email protected] | ||
with: | ||
arch: x64 | ||
|
||
# This makes two environment variables available in the following step(s) | ||
- name: Set Windows 🐍 2.7 environment variables | ||
if: matrix.python == 2.7 && runner.os == 'Windows' | ||
shell: bash | ||
run: | | ||
echo "DISTUTILS_USE_SDK=1" >> $GITHUB_ENV | ||
echo "MSSdk=1" >> $GITHUB_ENV | ||
# This makes sure the setup_helpers module can build packages using | ||
# setuptools | ||
- name: Setuptools helpers test | ||
|
@@ -784,7 +763,6 @@ jobs: | |
fail-fast: false | ||
matrix: | ||
python: | ||
- 2.7 | ||
- 3.6 | ||
- 3.7 | ||
# todo: check/cpptest does not support 3.8+ yet | ||
|
@@ -832,17 +810,12 @@ jobs: | |
fail-fast: false | ||
matrix: | ||
python: | ||
- 2.7 | ||
- 3.5 | ||
- 3.7 | ||
std: | ||
- 14 | ||
|
||
include: | ||
- python: 2.7 | ||
std: 17 | ||
args: > | ||
-DCMAKE_CXX_FLAGS="/permissive- /EHsc /GR" | ||
- python: 3.7 | ||
std: 17 | ||
args: > | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
recursive-include pybind11/include/pybind11 *.h | ||
recursive-include pybind11 *.py | ||
recursive-include pybind11 py.typed | ||
recursive-include pybind11 *.pyi | ||
include pybind11/share/cmake/pybind11/*.cmake | ||
include LICENSE README.rst pyproject.toml setup.py setup.cfg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.