Skip to content

Commit 62de44c

Browse files
authored
Merge branch 'main' into main
2 parents 394cd4e + 5f46d15 commit 62de44c

66 files changed

Lines changed: 3093 additions & 2316 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.coveragerc

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

.github/workflows/docs.yml

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,28 +3,30 @@ name: Documentation
33
on:
44
pull_request:
55
paths:
6-
- 'docs/**'
6+
- ".github/workflows/docs.yml"
7+
- "docs/**"
78
push:
89
paths:
9-
- 'docs/**'
10+
- ".github/workflows/docs.yml"
11+
- "docs/**"
12+
13+
concurrency:
14+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
15+
cancel-in-progress: true
1016

1117
jobs:
1218
docs:
1319
name: nox -s docs
1420
runs-on: ubuntu-latest
1521

1622
steps:
17-
- uses: actions/checkout@v1
18-
19-
- uses: actions/setup-python@v2
20-
name: Install Python
21-
with:
22-
python-version: '3.9'
23+
- uses: actions/checkout@v3
2324

24-
- name: Install dependencies
25-
run: |
26-
python -m pip install --upgrade pip
27-
python -m pip install --upgrade nox
25+
- uses: actions/setup-python@v4
26+
name: Install Python
27+
with:
28+
python-version: "3.9"
29+
cache: "pip"
2830

29-
- name: Build documentation
30-
run: python -m nox -s docs
31+
- name: Build documentation
32+
run: pipx run nox --error-on-missing-interpreters -s docs

.github/workflows/lint.yml

Lines changed: 15 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -3,31 +3,35 @@ name: Linting
33
on:
44
pull_request:
55
paths:
6+
- ".github/workflows/lint.yml"
7+
- ".pre-commit-config.yaml"
68
- "**.py"
79
push:
810
paths:
11+
- ".github/workflows/lint.yml"
12+
- ".pre-commit-config.yaml"
913
- "**.py"
1014

15+
concurrency:
16+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
17+
cancel-in-progress: true
18+
1119
jobs:
1220
lint:
1321
name: nox -s lint
1422
runs-on: ubuntu-latest
1523

1624
steps:
17-
- uses: actions/checkout@v1
25+
- uses: actions/checkout@v3
1826

19-
- uses: actions/setup-python@v2
27+
- uses: actions/setup-python@v4
2028
name: Install Python
2129
with:
2230
python-version: "3.9"
23-
24-
- name: Install dependencies
25-
run: |
26-
python -m pip install --upgrade pip
27-
python -m pip install --upgrade nox
31+
cache: "pip"
2832

2933
- name: Run `nox -s lint`
30-
run: python -m nox -s lint
34+
run: pipx run nox --error-on-missing-interpreters -s lint -- --show-diff-on-failure
3135

3236
build:
3337
name: Build sdist and wheel
@@ -39,21 +43,13 @@ jobs:
3943
needs: lint
4044

4145
steps:
42-
- uses: actions/checkout@v1
43-
44-
- uses: actions/setup-python@v2
45-
name: Install Python
46-
with:
47-
python-version: "3.9"
48-
49-
- name: Install dependencies
50-
run: python -m pip install --upgrade build
46+
- uses: actions/checkout@v3
5147

5248
- name: Build
53-
run: python -m build
49+
run: pipx run build
5450

5551
- name: Archive files
56-
uses: actions/upload-artifact@v1
52+
uses: actions/upload-artifact@v3
5753
with:
5854
name: dist
5955
path: dist

.github/workflows/test.yml

Lines changed: 12 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ on:
1010
- ".github/workflows/test.yml"
1111
- "**.py"
1212

13+
concurrency:
14+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
15+
cancel-in-progress: true
16+
1317
jobs:
1418
test:
1519
name: ${{ matrix.os }} / ${{ matrix.python_version }}
@@ -19,36 +23,21 @@ jobs:
1923
matrix:
2024
os: [Ubuntu, Windows, macOS]
2125
python_version:
22-
["3.6", "3.7", "3.8", "3.9", "pypy3"]
23-
exclude:
24-
# This is failing due to pip not being in the virtual environment.
25-
# https://github.com/pypa/packaging/runs/424785871#step:7:9
26-
- os: windows
27-
python_version: pypy3
26+
["3.7", "3.8", "3.9", "3.10", "3.11-dev", "pypy3.7", "pypy3.8", "pypy3.9"]
2827

