Add Python 3.10

Python 3.10.0 final was released yesterday, 2021-10-04:

Please could you also add support for Python 3.10?

Thank you!

PS It took 20 days for 3.9 (Python 3.9.0 build) and 21 hours for 3.8 (Add Python 3.8 support) :slight_smile:

3 Likes

Reminder for when this does get added, make sure to put "3.10" with quotes in your YAML, otherwise it’ll interpret 3.10 as a float => 3.1 and you’ll get a surprise!

Longer version:

Any update on this??

2 Likes

An while you are at it, please consider adding python “3.11-dev” as well:
PEP 664 – Python 3.11 Release Schedule

2 Likes

Python 3.10.1 came out last week:

What’s needed to add 3.10 final to Travis CI? Is there something we can help with?

Hey folks,

Python “3.10.0” should be already available.

I have completed the build for “3.10.1”, please give it ~24 hours to be available for images.

I have also triggered builds for “3.11-dev”, it should be available around the same time.

Thanks

Thanks @mustafa! Does that mean "3.10" will resolve to the latest python version in that release, same as how other python versions work?

"3.10" is not yet working, I get:

Downloading archive: https://storage.googleapis.com/travis-ci-language-archives/python/binaries/ubuntu/20.04/x86_64/python-3.10.tar.bz2
$ curl -sSf --retry 5 -o python-3.10.tar.bz2 ${archive_url}
curl: (22) The requested URL returned error: 404  

https://app.travis-ci.com/github/hugovk/test/jobs/541219400

~48 hours later 3.10 is still not available:

$ curl -sSf --retry 5 -o python-3.10.tar.bz2 ${archive_url}
curl: (22) The requested URL returned error: 404 
Unable to download 3.10 archive. The archive may not exist. Please consider a different version.

https://app.travis-ci.com/github/hugovk/test/jobs/552522000

Looks like the problem might be here?

sudo env PYTHON_BUILD_ROOT=/opt/pyenv/plugins/python-build \
  /opt/pyenv/plugins/python-build/bin/python-build --verbose $VERSION $INSTALL_DEST/$VERSION
python-build: definition not found: 3.10
The command "./bin/compile" exited with 2.

https://app.travis-ci.com/github/travis-ci/cpython-builder/jobs/552320855#L1013

Also 3.10.0, 3.10.1 and 3.11-dev are failing in a similar way:

https://app.travis-ci.com/github/hugovk/test/builds/243584339

So 3.10.0 and 3.10.1 now work (with Bionic and Focal), that’s good news.

But 3.10 still does not work because python-3.10.tar.bz2 is lacking, as shown in this list https://docs.travis-ci.com/user/languages/python/#python-versions.

This tar file needs to be added just like python-3.9.tar.bz2, python-3.8.tar.bz2 are already present next to their minor releases.

1 Like

Python 3.10.2 was released 3 days ago:

3.10.2 and 3.10 are not available on Travis:

@mustafa Please could you add 3.10.2 and also add and point 3.10 to the latest available?

Is there something we can help out with? It’s been over three months since 3.10 was released.

Thank you.

@hugovk

Now, Python “3.10.2” is ready to use for both Focal and Bionic images. And also “3.10” should be available as well.

Best

2 Likes

Confirmed both 3.10 and 3.10.2 are now available, thank you!

2 Likes

What does the travis.yml look like to use this?

This works for us:

python:
  - 3.8
  - 3.9
  - 3.10

Are you using language: python? We have language: java, but we also need Python in the same build.

Yes, that’s with language: python. If you use a different language, but still need a specific version of python, you might be able to use pyenv directly… e.g. pyenv global 3.10.8.

You have to put quotes around “3.10” in yaml otherwise it’s interpreted as 3.1!

More info:

For example:

Build example:

1 Like