Skip to content

Commit a8b2dcc

Browse files
authored
Update pyproject.toml to current best practices. Support 3.11 explicitly (#32)
1 parent d52413d commit a8b2dcc

File tree

2 files changed

+64
-59
lines changed

2 files changed

+64
-59
lines changed

.circleci/config.yml

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,22 @@ jobs:
3030
docker:
3131
- image: circleci/python:3.8
3232

33-
"test-py39-no-mypy":
33+
"test-py39":
34+
<<: *shared
35+
docker:
36+
- image: circleci/python:3.9
37+
38+
"test-py310":
39+
<<: *shared
40+
docker:
41+
- image: circleci/python:3.10
42+
43+
"test-py311-no-mypy":
3444
<<: *shared
3545
environment:
3646
TOX_SKIP_ENV: mypy
3747
docker:
38-
- image: circleci/python:3.9-rc
48+
- image: circleci/python:3.11-rc
3949

4050
workflows:
4151
version: 2
@@ -45,4 +55,6 @@ workflows:
4555
- "test-py36"
4656
- "test-py37"
4757
- "test-py38"
48-
- "test-py39-no-mypy"
58+
- "test-py39"
59+
- "test-py310"
60+
- "test-py311-no-mypy"

pyproject.toml

Lines changed: 49 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -1,68 +1,61 @@
11
[build-system]
2-
requires = ["flit_core >=2,<4"]
2+
requires = ["flit_core >=3.2,<4"]
33
build-backend = "flit_core.buildapi"
44

5-
6-
[tool.flit]
7-
8-
[tool.flit.metadata]
9-
module = "codetiming"
10-
author = "Real Python"
11-
author-email = "[email protected]"
12-
home-page = "https://realpython.com/python-timer"
13-
description-file = "README.md"
14-
classifiers = [
15-
"Development Status :: 5 - Production/Stable",
16-
"Intended Audience :: Developers",
17-
"License :: OSI Approved :: MIT License",
18-
"Natural Language :: English",
19-
"Operating System :: MacOS",
20-
"Operating System :: Microsoft",
21-
"Operating System :: POSIX :: Linux",
22-
"Programming Language :: Python :: 3.6",
23-
"Programming Language :: Python :: 3.7",
24-
"Programming Language :: Python :: 3.8",
25-
"Programming Language :: Python :: 3.9",
26-
"Topic :: Education",
27-
"Topic :: Software Development :: Libraries :: Python Modules",
28-
"Topic :: System :: Monitoring",
29-
"Typing :: Typed",
30-
]
31-
keywords = "timer class contextmanager decorator"
32-
33-
# Requirements
34-
requires-python = ">=3.6"
35-
requires = [
36-
"dataclasses; python_version < '3.7'",
37-
]
38-
39-
40-
[tool.flit.metadata.urls]
41-
"Source Code" = "https://github.com/realpython/codetiming"
42-
"Tutorial" = "https://realpython.com/python-timer"
43-
44-
[tool.flit.metadata.requires-extra]
45-
dev = ["black", "bump2version", "flake8", "flit", "interrogate", "isort", "mypy"]
46-
test = ["black", "interrogate", "pytest", "pytest-cov", "tox"]
5+
[project]
6+
name = "codetiming"
7+
authors = [
8+
{ name = "Geir Arne Hjelle", email = "[email protected]" },
9+
{ name = "Real Python", email = "[email protected]" },
10+
]
11+
readme = "README.md"
12+
dynamic = ["version", "description"]
13+
classifiers = [
14+
"Development Status :: 5 - Production/Stable",
15+
"Intended Audience :: Developers",
16+
"License :: OSI Approved :: MIT License",
17+
"Natural Language :: English",
18+
"Operating System :: MacOS",
19+
"Operating System :: Microsoft",
20+
"Operating System :: POSIX :: Linux",
21+
"Programming Language :: Python :: 3.6",
22+
"Programming Language :: Python :: 3.7",
23+
"Programming Language :: Python :: 3.8",
24+
"Programming Language :: Python :: 3.9",
25+
"Programming Language :: Python :: 3.10",
26+
"Programming Language :: Python :: 3.11",
27+
"Topic :: Education",
28+
"Topic :: Software Development :: Libraries :: Python Modules",
29+
"Topic :: System :: Monitoring",
30+
"Typing :: Typed",
31+
]
32+
keywords = ["timer", "class", "contextmanager", "decorator"]
33+
requires-python = ">=3.6"
34+
dependencies = ["dataclasses; python_version < '3.7'"]
35+
36+
[project.urls]
37+
Homepage = "https://realpython.com/python-timer"
38+
"Source Code" = "https://github.com/realpython/codetiming"
39+
Tutorial = "https://realpython.com/python-timer"
40+
41+
[project.optional-dependencies]
42+
dev = ["black", "bump2version", "flake8", "flit", "interrogate", "isort", "mypy"]
43+
test = ["black", "interrogate", "pytest", "pytest-cov", "tox"]
4744

4845

4946
[tool.interrogate]
5047
ignore-init-method = false
5148
ignore-init-module = false
52-
ignore-magic = false
49+
ignore-magic = false
5350
ignore-semiprivate = false
54-
ignore-private = false
55-
ignore-module = false
56-
fail-under = 100
57-
verbose = 0
51+
ignore-private = false
52+
ignore-module = false
53+
fail-under = 100
54+
verbose = 0
5855

5956

6057
[tool.isort]
61-
multi_line_output = 3
62-
include_trailing_comma = true
63-
force_grid_wrap = 0
64-
use_parentheses = true
65-
line_length = 88
66-
import_heading_stdlib = "Standard library imports"
67-
import_heading_thirdparty = "Third party imports"
68-
import_heading_firstparty = "Codetiming imports"
58+
profile = "black"
59+
import_heading_stdlib = "Standard library imports"
60+
import_heading_thirdparty = "Third party imports"
61+
import_heading_firstparty = "Codetiming imports"

0 commit comments

Comments
 (0)