Skip to content

Commit 0f15718

Browse files
authored
Merge branch 'main' into wheelfile
2 parents 3d9afa9 + 0055d4b commit 0f15718

21 files changed

+134
-97
lines changed

.github/workflows/codeql.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535

3636
# Initializes the CodeQL tools for scanning.
3737
- name: Initialize CodeQL
38-
uses: github/codeql-action/init@1b549b9259bda1cb5ddde3b41741a82a2d15a841 # v3.28.13
38+
uses: github/codeql-action/init@181d5eefc20863364f96762470ba6f862bdef56b # v3.29.2
3939
with:
4040
languages: ${{ matrix.language }}
4141
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -47,9 +47,9 @@ jobs:
4747

4848
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift).
4949
- name: Autobuild
50-
uses: github/codeql-action/autobuild@1b549b9259bda1cb5ddde3b41741a82a2d15a841 # v3.28.13
50+
uses: github/codeql-action/autobuild@181d5eefc20863364f96762470ba6f862bdef56b # v3.29.2
5151

5252
- name: Perform CodeQL Analysis
53-
uses: github/codeql-action/analyze@1b549b9259bda1cb5ddde3b41741a82a2d15a841 # v3.28.13
53+
uses: github/codeql-action/analyze@181d5eefc20863364f96762470ba6f862bdef56b # v3.29.2
5454
with:
5555
category: "/language:${{matrix.language}}"

.github/workflows/docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
steps:
2626
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2727

28-
- uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5.5.0
28+
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
2929
name: Install Python
3030
with:
3131
python-version: "3.9"

.github/workflows/lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
steps:
2828
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2929

30-
- uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5.5.0
30+
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
3131
name: Install Python
3232
with:
3333
python-version: "3.9"

.github/workflows/test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@ jobs:
2626
matrix:
2727
os: [Ubuntu, Windows, macOS]
2828
python_version:
29-
["3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "pypy3.8", "pypy3.9", "pypy3.10"]
29+
["3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.14", "pypy3.8", "pypy3.9", "pypy3.10", "pypy3.11"]
3030

3131
steps:
3232
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
3333

34-
- uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5.5.0
34+
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
3535
name: Install Python ${{ matrix.python_version }}
3636
with:
3737
python-version: ${{ matrix.python_version }}

.pre-commit-config.yaml

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
repos:
22
- repo: https://github.com/pre-commit/pre-commit-hooks
3-
rev: v4.4.0
3+
rev: v5.0.0
44
hooks:
55
- id: check-toml
66
- id: check-yaml
77
- id: end-of-file-fixer
8+
- id: mixed-line-ending
89
- id: trailing-whitespace
910

1011
- repo: https://github.com/pre-commit/mirrors-mypy
@@ -13,11 +14,25 @@ repos:
1314
- id: mypy
1415
exclude: '^(docs|tasks|tests)|setup\.py'
1516
args: []
16-
additional_dependencies: [pyparsing, nox]
17+
additional_dependencies: [pyparsing, nox, orjson]
1718

1819
- repo: https://github.com/astral-sh/ruff-pre-commit
19-
rev: v0.9.1
20+
rev: v0.11.8
2021
hooks:
2122
- id: ruff
22-
args: [ --fix ]
23+
args: [ --fix, --show-fixes ]
2324
- id: ruff-format
25+
26+
- repo: https://github.com/pre-commit/pygrep-hooks
27+
rev: "v1.10.0"
28+
hooks:
29+
- id: rst-backticks
30+
- id: rst-directive-colons
31+
- id: rst-inline-touching-normal
32+
33+
- repo: https://github.com/codespell-project/codespell
34+
rev: "v2.4.1"
35+
hooks:
36+
- id: codespell
37+
additional_dependencies:
38+
- tomli; python_version<'3.11'

CHANGELOG.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ Changelog
7272
* Parse raw metadata (:issue:`671`)
7373
* Import underlying parser functions as an underscored variable (:issue:`663`)
7474
* Improve error for local version label with unsupported operators (:issue:`675`)
75-
* Add dedicated error for specifiers with incorrect `.*` suffix
75+
* Add dedicated error for specifiers with incorrect ``.*`` suffix
7676
* Replace spaces in platform names with underscores (:issue:`620`)
7777
* Relax typing of ``_key`` on ``_BaseVersion`` (:issue:`669`)
7878
* Handle prefix match with zeros at end of prefix correctly (:issue:`674`)
@@ -175,8 +175,8 @@ No unreleased changes.
175175
.. note:: This release was subsequently yanked, and these changes were included in 20.7.
176176

177177
* Fix flit configuration, to include LICENSE files (:issue:`357`)
178-
* Make `intel` a recognized CPU architecture for the `universal` macOS platform tag (:issue:`361`)
179-
* Add some missing type hints to `packaging.requirements` (issue:`350`)
178+
* Make ``intel`` a recognized CPU architecture for the ``universal`` macOS platform tag (:issue:`361`)
179+
* Add some missing type hints to ``packaging.requirements`` (issue:`350`)
180180

181181
20.5 - 2020-11-27
182182
~~~~~~~~~~~~~~~~~
@@ -228,7 +228,7 @@ No unreleased changes.
228228

229229
* Add ``major``, ``minor``, and ``micro`` aliases to ``packaging.version.Version`` (:issue:`225`)
230230

231-
* Properly mark ``packaging`` has being fully typed by adding a `py.typed` file (:issue:`226`)
231+
* Properly mark ``packaging`` has being fully typed by adding a ``py.typed`` file (:issue:`226`)
232232

233233
19.2 - 2019-09-18
234234
~~~~~~~~~~~~~~~~~

docs/markers.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Usage
2121
>>> marker.evaluate()
2222
True
2323
>>> # We can also override the environment
24-
>>> env = {'python_version': '1.5.4'}
24+
>>> env = {'python_version': '1.5'}
2525
>>> marker.evaluate(environment=env)
2626
False
2727
>>> # Multiple markers can be ANDed

docs/metadata.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Metadata
44
.. currentmodule:: packaging.markers
55

66

7-
Both `source distributions`_ and `binary distributions`
7+
Both `source distributions`_ and `binary distributions`_
88
(_sdists_ and _wheels_, respectively) contain files recording the
99
`core metadata`_ for the distribution. This information is used for
1010
everything from recording the name of the distribution to the

noxfile.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,37 +29,39 @@
2929
"3.11",
3030
"3.12",
3131
"3.13",
32+
"3.14",
3233
"pypy3.8",
3334
"pypy3.9",
3435
"pypy3.10",
36+
"pypy3.11",
3537
]
3638
)
3739
def tests(session):
38-
def coverage(*args):
39-
session.run("python", "-m", "coverage", *args)
40+
coverage = ["python", "-m", "coverage"]
4041

