Skip to content

Commit

Permalink
Support Python 3.12 (#452)
Browse files Browse the repository at this point in the history
  • Loading branch information
adamchainz authored Jun 15, 2023
1 parent bfcc608 commit c531251
Show file tree
Hide file tree
Showing 8 changed files with 66 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,15 @@ jobs:
- 3.9
- '3.10'
- '3.11'
- '3.12'

steps:
- uses: actions/checkout@v3

- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true
cache: pip
cache-dependency-path: 'requirements/*.txt'

Expand Down
2 changes: 2 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ repos:
- id: setup-cfg-fmt
args:
- --include-version-classifiers
- --max-py-version
- '3.12'
- repo: https://github.com/tox-dev/tox-ini-fmt
rev: 1.3.0
hooks:
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
Changelog
=========

* Support Python 3.12.

4.8.0 (2022-05-11)
------------------

Expand Down
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ A `flake8 <https://flake8.readthedocs.io/en/latest/index.html>`_ plugin that hel
Requirements
============

Python 3.7 to 3.11 supported.
Python 3.7 to 3.12 supported.

Installation
============
Expand Down
5 changes: 5 additions & 0 deletions requirements/compile.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,8 @@
check=True,
capture_output=True,
)
subprocess.run(
["python3.12", *common_args, "-o", "py312.txt"],
check=True,
capture_output=True,
)
51 changes: 51 additions & 0 deletions requirements/py312.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
#
# This file is autogenerated by pip-compile with Python 3.12
# by the following command:
#
# requirements/compile.py
#
flake8==6.0.0 \
--hash=sha256:3833794e27ff64ea4e9cf5d410082a8b97ff1a06c16aa3d2027339cd0f1195c7 \
--hash=sha256:c61007e76655af75e6785a931f452915b371dc48f56efd765247c8fe68f2b181
# via
# -r requirements.in
# pytest-flake8-path
iniconfig==2.0.0 \
--hash=sha256:2d91e135bf72d31a410b17c16da610a82cb55f6b0477d1a902134b24a455b8b3 \
--hash=sha256:b6a85871a79d2e3b22d2d1b94ac2824226a63c6b741c88f7ae975f18b6778374
# via pytest
mccabe==0.7.0 \
--hash=sha256:348e0240c33b60bbdf4e523192ef919f28cb2c3d7d5c7794f74009290f236325 \
--hash=sha256:6c2d30ab6be0e4a46919781807b4f0d834ebdd6c6e3dca0bda5a15f863427b6e
# via flake8
packaging==23.1 \
--hash=sha256:994793af429502c4ea2ebf6bf664629d07c1a9fe974af92966e4b8d2df7edc61 \
--hash=sha256:a392980d2b6cffa644431898be54b0045151319d1e7ec34f0cfed48767dd334f
# via pytest
pluggy==1.0.0 \
--hash=sha256:4224373bacce55f955a878bf9cfa763c1e360858e330072059e10bad68531159 \
--hash=sha256:74134bbf457f031a36d68416e1509f34bd5ccc019f0bcc952c7b909d06b37bd3
# via pytest
pycodestyle==2.10.0 \
--hash=sha256:347187bdb476329d98f695c213d7295a846d1152ff4fe9bacb8a9590b8ee7053 \
--hash=sha256:8a4eaf0d0495c7395bdab3589ac2db602797d76207242c17d470186815706610
# via flake8
pyflakes==3.0.1 \
--hash=sha256:ec55bf7fe21fff7f1ad2f7da62363d749e2a470500eab1b555334b67aa1ef8cf \
--hash=sha256:ec8b276a6b60bd80defed25add7e439881c19e64850afd9b346283d4165fd0fd
# via flake8
pytest==7.3.2 \
--hash=sha256:cdcbd012c9312258922f8cd3f1b62a6580fdced17db6014896053d47cddf9295 \
--hash=sha256:ee990a3cc55ba808b80795a79944756f315c67c12b56abd3ac993a7b8c17030b
# via
# -r requirements.in
# pytest-flake8-path
# pytest-randomly
pytest-flake8-path==1.3.0 \
--hash=sha256:a1f6a7f045e73b3400a59ad1a874dad39636a8d6bedef6e962396f863e05a4ac \
--hash=sha256:a3ddf053b56dbd1981f0e74ca02041e18f4e9f82435052358ffd2c147bf5a461
# via -r requirements.in
pytest-randomly==3.12.0 \
--hash=sha256:d60c2db71ac319aee0fc6c4110a7597d611a8b94a5590918bfa8583f00caccb2 \
--hash=sha256:f4f2e803daf5d1ba036cc22bf4fe9dbbf99389ec56b00e5cba732fb5c1d07fdd
# via -r requirements.in
1 change: 1 addition & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ classifiers =
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Programming Language :: Python :: 3.11
Programming Language :: Python :: 3.12
Typing :: Typed
keywords = flake8_tidy_imports
project_urls =
Expand Down
3 changes: 2 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@
requires =
tox>=4.2
env_list =
py{311, 310, 39, 38, 37}
py{312, 311, 310, 39, 38, 37}

[testenv]
package = wheel
deps =
-r requirements/{envname}.txt
set_env =
Expand Down

0 comments on commit c531251

Please sign in to comment.