Skip to content

Python 3 migration plan ? #1731

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
Carreau opened this issue Oct 5, 2015 · 9 comments
Closed

Python 3 migration plan ? #1731

Carreau opened this issue Oct 5, 2015 · 9 comments
Labels
Community Effort Improvement Minor improvement to code

Comments

@Carreau
Copy link
Contributor

Carreau commented Oct 5, 2015

Maybe I'm just bad at searching, but is there a plan/meta issue on wether/how/when RTD itself will migrate to Python3 , and what is needed for this to append ?

From a quick look dependencies that don't install on py3:

  • bump simplejson version
  • drop Distutils2
  • figure out what to do for mercurial. Do RTD only shell out to mercurial ? If so it can be installed separately.
  • define __str__ on all object that define __unicode__ or their Object representation will be <ClassName> object.

Then refactor of RTD codebase itself ?

Thanks !

@agjohnson
Copy link
Contributor

I had this mostly working about a year ago and also hit issues with several dependencies. Launchpad was one of them, we aren't really supporting that much now anyways though. Several django libraries were also still lacking support, though I can't recall which ones.

This isn't on our roadmap at the moment, because of larger pressing issues -- and because this is mostly just refactory cleanup that we won't see much benefit from. We should do this eventually though.

@agjohnson agjohnson added Improvement Minor improvement to code Community Effort labels Oct 5, 2015
@Carreau
Copy link
Contributor Author

Carreau commented Oct 5, 2015

Ok, Thanks.

From experience, introducing python3-ism early is helpful as new code will not have to be ported,
and new contributor often match the style of the library.

I'll see if I can send some fix that make rtd single source.

@agjohnson
Copy link
Contributor

Ideally, any attempts to port our code base to Python 3 should be handled incrementally. We did the same with linting efforts. Breaking up by digestible chunks is important to avoid code rot -- as a monolithic PR will end up lagging behind our normal development pace.

Anyone looking to take this one should bite off small chunks. I'll open a milestone to track some work here.

@agjohnson agjohnson added this to the Python 3 Support milestone Oct 6, 2015
@Carreau
Copy link
Contributor Author

Carreau commented Oct 6, 2015

Breaking up by digestible chunks is important to avoid code rot -- as a monolithic PR will end up lagging behind our normal development pace.

Agreed, it is also impossible to review.

I wish some tools like pep8, pylint etc, would be more friendly to impose code style and check only to part of the code, in particular when making a PR, only to the lines that have been added & removed in comparison to master.

@agjohnson
Copy link
Contributor

When making changes to linting, we've whitelisted paths as we work through them. But yeah, entirely different with something like py3 support changes. Changes will be all or nothing until we're actually able to even run the code from py3.

@dougthor42
Copy link

Any updates on Python 3 progress? Perhaps a timeline or ETA? Is the port still being actively developed?

I'm looking to self-host RTFD for my company and we'd rather not spin up another VM just for Python2 and RTFD - it would be much more convenient for us to just add it to our current Apache + Flask + Python3.5 server.

@travcunn
Copy link

travcunn commented Mar 20, 2017

I think if we are going to target Python 3, we should shoot for Python 3.5+.

Some preliminary testing indicates https://github.com/samgiles/slumber needs to be updated for Python 3.5 support.

@humitos
Copy link
Member

humitos commented May 29, 2017

There are some work here: #2819

@agjohnson
Copy link
Contributor

There are a few outstanding tests that are failing currently, but I think this ticket can be closed. @gthank spearheaded efforts here and got us 95% of the way to py2/3 compatibility.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Community Effort Improvement Minor improvement to code
Projects
None yet
Development

No branches or pull requests

5 participants