4142
session.install("-r", "tests/requirements.txt")
4243
session.install(".")
44+
env = {} if session.python != "3.14" else {"COVERAGE_CORE": "sysmon"}
4345

4446
if "pypy" not in session.python:
45-
coverage(
47+
session.run(
48+
*coverage,
4649
"run",
4750
"--source",
4851
"packaging",
4952
"-m",
5053
"pytest",
51-
"--strict-markers",
5254
*session.posargs,
55+
env=env,
5356
)
54-
coverage("report", "-m", "--fail-under", "100")
57+
session.run(*coverage, "report", "-m", "--fail-under", "100")
5558
else:
5659
# Don't do coverage tracking for PyPy, since it's SLOW.
5760
session.run(
5861
"python",
5962
"-m",
6063
"pytest",
6164
"--capture=no",
62-
"--strict-markers",
6365
*session.posargs,
6466
)
6567

pyproject.toml

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ classifiers = [
2424
"Programming Language :: Python :: 3.11",
2525
"Programming Language :: Python :: 3.12",
2626
"Programming Language :: Python :: 3.13",
27+
"Programming Language :: Python :: 3.14",
2728
"Programming Language :: Python :: Implementation :: CPython",
2829
"Programming Language :: Python :: Implementation :: PyPy",
2930
"Typing :: Typed",
@@ -39,27 +40,38 @@ Source = "https://github.com/pypa/packaging"
3940
include = ["tests/", "docs/", "CHANGELOG.rst"]
4041
exclude = ["docs/_build", "tests/manylinux/build-hello-world.sh", "tests/musllinux/build.sh", "tests/hello-world.c", "tests/__pycache__", "build/__pycache__"]
4142

43+
[tool.codespell]
44+
ignore-words-list = [
45+
"dynamc",
46+
"notin"
47+
]
4248

4349
[tool.coverage.run]
4450
branch = true
4551

4652
[tool.coverage.report]
4753
exclude_lines = ["pragma: no cover", "@abc.abstractmethod", "@abc.abstractproperty"]
4854

55+
[tool.pytest.ini_options]
56+
minversion = "6.2"
57+
addopts = ["-ra", "--showlocals", "--strict-markers", "--strict-config"]
58+
xfail_strict = true
59+
filterwarnings = ["error"]
60+
log_cli_level = "INFO"
61+
testpaths = ["tests"]
62+
4963

5064
[tool.mypy]
5165
strict = true
52-
show_error_codes = true
5366
enable_error_code = ["ignore-without-code", "redundant-expr", "truthy-bool"]
5467
warn_unused_ignores = true
55-
python_version = 3.8
68+
python_version = "3.8"
5669

5770
[[tool.mypy.overrides]]
5871
module = ["_manylinux"]
5972
ignore_missing_imports = true
6073

6174
[tool.ruff]
62-
src = ["src"]
6375
extend-exclude = [
6476
"src/packaging/licenses/_spdx.py"
6577
]
@@ -72,28 +84,16 @@ extend-select = [
7284
"FA",
7385
"I",
7486
"N",
75-
"UP",
87+
"PYI",
7688
"RUF",
89+
"UP",
7790
"W"
7891
]
7992
ignore = [
80-
"B027",
81-
"F821",
82-
"N818",
83-
"RUF003",
84-
"RUF012",
85-
"UP032",
86-
# https://docs.astral.sh/ruff/formatter/#conflicting-lint-rules
87-
"W191",
88-
"E111",
89-
"E114",
90-
"E117",
91-
"D206",
92-
"D300",
93-
"Q000",
94-
"Q001",
95-
"Q002",
96-
"Q003",
97-
"COM812",
98-
"COM819",
93+
"N818", # exceptions must end in "*Error"
9994
]
95+
96+
[tool.ruff.lint.per-file-ignores]
97+
"tests/test_*.py" = ["PYI024"]
98+
"tasks/check.py" = ["UP032"]
99+
"tests/test_requirements.py" = ["UP032"]

0 commit comments

Comments
 (0)