-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Set python3 as default interpreter #3581
Conversation
Do I need to run migrations for this? If that is the case, probably we want to do another PR with the missing migrations right now before this one. |
readthedocs/projects/models.py
Outdated
@@ -196,7 +196,7 @@ class Project(models.Model): | |||
_('Python Interpreter'), | |||
max_length=20, | |||
choices=constants.PYTHON_CHOICES, | |||
default='python', | |||
default='python3', | |||
help_text=_('(Beta) The Python interpreter used to create the virtual ' |
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.
Can I remove the help text about being a beta feature?
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.
Oh yeah, this copy should definitely change :)
This is a change we've been wanting to make for a while now, but it is blocked more on the operations and support side. If we don't want to jump into this change just yet, we can at least keep this PR sidelined for when we are close. I think we want to eventually just force 3.6 (at least). So perhaps the order of how we merge things would look like:
There is also likely a change we should coordinate here with our configuration handling and we should make 3.6 the default there too. |
Blocked on readthedocs/readthedocs-docker-images#62 |
Not blocked on readthedocs/readthedocs-docker-images#62, but this is blocked on making a change to our default image. |
a72d1f2
to
a4406db
Compare
So, this will change the default interpreter for new projects, which is probably a safe place to start. We probably need to define a few more things though:
|
Yes. This should only be for projects going forward, not a change of existing configurations. |
With the config file v2, the default version is python3, v1 would respect the setting in the admin panel. This only affects new projects. |
a4406db
to
29e4fa0
Compare
docs/yaml-config.rst
Outdated
@@ -135,7 +135,7 @@ used for building documentation. | |||
python.version | |||
`````````````` | |||
|
|||
* Default: ``2.7`` | |||
* Default: ``3.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.
This will be difficult to express... The actual default value here is the one from the admin panel
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.
3.5 has some issues (#5051) we may want to default to 3.6 or even 3.7.x because
Python 3.6.8 is planned to be the last bugfix release for 3.6.x. Following the release of 3.6.8, we plan to provide security fixes for Python 3.6 as needed through 2021, five years following its initial release.
from https://www.python.org/downloads/release/python-368/
This is also a good excuse to upgrade our Docker images.
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.
With our current release of docker images:
3.0
will default topy3.5
4.0
topy3.5
5.0rc1
topy3.6
So, I think we are fine here.
8ba63f9
to
9198fbc
Compare
9198fbc
to
03723df
Compare
03723df
to
4f4fd67
Compare
Codecov Report
@@ Coverage Diff @@
## master #3581 +/- ##
==========================================
- Coverage 76.74% 76.26% -0.49%
==========================================
Files 158 158
Lines 9951 10034 +83
Branches 1244 1267 +23
==========================================
+ Hits 7637 7652 +15
- Misses 1980 2039 +59
- Partials 334 343 +9
|
Sphinx 2.0 is deprecating python2 http://www.sphinx-doc.org/en/master/changes.html#incompatible-changes. Just a note in case we update sphinx first. |
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 want this to go out sooner than later.
This is a safe change considering that it will only affect new projects and won't touch existing ones.
Although, I'd prefer to upgrade our docker images before this PR gets merged and use 3.6 or probably 3.7 as default instead of 3.5.
docs/yaml-config.rst
Outdated
@@ -135,7 +135,7 @@ used for building documentation. | |||
python.version | |||
`````````````` | |||
|
|||
* Default: ``2.7`` | |||
* Default: ``3.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.
3.5 has some issues (#5051) we may want to default to 3.6 or even 3.7.x because
Python 3.6.8 is planned to be the last bugfix release for 3.6.x. Following the release of 3.6.8, we plan to provide security fixes for Python 3.6 as needed through 2021, five years following its initial release.
from https://www.python.org/downloads/release/python-368/
This is also a good excuse to upgrade our Docker images.
I'm proposing some direction to achieve this goal at readthedocs/readthedocs-docker-images#84 but it involves some months before we get 3.7 working on the docker image (we have to release So, I suppose we can do this a smooth migration: first go with |
Sphinx2 is doing a lot of things and I suspect there will be a number of incompatibilities (with our theme possibly but also lots of folks' docs). We will probably have to test this pretty extensively and perhaps have a milestone for it. |
docs/yaml-config.rst
Outdated
@@ -135,7 +135,7 @@ used for building documentation. | |||
python.version | |||
`````````````` | |||
|
|||
* Default: ``2.7`` | |||
* Default: ``3.5`` | |||
* Options: ``2.7``, ``2``, ``3.5``, ``3`` |
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 suppose that we should update this line to support 3.6
also.
I think we are almost ready to merge this PR.
Am I missing anything else here? |
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.
Everything looks good here 👍
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 think that after updating the docs about the possible values for build.image
we are ready to merge.
What I'm reading in the code does not match what we have written in the docs, but maybe I'm wrong.
This closes #3070