Skip to content

Enable CI on Python 3.10 #11297

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Oct 11, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 27 additions & 20 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -96,7 +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
run: pip install --upgrade 'setuptools!=50' 'virtualenv>=20.6.0' tox==3.20.1
- name: Compiled with mypyc
if: ${{ matrix.test_mypyc }}
run: |
Expand All @@ -107,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.10-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

2 changes: 1 addition & 1 deletion mypyc/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
2 changes: 1 addition & 1 deletion scripts/mypyc
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
2 changes: 1 addition & 1 deletion test-data/packages/typedpkg-stubs/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the usage of distutils that is causing a DeprecationWarning is in the setup.py mypyc generates to build C extensions:

mypy/scripts/mypyc

Lines 21 to 28 in 8cba3bc

setup_format = """\
from distutils.core import setup
from mypyc.build import mypycify
setup(name='mypyc_output',
ext_modules=mypycify({}, opt_level="{}"),
)
"""

I'm not really sure what this file's for but I don't think this is what's causing the CI failure.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, I'm looking at these. However I just wondering whether should I modify the test-data/packages/typedpkg-stubs/setup.py

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a sample package used for unit tests. We should probably update it too, but it should only affect a few unit tests.


setup(
name='typedpkg-stubs',
Expand Down