2928
steps:
30-
- uses: actions/checkout@v1
29+
- uses: actions/checkout@v3
3130

32-
- uses: actions/setup-python@v2
31+
- uses: actions/setup-python@v4
3332
name: Install Python ${{ matrix.python_version }}
3433
with:
3534
python-version: ${{ matrix.python_version }}
36-
37-
- name: Install dependencies
38-
run: |
39-
python -m pip install --upgrade pip
40-
python -m pip install nox
41-
shell: bash
35+
cache: "pip"
4236

4337
- name: Run nox
4438
run: |
45-
python -m nox --error-on-missing-interpreters -s tests-${{ matrix.python_version }}
46-
shell: bash
47-
if: matrix.python_version != 'pypy2'
48-
49-
# Binary is named 'pypy', but setup-python specifies it as 'pypy2'.
50-
- name: Run nox for pypy2
51-
run: |
52-
python -m nox --error-on-missing-interpreters -s tests-pypy
39+
# Need to remove "-dev" suffix
40+
INTERPRETER=${{ matrix.python_version }}
41+
INTERPRETER=${INTERPRETER/-dev/}
42+
pipx run nox --error-on-missing-interpreters -s tests-${INTERPRETER}
5343
shell: bash
54-
if: matrix.python_version == 'pypy2'

.pre-commit-config.yaml

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,38 @@
11
repos:
22
- repo: https://github.com/pre-commit/pre-commit-hooks
3-
rev: v2.3.0
3+
rev: v4.2.0
44
hooks:
55
- id: check-toml
66
- id: check-yaml
77
- id: end-of-file-fixer
88
- id: trailing-whitespace
99

1010
- repo: https://github.com/pre-commit/mirrors-mypy
11-
rev: v0.790
11+
rev: v0.950
1212
hooks:
1313
- id: mypy
1414
exclude: '^(docs|tasks|tests)|setup\.py'
1515
args: []
16+
additional_dependencies: [pyparsing, nox]
17+
18+
- repo: https://github.com/asottile/pyupgrade
19+
rev: v2.32.0
20+
hooks:
21+
- id: pyupgrade
22+
args: [--py36-plus]
1623

1724
- repo: https://github.com/psf/black
18-
rev: 19.3b0
25+
rev: 22.3.0
1926
hooks:
2027
- id: black
2128

2229
- repo: https://github.com/PyCQA/isort
23-
rev: 5.6.4
30+
rev: 5.10.1
2431
hooks:
2532
- id: isort
2633

27-
- repo: https://gitlab.com/PyCQA/flake8
28-
rev: "3.7.8"
34+
- repo: https://github.com/PyCQA/flake8
35+
rev: "3.9.2"
2936
hooks:
3037
- id: flake8
3138
additional_dependencies: ["pep8-naming"]

.travis.yml

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

CHANGELOG.rst

Lines changed: 42 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,46 @@ Changelog
44
*unreleased*
55
~~~~~~~~~~~~
66

