Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python 3.12 support #904

Merged
merged 1 commit into from
Dec 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/build_wheels_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12']
platform: [x64]
with_contrib: [0, 1]
without_gui: [0, 1]
Expand All @@ -93,7 +93,7 @@ jobs:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
MB_PYTHON_VERSION: ${{ matrix.python-version }}
NP_TEST_DEP: numpy==1.19.4
NP_TEST_DEP_LATEST: numpy==1.24.0
NP_TEST_DEP_LATEST: numpy==1.26.0
CONFIG_PATH: travis_config.sh
PLAT: x86_64
steps:
Expand All @@ -106,7 +106,7 @@ jobs:
submodules: true
fetch-depth: 0
- name: Setup Environment variables
run: if [ "3.10" == "${{ matrix.python-version }}" -o "3.11" == "${{ matrix.python-version }}" ]; then echo "TEST_DEPENDS=$(echo $NP_TEST_DEP_LATEST)" >> $GITHUB_ENV; else echo "TEST_DEPENDS=$(echo $NP_TEST_DEP)" >> $GITHUB_ENV; fi
run: if [ "3.10" == "${{ matrix.python-version }}" -o "3.11" == "${{ matrix.python-version }}" -o "3.12" == "${{ matrix.python-version }}" ]; then echo "TEST_DEPENDS=$(echo $NP_TEST_DEP_LATEST)" >> $GITHUB_ENV; else echo "TEST_DEPENDS=$(echo $NP_TEST_DEP)" >> $GITHUB_ENV; fi
- name: Download a wheel accordingly to matrix
uses: actions/download-artifact@v3
with:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/build_wheels_linux_arm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
MB_ML_VER: 2014
TRAVIS_BUILD_DIR: ${{ github.workspace }}
CONFIG_PATH: travis_config.sh
DOCKER_IMAGE: quay.io/opencv-ci/opencv-python-manylinux2014-aarch64:20231006
DOCKER_IMAGE: quay.io/opencv-ci/opencv-python-manylinux2014-aarch64:20231109
USE_CCACHE: 0
UNICODE_WIDTH: 32
SDIST: ${{ matrix.build_sdist || 0 }}
Expand Down Expand Up @@ -84,7 +84,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12']
platform: [x64]
with_contrib: [0, 1]
without_gui: [0, 1]
Expand All @@ -94,7 +94,7 @@ jobs:
MB_PYTHON_VERSION: ${{ matrix.python-version }}
PLAT: aarch64
NP_TEST_DEP: numpy==1.19.4
NP_TEST_DEP_LATEST: numpy==1.24.0
NP_TEST_DEP_LATEST: numpy==1.26.0
CONFIG_PATH: travis_config.sh
DOCKER_TEST_IMAGE: multibuild/focal_arm64v8
UNICODE_WIDTH: 32
Expand All @@ -108,7 +108,7 @@ jobs:
submodules: true
fetch-depth: 0
- name: Setup Environment variables
run: if [ "3.10" == "${{ matrix.python-version }}" -o "3.11" == "${{ matrix.python-version }}" ]; then echo "TEST_DEPENDS=$(echo $NP_TEST_DEP_LATEST)" >> $GITHUB_ENV; else echo "TEST_DEPENDS=$(echo $NP_TEST_DEP)" >> $GITHUB_ENV; fi
run: if [ "3.10" == "${{ matrix.python-version }}" -o "3.11" == "${{ matrix.python-version }}" -o "3.12" == "${{ matrix.python-version }}" ]; then echo "TEST_DEPENDS=$(echo $NP_TEST_DEP_LATEST)" >> $GITHUB_ENV; else echo "TEST_DEPENDS=$(echo $NP_TEST_DEP)" >> $GITHUB_ENV; fi
- name: Download a wheel accordingly to matrix
uses: actions/download-artifact@v3
with:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/build_wheels_macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12']
platform: [x64]
with_contrib: [0, 1]
without_gui: [0, 1]
Expand All @@ -114,7 +114,7 @@ jobs:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
MB_PYTHON_VERSION: ${{ matrix.python-version }}
NP_TEST_DEP: numpy==1.19.4
NP_TEST_DEP_LATEST: numpy==1.24.0
NP_TEST_DEP_LATEST: numpy==1.26.0
CONFIG_PATH: travis_config.sh
PLAT: x86_64
OPENCV_TEST_DATA_PATH: ${{ github.workspace }}/opencv_extra/testdata
Expand All @@ -134,7 +134,7 @@ jobs:
python-version: ${{ matrix.python-version }}
architecture: ${{ matrix.platform }}
- name: Setup Environment variables
run: if [ "3.10" == "${{ matrix.python-version }}" -o "3.11" == "${{ matrix.python-version }}" ]; then echo "TEST_DEPENDS=$(echo $NP_TEST_DEP_LATEST)" >> $GITHUB_ENV; else echo "TEST_DEPENDS=$(echo $NP_TEST_DEP)" >> $GITHUB_ENV; fi
run: if [ "3.10" == "${{ matrix.python-version }}" -o "3.11" == "${{ matrix.python-version }}" -o "3.12" == "${{ matrix.python-version }}" ]; then echo "TEST_DEPENDS=$(echo $NP_TEST_DEP_LATEST)" >> $GITHUB_ENV; else echo "TEST_DEPENDS=$(echo $NP_TEST_DEP)" >> $GITHUB_ENV; fi
- name: Download a wheel accordingly to matrix
uses: actions/download-artifact@v3
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build_wheels_macos_m1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12']
platform: [x64]
with_contrib: [0, 1]
without_gui: [0, 1]
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build_wheels_windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12']
platform: [x86, x64]
with_contrib: [0, 1]
without_gui: [0, 1]
Expand Down
2 changes: 1 addition & 1 deletion docker/manylinux2014/Dockerfile_x86_64
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Version: 20231006
# Version: 20231109
# Image name: quay.io/opencv-ci/opencv-python-manylinux2014-x86-64

FROM quay.io/pypa/manylinux2014_x86_64:latest
Expand Down
4 changes: 3 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ def main():
'numpy>=1.19.3; python_version>="3.6" and platform_system=="Linux" and platform_machine=="aarch64"',
'numpy>=1.21.0; python_version<="3.9" and platform_system=="Darwin" and platform_machine=="arm64"',
'numpy>=1.21.4; python_version>="3.10" and platform_system=="Darwin"',
"numpy>=1.23.5; python_version>='3.11'"
"numpy>=1.23.5; python_version>='3.11'",
"numpy>=1.26.0; python_version>='3.12'"
]

python_version = cmaker.CMaker.get_python_version()
Expand Down Expand Up @@ -299,6 +300,7 @@ def main():
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: C++",
"Programming Language :: Python :: Implementation :: CPython",
"Topic :: Scientific/Engineering",
Expand Down
Loading