Skip to content

Define Python supported versions as strings instead of float #8361

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

Closed
5 tasks
humitos opened this issue Jul 22, 2021 · 1 comment
Closed
5 tasks

Define Python supported versions as strings instead of float #8361

humitos opened this issue Jul 22, 2021 · 1 comment
Labels
Accepted Accepted issue on our roadmap Good First Issue Good for new contributors Improvement Minor improvement to code

Comments

@humitos
Copy link
Member

humitos commented Jul 22, 2021

In #8328 (comment) we realized that we are using floats to set the version of Python (3.5, 3.8, 3.10) which doesn't make sense and breaks due to 3.10 is 3.1.

This is the setting involved here:

DOCKER_IMAGE_SETTINGS = {
# A large number of users still have this pinned in their config file.
# We must have documented it at some point.
'readthedocs/build:2.0': {
'python': {
'supported_versions': [2, 2.7, 3, 3.5],
'default_version': {
2: 2.7,
3: 3.5,
},
},
},
'readthedocs/build:4.0': {
'python': {
'supported_versions': [2, 2.7, 3, 3.5, 3.6, 3.7],
'default_version': {
2: 2.7,
3: 3.7,
},
},
},
'readthedocs/build:5.0': {
'python': {
'supported_versions': [2, 2.7, 3, 3.5, 3.6, 3.7, 'pypy3.5'],
'default_version': {
2: 2.7,
3: 3.7,
},
},
},
'readthedocs/build:6.0': {
'python': {
'supported_versions': [2, 2.7, 3, 3.5, 3.6, 3.7, 3.8, 'pypy3.5'],
'default_version': {
2: 2.7,
3: 3.7,
},
},
},
'readthedocs/build:7.0': {
'python': {
'supported_versions': [2, 2.7, 3, 3.5, 3.6, 3.7, 3.8, 3.9, 'pypy3.5'],
'default_version': {
2: 2.7,
3: 3.7,
},
},
},
}

We need to,

  • define those Python versions as string
  • convert the Python version defined in YAML file to string
  • update tests to work with versions as string
  • update documentation to mention that YAML python.version uses string
  • demotivate the usage of float in YAML

There may be more changes required here, but I think they will appear as we are making the other changes. Feel free to add them to this list.

@humitos humitos added Good First Issue Good for new contributors Improvement Minor improvement to code Accepted Accepted issue on our roadmap labels Jul 22, 2021
@stsewd
Copy link
Member

stsewd commented Aug 4, 2021

This is already done

@stsewd stsewd closed this as completed Aug 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Accepted Accepted issue on our roadmap Good First Issue Good for new contributors Improvement Minor improvement to code
Projects
None yet
Development

No branches or pull requests

2 participants