Skip to content

Commit

Permalink
Add support for Python 3.12 (#751)
Browse files Browse the repository at this point in the history
* Add support for Python 3.12

* Fix

* Again

* Update metadata
  • Loading branch information
bachya authored Oct 29, 2023
1 parent 75960c6 commit 8aa6f8e
Show file tree
Hide file tree
Showing 8 changed files with 345 additions and 342 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/publish-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ jobs:
- name: ⤵️ Check out code from GitHub
uses: actions/checkout@v4

- name: 🏗 Set up Python 3.9
- name: 🏗 Set up Python 3.12
id: python
uses: actions/setup-python@v4
with:
python-version: 3.9
python-version: "3.12"

- name: 🚀 Publish to PyPi
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/static-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ jobs:
- name: ⤵️ Check out code from GitHub
uses: actions/checkout@v4

- name: 🏗 Set up Python 3.9
- name: 🏗 Set up Python 3.12
id: setup-python
uses: actions/setup-python@v4
with:
python-version: 3.9
python-version: "3.12"

- name: ⤵️ Get pip cache directory
id: pip-cache
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ jobs:
strategy:
matrix:
python-version:
- "3.9"
- "3.10"
- "3.11"
- "3.12"

steps:
- name: ⤵️ Check out code from GitHub
Expand Down Expand Up @@ -91,11 +91,11 @@ jobs:
- name: ⬇️ Download coverage data
uses: actions/download-artifact@v3

- name: 🏗 Set up Python 3.9
- name: 🏗 Set up Python 3.12
id: setup-python
uses: actions/setup-python@v4
with:
python-version: 3.9
python-version: "3.12"

- name: ⤵️ Get pip cache directory
id: pip-cache
Expand Down
2 changes: 1 addition & 1 deletion .rtx.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[tools]
python = { version="3.11", virtualenv=".venv" }
python = { version="3.12", virtualenv=".venv" }
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ pip install ecowitt2mqtt

`ecowitt2mqtt` is currently supported on:

- Python 3.9
- Python 3.10
- Python 3.11
- Python 3.12

# Disclaimer

Expand Down
651 changes: 323 additions & 328 deletions poetry.lock

Large diffs are not rendered by default.

14 changes: 9 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -52,28 +52,31 @@ classifiers = [
"License :: OSI Approved :: MIT License",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
]

[tool.poetry.dependencies]
"ruamel.yaml" = ">=0.17.21,<0.19.0"
aiohttp = "^3.8.1"
"ruamel.yaml.clib" = ">=0.2.8,<0.3.0"
aiohttp = ">=3.9.0b0"
aiomqtt = "^1.0.0"
certifi = ">=2023.07.22"
colorlog = "^6.6.0"
fastapi = ">=0.89.1,<0.105.0"
frozenlist = "^1.4.0"
meteocalc = "^1.1.0"
python = "^3.9.0"
python = ">=3.10,<=3.12"
python-multipart = ">=0.0.5,<0.0.7"
rapidfuzz = ">=2.13,<4.0"
urllib3 = ">=1.26.18"
uvicorn = ">=0.19.0"
uvloop = ">=0.17,<0.20"
voluptuous = "^0.13.1"
urllib3 = ">=1.26.18"
yarl = ">=1.9.2"

[tool.poetry.group.dev.dependencies]
GitPython = ">=3.1.35"
Expand All @@ -95,10 +98,11 @@ pytest-aiohttp = "^1.0.0"
pytest-asyncio = ">=0.20.1,<0.22.0"
pytest-cov = "^4.0.0"
pyupgrade = "^3.1.0"
pyyaml = "^6.0.1"
requests = ">=2.31.0"
ruff = ">=0.0.261,<0.1.4"
safety = "^2.3.1"
typing-extensions = "^4.4.0"
typing-extensions = "^4.8.0"
vulture = "^2.6"
yamllint = "^1.28.0"

Expand Down
4 changes: 4 additions & 0 deletions script/setup
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
#!/bin/sh
set -e

if command -v "rtx"; then
rtx install
fi

# Install all dependencies:
pip3 install poetry
poetry install
Expand Down

0 comments on commit 8aa6f8e

Please sign in to comment.