Skip to content

Commit cf79b8f

Browse files
Fix GitHub CI, use 3.11, 3.12 and 3.13 and fix pylint errors
Signed-off-by: Bernhard Kaindl <[email protected]>
1 parent 270ccd1 commit cf79b8f

23 files changed

+100
-184
lines changed

.github/workflows/main.yml

Lines changed: 4 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@ jobs:
2828
fail-fast: false
2929
matrix:
3030
include:
31-
- python-version: '3.6'
32-
os: ubuntu-20.04
33-
- python-version: '3.10'
34-
os: ubuntu-22.04
3531
- python-version: '3.11'
3632
os: ubuntu-22.04
33+
- python-version: '3.12'
34+
os: ubuntu-22.04
35+
- python-version: '3.13'
36+
os: ubuntu-22.04
3737
runs-on: ${{ matrix.os }}
3838
steps:
3939
- uses: actions/checkout@v4
@@ -58,21 +58,6 @@ jobs:
5858
pip install 'virtualenv<20.22' 'tox==4.5.1' tox-gh-actions
5959
tox --workdir .github/workflows/.tox --recreate
6060
61-
# tox >= 4.0.0 is needed for using optional-dependencies from pyproject.toml, which is
62-
# is not available for python <= 3.6, so use the python3.8 of Ubuntu-20.04 to install it:
63-
- name: Run tox for 3.6 and 3.8 on ${{ matrix.os }}'s 3.8 to get 'extras' from pyproject.toml)
64-
if: ${{ matrix.python-version == 2.7 || matrix.python-version == 3.6 }}
65-
run: |
66-
set -xv;curl -sSL https://bootstrap.pypa.io/get-pip.py -o get-pip.py
67-
python3.8 get-pip.py
68-
# The alternative is installing python3-pip but we don't need full pip function for now:
69-
# sudo apt-get update && sudo apt-get install -y python3-pip
70-
# Let tox-gh-actions get the environment(s) to run tests with from tox.ini:
71-
# Use tox==4.5.1: tox>=4 is needed for reading the extras from pyproject.toml
72-
# Warning: tox>=4.5.2 depends on virutalenv>=20.23, which breaks Python 2.7:
73-
python3.8 -m pip install 'virtualenv<20.22' 'tox==4.5.1' tox-gh-actions
74-
tox --workdir .github/workflows/.tox --recreate
75-
7661
- name: Select the coverage file for upload
7762
if: |
7863
( matrix.python-version == '3.6' || matrix.python-version == '3.11' ) &&

.pylintrc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ disable=W0142,W0703,C0111,R0201,W0603,W0613,W0212,W0141,
6565
len-as-condition,
6666
no-else-return,
6767
raise-missing-from,
68+
too-many-positional-arguments,
6869
too-many-branches,
6970
too-many-nested-blocks,
7071
too-many-statements,
@@ -222,8 +223,9 @@ defining-attr-methods=__init__,__new__,setUp
222223

223224
[DESIGN]
224225

225-
# Maximum number of arguments for function / method
226-
max-args=100
226+
# Maximum number of arguments for function / method.
227+
# defaults to: max-args=5
228+
max-args=10
227229

228230
# Argument names that match this expression will be ignored. Default to name
229231
# with leading underscore

pyproject.toml

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -71,11 +71,6 @@ mypy = [
7171
"types-six",
7272
"types-toml",
7373
]
74-
# pyre introduced two false-postives recently, pin it to prevent further surprises:
75-
pyre = [
76-
"pyre-check == 0.9.21",
77-
"pyre-extensions == 0.0.30",
78-
]
7974
pytype = [
8075
"pandas",
8176
"pytype",
@@ -198,7 +193,7 @@ exclude = [
198193
extraPaths = ["stubs"]
199194
include = ["xcp", "tests"]
200195
pythonPlatform = "Linux"
201-
pythonVersion = "3.6"
196+
pythonVersion = "3.11"
202197
reportFunctionMemberAccess = true
203198
reportGeneralTypeIssues = "warning"
204199
reportOptionalMemberAccess = "warning"
@@ -211,7 +206,7 @@ stubPath = "stubs"
211206
inputs = ["xcp", "tests", "./*.py"]
212207
keepgoing = true
213208
platform = "linux"
214-
python_version = "3.10"
209+
python_version = "3.11"
215210
pythonpath = ".:stubs"
216211
disable = ["ignored-type-comment"]
217212
overriding_parameter_count_checks = true

pyre_runner.py

Lines changed: 0 additions & 62 deletions
This file was deleted.

pytest.ini

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
required_plugins =
1212
pytest_httpserver
1313
pytest-forked
14-
pytest-localftpserver
1514
pytest-pythonpath
1615
pytest-subprocess
1716
pytest-timeout
@@ -38,4 +37,5 @@ filterwarnings=ignore:Unknown config option
3837
pythonpath=stubs
3938
# Disable when using pytest >= 7.0.0:
4039
# Used by pytest-pythonpath for Python >=2.7 (https://pypi.org/project/pytest-pythonpath):
41-
python_paths=stubs
40+
# Can now only be activated when using newer pytest:
41+
#python_paths=stubs

stubs/pyfakefs/__init__.pyi

Whitespace-only changes.

stubs/pyfakefs/fake_filesystem_unittest.pyi

Lines changed: 0 additions & 20 deletions
This file was deleted.

stubs/pytest.pyi

Lines changed: 0 additions & 8 deletions
This file was deleted.

stubs/werkzeug/wrappers.pyi

Lines changed: 0 additions & 3 deletions
This file was deleted.

tests/conftest.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,20 @@
55
This module is run automatically by pytest to define and enable fixtures.
66
"""
77

8-
# pyre-ignore-all-errors[21]
8+
import os
9+
import tempfile
910
import warnings
1011

11-
import pytest # pyre does not find the module when run by tox -e py311-pyre
12+
import pytest
13+
14+
15+
@pytest.fixture()
16+
def mount_dir():
17+
"""pytest fixture for getting a temporary name for a temp directory"""
18+
mount_point = tempfile.mkdtemp(prefix="media-", dir="/tmp")
19+
os.rmdir(mount_point)
20+
return mount_point.encode()
21+
1222

1323
@pytest.fixture(autouse=True)
1424
def set_warnings():

0 commit comments

Comments
 (0)