chore(deps): Support Python 3.13 and drop 3.9

Closes #3037
This commit is contained in:
Rene Leonhardt 2025-04-07 13:46:49 +02:00
parent 3caab85931
commit 05076c3f40
No known key found for this signature in database
GPG key ID: 8C95C84F75AB1E8E
16 changed files with 46 additions and 39 deletions

View file

@ -15,7 +15,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy: strategy:
matrix: matrix:
python-version: ["3.10", "3.11", "3.12"] python-version: ["3.10", "3.11", "3.12", "3.13"]
steps: steps:
- name: Set up Python ${{ matrix.python-version }} - name: Set up Python ${{ matrix.python-version }}

View file

@ -25,7 +25,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy: strategy:
matrix: matrix:
python-version: ["3.10", "3.11", "3.12"] python-version: ["3.10", "3.11", "3.12", "3.13"]
steps: steps:
- name: Check out repository - name: Check out repository

View file

@ -25,7 +25,7 @@ jobs:
runs-on: windows-latest runs-on: windows-latest
strategy: strategy:
matrix: matrix:
python-version: ["3.10", "3.11", "3.12"] python-version: ["3.10", "3.11", "3.12", "3.13"]
steps: steps:
- name: Check out repository - name: Check out repository
@ -49,4 +49,3 @@ jobs:
AIDER_ANALYTICS: false AIDER_ANALYTICS: false
run: | run: |
pytest pytest

View file

@ -15,7 +15,7 @@ jobs:
runs-on: windows-latest runs-on: windows-latest
strategy: strategy:
matrix: matrix:
python-version: ["3.10", "3.11", "3.12"] python-version: ["3.10", "3.11", "3.12", "3.13"]
defaults: defaults:
run: run:
shell: pwsh # Use PowerShell for all run steps shell: pwsh # Use PowerShell for all run steps

View file

@ -50,7 +50,7 @@ cd aider
It is recommended to create a virtual environment outside of the repository to keep your development environment isolated. It is recommended to create a virtual environment outside of the repository to keep your development environment isolated.
#### Using `venv` (Python 3.9 and later) #### Using `venv` (Python 3.10 and later)
``` ```
python -m venv /path/to/venv python -m venv /path/to/venv
@ -155,7 +155,7 @@ The built documentation will be available in the `aider/website/_site` directory
### Python Compatibility ### Python Compatibility
Aider supports Python versions 3.9, 3.10, 3.11, and 3.12. When contributing code, ensure compatibility with these supported Python versions. Aider supports Python versions 3.10, 3.11, 3.12, and 3.13. When contributing code, ensure compatibility with these supported Python versions.
### Code Style ### Code Style
@ -188,7 +188,7 @@ pytest tests/basic/test_coder.py::TestCoder::test_specific_case
The project uses GitHub Actions for continuous integration. The testing workflows are defined in the following files: The project uses GitHub Actions for continuous integration. The testing workflows are defined in the following files:
- `.github/workflows/ubuntu-tests.yml`: Runs tests on Ubuntu for Python versions 3.9 through 3.12. - `.github/workflows/ubuntu-tests.yml`: Runs tests on Ubuntu for Python versions 3.10 through 3.13.
- `.github/workflows/windows-tests.yml`: Runs that on Windows - `.github/workflows/windows-tests.yml`: Runs that on Windows
These workflows are triggered on push and pull request events to the `main` branch, ignoring changes to the `aider/website/**` and `README.md` files. These workflows are triggered on push and pull request events to the `main` branch, ignoring changes to the `aider/website/**` and `README.md` files.

View file

