diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 50cfb956..cc614f0f 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -14,6 +14,9 @@ concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} cancel-in-progress: true +env: + FORCE_COLOR: 1 + jobs: docs: name: nox -s docs diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 652a2f92..2c1829dd 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -16,6 +16,9 @@ concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} cancel-in-progress: true +env: + FORCE_COLOR: 1 + jobs: lint: name: nox -s lint diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8f81945e..debdb74d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -14,6 +14,9 @@ concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} cancel-in-progress: true +env: + FORCE_COLOR: 1 + jobs: test: name: ${{ matrix.os }} / ${{ matrix.python_version }} @@ -23,7 +26,7 @@ jobs: matrix: os: [Ubuntu, Windows, macOS] python_version: - ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "pypy3.8", "pypy3.9", "pypy3.10"] + ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "pypy3.8", "pypy3.9", "pypy3.10"] steps: - uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0 diff --git a/docs/development/getting-started.rst b/docs/development/getting-started.rst index a713eac8..0cad38ae 100644 --- a/docs/development/getting-started.rst +++ b/docs/development/getting-started.rst @@ -30,11 +30,15 @@ each supported Python version and run the tests. For example: $ nox -s tests ... nox > Ran multiple sessions: - nox > * tests-3.7: success nox > * tests-3.8: success nox > * tests-3.9: success nox > * tests-3.10: success - nox > * tests-pypy3: skipped + nox > * tests-3.11: success + nox > * tests-3.12: success + nox > * tests-3.13: success + nox > * tests-pypy3.8: skipped + nox > * tests-pypy3.9: skipped + nox > * tests-pypy3.10: skipped You may not have all the required Python versions installed, in which case you will see one or more ``InterpreterNotFound`` errors. diff --git a/noxfile.py b/noxfile.py index 4f97e8e5..454ba21c 100644 --- a/noxfile.py +++ b/noxfile.py @@ -23,12 +23,12 @@ @nox.session( python=[ - "3.7", "3.8", "3.9", "3.10", "3.11", "3.12", + "3.13", "pypy3.8", "pypy3.9", "pypy3.10", diff --git a/pyproject.toml b/pyproject.toml index f115bb75..5deff4d7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -8,7 +8,7 @@ name = "packaging" description = "Core utilities for Python packages" dynamic = ["version"] readme = "README.rst" -requires-python = ">=3.7" +requires-python = ">=3.8" authors = [{name = "Donald Stufft", email = "donald@stufft.io"}] classifiers = [ "Development Status :: 5 - Production/Stable", @@ -18,12 +18,12 @@ classifiers = [ "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", "Typing :: Typed", diff --git a/src/packaging/_manylinux.py b/src/packaging/_manylinux.py index ad62505f..1f5f4ab3 100644 --- a/src/packaging/_manylinux.py +++ b/src/packaging/_manylinux.py @@ -167,7 +167,7 @@ def _parse_glibc_version(version_str: str) -> Tuple[int, int]: return int(m.group("major")), int(m.group("minor")) -@functools.lru_cache() +@functools.lru_cache def _get_glibc_version() -> Tuple[int, int]: version_str = _glibc_version_string() if version_str is None: diff --git a/src/packaging/_musllinux.py b/src/packaging/_musllinux.py index 86419df9..eb4251b5 100644 --- a/src/packaging/_musllinux.py +++ b/src/packaging/_musllinux.py @@ -28,7 +28,7 @@ def _parse_musl_version(output: str) -> Optional[_MuslVersion]: return _MuslVersion(major=int(m.group(1)), minor=int(m.group(2))) -@functools.lru_cache() +@functools.lru_cache def _get_musl_version(executable: str) -> Optional[_MuslVersion]: """Detect currently-running musl runtime version. diff --git a/src/packaging/metadata.py b/src/packaging/metadata.py index 80f46d19..fe835071 100644 --- a/src/packaging/metadata.py +++ b/src/packaging/metadata.py @@ -3,7 +3,6 @@ import email.message import email.parser import email.policy -import sys import typing from typing import ( Any, @@ -11,9 +10,11 @@ Dict, Generic, List, + Literal, Optional, Tuple, Type, + TypedDict, Union, cast, ) @@ -22,23 +23,6 @@ from . import version as version_module T = typing.TypeVar("T") -if sys.version_info[:2] >= (3, 8): # pragma: no cover - from typing import Literal, TypedDict -else: # pragma: no cover - if typing.TYPE_CHECKING: - from typing_extensions import Literal, TypedDict - else: - try: - from typing_extensions import Literal, TypedDict - except ImportError: - - class Literal: - def __init_subclass__(*_args, **_kwargs): - pass - - class TypedDict: - def __init_subclass__(*_args, **_kwargs): - pass try: