Skip to content

Commit

Permalink
Bring back support for py39 (#241)
Browse files Browse the repository at this point in the history
  • Loading branch information
ssbarnea authored Sep 4, 2024
1 parent e89ce31 commit f433383
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 18 deletions.
10 changes: 5 additions & 5 deletions .config/constraints.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# This file is autogenerated by pip-compile with Python 3.10
# This file is autogenerated by pip-compile with Python 3.9
# by the following command:
#
# pip-compile --all-extras --no-annotate --output-file=.config/constraints.txt --strip-extras --unsafe-package=backports-tarfile --unsafe-package=cryptography --unsafe-package=exceptiongroup --unsafe-package=jeepney --unsafe-package=secretstorage --unsafe-package=twine pyproject.toml
Expand Down Expand Up @@ -41,7 +41,7 @@ markupsafe==2.1.5
mdurl==0.1.2
mergedeep==1.3.4
mkdocs==1.6.1
mkdocs-autorefs==1.1.0
mkdocs-autorefs==1.2.0
mkdocs-gen-files==0.5.0
mkdocs-get-deps==0.2.0
mkdocs-htmlproofer-plugin==1.2.1
Expand All @@ -55,7 +55,7 @@ pathspec==0.12.1
pillow==10.4.0
pip==24.2
pipdeptree==2.23.1
pkginfo==1.11.1
pkginfo==1.10.0
platformdirs==4.2.2
pluggy==1.5.0
py-cpuinfo==9.0.0
Expand All @@ -76,7 +76,7 @@ requests==2.32.3
requests-toolbelt==1.0.0
rfc3986==2.0.0
rich==13.8.0
setuptools==74.0.0
setuptools==74.1.1
shellingham==1.5.4
six==1.16.0
smmap==5.0.1
Expand All @@ -90,7 +90,7 @@ typer-config==1.4.0
typing-extensions==4.12.2
urllib3==2.2.2
virtualenv==20.26.3
watchdog==5.0.0
watchdog==5.0.1
webencodings==0.5.1
zipp==3.20.1

Expand Down
10 changes: 6 additions & 4 deletions .github/workflows/tox.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,13 @@ jobs:
id: generate_matrix
uses: coactions/dynamic-matrix@v3
with:
min_python: "3.10"
default_python: "3.10"
min_python: "3.9"
default_python: |
3.9
3.10
max_python: "3.13"
other_names: |
lint
lint:tox -e py39-lint;tox -e py310-lint
docs
integration
pkg
Expand Down Expand Up @@ -154,7 +156,7 @@ jobs:

- name: Check for expected number of coverage.xml reports
run: |
JOBS_PRODUCING_COVERAGE=6
JOBS_PRODUCING_COVERAGE=7
if [ "$(find . -name coverage.xml | wc -l | bc)" -ne "${JOBS_PRODUCING_COVERAGE}" ]; then
echo "::error::Number of coverage.xml files was not the expected one (${JOBS_PRODUCING_COVERAGE}): $(find . -name coverage.xml |xargs echo)"
exit 1
Expand Down
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ repos:
rev: v24.7.0
hooks:
- id: ansible-lint
language_version: python3.10 # minimal supported officially
args: [--fix]
- repo: https://github.com/adrienverge/yamllint.git
rev: v1.35.1
Expand All @@ -66,7 +67,6 @@ repos:
rev: v1.11.2
hooks:
- id: mypy
args: [--python-version, "3.10"]
entry: mypy src/
pass_filenames: false
additional_dependencies:
Expand Down Expand Up @@ -103,7 +103,7 @@ repos:
entry: pip-compile pyproject.toml
files: ^.config\/.*requirements.*$
language: python
language_version: "3.10" # minimal we support officially
language_version: "3.9" # minimal we support officially
pass_filenames: false
stages: [manual]
additional_dependencies:
Expand All @@ -115,7 +115,7 @@ repos:
entry: pip-compile pyproject.toml --upgrade
files: ^.config\/.*requirements.*$
language: python
language_version: "3.10" # minimal we support officially
language_version: "3.9" # minimal we support officially
pass_filenames: false
stages: [manual]
additional_dependencies:
Expand Down
2 changes: 1 addition & 1 deletion mypy.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[mypy]
python_version = 3.10
python_version = 3.9
color_output = True
error_summary = True
# TODO(ssbarnea): Remove ignores below:
Expand Down
5 changes: 3 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ build-backend = "setuptools.build_meta"

[project]
# https://peps.python.org/pep-0621/#readme
requires-python = ">=3.10"
requires-python = ">=3.9"
dynamic = ["version", "dependencies", "optional-dependencies"]
name = "mk"
description = "mk"
Expand All @@ -24,6 +24,7 @@ classifiers = [
"Operating System :: MacOS",
"Operating System :: POSIX",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
Expand Down Expand Up @@ -92,7 +93,7 @@ concurrency = ["multiprocessing", "thread"]
profile = "black"

[tool.mypy]
python_version = "3.10"
python_version = "3.9"
strict = true
color_output = true
error_summary = true
Expand Down
6 changes: 3 additions & 3 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ commands =
--durations=10 \
-m "not eco" \
}
{py,py310,py311,py312,py313}: sh -c "coverage combine -a -q --data-file={envdir}/.coverage {envdir}/.coverage.* && coverage xml --data-file={envdir}/.coverage -o {envdir}/coverage.xml --fail-under=0 && coverage report --data-file={envdir}/.coverage"
{py,py39,py310,py311,py312,py313}: sh -c "coverage combine -a -q --data-file={envdir}/.coverage {envdir}/.coverage.* && coverage xml --data-file={envdir}/.coverage -o {envdir}/coverage.xml --fail-under=0 && coverage report --data-file={envdir}/.coverage"
passenv =
CURL_CA_BUNDLE # https proxies, https://github.com/tox-dev/tox/issues/1437
FORCE_COLOR
Expand Down Expand Up @@ -65,7 +65,7 @@ setenv =
PRE_COMMIT_COLOR = always
PYTHONHASHSEED = 0
VIRTUALENV_NO_DOWNLOAD = 1
devel,pkg,pre: PIP_CONSTRAINT = /dev/null
devel,lint,py{39,310,311,312,313},pkg,pre: PIP_CONSTRAINT = /dev/null

allowlist_externals =
bash
Expand Down Expand Up @@ -110,7 +110,7 @@ commands =
white_list_externals =
sh

[testenv:lint]
[testenv:lint,py{39,310,311,312,313}-lint]
description = Run linters
passenv = {[testenv]passenv}
# without PROGRAMDATA cloning using git for Windows will fail with an
Expand Down

0 comments on commit f433383

Please sign in to comment.