From 851565985b0a53d2431010e4b79e1f51478fd484 Mon Sep 17 00:00:00 2001 From: Jingchen Ye <97littleleaf11@gmail.com> Date: Sat, 9 Oct 2021 01:20:30 +0800 Subject: [PATCH 1/6] Enable CI on Python 3.10 --- .github/workflows/test.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 2e1f73e981a3..38bf99e869b5 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -56,6 +56,12 @@ jobs: toxenv: py tox_extra_args: "-n 2" test_mypyc: true + - name: Test suite with py310-ubuntu + python: '3.10' + arch: x64 + os: ubuntu-latest + toxenv: py + tox_extra_args: "-n 2" - name: mypyc runtime tests with py36-macos python: '3.6' arch: x64 @@ -114,7 +120,7 @@ jobs: - uses: actions/checkout@v2 - uses: actions/setup-python@v2 with: - python-version: '3.10-dev' + python-version: '3.11-dev' - name: Install tox run: | pip install -U pip==21.2.3 setuptools From 1819b37a67c156039554ffd468e7cf6441844ba8 Mon Sep 17 00:00:00 2001 From: Jingchen Ye <97littleleaf11@gmail.com> Date: Sat, 9 Oct 2021 01:25:00 +0800 Subject: [PATCH 2/6] Comment python-nightly --- .github/workflows/test.yml | 39 +++++++++++++++++++------------------- 1 file changed, 20 insertions(+), 19 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 38bf99e869b5..e92fc8f480d7 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -113,23 +113,24 @@ jobs: - name: Test run: tox -e ${{ matrix.toxenv }} --skip-pkg-install -- ${{ matrix.tox_extra_args }} - python-nightly: - runs-on: ubuntu-latest - name: Test suite with Python nightly - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-python@v2 - with: - python-version: '3.11-dev' - - name: Install tox - run: | - pip install -U pip==21.2.3 setuptools - pip install --upgrade 'setuptools!=50' virtualenv==20.4.7 tox==3.20.1 - - name: Setup tox environment - run: tox -e py --notest - - name: Test - run: tox -e py --skip-pkg-install -- "-n 2" - continue-on-error: true - - name: Mark as a success - run: exit 0 +# TODO: uncomment this when 3.11-dev is available +# python-nightly: +# runs-on: ubuntu-latest +# name: Test suite with Python nightly +# steps: +# - uses: actions/checkout@v2 +# - uses: actions/setup-python@v2 +# with: +# python-version: '3.11-dev' +# - name: Install tox +# run: | +# pip install -U pip==21.2.3 setuptools +# pip install --upgrade 'setuptools!=50' virtualenv==20.4.7 tox==3.20.1 +# - name: Setup tox environment +# run: tox -e py --notest +# - name: Test +# run: tox -e py --skip-pkg-install -- "-n 2" +# continue-on-error: true +# - name: Mark as a success +# run: exit 0 From be6a8b35931c5317e910b407104b2ac570dd2adb Mon Sep 17 00:00:00 2001 From: Jingchen Ye <97littleleaf11@gmail.com> Date: Sat, 9 Oct 2021 01:35:23 +0800 Subject: [PATCH 3/6] Upgrade virtualenv when running python3.10 --- .github/workflows/test.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e92fc8f480d7..f6e61a32b4e9 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -103,6 +103,9 @@ jobs: source $VENV/bin/activate - name: Install tox run: pip install --upgrade 'setuptools!=50' 'virtualenv<16.7.11' tox==3.20.1 + - name: Upgrade virtualenv + if: ${{ matrix.python == '3.10' }} + run: pip install --upgrade virtualenv==20.4.7 - name: Compiled with mypyc if: ${{ matrix.test_mypyc }} run: | From eb17cf01769d259ec541f5f9b2540d7d2a2d7a20 Mon Sep 17 00:00:00 2001 From: Jingchen Ye <97littleleaf11@gmail.com> Date: Sat, 9 Oct 2021 02:17:48 +0800 Subject: [PATCH 4/6] Use virtualenv 20 --- .github/workflows/test.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f6e61a32b4e9..a8360ddd2703 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -102,10 +102,7 @@ jobs: ./misc/build-debug-python.sh $PYTHONVERSION $PYTHONDIR $VENV source $VENV/bin/activate - name: Install tox - run: pip install --upgrade 'setuptools!=50' 'virtualenv<16.7.11' tox==3.20.1 - - name: Upgrade virtualenv - if: ${{ matrix.python == '3.10' }} - run: pip install --upgrade virtualenv==20.4.7 + run: pip install --upgrade 'setuptools!=50' 'virtualenv>=20.6.0' tox==3.20.1 - name: Compiled with mypyc if: ${{ matrix.test_mypyc }} run: | From f5b36d08ea8455ce283fbf146418eed82f0684eb Mon Sep 17 00:00:00 2001 From: Jingchen Ye <97littleleaf11@gmail.com> Date: Mon, 11 Oct 2021 02:38:33 +0800 Subject: [PATCH 5/6] Use setuptools --- test-data/packages/typedpkg-stubs/setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test-data/packages/typedpkg-stubs/setup.py b/test-data/packages/typedpkg-stubs/setup.py index 58d8fa968cc3..4948dc6a01df 100644 --- a/test-data/packages/typedpkg-stubs/setup.py +++ b/test-data/packages/typedpkg-stubs/setup.py @@ -2,7 +2,7 @@ This setup file installs packages to test mypy's PEP 561 implementation """ -from distutils.core import setup +from setuptools import setup setup( name='typedpkg-stubs', From 73c5a0706c2e9ee18f22e040e9eecad74fdc2787 Mon Sep 17 00:00:00 2001 From: Jingchen Ye <97littleleaf11@gmail.com> Date: Mon, 11 Oct 2021 02:55:06 +0800 Subject: [PATCH 6/6] Use setuptools --- mypyc/build.py | 2 +- scripts/mypyc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mypyc/build.py b/mypyc/build.py index 71acec06ad18..026da76baaea 100644 --- a/mypyc/build.py +++ b/mypyc/build.py @@ -4,7 +4,7 @@ modules to be passed to setup. A trivial setup.py for a mypyc built project, then, looks like: - from distutils.core import setup + from setuptools import setup from mypyc.build import mypycify setup(name='test_module', diff --git a/scripts/mypyc b/scripts/mypyc index 1dc42966eb35..235814042d27 100755 --- a/scripts/mypyc +++ b/scripts/mypyc @@ -19,7 +19,7 @@ import sys base_path = os.path.join(os.path.dirname(__file__), '..') setup_format = """\ -from distutils.core import setup +from setuptools import setup from mypyc.build import mypycify setup(name='mypyc_output',