Skip to content

Commit

Permalink
Merge branch 'main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
e2thenegpii authored Sep 28, 2022
2 parents 394cd4e + 5f46d15 commit 62de44c
Show file tree
Hide file tree
Showing 66 changed files with 3,093 additions and 2,316 deletions.
9 changes: 0 additions & 9 deletions .coveragerc

This file was deleted.

30 changes: 16 additions & 14 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,28 +3,30 @@ name: Documentation
on:
pull_request:
paths:
- 'docs/**'
- ".github/workflows/docs.yml"
- "docs/**"
push:
paths:
- 'docs/**'
- ".github/workflows/docs.yml"
- "docs/**"

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true

jobs:
docs:
name: nox -s docs
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1

- uses: actions/setup-python@v2
name: Install Python
with:
python-version: '3.9'
- uses: actions/checkout@v3

- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade nox
- uses: actions/setup-python@v4
name: Install Python
with:
python-version: "3.9"
cache: "pip"

- name: Build documentation
run: python -m nox -s docs
- name: Build documentation
run: pipx run nox --error-on-missing-interpreters -s docs
34 changes: 15 additions & 19 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,31 +3,35 @@ name: Linting
on:
pull_request:
paths:
- ".github/workflows/lint.yml"
- ".pre-commit-config.yaml"
- "**.py"
push:
paths:
- ".github/workflows/lint.yml"
- ".pre-commit-config.yaml"
- "**.py"

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true

jobs:
lint:
name: nox -s lint
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v3

- uses: actions/setup-python@v2
- uses: actions/setup-python@v4
name: Install Python
with:
python-version: "3.9"

- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade nox
cache: "pip"

- name: Run `nox -s lint`
run: python -m nox -s lint
run: pipx run nox --error-on-missing-interpreters -s lint -- --show-diff-on-failure

build:
name: Build sdist and wheel
Expand All @@ -39,21 +43,13 @@ jobs:
needs: lint

steps:
- uses: actions/checkout@v1

- uses: actions/setup-python@v2
name: Install Python
with:
python-version: "3.9"

- name: Install dependencies
run: python -m pip install --upgrade build
- uses: actions/checkout@v3

- name: Build
run: python -m build
run: pipx run build

- name: Archive files
uses: actions/upload-artifact@v1
uses: actions/upload-artifact@v3
with:
name: dist
path: dist
35 changes: 12 additions & 23 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ on:
- ".github/workflows/test.yml"
- "**.py"

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true

jobs:
test:
name: ${{ matrix.os }} / ${{ matrix.python_version }}
Expand All @@ -19,36 +23,21 @@ jobs:
matrix:
os: [Ubuntu, Windows, macOS]
python_version:
["3.6", "3.7", "3.8", "3.9", "pypy3"]
exclude:
# This is failing due to pip not being in the virtual environment.
# https://github.com/pypa/packaging/runs/424785871#step:7:9
- os: windows
python_version: pypy3
["3.7", "3.8", "3.9", "3.10", "3.11-dev", "pypy3.7", "pypy3.8", "pypy3.9"]

steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v3

