Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 10 additions & 13 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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 }}

Expand All @@ -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

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -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:
Expand All @@ -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"]
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down
4 changes: 2 additions & 2 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
<https://github.com/python-distro/distro/tree/master/tests/resources/distros>`_.

Expand Down
3 changes: 1 addition & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -35,7 +34,7 @@ classifiers =
package_dir =
= src
packages = distro
python_requires = >=3.6
python_requires = >=3.7

[options.package_data]
* = py.typed
Expand Down
2 changes: 1 addition & 1 deletion src/distro/distro.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
from typing import TypedDict
except ImportError:
# Python 3.7
TypedDict = dict
TypedDict = dict # type: ignore[assignment]

__version__ = "1.9.0"

Expand Down
8 changes: 4 additions & 4 deletions tests/test_distro.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down