Skip to content

Commit

Permalink
feat: add Python 3.12 (#616)
Browse files Browse the repository at this point in the history
* build: upgrade everything with "poetry update"
* build: downgrade pylint to the previous version
  • Loading branch information
andreoliwa authored Oct 20, 2023
1 parent 31ee437 commit 90ced4c
Show file tree
Hide file tree
Showing 25 changed files with 975 additions and 643 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/python.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.11", "3.10", "3.9", "3.8"]
python-version: ["3.12", "3.11", "3.10", "3.9", "3.8"]
# ubuntu-latest is being moved from ubuntu-18.04 to ubuntu-20.04
# See https://github.com/actions/virtual-environments/issues/1816
os: [ubuntu-latest, windows-latest, macos-latest]
Expand Down
3 changes: 1 addition & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

# https://pre-commit.com/#top_level-default_language_version
default_language_version:
python: python3.8
python: python3.11

# https://pre-commit.ci/#configuration
ci:
Expand Down Expand Up @@ -57,7 +57,6 @@ repos:
rev: v1.2.0
hooks:
- id: sort-all
language_version: python3.8
- repo: https://github.com/psf/black
rev: 23.9.1
hooks:
Expand Down
2 changes: 1 addition & 1 deletion .tool-versions
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
poetry 1.5.1
poetry 1.6.1
pre-commit 3.3.2
2 changes: 2 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,8 @@ python
- Python 3.10
* - `py://nitpick/resources/python/311 <src/nitpick/resources/python/311.toml>`_
- Python 3.11
* - `py://nitpick/resources/python/312 <src/nitpick/resources/python/312.toml>`_
- Python 3.12
* - `py://nitpick/resources/python/38 <src/nitpick/resources/python/38.toml>`_
- Python 3.8
* - `py://nitpick/resources/python/39 <src/nitpick/resources/python/39.toml>`_
Expand Down
4 changes: 2 additions & 2 deletions docs/ideas/yaml/contains.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
[[".github/workflows/python.yaml".contains]]
__jmespath = "jobs.build.strategy.matrix"
os = ["ubuntu-latest", "macos-latest", "windows-latest"]
"python-version" = ["3.11", "3.10", "3.9", "3.8"]
"python-version" = ["3.12", "3.11", "3.10", "3.9", "3.8"]

# 3. Same as item 4 on "jmespath-on-section.toml", but with a different syntax.
[[".github/workflows/python.yaml".contains]]
Expand Down Expand Up @@ -56,7 +56,7 @@ __yaml = "- uses: actions/checkout@v2"
[[".github/workflows/python.yaml".contains_sorted]]
__jmespath = "jobs.build.strategy.matrix"
os = ["ubuntu-latest", "macos-latest", "windows-latest"]
"python-version" = ["3.11", "3.10", "3.9", "3.8"]
"python-version" = ["3.12", "3.11", "3.10", "3.9", "3.8"]

[[".github/workflows/python.yaml".contains_sorted]]
__jmespath = "jobs.build"
Expand Down
2 changes: 1 addition & 1 deletion docs/ideas/yaml/merge_lists/merged_style.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# This should be the result of a parent style including all the styles in this directory
[".github/workflows/python.yaml".jobs.build.strategy.matrix]
os = ["ubuntu-latest", "macos-latest", "windows-latest"]
"python-version" = ["3.11", "3.10", "3.9", "3.8"]
"python-version" = ["3.12", "3.11", "3.10", "3.9", "3.8"]
2 changes: 2 additions & 0 deletions docs/ideas/yaml/merge_lists/py312.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[".github/workflows/python.yaml".jobs.build.strategy.matrix]
"python-version" = ["3.12"]
2 changes: 2 additions & 0 deletions docs/library.rst
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,8 @@ python
- Python 3.10
* - :gitref:`py://nitpick/resources/python/311 <src/nitpick/resources/python/311.toml>`
- Python 3.11
* - :gitref:`py://nitpick/resources/python/312 <src/nitpick/resources/python/312.toml>`
- Python 3.12
* - :gitref:`py://nitpick/resources/python/38 <src/nitpick/resources/python/38.toml>`
- Python 3.8
* - :gitref:`py://nitpick/resources/python/39 <src/nitpick/resources/python/39.toml>`
Expand Down
8 changes: 4 additions & 4 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ attrs==23.1.0 ; python_version >= "3.8" and python_version < "4.0"
autorepr==0.3.0 ; python_version >= "3.8" and python_version < "4.0"
babel==2.9.1 ; python_version >= "3.8" and python_version < "4.0"
cattrs==22.2.0 ; python_version >= "3.8" and python_version < "4.0"
certifi==2022.12.7 ; python_version >= "3.8" and python_version < "4.0"
certifi==2023.7.22 ; python_version >= "3.8" and python_version < "4.0"
charset-normalizer==2.0.11 ; python_version >= "3.8" and python_version < "4.0"
click==8.1.3 ; python_version >= "3.8" and python_version < "4.0"
click==8.1.7 ; python_version >= "3.8" and python_version < "4.0"
colorama==0.4.6 ; python_version >= "3.8" and python_version < "4.0" and (platform_system == "Windows" or sys_platform == "win32")
configupdater==3.1.1 ; python_version >= "3.8" and python_version < "4.0"
dictdiffer==0.9.0 ; python_version >= "3.8" and python_version < "4.0"
Expand Down Expand Up @@ -36,7 +36,7 @@ platformdirs==3.1.1 ; python_version >= "3.8" and python_version < "4.0"
pluggy==1.0.0 ; python_version >= "3.8" and python_version < "4.0"
pycodestyle==2.7.0 ; python_version >= "3.8" and python_version < "4.0"
pyflakes==2.3.1 ; python_version >= "3.8" and python_version < "4.0"
pygments==2.14.0 ; python_version >= "3.8" and python_version < "4.0"
pygments==2.15.0 ; python_version >= "3.8" and python_version < "4.0"
pyparsing==3.0.7 ; python_version >= "3.8" and python_version < "4.0"
pyrsistent==0.18.1 ; python_version >= "3.8" and python_version < "4.0"
pytest-socket==0.6.0 ; python_version >= "3.8" and python_version < "4.0"
Expand Down Expand Up @@ -66,6 +66,6 @@ toml==0.10.2 ; python_version >= "3.8" and python_version < "4.0"
tomli==2.0.0 ; python_version >= "3.8" and python_version < "3.11"
tomlkit==0.11.8 ; python_version >= "3.8" and python_version < "4.0"
url-normalize==1.4.3 ; python_version >= "3.8" and python_version < "4.0"
urllib3==1.26.8 ; python_version >= "3.8" and python_version < "4"
urllib3==1.26.18 ; python_version >= "3.8" and python_version < "4.0"
win32-setctime==1.1.0 ; python_version >= "3.8" and python_version < "4.0" and sys_platform == "win32"
zipp==3.7.0 ; python_version >= "3.8" and python_version < "3.10"
Loading

0 comments on commit 90ced4c

Please sign in to comment.