From afd2fac5a595b966a2722cfbc9d49948b07d2948 Mon Sep 17 00:00:00 2001 From: Aaron Smith Date: Thu, 3 Nov 2022 08:26:31 -0500 Subject: [PATCH] Python 3.11 Support (#524) * First pass at Python 3.11 support * Update 'whats new' * Update build_requirements for different python versions * Fix docs * Empty commit for CI * Use lowest supported numpy (==) for building instead of max compatible (~=) * Make min numpy 1.21.3 * Use lowest supported version of scipy when building * More scipy hackery * https://github.com/scipy/scipy/blob/26a77da3a4ca126a943a331c1aa6ef3915b0d501/pyproject.toml#L41 * More scipy hackery * Typos * More typos --- .circleci/config.yml | 27 ++++++++++++++++++++++++++ .github/workflows/build_and_deploy.yml | 2 +- .github/workflows/nightly_cron.yml | 4 ++-- build_tools/build_requirements.txt | 11 +++++++++-- doc/whats_new.rst | 6 ++++++ requirements.txt | 2 +- setup.py | 1 + 7 files changed, 47 insertions(+), 6 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 725281166..bc6d6ae1e 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -167,6 +167,15 @@ jobs: - checkout - build-test-and-persist: pythonversion: "3.10" + + test-unit-cpython311: + machine: + image: ubuntu-2004:202111-02 + working_directory: ~/pmdarima + steps: + - checkout + - build-test-and-persist: + pythonversion: "3.11" # --- /Unit tests --- build-doc: @@ -241,6 +250,16 @@ jobs: key: "3.10" - deploy-to-pypi + deploy-cpython311-whl: + machine: + image: ubuntu-2004:202111-02 + working_directory: ~/pmdarima + steps: + - checkout + - restore-whl-file: + key: "3.11" + - deploy-to-pypi + # For documentation deployment. You'll need the following environment vars # in your Circle CI settings, otherwise this will not work. # @@ -276,6 +295,8 @@ workflows: filters: *test-filters - test-unit-cpython310: filters: *test-filters + - test-unit-cpython311: + filters: *test-filters - build-doc: filters: *test-filters - testing-passed: @@ -285,6 +306,7 @@ workflows: - test-unit-cpython38 - test-unit-cpython39 - test-unit-cpython310 + - test-unit-cpython311 - build-doc filters: *test-filters @@ -314,3 +336,8 @@ workflows: filters: *deploy-filters requires: - deploy-doc + + - deploy-cpython311-whl: + filters: *deploy-filters + requires: + - deploy-doc diff --git a/.github/workflows/build_and_deploy.yml b/.github/workflows/build_and_deploy.yml index efa129610..3a5eefec8 100644 --- a/.github/workflows/build_and_deploy.yml +++ b/.github/workflows/build_and_deploy.yml @@ -20,7 +20,7 @@ jobs: build-and-deploy: strategy: matrix: - python3-minor-version: [7, 8, 9, 10] + python3-minor-version: [7, 8, 9, 10, 11] os: [macos-latest, ubuntu-latest, windows-latest] defaults: run: diff --git a/.github/workflows/nightly_cron.yml b/.github/workflows/nightly_cron.yml index 21aa60e6a..d05ebbfe4 100644 --- a/.github/workflows/nightly_cron.yml +++ b/.github/workflows/nightly_cron.yml @@ -24,8 +24,8 @@ jobs: fail-fast: false matrix: os: [windows-latest, macos-latest, ubuntu-latest] - python-version: ['3.10'] - python-executable: ['cp310'] + python-version: ['3.11'] + python-executable: ['cp311'] defaults: run: shell: bash diff --git a/build_tools/build_requirements.txt b/build_tools/build_requirements.txt index c992fd6f6..6c79033b3 100644 --- a/build_tools/build_requirements.txt +++ b/build_tools/build_requirements.txt @@ -1,5 +1,12 @@ -numpy~=1.21.2 -scipy>=1.3.2 +numpy==1.21.2; python_version < '3.10' +numpy==1.21.6; python_version == '3.10' and platform_system != 'Windows' +numpy==1.22.3; python_version == '3.10' and platform_system == 'Windows' +numpy==1.23.2; python_version >= '3.11' +scipy==1.3.2; python_version <= '3.8' and platform_machine != 'aarch64' +scipy==1.5.3; python_version <= '3.8' and platform_machine == 'aarch64' +scipy==1.5.4; python_version == '3.9' +scipy==1.7.2; python_version == '3.10' +scipy==1.9.3; python_version == '3.11' cython>=0.29,!=0.29.18,!=0.29.31 scikit-learn>=0.22 pandas>=0.19 diff --git a/doc/whats_new.rst b/doc/whats_new.rst index 7f0c07dc7..816f6d958 100644 --- a/doc/whats_new.rst +++ b/doc/whats_new.rst @@ -7,6 +7,12 @@ What's new in pmdarima As new releases of pmdarima are pushed out, the following list (introduced in v0.8.1) will document the latest features. +`v2.0.2 `_ +------------------------------------------------- + +* Add support for Python 3.11 +* Change minimum numpy version to ``1.21.2`` + `v2.0.1 `_ ------------------------------------------------- diff --git a/requirements.txt b/requirements.txt index 262d3e36b..ff609a594 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,6 @@ joblib>=0.11 Cython>=0.29,!=0.29.18,!=0.29.31 -numpy>=1.21 +numpy>=1.21.2 pandas>=0.19 scikit-learn>=0.22 scipy>=1.3.2 diff --git a/setup.py b/setup.py index df6668ed2..1ac31bd83 100644 --- a/setup.py +++ b/setup.py @@ -243,6 +243,7 @@ def do_setup(): 'Programming Language :: Python :: 3.8', 'Programming Language :: Python :: 3.9', 'Programming Language :: Python :: 3.10', + 'Programming Language :: Python :: 3.11', ('Programming Language :: Python :: ' 'Implementation :: CPython'), ],