Skip to content

Commit

Permalink
Add support for Python 3.13 (#3490)
Browse files Browse the repository at this point in the history
Python 3.13 has been released on 7 Oct 2024, changelog is at https://docs.python.org/3.13/whatsnew/3.13.html

---------

Co-authored-by: Dongdong Tian <[email protected]>
  • Loading branch information
weiji14 and seisman authored Dec 19, 2024
1 parent 4060160 commit 823d9c0
Show file tree
Hide file tree
Showing 14 changed files with 18 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:
cache-environment-key: micromamba-environment-${{ steps.date.outputs.date }}
create-args: >-
gmt=6.5.0
python=3.12
python=3.13
numpy
pandas
xarray
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cache_data.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
- conda-forge
- nodefaults
create-args: >-
python=3.12
python=3.13
gmt=6.5.0
numpy
pandas
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
# Is it a draft Pull Request (true or false)?
isDraft:
- ${{ github.event.pull_request.draft }}
# Only run one job (Ubuntu + Python 3.12) for draft PRs
# Only run jobs on Ubuntu for draft PRs
exclude:
- os: macos-latest
isDraft: true
Expand Down Expand Up @@ -92,7 +92,7 @@ jobs:
# environment cache is persistent for one week.
cache-environment-key: micromamba-environment-${{ steps.date.outputs.date }}
create-args: >-
python=3.12
python=3.13
gmt=6.5.0
ghostscript=10.04.0
numpy
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci_doctests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
- conda-forge
- nodefaults
create-args: >-
python=3.12
python=3.13
gmt=6.5.0
numpy
pandas
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/ci_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ['3.10', '3.12']
python-version: ['3.10', '3.13']
os: [ubuntu-latest, macos-latest, windows-latest]
# Is it a draft Pull Request (true or false)?
isDraft:
Expand All @@ -74,8 +74,8 @@ jobs:
pandas-version: '=2.0'
xarray-version: '=2023.04'
optional-packages: ' contextily geopandas<1 ipython pyarrow rioxarray sphinx-gallery'
# Python 3.12 + core packages (latest versions) + optional packages
- python-version: '3.12'
# Python 3.13 + core packages (latest versions) + optional packages
- python-version: '3.13'
numpy-version: '2.2'
pandas-version: ''
xarray-version: ''
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci_tests_dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ jobs:
# environment cache is persistent for one week.
cache-environment-key: micromamba-environment-${{ steps.date.outputs.date }}
create-args: >-
python=3.12
python=3.13
cmake
make
ninja
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/format-command.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
# Setup Python environment
- uses: actions/[email protected]
with:
python-version: '3.12'
python-version: '3.13'

# Install formatting tools
- name: Install formatting tools
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-to-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
- name: Set up Python
uses: actions/[email protected]
with:
python-version: '3.12'
python-version: '3.13'

- name: Install dependencies
run: python -m pip install build
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/style_checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
- name: Set up Python
uses: actions/[email protected]
with:
python-version: '3.12'
python-version: '3.13'

- name: Install packages
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/type_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
- name: Set up Python
uses: actions/[email protected]
with:
python-version: '3.12'
python-version: '3.13'

- name: Install packages
run: |
Expand Down
2 changes: 1 addition & 1 deletion ci/requirements/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ channels:
- nodefaults
dependencies:
# Required dependencies
- python=3.12
- python=3.13
- gmt=6.5.0
- ghostscript=10.04.0
- numpy
Expand Down
4 changes: 2 additions & 2 deletions doc/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,14 +128,14 @@ installed (we'll call it `pygmt` but feel free to change it to whatever you want
::: {tab-item} mamba
:sync: mamba
```
mamba create --name pygmt python=3.12 numpy pandas xarray netcdf4 packaging gmt
mamba create --name pygmt python=3.13 numpy pandas xarray netcdf4 packaging gmt
```
:::

::: {tab-item} conda
:sync: conda
```
conda create --name pygmt python=3.12 numpy pandas xarray netcdf4 packaging gmt
conda create --name pygmt python=3.13 numpy pandas xarray netcdf4 packaging gmt
```
:::
::::
Expand Down
2 changes: 1 addition & 1 deletion environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ channels:
- conda-forge
- nodefaults
dependencies:
- python=3.12
- python>=3.10
# Required dependencies
- gmt=6.5.0
- ghostscript=10.04.0
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ classifiers = [
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"License :: OSI Approved :: BSD License",
]
dependencies = [
Expand Down

0 comments on commit 823d9c0

Please sign in to comment.