Skip to content
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

Add support for Python 3.10 #321

Merged
merged 1 commit into from
Oct 7, 2021
Merged

Add support for Python 3.10 #321

merged 1 commit into from
Oct 7, 2021

Conversation

hugovk
Copy link
Contributor

@hugovk hugovk commented Oct 7, 2021

$ tox -e py310
GLOB sdist-make: /private/tmp/colorama/setup.py
py310 create: /private/tmp/colorama/.tox/py310
py310 inst: /private/tmp/colorama/.tox/.tmp/package/1/colorama-0.4.5rc0.zip
py310 testmon: setting TESTMON_DATAFILE=/private/tmp/colorama/.tox/py310/.testmondata
py310 installed: colorama @ file:///private/tmp/colorama/.tox/.tmp/package/1/colorama-0.4.5rc0.zip
py310 run-test-pre: PYTHONHASHSEED='2568120525'
py310 run-test: commands[0] | python -m unittest discover -p '*_test.py'
.........................................sss....s
----------------------------------------------------------------------
Ran 49 tests in 0.038s

OK (skipped=4)
______________________________________________________ summary _______________________________________________________
  py310: commands succeeded
  congratulations :)

@tartley
Copy link
Owner

tartley commented Oct 7, 2021

This is brilliant, huge thanks. I just added an issue to this effect 30 seconds ago, then saw you'd already submitted this. Thank you!

I want to merge it immediately. Before I do, can you indulge me by getting me up to speed on the syntax of the travis file:

matrix:
  include:
    - python: "2.7"
    - python: "3.10-dev"
    - python: "3.9"
    - python: "3.8"
    - arch: arm64
      python: "3.7"
    - arch: amd64
      python: "3.7"
    - python: "3.6"
    - python: "3.5"
    - python: "pypy"
    - python: "pypy3"

Am I right to infer that you had to add quotes for the "3.10-dev", so you thought you'd add quotes to all entries, to be consistent? That seems sensible.

Does the above mean that for arm64 and amd64, we test on python3.7? Presumably that was the latest at the time those lines were written. Should we update it? To python 3.10-dev? Or to python 3.9?

What architecture do all the other python versions get tested on?

@tartley tartley added the 0.4.5 Get merged for 0.4.5 release label Oct 7, 2021
@tartley
Copy link
Owner

tartley commented Oct 7, 2021

Ah, I just saw (and merged) your other branch to switch from Travis to github actions. https://github.com/tartley/colorama/pull/322/files I see it includes python3.10 in the tests it runs.

Am I right that this PR no longer needs to be merged?

@hugovk
Copy link
Contributor Author

hugovk commented Oct 7, 2021

I want to merge it immediately. Before I do, can you indulge me by getting me up to speed on the syntax of the travis file:

matrix:
  include:
    - python: "2.7"
    - python: "3.10-dev"
    - python: "3.9"
    - python: "3.8"
    - arch: arm64
      python: "3.7"
    - arch: amd64
      python: "3.7"
    - python: "3.6"
    - python: "3.5"
    - python: "pypy"
    - python: "pypy3"

Am I right to infer that you had to add quotes for the "3.10-dev", so you thought you'd add quotes to all entries, to be consistent? That seems sensible.

I added quotes because of a special case for Python 3.10. In YAML, if you put 3.10 without quotes it's interpreted as a float and as 3.1, and we don't want Python 3.1! So it's good practice to always put version numbers in quotes in YAML so we don't get this surprise when deleting the -dev.

More info: https://dev.to/hugovk/the-python-3-1-problem-85g

Of course, we don't need to worry about deleting -dev because GitHub Actions already has "3.10" available, and we've already switched to GHA in another PR. Travis CI does not have "3.10" available yet, so if we kept Travis we'd need to use "3.10-dev" for a few more weeks.

Does the above mean that for arm64 and amd64, we test on python3.7?

Yes.

Presumably that was the latest at the time those lines were written.

They were added in #253, 3.8 was the latest at that time. #248 is discussion. GitHub Actions doesn't have any native arm64 support.

Should we update it? To python 3.10-dev? Or to python 3.9?

Testing a single version is probably enough. Do we still need to test on arm64? If so, one solution is to get Travis back up and running for this repo and just test arm64 there. Another option is to use Docker on GitHub Actions and emulate arm64. Ping also @ossdev07 who contributed the PR mentioned above.

What architecture do all the other python versions get tested on?

The default Travis architecture is AMD64 architecture (arch: amd64).

https://docs.travis-ci.com/user/reference/overview/#for-a-particular-travisyml-configuration

GitHub Actions are also amd64.

@hugovk
Copy link
Contributor Author

hugovk commented Oct 7, 2021

Ah, I just saw (and merged) your other branch to switch from Travis to github actions. #322 (files) I see it includes python3.10 in the tests it runs.

Am I right that this PR no longer needs to be merged?

The README, tox.ini and setup.py changes are still useful, I'll rebase!

@hugovk
Copy link
Contributor Author

hugovk commented Oct 7, 2021

Rebased!

@tartley
Copy link
Owner

tartley commented Oct 7, 2021

You are amazing, many thanks, merging...

@tartley tartley merged commit 8bec044 into tartley:master Oct 7, 2021
@hugovk hugovk deleted the add-3.10 branch October 7, 2021 19:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.4.5 Get merged for 0.4.5 release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants