Skip to content

Commit 0349bbe

Browse files
authored
Add explicit support for Python 3.11, upgrade linting tools
1 parent 2ca4b01 commit 0349bbe

File tree

7 files changed

+31
-29
lines changed

7 files changed

+31
-29
lines changed

.github/workflows/main.yml

Lines changed: 6 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -9,24 +9,12 @@ on:
99
jobs:
1010
main:
1111
strategy:
12+
fail-fast: false
1213
matrix:
14+
os: [ubuntu-latest]
15+
python: [pypy3.7, 3.7, 3.9, "3.10", 3.11, 3.12-dev]
16+
toxenv: [py]
1317
include:
14-
# linux
15-
- os: ubuntu-latest
16-
python: pypy-3.7
17-
toxenv: py
18-
- os: ubuntu-latest
19-
python: 3.7
20-
toxenv: py
21-
- os: ubuntu-latest
22-
python: 3.8
23-
toxenv: py
24-
- os: ubuntu-latest
25-
python: 3.9
26-
toxenv: py
27-
- os: ubuntu-latest
28-
python: '3.10'
29-
toxenv: py
3018
# windows
3119
- os: windows-latest
3220
python: 3.7
@@ -40,8 +28,8 @@ jobs:
4028
toxenv: pre-commit
4129
runs-on: ${{ matrix.os }}
4230
steps:
43-
- uses: actions/checkout@v2
44-
- uses: actions/setup-python@v2
31+
- uses: actions/checkout@v3
32+
- uses: actions/setup-python@v4
4533
with:
4634
python-version: ${{ matrix.python }}
4735
- run: python -mpip install --upgrade setuptools pip tox virtualenv

.pre-commit-config.yaml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,39 @@
11
repos:
22
- repo: https://github.com/pre-commit/pre-commit-hooks
3-
rev: v4.1.0
3+
rev: v4.4.0
44
hooks:
55
- id: check-yaml
66
- id: debug-statements
77
- id: end-of-file-fixer
88
- id: trailing-whitespace
99
- repo: https://github.com/asottile/reorder_python_imports
10-
rev: v2.6.0
10+
rev: v3.9.0
1111
hooks:
1212
- id: reorder-python-imports
1313
args: [--application-directories, '.:src', --py37-plus]
1414
- repo: https://github.com/psf/black
15-
rev: 21.12b0
15+
rev: 23.1.0
1616
hooks:
1717
- id: black
1818
args: [--line-length=79]
1919
- repo: https://github.com/asottile/pyupgrade
20-
rev: v2.31.0
20+
rev: v3.3.1
2121
hooks:
2222
- id: pyupgrade
2323
args: [--py37-plus]
2424
- repo: https://github.com/pycqa/flake8
25-
rev: 4.0.1
25+
rev: 6.0.0
2626
hooks:
2727
- id: flake8
2828
exclude: ^(tests/|docs/|setup.py)
2929
additional_dependencies:
3030
- flake8-docstrings
3131
- flake8-import-order
3232
- repo: https://github.com/asottile/setup-cfg-fmt
33-
rev: v1.19.0
33+
rev: v2.2.0
3434
hooks:
3535
- id: setup-cfg-fmt
36+
args: [--include-version-classifiers]
3637
#- repo: https://github.com/pre-commit/mirrors-mypy
3738
# rev: v0.910-1
3839
# hooks:

docs/source/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@
7171
#
7272
# This is also used if you do content translation via gettext catalogs.
7373
# Usually you set "language" from the command line for these cases.
74-
language = None
74+
language = "en"
7575

7676
# List of patterns, relative to source directory, that match files and
7777
# directories to ignore when looking for source files.

setup.cfg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ classifiers =
2121
Programming Language :: Python :: 3.8
2222
Programming Language :: Python :: 3.9
2323
Programming Language :: Python :: 3.10
24+
Programming Language :: Python :: 3.11
2425
Programming Language :: Python :: Implementation :: CPython
2526

2627
[options]

tests/test_parseresult.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,19 @@
1818
from rfc3986 import exceptions
1919
from rfc3986 import parseresult as pr
2020

21-
INVALID_PORTS = ["443:80", "443:80:443", "abcdef", "port", "43port", " 1", "1 ", "𖭖", "-1", " 1", "1_1"]
21+
INVALID_PORTS = [
22+
"443:80",
23+
"443:80:443",
24+
"abcdef",
25+
"port",
26+
"43port",
27+
" 1",
28+
"1 ",
29+
"𖭖",
30+
"-1",
31+
" 1",
32+
"1_1",
33+
]
2234

2335
SNOWMAN = b"\xe2\x98\x83"
2436
SNOWMAN_IDNA_HOST = "http://xn--n3h.com"

tests/test_validators.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -245,12 +245,12 @@ def test_allowed_hosts_and_schemes(uri, failed_component):
245245
)
246246
def test_successful_complex_validation(uri):
247247
"""Verify we do not raise ValidationErrors for good URIs."""
248-
validators.Validator().allow_schemes("https", "ssh",).allow_hosts(
248+
validators.Validator().allow_schemes("https", "ssh").allow_hosts(
249249
"github.com",
250250
"bitbucket.org",
251251
"gitlab.com",
252252
"git.openstack.org",
253-
).allow_ports("22", "443",).require_presence_of(
253+
).allow_ports("22", "443").require_presence_of(
254254
"scheme",
255255
"host",
256256
"path",

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[tox]
2-
envlist = py37,py38,py39,py310,lint
2+
envlist = py{37,38,39,310,311,312},lint
33

44
[testenv]
55
pip_pre = False

0 commit comments

Comments
 (0)