Skip to content

Commit 68a4230

Browse files
authored
Attempt at fixing the CI (#494)
* MAINT drop Python 3.6 on github actions * Skip test_dynamic_pytest_module with recent versions of pytest * Use old flake8 for now
1 parent cc6a199 commit 68a4230

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

.github/workflows/testing.yml

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,18 @@ jobs:
1111
runs-on: ubuntu-latest
1212
steps:
1313
- uses: actions/checkout@v1
14-
- name: Set up Python 3.7
14+
- name: Set up Python 3.11
1515
uses: actions/setup-python@v1
1616
with:
17-
python-version: 3.7
17+
python-version: 3.11
1818
- name: Install flake8
1919
shell: bash
2020
run: |
2121
python -V
22-
python -m pip install flake8
22+
python -m pip install "flake8<6.0.0"
23+
# XXX: flake8 --diff is deprecated, broken and was removed
24+
# in flake8 6.0.0: we should instead black-ify the full repo
25+
# and run a full flake8 check at each PR.
2326
- name: Run flake8 on diff with upstream/master
2427
shell: bash
2528
run: |
@@ -29,21 +32,18 @@ jobs:
2932
strategy:
3033
matrix:
3134
os: [ubuntu-latest, windows-latest, macos-latest]
32-
python_version: [3.6, 3.7, 3.8, 3.9, "3.10", "3.11-dev", "pypy-3.9"]
35+
# TODO: add "3.12-dev" to the list
36+
python_version: [3.7, 3.8, 3.9, "3.10", "3.11", "pypy-3.9"]
3337
exclude:
3438
# Do not test all minor versions on all platforms, especially if they
3539
# are not the oldest/newest supported versions
36-
- os: windows-latest
37-
python_version: 3.6
3840
- os: windows-latest
3941
python_version: 3.7
4042
- os: windows-latest
4143
python_version: 3.8
4244
# as of 4/02/2020, psutil won't build under PyPy + Windows
4345
- os: windows-latest
4446
python_version: "pypy-3.9"
45-
- os: macos-latest
46-
python_version: 3.6
4747
- os: macos-latest
4848
python_version: 3.7
4949
- os: macos-latest
@@ -69,10 +69,6 @@ jobs:
6969
python -m pip install -r dev-requirements.txt
7070
python ci/install_coverage_subprocess_pth.py
7171
export
72-
- name: Install supported dependencies (only test in Python 3.6)
73-
shell: bash
74-
run: python -m pip install typing-extensions
75-
if: matrix.python_version == '3.6'
7672
- name: Display Python version
7773
shell: bash
7874
run: python -c "import sys; print(sys.version)"

tests/cloudpickle_test.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1498,7 +1498,11 @@ def foo():
14981498

14991499
def test_dynamic_pytest_module(self):
15001500
# Test case for pull request https://github.com/cloudpipe/cloudpickle/pull/116
1501-
import py
1501+
1502+
# This test does not longer make sense with pytest >= 7.2
1503+
py = pytest.importorskip("py")
1504+
if not hasattr(py, "builtin"):
1505+
pytest.skip("py.builtin is not available")
15021506

15031507
def f():
15041508
s = py.builtin.set([1])

0 commit comments

Comments
 (0)