- uses: actions/setup-python@v2
- uses: actions/setup-python@v4
name: Install Python ${{ matrix.python_version }}
with:
python-version: ${{ matrix.python_version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install nox
shell: bash
cache: "pip"

- name: Run nox
run: |
python -m nox --error-on-missing-interpreters -s tests-${{ matrix.python_version }}
shell: bash
if: matrix.python_version != 'pypy2'

# Binary is named 'pypy', but setup-python specifies it as 'pypy2'.
- name: Run nox for pypy2
run: |
python -m nox --error-on-missing-interpreters -s tests-pypy
# Need to remove "-dev" suffix
INTERPRETER=${{ matrix.python_version }}
INTERPRETER=${INTERPRETER/-dev/}
pipx run nox --error-on-missing-interpreters -s tests-${INTERPRETER}
shell: bash
if: matrix.python_version == 'pypy2'
19 changes: 13 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,31 +1,38 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.3.0
rev: v4.2.0
hooks:
- id: check-toml
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.790
rev: v0.950
hooks:
- id: mypy
exclude: '^(docs|tasks|tests)|setup\.py'
args: []
additional_dependencies: [pyparsing, nox]

- repo: https://github.com/asottile/pyupgrade
rev: v2.32.0
hooks:
- id: pyupgrade
args: [--py36-plus]

- repo: https://github.com/psf/black
rev: 19.3b0
rev: 22.3.0
hooks:
- id: black

- repo: https://github.com/PyCQA/isort
rev: 5.6.4
rev: 5.10.1
hooks:
- id: isort

- repo: https://gitlab.com/PyCQA/flake8
rev: "3.7.8"
- repo: https://github.com/PyCQA/flake8
rev: "3.9.2"
hooks:
- id: flake8
additional_dependencies: ["pep8-naming"]
Expand Down
34 changes: 0 additions & 34 deletions .travis.yml

This file was deleted.

46 changes: 42 additions & 4 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,46 @@ Changelog
*unreleased*
~~~~~~~~~~~~

* `packaging` is now only compatible with Python 3.6 and above.
* Added ``packaging.utils.create_wheel_filename()`` and ``create_sdist_filename()`` (:issue:`408`)
* ``Marker.evaluate`` will now assume evaluation environment with empty ``extra``.
Evaluating markers like ``"extra == 'xyz'"`` without passing any extra in the
``environment`` will no longer raise an exception.
* Remove dependency on ``pyparsing``, by replacing it with a hand-written parser. This package now has no runtime dependencies (:issue:`468`)
* Update return type hint for ``Specifier.filter`` and ``SpecifierSet.filter``
to use ``Iterator`` instead of ``Iterable``

21.3 - 2021-11-17
~~~~~~~~~~~~~~~~~

* Add a ``pp3-none-any`` tag (:issue:`311`)
* Replace the blank pyparsing 3 exclusion with a 3.0.5 exclusion (:issue:`481`, :issue:`486`)
* Fix a spelling mistake (:issue:`479`)

21.2 - 2021-10-29
~~~~~~~~~~~~~~~~~

* Update documentation entry for 21.1.

21.1 - 2021-10-29
~~~~~~~~~~~~~~~~~

* Update pin to pyparsing to exclude 3.0.0.

21.0 - 2021-07-03
~~~~~~~~~~~~~~~~~

* PEP 656: musllinux support (:issue:`411`)
* Drop support for Python 2.7, Python 3.4 and Python 3.5.
* Replace distutils usage with sysconfig (:issue:`396`)
* Add support for zip files in ``parse_sdist_filename`` (:issue:`429`)
* Use cached ``_hash`` attribute to short-circuit tag equality comparisons (:issue:`417`)
* Specify the default value for the ``specifier`` argument to ``SpecifierSet`` (:issue:`437`)
* Proper keyword-only "warn" argument in packaging.tags (:issue:`403`)
* Correctly remove prerelease suffixes from ~= check (:issue:`366`)
* Fix type hints for ``Version.post`` and ``Version.dev`` (:issue:`393`)
* Use typing alias ``UnparsedVersion`` (:issue:`398`)
* Improve type inference for ``packaging.specifiers.filter()`` (:issue:`430`)
* Tighten the return type of ``canonicalize_version()`` (:issue:`402`)

20.9 - 2021-01-29
~~~~~~~~~~~~~~~~~
Expand Down Expand Up @@ -80,11 +118,11 @@ No unreleased changes.

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

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

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

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

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

Expand Down Expand Up @@ -231,7 +269,7 @@ No unreleased changes.
15.2 - 2015-05-13
~~~~~~~~~~~~~~~~~

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

* Expose the specifier and version parts through properties on the
Expand Down
8 changes: 5 additions & 3 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,19 @@ include LICENSE LICENSE.APACHE LICENSE.BSD
include .coveragerc
include .flake8
include .pre-commit-config.yaml
include mypy.ini

recursive-include docs *
recursive-include tests *.py
recursive-include tests hello-world-*
recursive-include tests/manylinux hello-world-*
recursive-include tests/musllinux glibc-*
recursive-include tests/musllinux musl-*

exclude noxfile.py
exclude .readthedocs.yml
exclude .travis.yml
exclude dev-requirements.txt
exclude tests/build-hello-world.sh
exclude tests/manylinux/build-hello-world.sh
exclude tests/musllinux/build.sh
exclude tests/hello-world.c

prune docs/_build
Expand Down
Empty file removed docs/_static/.empty
Empty file.
Loading

0 comments on commit 62de44c

Please sign in to comment.