Skip to content

Commit e5f6622

Browse files
committed
PEP 621: Migrate from setup.{py, cfg} to pyproject.toml
1 parent a015b44 commit e5f6622

File tree

9 files changed

+166
-202
lines changed

9 files changed

+166
-202
lines changed

.github/workflows/lint_python.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@ jobs:
1515
- run: pip install codespell mypy pytest ruff safety
1616
- run: ruff check --output-format=github .
1717
- run: codespell --ignore-words-list="implementor,mimiced,provicers,re-use,THIRDPARTY,assertIn" # --skip="*.css,*.js,*.lock"
18-
- run: pip install -r requirements-test.txt
19-
- run: pip install --editable .
18+
- run: pip install --editable ".[test]"
2019
- run: mkdir --parents --verbose .mypy_cache
2120
- run: mypy --ignore-missing-imports --install-types --non-interactive . || true
2221
- run: pytest

.github/workflows/python-build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
- name: Coveralls
2727
env:
2828
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
29-
COVERALLS_FLAG_NAME: ${{ matrix.python-version }}
29+
COVERALLS_FLAG_NAME: ${{ matrix.python }}
3030
COVERALLS_PARALLEL: true
3131
run: coveralls
3232
coveralls:

pyproject.toml

Lines changed: 164 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,164 @@
1+
[build-system]
2+
build-backend = "setuptools.build_meta"
3+
4+
requires = [ "setuptools>=61.2" ]
5+
6+
[project]
7+
name = "oauthlib"
8+
version = "3.3.1"
9+
description = "A generic, spec-compliant, thorough implementation of the OAuth request-signing logic"
10+
readme.content-type = "text/x-rst"
11+
readme.file = "README.rst"
12+
license = { text = "BSD-3-Clause" }
13+
maintainers = [ { name = "Jonathan Huot", email = "jonathan.huot@gmail.com" } ]
14+
authors = [ { name = "The OAuthlib Community" } ]
15+
requires-python = ">=3.8"
16+
17+
classifiers = [
18+
"Development Status :: 5 - Production/Stable",
19+
"Environment :: Web Environment",
20+
"Intended Audience :: Developers",
21+
"Operating System :: MacOS",
22+
"Operating System :: POSIX",
23+
"Operating System :: POSIX :: Linux",
24+
"Programming Language :: Python",
25+
"Programming Language :: Python :: 3 :: Only",
26+
"Programming Language :: Python :: 3.8",
27+
"Programming Language :: Python :: 3.9",
28+
"Programming Language :: Python :: 3.10",
29+
"Programming Language :: Python :: 3.11",
30+
"Programming Language :: Python :: 3.12",
31+
"Programming Language :: Python :: 3.13",
32+
"Programming Language :: Python :: Implementation",
33+
"Programming Language :: Python :: Implementation :: CPython",
34+
"Programming Language :: Python :: Implementation :: PyPy",
35+
"Topic :: Software Development :: Libraries :: Python Modules",
36+
]
37+
dependencies = [
38+
"blinker==1.4",
39+
"cryptography>=3.0.0",
40+
"pyjwt>=2.0.0,<3.0.0",
41+
]
42+
optional-dependencies.rsa = [ "cryptography>=3.0.0" ]
43+
optional-dependencies.signals = [ "blinker>=1.4.0" ]
44+
optional-dependencies.signedtoken = [ "cryptography>=3.0.0", "pyjwt>=2.0.0,<3.0.0" ]
45+
optional-dependencies.test = [ "pytest>=4.0.0", "pytest-cov>=2.6.0", "pytest-subtests" ]
46+
urls = { Homepage = "https://github.com/oauthlib/oauthlib" }
47+
48+
[tool.setuptools]
49+
platforms = [ "any" ]
50+
license-files = [ "LICENSE" ]
51+
include-package-data = false
52+
53+
[tool.setuptools.packages.find]
54+
exclude = [ "docs" ] # examples; tests; tests.*
55+
namespaces = false
56+
57+
[tool.ruff]
58+
target-version = "py37"
59+
60+
line-length = 255
61+
lint.select = [
62+
"A", # flake8-builtins
63+
"AIR", # Airflow
64+
"ASYNC", # flake8-async
65+
"BLE", # flake8-blind-except
66+
"C4", # flake8-comprehensions
67+
"C90", # McCabe cyclomatic complexity
68+
"DJ", # flake8-django
69+
"E", # pycodestyle
70+
"EXE", # flake8-executable
71+
"F", # Pyflakes
72+
"FA", # flake8-future-annotations
73+
"FLY", # flynt
74+
"ICN", # flake8-import-conventions
75+
"INP", # flake8-no-pep420
76+
"INT", # flake8-gettext
77+
"ISC", # flake8-implicit-str-concat
78+
"N", # pep8-naming
79+
"NPY", # NumPy-specific rules
80+
"PD", # pandas-vet
81+
"PERF", # Perflint
82+
"PGH", # pygrep-hooks
83+
"PIE", # flake8-pie
84+
"PL", # Pylint
85+
"PT", # flake8-pytest-style
86+
"PYI", # flake8-pyi
87+
"RSE", # flake8-raise
88+
"RUF", # Ruff-specific rules
89+
"S", # flake8-bandit
90+
"SIM", # flake8-simplify
91+
"SLOT", # flake8-slots
92+
"T10", # flake8-debugger
93+
"T20", # flake8-print
94+
"TCH", # flake8-type-checking
95+
"W", # pycodestyle
96+
"YTT", # flake8-2020
97+
# "ANN", # flake8-annotations
98+
# "ARG", # flake8-unused-arguments
99+
# "B", # flake8-bugbear
100+
# "COM", # flake8-commas
101+
# "CPY", # flake8-copyright
102+
# "D", # pydocstyle
103+
# "DTZ", # flake8-datetimez
104+
# "EM", # flake8-errmsg
105+
# "ERA", # eradicate
106+
# "FBT", # flake8-boolean-trap
107+
# "FIX", # flake8-fixme
108+
# "G", # flake8-logging-format
109+
# "I", # isort
110+
# "PTH", # flake8-use-pathlib
111+
# "Q", # flake8-quotes
112+
# "RET", # flake8-return
113+
# "SLF", # flake8-self
114+
# "TD", # flake8-todos
115+
# "TID", # flake8-tidy-imports
116+
# "TRY", # tryceratops
117+
# "UP", # pyupgrade
118+
]
119+
lint.ignore = [
120+
"F401",
121+
"F403",
122+
"F405",
123+
"F841",
124+
"FLY002",
125+
"N806",
126+
"N818",
127+
"PERF401",
128+
"PLW2901",
129+
"PT008",
130+
"RSE102",
131+
"RUF005",
132+
"RUF012",
133+
"RUF013",
134+
"S105",
135+
"S106",
136+
"S107",
137+
]
138+
lint.exclude = [ "bottle-oauthlib", "django-oauth-toolkit", "flask-dance", "requests-oauthlib" ]
139+
lint.per-file-ignores."docs/conf.py" = [ "A001", "INP001" ]
140+
lint.per-file-ignores."oauthlib/oauth1/rfc5849/endpoints/resource.py" = [ "A005" ]
141+
lint.per-file-ignores."oauthlib/oauth2/rfc6749/clients/base.py" = [ "E722" ]
142+
lint.per-file-ignores."oauthlib/oauth2/rfc6749/endpoints/base.py" = [ "BLE001" ]
143+
lint.per-file-ignores."oauthlib/oauth2/rfc6749/endpoints/resource.py" = [ "A005" ]
144+
lint.per-file-ignores."oauthlib/oauth2/rfc6749/endpoints/token.py" = [ "A005" ]
145+
lint.per-file-ignores."oauthlib/oauth2/rfc6749/parameters.py" = [ "PLC0206" ]
146+
lint.per-file-ignores."oauthlib/oauth2/rfc6749/tokens.py" = [ "RUF023" ]
147+
lint.per-file-ignores."oauthlib/openid/connect/core/grant_types/base.py" = [ "BLE001" ]
148+
lint.per-file-ignores."oauthlib/openid/connect/core/tokens.py" = [ "RUF023" ]
149+
lint.per-file-ignores."tests/*" = [ "PT009", "PT027", "S101" ]
150+
lint.mccabe.max-complexity = 24 # default is 10
151+
lint.pylint.allow-magic-value-types = [ "int", "str" ]
152+
lint.pylint.max-args = 16 # default is 5
153+
lint.pylint.max-branches = 24 # default is 12
154+
lint.pylint.max-statements = 56 # default is 50
155+
156+
[tool.isort]
157+
combine_as_imports = true
158+
default_section = "THIRDPARTY"
159+
include_trailing_comma = true
160+
known_first_party = [ "oauthlib" ]
161+
known_tests = [ "tests" ]
162+
sections = [ "FUTURE", "STDLIB", "THIRDPARTY", "FIRSTPARTY", "TESTS", "LOCALFOLDER" ]
163+
line_length = 79
164+
multi_line_output = 5

requirements-test.txt

Lines changed: 0 additions & 4 deletions
This file was deleted.

requirements.txt

Lines changed: 0 additions & 3 deletions
This file was deleted.

ruff.toml

Lines changed: 0 additions & 114 deletions
This file was deleted.

setup.cfg

Lines changed: 0 additions & 12 deletions
This file was deleted.

setup.py

Lines changed: 0 additions & 64 deletions
This file was deleted.

tox.ini

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
envlist = py38,py39,py310,py311,py312,py313,pypy3,docs,readme,ruff
44

55
[testenv]
6-
deps=
7-
-rrequirements-test.txt
86
commands=
97
pytest --cov=oauthlib tests/
108

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy