diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 8dbf357f9..be034ae9a 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -29,7 +29,7 @@ jobs: strategy: matrix: os: [ubuntu-latest, windows-latest, macos-latest] - python_version: [3.5, 3.6, 3.7, 3.8, 3.9, "pypy3"] + python_version: [3.5, 3.6, 3.7, 3.8, 3.9, "3.10-dev", "pypy3"] exclude: # Do not test all minor versions on all platforms, especially if they # are not the oldest/newest supported versions @@ -58,7 +58,7 @@ jobs: steps: - uses: actions/checkout@v1 - name: Set up Python ${{ matrix.python_version }} - uses: actions/setup-python@v1 + uses: actions/setup-python@v2 with: python-version: ${{ matrix.python_version }} - name: Install project and dependencies @@ -96,14 +96,16 @@ jobs: python-nightly: runs-on: ubuntu-18.04 + # This entry is made optional for now, see https://github.com/cloudpipe/cloudpickle/pull/420 + if: "contains(github.event.pull_request.labels.*.name, 'ci python-nightly')" steps: - uses: actions/checkout@v1 - name: Install Python from ppa:deadsnakes/nightly run: | sudo add-apt-repository ppa:deadsnakes/nightly sudo apt update - sudo apt install python3.10 python3.10-venv python3.10-dev - python3.10 -m venv nightly-venv + sudo apt install python3.11 python3.11-venv python3.11-dev + python3.11 -m venv nightly-venv echo "$PWD/nightly-venv/bin" >> $GITHUB_PATH - name: Display Python version run: python -c "import sys; print(sys.version)" diff --git a/tests/cloudpickle_test.py b/tests/cloudpickle_test.py index 845f27962..f63d5168c 100644 --- a/tests/cloudpickle_test.py +++ b/tests/cloudpickle_test.py @@ -2207,10 +2207,13 @@ def method(self, arg: type_) -> type_: def check_annotations(obj, expected_type, expected_type_str): assert obj.__annotations__["attribute"] == expected_type - if sys.version_info >= (3, 10): - # In Python 3.10, type annotations are stored as strings. + if sys.version_info >= (3, 11): + # In Python 3.11, type annotations are stored as strings. # See PEP 563 for more details: # https://www.python.org/dev/peps/pep-0563/ + # Originaly scheduled for 3.10, then postponed. + # See this for more details: + # https://mail.python.org/archives/list/python-dev@python.org/thread/CLVXXPQ2T2LQ5MP2Y53VVQFCXYWQJHKZ/ assert ( obj.method.__annotations__["arg"] == expected_type_str