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

Support Python 3.10 and 3.11 #2435

Merged
merged 7 commits into from
Apr 7, 2023
Merged
Show file tree
Hide file tree
Changes from 6 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
4 changes: 2 additions & 2 deletions .github/workflows/test_on_push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: [3.8, 3.9]
python-version: ["3.8", "3.9", "3.10", "3.11"]

steps:
- uses: actions/checkout@v3
Expand Down Expand Up @@ -89,7 +89,7 @@ jobs:
if: matrix.os == 'ubuntu-latest'
run: tox -e pybamm-requires

- name: Run unit tests for GNU/Linux with Python 3.8
- name: Run unit tests for GNU/Linux with Python 3.8, 3.10, and 3.11
if: matrix.os == 'ubuntu-latest' && matrix.python-version != 3.9
run: python -m tox -e unit

Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

# Features

- PyBaMM now support Python 3.10 and 3.11 ([#2435](https://github.com/pybamm-team/PyBaMM/pull/2435))
- Updated to casadi 3.6, which required some changes to the casadi integrator. ([#2859](https://github.com/pybamm-team/PyBaMM/pull/2859))

## Bug fixes
Expand Down
2 changes: 1 addition & 1 deletion docs/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ pandas >= 0.24
anytree >= 2.4.3
autograd >= 1.2
scikit-fem >= 0.2.0
casadi >= 3.5.0
casadi >= 3.6.0
imageio>=2.9.0
jupyter # For example notebooks
pybtex
Expand Down
4 changes: 2 additions & 2 deletions docs/source/user_guide/installation/GNU-linux.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
Prerequisites
=============

To use and/or contribute to PyBaMM, you must have Python 3.8 or 3.9 installed.
To use and/or contribute to PyBaMM, you must have Python 3.8, 3.9, 3.10, or 3.11 installed.

To install Python 3 on Debian-based distribution (Debian, Ubuntu, Linux
mint), open a terminal and run
Expand Down Expand Up @@ -46,7 +46,7 @@ User install

We recommend to install PyBaMM within a virtual environment, in order
not to alter any distribution Python files.
First, make sure you are using Python 3.8 or 3.9.
First, make sure you are using Python 3.8, 3.9, 3.10, or 3.11.
To create a virtual environment ``env`` within your current directory type:

.. code:: bash
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ or download the source archive on the repository's homepage.

To install PyBaMM, you will need:

- Python 3 (PyBaMM supports versions 3.8 and 3.9)
- Python 3 (PyBaMM supports versions 3.8, 3.9, 3.10, and 3.11)
- The Python headers file for your current Python version.
- A BLAS library (for instance `openblas <https://www.openblas.net/>`_).
- A C compiler (ex: ``gcc``).
Expand Down
2 changes: 1 addition & 1 deletion docs/source/user_guide/installation/windows.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Windows
Prerequisites
-------------

To use and/or contribute to PyBaMM, you must have Python 3.8 or 3.9 installed.
To use and/or contribute to PyBaMM, you must have Python 3.8, 3.9, 3.10, or 3.11 installed.

To install Python 3 download the installation files from `Python’s
website <https://www.python.org/downloads/windows/>`__. Make sure to
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ pandas >= 0.24
anytree >= 2.4.3
autograd >= 1.2
scikit-fem >= 0.2.0
casadi >= 3.5.0
casadi >= 3.6.0
imageio>=2.9.0
pybtex>=0.24.0
sympy >= 1.8
Expand Down
18 changes: 16 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,21 @@ def compile_KLU():
},
package_data={"pybamm": pybamm_data},
# Python version
python_requires=">=3.8,<3.10",
python_requires=">=3.8,<3.12",
classifiers=[
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: BSD License",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Topic :: Scientific/Engineering",
],
# List of dependencies
install_requires=[
"numpy>=1.16",
Expand All @@ -195,7 +209,7 @@ def compile_KLU():
"anytree>=2.4.3",
"autograd>=1.2",
"scikit-fem>=0.2.0",
"casadi>=3.5.0",
"casadi>=3.6.0",
"imageio>=2.9.0",
"importlib-metadata",
"pybtex>=0.24.0",
Expand Down