Skip to content

Commit

Permalink
drop compatibility with python3.7; remove pylint-import-requirements …
Browse files Browse the repository at this point in the history
…from pipeline; relock env with pipenv v2023.10.3 on python v3.11.2
  • Loading branch information
fphammerle committed Oct 7, 2023
2 parents c698740 + f21205f commit de1dc08
Show file tree
Hide file tree
Showing 5 changed files with 314 additions and 352 deletions.
16 changes: 10 additions & 6 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- run: pip install --upgrade pipenv==2020.8.13
- run: pip install --upgrade pipenv==2023.6.18
- run: sudo apt-get update
# TODO exclude dbus-python & PyGObject from pipenv install
- run: sudo apt-get install --yes --no-install-recommends
Expand All @@ -39,7 +39,6 @@ jobs:
strategy:
matrix:
python-version:
- '3.7'
- '3.8'
- '3.9'
- '3.10'
Expand All @@ -49,7 +48,14 @@ jobs:
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- run: pip install --upgrade pipenv==2020.8.13
# with pipenv v2023.6.26:
# > $ pipenv run pytest --cov="$(cat *.egg-info/top_level.txt)"
# . --cov-report=term-missing --cov-fail-under=100
# > cat: '*.egg-info/top_level.txt': No such file or directory
# > [...]
# > [...]/coverage/inorout.py:507: CoverageWarning:
# . Module was never imported. (module-not-imported)
- run: pip install --upgrade pipenv==2023.6.18
- run: sudo apt-get update
- run: sudo apt-get install --yes --no-install-recommends
libdbus-1-dev
Expand All @@ -59,9 +65,7 @@ jobs:
PYTHON_VERSION: ${{ matrix.python-version }}
- run: pipenv graph
- run: pipenv run pytest --cov="$(cat *.egg-info/top_level.txt)" --cov-report=term-missing --cov-fail-under=100
# https://github.com/PyCQA/pylint/issues/3882
- run: python3 -c 'import sys; sys.exit(sys.version_info < (3, 9))'
|| pipenv run pylint --load-plugins=pylint_import_requirements "$(cat *.egg-info/top_level.txt)"
- run: pipenv run pylint "$(cat *.egg-info/top_level.txt)"
# https://github.com/PyCQA/pylint/issues/352
- run: pipenv run pylint tests/*
- run: pipenv run mypy "$(cat *.egg-info/top_level.txt)" tests
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
(fixes `pipenv.vendor.requirementslib.exceptions.RequirementError: Failed parsing requirement from '.'`)

### Removed
- compatibility with `python3.5` & `python3.6`
- compatibility with `python3.5`, `python3.6` & `python3.7`

## [0.5.0] - 2020-11-06
### Added
Expand Down
26 changes: 20 additions & 6 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ verify_ssl = true
name = "pypi"

[packages]
systemctl-mqtt = {editable = true,path = "."}
systemctl-mqtt = {editable = true, path = "."}

# > ImportError: [...]/python3.10/site-packages/gi/_gi.cpython-310-x86_64-linux-gnu.so:
# . undefined symbol: _PyUnicode_AsStringAndSize
Expand All @@ -14,18 +14,32 @@ PyGObject = "!=3.30.5"
black = "*"
mypy = "*"
pylint = "*"
# >=2.0.3 to skip PyGObject's custom loader & fix broken wheel
pylint-import-requirements = ">=2.0.3"
pytest = "*"
pytest-cov = "*"

# python3.10 compatibility
# > File "[...]/lib/python3.10/site-packages/mypy/main.py", line 11, in <module>
# > from typing_extensions import Final, NoReturn
# > ModuleNotFoundError: No module named 'typing_extensions'
typing-extensions = "*"
# mypy on python<3.8
typed-ast = {markers = "python_version < '3.8'"}
typing-extensions = {markers = ""}
# python<3.11 compatibility
# > File "[...]/lib/python3.10/site-packages/_pytest/_code/code.py", line 60, in <module>
# > from exceptiongroup import BaseExceptionGroup
# > ModuleNotFoundError: No module named 'exceptiongroup'
exceptiongroup = {markers = "python_version < '3.11'"}
# > File "[...]/lib/python3.10/site-packages/_pytest/config/findpaths.py", line 71, in load_config_dict_from_file
# > import tomli as tomllib
# > ModuleNotFoundError: No module named 'tomli'
tomli = {markers = "python_version < '3.11'"}
# > File "[...]/lib/python3.10/site-packages/astroid/decorators.py", line 16, in <module>
# > import wrapt
# > ModuleNotFoundError: No module named 'wrapt'
wrapt = "*"
# remove `"markers": "python_version >= '3.11'"` to workaround:
# > File "[...]/lib/python3.7/site-packages/pylint/lint/parallel.py", line 13, in <module>
# > import dill
# > ModuleNotFoundError: No module named 'dill'
dill = {markers = "python_version >= '0'"}

[requires]
python_version = "3"
Expand Down
Loading

0 comments on commit de1dc08

Please sign in to comment.