7-
* `packaging` is now only compatible with Python 3.6 and above.
87
* Added ``packaging.utils.create_wheel_filename()`` and ``create_sdist_filename()`` (:issue:`408`)
8+
* ``Marker.evaluate`` will now assume evaluation environment with empty ``extra``.
9+
Evaluating markers like ``"extra == 'xyz'"`` without passing any extra in the
10+
``environment`` will no longer raise an exception.
11+
* Remove dependency on ``pyparsing``, by replacing it with a hand-written parser. This package now has no runtime dependencies (:issue:`468`)
12+
* Update return type hint for ``Specifier.filter`` and ``SpecifierSet.filter``
13+
to use ``Iterator`` instead of ``Iterable``
14+
15+
21.3 - 2021-11-17
16+
~~~~~~~~~~~~~~~~~
17+
18+
* Add a ``pp3-none-any`` tag (:issue:`311`)
19+
* Replace the blank pyparsing 3 exclusion with a 3.0.5 exclusion (:issue:`481`, :issue:`486`)
20+
* Fix a spelling mistake (:issue:`479`)
21+
22+
21.2 - 2021-10-29
23+
~~~~~~~~~~~~~~~~~
24+
25+
* Update documentation entry for 21.1.
26+
27+
21.1 - 2021-10-29
28+
~~~~~~~~~~~~~~~~~
29+
30+
* Update pin to pyparsing to exclude 3.0.0.
31+
32+
21.0 - 2021-07-03
33+
~~~~~~~~~~~~~~~~~
34+
35+
* PEP 656: musllinux support (:issue:`411`)
36+
* Drop support for Python 2.7, Python 3.4 and Python 3.5.
37+
* Replace distutils usage with sysconfig (:issue:`396`)
38+
* Add support for zip files in ``parse_sdist_filename`` (:issue:`429`)
39+
* Use cached ``_hash`` attribute to short-circuit tag equality comparisons (:issue:`417`)
40+
* Specify the default value for the ``specifier`` argument to ``SpecifierSet`` (:issue:`437`)
41+
* Proper keyword-only "warn" argument in packaging.tags (:issue:`403`)
42+
* Correctly remove prerelease suffixes from ~= check (:issue:`366`)
43+
* Fix type hints for ``Version.post`` and ``Version.dev`` (:issue:`393`)
44+
* Use typing alias ``UnparsedVersion`` (:issue:`398`)
45+
* Improve type inference for ``packaging.specifiers.filter()`` (:issue:`430`)
46+
* Tighten the return type of ``canonicalize_version()`` (:issue:`402`)
947

1048
20.9 - 2021-01-29
1149
~~~~~~~~~~~~~~~~~
@@ -80,11 +118,11 @@ No unreleased changes.
80118

81119
* Use ``sys.implementation.name`` where appropriate for ``packaging.tags`` (:issue:`193`)
82120

83-
* Expand upon the API provded by ``packaging.tags``: ``interpreter_name()``, ``mac_platforms()``, ``compatible_tags()``, ``cpython_tags()``, ``generic_tags()`` (:issue:`187`)
121+
* Expand upon the API provided by ``packaging.tags``: ``interpreter_name()``, ``mac_platforms()``, ``compatible_tags()``, ``cpython_tags()``, ``generic_tags()`` (:issue:`187`)
84122

85123
* Officially support Python 3.8 (:issue:`232`)
86124

87-
* Add ``major``, ``minor``, and ``micro`` aliases to ``packaging.version.Version`` (:issue:`226`)
125+
* Add ``major``, ``minor``, and ``micro`` aliases to ``packaging.version.Version`` (:issue:`225`)
88126

89127
* Properly mark ``packaging`` has being fully typed by adding a `py.typed` file (:issue:`226`)
90128

@@ -231,7 +269,7 @@ No unreleased changes.
231269
15.2 - 2015-05-13
232270
~~~~~~~~~~~~~~~~~
233271

234-
* Fix an error where the arbitary specifier (``===``) was not correctly
272+
* Fix an error where the arbitrary specifier (``===``) was not correctly
235273
allowing pre-releases when it was being used.
236274

237275
* Expose the specifier and version parts through properties on the

MANIFEST.in

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,19 @@ include LICENSE LICENSE.APACHE LICENSE.BSD
44
include .coveragerc
55
include .flake8
66
include .pre-commit-config.yaml
7-
include mypy.ini
87

98
recursive-include docs *
109
recursive-include tests *.py
11-
recursive-include tests hello-world-*
10+
recursive-include tests/manylinux hello-world-*
11+
recursive-include tests/musllinux glibc-*
12+
recursive-include tests/musllinux musl-*
1213

1314
exclude noxfile.py
1415
exclude .readthedocs.yml
1516
exclude .travis.yml
1617
exclude dev-requirements.txt
17-
exclude tests/build-hello-world.sh
18+
exclude tests/manylinux/build-hello-world.sh
19+
exclude tests/musllinux/build.sh
1820
exclude tests/hello-world.c
1921

2022
prune docs/_build

docs/_static/.empty

Whitespace-only changes.

0 commit comments

Comments
 (0)