@ -75,7 +75,7 @@ python -m pip install pipx # If you need to install pipx
pipx install aider-chat pipx install aider-chat
``` ```
You can use pipx to install aider with python versions 3.9-3.12. You can use pipx to install aider with python versions 3.10-3.13.
Also see the Also see the
[docs on other methods for installing pipx itself](https://pipx.pypa.io/stable/installation/). [docs on other methods for installing pipx itself](https://pipx.pypa.io/stable/installation/).
@ -93,7 +93,7 @@ using a
to keep aider's dependencies separated. to keep aider's dependencies separated.
You can use pip to install aider with python versions 3.9-3.12. You can use pip to install aider with python versions 3.10-3.13.
```bash ```bash
python -m pip install -U --upgrade-strategy only-if-needed aider-chat python -m pip install -U --upgrade-strategy only-if-needed aider-chat
@ -112,4 +112,3 @@ they often install aider with incorrect dependencies.
There are some [optional install steps](/docs/install/optional.html) you could consider. There are some [optional install steps](/docs/install/optional.html) you could consider.
See the [usage instructions](https://aider.chat/docs/usage.html) to start coding with aider. See the [usage instructions](https://aider.chat/docs/usage.html) to start coding with aider.

View file

@ -12,10 +12,11 @@ classifiers = [
"Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python", "Programming Language :: Python",
"Topic :: Software Development", "Topic :: Software Development",
] ]
requires-python = ">=3.10,<3.13" requires-python = ">=3.10,<3.14"
dynamic = ["dependencies", "optional-dependencies", "version"] dynamic = ["dependencies", "optional-dependencies", "version"]
[project.urls] [project.urls]

View file

@ -250,7 +250,7 @@ networkx==3.4.2
# via # via
# -c requirements/common-constraints.txt # -c requirements/common-constraints.txt
# -r requirements/requirements.in # -r requirements/requirements.in
numpy==1.26.4 numpy==2.2.4
# via # via
# -c requirements/common-constraints.txt # -c requirements/common-constraints.txt
# scipy # scipy
@ -463,9 +463,6 @@ tqdm==4.67.1
# google-generativeai # google-generativeai
# huggingface-hub # huggingface-hub
# openai # openai
# via
# -c requirements/common-constraints.txt
# tree-sitter-language-pack
tree-sitter-c-sharp==0.23.1 tree-sitter-c-sharp==0.23.1
# via # via
# -c requirements/common-constraints.txt # -c requirements/common-constraints.txt
@ -485,14 +482,12 @@ tree-sitter-yaml==0.7.0
typing-extensions==4.13.2 typing-extensions==4.13.2
# via # via
# -c requirements/common-constraints.txt # -c requirements/common-constraints.txt
# anyio
# beautifulsoup4 # beautifulsoup4
# google-generativeai # google-generativeai
# huggingface-hub # huggingface-hub
# openai # openai
# pydantic # pydantic
# pydantic-core # pydantic-core
# referencing
# typing-inspection # typing-inspection
typing-inspection==0.4.0 typing-inspection==0.4.0
# via # via
@ -523,6 +518,9 @@ zipp==3.21.0
# via # via
# -c requirements/common-constraints.txt # -c requirements/common-constraints.txt
# importlib-metadata # importlib-metadata
tree-sitter==0.23.2; python_version < "3.10" tree-sitter==0.23.2; python_version < "3.10"
tree-sitter==0.24.0; python_version >= "3.10" tree-sitter==0.24.0; python_version >= "3.10"
# Remove if Python 3.13 support https://github.com/jiaaro/pydub/pull/816 gets released
audioop-lts>=0.2.1; python_version >= "3.13"

View file

@ -282,7 +282,7 @@ nltk==3.9.1
# via llama-index-core # via llama-index-core
nodeenv==1.9.1 nodeenv==1.9.1
# via pre-commit # via pre-commit
numpy==1.26.4 numpy==2.2.4
# via # via
# -r requirements/requirements-help.in # -r requirements/requirements-help.in
# contourpy # contourpy
@ -295,7 +295,7 @@ numpy==1.26.4
# soundfile # soundfile
# streamlit # streamlit
# transformers # transformers
openai==1.75.0 openai==1.76.0
# via litellm # via litellm
oslex==0.1.3 oslex==0.1.3
# via -r requirements/requirements.in # via -r requirements/requirements.in
@ -529,7 +529,7 @@ tokenizers==0.21.1
# transformers # transformers
toml==0.10.2 toml==0.10.2
# via streamlit # via streamlit
torch==2.2.2 torch==2.6.0
# via # via
# -r requirements/requirements-help.in # -r requirements/requirements-help.in
# sentence-transformers # sentence-transformers
@ -561,7 +561,6 @@ typer==0.15.3
typing-extensions==4.13.2 typing-extensions==4.13.2
# via # via
# altair # altair
# anyio
# beautifulsoup4 # beautifulsoup4
# google-generativeai # google-generativeai
# huggingface-hub # huggingface-hub
@ -570,7 +569,6 @@ typing-extensions==4.13.2
# pydantic # pydantic
# pydantic-core # pydantic-core
# pyee # pyee
# referencing
# sentence-transformers # sentence-transformers
# sqlalchemy # sqlalchemy
# streamlit # streamlit
@ -610,3 +608,7 @@ yarl==1.20.0
# via aiohttp # via aiohttp
zipp==3.21.0 zipp==3.21.0
# via importlib-metadata # via importlib-metadata
# The following packages are considered to be unsafe in a requirements file:
# pip
# setuptools

2
requirements/pydub.in Normal file
View file

@ -0,0 +1,2 @@
# Remove if Python 3.13 support https://github.com/jiaaro/pydub/pull/816 gets released
audioop-lts>=0.2.1; python_version >= "3.13"

View file

@ -62,7 +62,7 @@ narwhals==1.38.2
# via # via
# -c requirements/common-constraints.txt # -c requirements/common-constraints.txt
# altair # altair
numpy==1.26.4 numpy==2.2.4
# via # via
# -c requirements/common-constraints.txt # -c requirements/common-constraints.txt
# pandas # pandas
@ -143,7 +143,6 @@ typing-extensions==4.13.2
# via # via
# -c requirements/common-constraints.txt # -c requirements/common-constraints.txt
# altair # altair
# referencing
# streamlit # streamlit
tzdata==2025.2 tzdata==2025.2
# via # via

View file

@ -143,7 +143,7 @@ nodeenv==1.9.1
# via # via
# -c requirements/common-constraints.txt # -c requirements/common-constraints.txt
# pre-commit # pre-commit
numpy==1.26.4 numpy==2.2.4
# via # via
# -c requirements/common-constraints.txt # -c requirements/common-constraints.txt
# contourpy # contourpy
@ -309,3 +309,7 @@ wheel==0.45.1
# via # via
# -c requirements/common-constraints.txt # -c requirements/common-constraints.txt
# pip-tools # pip-tools
# The following packages are considered to be unsafe in a requirements file:
# pip
# setuptools

View file

@ -1,11 +1,11 @@
llama-index-embeddings-huggingface llama-index-embeddings-huggingface
# Because sentence-transformers doesn't like >=2 # sentence-transformers 4 requires numpy 2 (indirectly through scipy 1.14 which dropped Python 3.9 support)
numpy<2 numpy>=2
# Mac x86 only supports 2.2.2 # Drop Mac x86 support
# https://discuss.pytorch.org/t/why-no-macosx-x86-64-build-after-torch-2-2-2-cp39-none-macosx-10-9-x86-64-whl/204546/2 # https://discuss.pytorch.org/t/why-no-macosx-x86-64-build-after-torch-2-2-2-cp39-none-macosx-10-9-x86-64-whl/204546/2
torch==2.2.2 torch>2.2.2
# Later versions break test_help in GitHub Actions on Windows and Ubuntu # Later versions break test_help in GitHub Actions on Windows and Ubuntu
llama-index-core==0.12.26 llama-index-core==0.12.26

View file

@ -172,7 +172,7 @@ nltk==3.9.1
# via # via
# -c requirements/common-constraints.txt # -c requirements/common-constraints.txt
# llama-index-core # llama-index-core
numpy==1.26.4 numpy==2.2.4
# via # via
# -c requirements/common-constraints.txt # -c requirements/common-constraints.txt
# -r requirements/requirements-help.in # -r requirements/requirements-help.in
@ -273,7 +273,7 @@ tokenizers==0.21.1
# via # via
# -c requirements/common-constraints.txt # -c requirements/common-constraints.txt
# transformers # transformers
torch==2.2.2 torch==2.6.0
# via # via
# -c requirements/common-constraints.txt # -c requirements/common-constraints.txt
# -r requirements/requirements-help.in # -r requirements/requirements-help.in
@ -293,7 +293,6 @@ transformers==4.51.3
typing-extensions==4.13.2 typing-extensions==4.13.2
# via # via
# -c requirements/common-constraints.txt # -c requirements/common-constraints.txt
# anyio
# huggingface-hub # huggingface-hub
# llama-index-core # llama-index-core
# pydantic # pydantic
@ -325,3 +324,6 @@ yarl==1.20.0
# via # via
# -c requirements/common-constraints.txt # -c requirements/common-constraints.txt
# aiohttp # aiohttp
# The following packages are considered to be unsafe in a requirements file:
# setuptools

View file

@ -1,3 +1,2 @@
tree-sitter==0.23.2; python_version < "3.10" tree-sitter==0.23.2; python_version < "3.10"
tree-sitter==0.24.0; python_version >= "3.10" tree-sitter==0.24.0; python_version >= "3.10"

View file

@ -25,9 +25,11 @@ uv pip compile \
requirements/requirements.in \ requirements/requirements.in \
$1 $1
grep -v ^tree-sitter= tmp.requirements.txt \ {
| cat - requirements/tree-sitter.in \ grep -v ^tree-sitter= tmp.requirements.txt
> requirements.txt echo; cat requirements/tree-sitter.in
echo; cat requirements/pydub.in
} > requirements.txt
# Compile additional requirements files # Compile additional requirements files
SUFFIXES=(dev help browser playwright) SUFFIXES=(dev help browser playwright)