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

Change Python environment default to 3 #3070

Closed
ericholscher opened this issue Aug 28, 2017 · 12 comments · Fixed by #3581
Closed

Change Python environment default to 3 #3070

ericholscher opened this issue Aug 28, 2017 · 12 comments · Fixed by #3581
Labels
Accepted Accepted issue on our roadmap Improvement Minor improvement to code
Milestone

Comments

@ericholscher
Copy link
Member

Python 2 is going to stop being maintained in less than 3 years. We should switch our default Python version for projects to Python 3, as this should increase the number of python 3 projects being built on RTD by a large number. It's just a small settings change, but putting it here for discussion.

@ericholscher
Copy link
Member Author

@humitos humitos added the Needed: design decision A core team decision is required label Dec 26, 2017
@agjohnson agjohnson modified the milestones: 2.5, 2.6 Jun 1, 2018
@agjohnson agjohnson added the Accepted Accepted issue on our roadmap label Jun 8, 2018
@agjohnson agjohnson modified the milestones: 2.6, 2.7 Jul 17, 2018
@Naereen
Copy link

Naereen commented Jul 26, 2018

Hi,
Is it planned soon to support Python 3.6 by default?
3.7 is already the new default version, but apparently RTD (still) builds with 3.5.
Thanks.

@stsewd
Copy link
Member

stsewd commented Jul 26, 2018

@Naereen python 3.6 is already supported, you need to use a configuration file https://docs.readthedocs.io/en/latest/yaml-config.html

@Naereen
Copy link

Naereen commented Jul 26, 2018

Thanks @stsewd !

@humitos
Copy link
Member

humitos commented Sep 6, 2018

@ericholscher I think we can do this now. I wonder if we need to create a date Feature flag for this, so only new projects start building with python3 instead of forcing all the projects that were already building with python2 to migrate. What do you think?

@humitos
Copy link
Member

humitos commented Sep 6, 2018

Oh, I got confused. By changing the default= attribute in the model we already get what I was proposing with the Feature flag :)

@agjohnson agjohnson added Improvement Minor improvement to code and removed Needed: design decision A core team decision is required labels Nov 10, 2018
@agjohnson agjohnson modified the milestones: 2.9, 3.0 Nov 10, 2018
@Naereen
Copy link

Naereen commented Nov 20, 2018

@Naereen python 3.6 is already supported, you need to use a configuration file https://docs.readthedocs.io/en/latest/yaml-config.html

Hi! I'm quite curious, I though python 3.6 was supported, but for instance this build tried to use python.version: 3.6 in my YAML file, and failed instantly.
See #4918

@stsewd
Copy link
Member

stsewd commented Nov 20, 2018

It's supported, please see https://docs.readthedocs.io/en/latest/yaml-config.html#python-version

The supported Python versions depends on the version of the build image your project is using.

You need

build:
  image: latest

@Naereen
Copy link

Naereen commented Nov 20, 2018

Oh, OK. Sorry I (still) didn't understand this point. Thanks!
My latest build is working, thanks a lot!

@stsewd
Copy link
Member

stsewd commented Nov 20, 2018

We use docker images to encapsulate the build process, each docker image has different python versions, and libs, here is the list https://docs.readthedocs.io/en/latest/builds.html#the-build-environment. Using latest is recommendable.

@impredicative
Copy link

impredicative commented Jan 17, 2019

Is there any reason why 3.6 isn't currently the default?

@humitos
Copy link
Member

humitos commented Jan 17, 2019

Is there any reason why 3.6 isn't currently the default?

Just legacy code. We are upgrading it to make this to happen soon.

@agjohnson agjohnson modified the milestones: 3.0, 3.2 Jan 25, 2019
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 Improvement Minor improvement to code
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants