-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Add support for Python3.10 on testing
Docker image
#8328
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
Changes from 1 commit
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
5e013c5
Add support for Python3.10 on `testing` Docker image
humitos d9c9ed6
Comment about potential problems with float values
humitos 7f83fcd
Allow to use 3.10 as string in YAML config file
humitos 80b3c2c
Merge branch 'master' of github.com:readthedocs/readthedocs.org into …
humitos b38cd36
Merge branch 'master' into humitos/py310-testing-image
stsewd 3222858
Config file: use string for python.version (#8372)
stsewd File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like these should probably be strings, but guessing that ship has sailed. Are they floats now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't remember this setting being a different type than float. We are accepting floats and string in the config file, but if it's a string we are converting it to float. I found we have a test case for that https://github.com/readthedocs/readthedocs.org/blob/884132a5b55a6d5e7e70d8da4856f47df1d352d7/readthedocs/config/tests/test_config.py#L384-L399
So, I suppose that using string here will require more work.
... I just realized that I'm sleepy 😴 ...
This may be a problem, I guess. We will be comparing against
3.1
--which, it will work with because we are changingpython: version: "3.10"
to float as well ending up as3.1
, but it will eventually explode 💣There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we ever hit this problem, it would probably be in Python
3.50
because we already accept Python3.5
😅There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it really too late to change this? 🙈
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@stsewd how much work would be to change
python.version
to be support float and string and use the string version in all our internal code? (config file, build environment, tests, settings, etc).Also, we should change our documentation to de-motivate the usage of float on this config and re-write all the occurrences to use the string version.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should be fine. We used to compare the versions as numbers to get the highest version for
3
and2
, but we use another method for that now.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As this doesn't affect us immediately, I don't want to block the upgrade to the new Docker image because of this problem. I opened this issue to track this change: #8361
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Meh, it doesn't work when doing the build
/bin/sh: 1: python3.1: not found
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I pushed a commit to support
"3.10"
as string inpython.version
.However, I had to made some decisions:
python.version
is not cast to int/float anymore"3.6"
(as string) in the YAML keeps working for backward compatibilityThis helps us to keep all the config files working as they were. However, I had to adapt our code to:
python.supported_versions
in our settings filepython.supported_versions
to use int, float, and string versionspython_interpreter
These changes are enough to make 3.10 work on our platform. I didn't find any issue with them yet, but it may be good to take a deeper look in the future and eventually remove the support for int/float values on
python.version
in the config file.