diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index c2da761f..35ac9671 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -10,10 +10,10 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - name: Set up Python - uses: actions/setup-python@v5 + uses: actions/setup-python@v6 with: python-version: 3.x @@ -32,27 +32,24 @@ jobs: os: - "ubuntu-latest" python: - - "3.7" - "3.8" - "3.9" - "3.10" - "3.11" - "3.12" include: - - os: "ubuntu-20.04" - python: "3.6" - - os: "ubuntu-20.04" - python: "pypy-3.6" + - os: "ubuntu-22.04" + python: "3.7" - os: "ubuntu-22.04" python: "pypy-3.10" - - os: "macos-12" - python: 3.12 + - os: "macos-latest" + python: "3.12" steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - name: Set up Python ${{ matrix.python }} - uses: actions/setup-python@v5 + uses: actions/setup-python@v6 with: python-version: ${{ matrix.python }} @@ -72,12 +69,12 @@ jobs: runs-on: windows-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - uses: codecov/codecov-action@v3 - name: Set up Python - uses: actions/setup-python@v5 + uses: actions/setup-python@v6 with: python-version: 3.x diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 120db2f8..efcfa6de 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -12,10 +12,10 @@ jobs: runs-on: ubuntu-latest environment: Deploy steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 with: ref: ${{ github.event.inputs.tag }} - - uses: actions/setup-python@v5 + - uses: actions/setup-python@v6 with: python-version: 3.x - shell: bash diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 95cbb415..e2f1dcf0 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,9 +1,9 @@ repos: - repo: https://github.com/psf/black - rev: 22.3.0 + rev: 25.9.0 hooks: - id: black - args: ["--target-version", "py36"] + args: ["--target-version", "py37"] - repo: https://github.com/PyCQA/flake8 rev: 6.1.0 hooks: @@ -13,7 +13,7 @@ repos: hooks: - id: isort - repo: https://github.com/pre-commit/mirrors-mypy - rev: v0.910 + rev: v1.18.2 hooks: - id: mypy args: ["--strict"] diff --git a/README.md b/README.md index 6f39d373..83ee3db5 100644 --- a/README.md +++ b/README.md @@ -109,7 +109,7 @@ namely from these data sources (from high to low precedence): ## Python and Distribution Support -`distro` is supported and tested on Python 3.6+ and PyPy and on any +`distro` is supported and tested on Python 3.7+ and PyPy and on any distribution that provides one or more of the data sources covered. This package is tested with test data that mimics the exact behavior of the data sources of [a number of Linux distributions](https://github.com/python-distro/distro/tree/master/tests/resources/distros). diff --git a/docs/index.rst b/docs/index.rst index d320e668..fcf64312 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -19,11 +19,11 @@ If you want to jump into the API description right away, read about the Compatibility ============= -The ``distro`` package is supported on Python 3.6+ and PyPy, and on any Linux +The ``distro`` package is supported on Python 3.7+ and PyPy, and on any Linux or BSD distribution that provides one or more of the `data sources`_ used by this package. -This package is tested on Python 3.6+ and PyPy, with test data that mimics the +This package is tested on Python 3.7+ and PyPy, with test data that mimics the exact behavior of the data sources of `a number of Linux distributions `_. diff --git a/setup.cfg b/setup.cfg index 6f694f0c..877af10f 100644 --- a/setup.cfg +++ b/setup.cfg @@ -21,7 +21,6 @@ classifiers = Operating System :: POSIX :: BSD :: OpenBSD Programming Language :: Python :: 3 Programming Language :: Python :: 3 :: Only - Programming Language :: Python :: 3.6 Programming Language :: Python :: 3.7 Programming Language :: Python :: 3.8 Programming Language :: Python :: 3.9 @@ -35,7 +34,7 @@ classifiers = package_dir = = src packages = distro -python_requires = >=3.6 +python_requires = >=3.7 [options.package_data] * = py.typed diff --git a/src/distro/distro.py b/src/distro/distro.py index 8c1e9d5d..14b8a075 100755 --- a/src/distro/distro.py +++ b/src/distro/distro.py @@ -53,7 +53,7 @@ from typing import TypedDict except ImportError: # Python 3.7 - TypedDict = dict + TypedDict = dict # type: ignore[assignment] __version__ = "1.9.0" diff --git a/tests/test_distro.py b/tests/test_distro.py index c08badc4..a886c7eb 100644 --- a/tests/test_distro.py +++ b/tests/test_distro.py @@ -2241,16 +2241,16 @@ def test_kv_21_single_quoted_word_with_double_quote(self) -> None: def test_kv_22_quoted_unicode_wordchar(self) -> None: # "wordchar" means it is in the shlex.wordchars variable. - props = self._get_props('KEY="wordchar: \u00CA (E accent grave)"\n') - assert props.get("key", None) == "wordchar: \u00CA (E accent grave)" + props = self._get_props('KEY="wordchar: \u00ca (E accent grave)"\n') + assert props.get("key", None) == "wordchar: \u00ca (E accent grave)" def test_kv_23_quoted_unicode_non_wordchar(self) -> None: # "non-wordchar" means it is not in the shlex.wordchars variable. props = self._get_props( - 'KEY="non-wordchar: \u00A1 (inverted exclamation mark)"\n' + 'KEY="non-wordchar: \u00a1 (inverted exclamation mark)"\n' ) assert ( - props.get("key", None) == "non-wordchar: \u00A1 (inverted exclamation mark)" + props.get("key", None) == "non-wordchar: \u00a1 (inverted exclamation mark)" ) def test_kv_24_double_quoted_entire_single_quoted_word(self) -> None: diff --git a/tox.ini b/tox.ini index bc1e8d68..9848233d 100644 --- a/tox.ini +++ b/tox.ini @@ -14,7 +14,7 @@ [tox] minversion = 1.9 -envlist = lint, py{36,37,38,39,310,311,312,py3} +envlist = lint, py{37,38,39,310,311,312,py3} isolated_build = true skip_missing_interpreters = true