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

Avoid to use 2to3 to support Python 3 #274

Closed
giampaolo opened this issue May 23, 2014 · 3 comments
Closed

Avoid to use 2to3 to support Python 3 #274

giampaolo opened this issue May 23, 2014 · 3 comments

Comments

@giampaolo
Copy link
Owner

From g.rodola on June 02, 2012 22:16:46

At the time I ported psutil to python 3 ( issue 73 ) the recommended porting 
strategy was to use 2to3.
As such, 2to3 is currently run for all the py files at installation time: 
https://code.google.com/p/psutil/source/browse/tags/release-0.4.1/setup.py#19 
Now that 2 years has passed I realize this is a poor strategy for different reasons:

- installation on python 3 is slower than on python 2 because of 2to3 run; not 
too much but...

- if psutil is first installed with python 2 and then python 3, the second 
installation fails if "build" directory is not removed first

- with python 3 it is not possible to use "python setup.py develop" because 
2to3 is not run


With pyftpdlib I learned that maintaining a single code base which runs with 
both python 2 and 3 is possible without too much effort and saves the trouble 
of using 2to3: https://code.google.com/p/pyftpdlib/issues/detail?id=198#c15 The 
same thing should be made for psutil.

Original issue: http://code.google.com/p/psutil/issues/detail?id=274

@giampaolo giampaolo self-assigned this May 23, 2014
@giampaolo
Copy link
Owner Author

From g.rodola on June 03, 2012 11:22:35

Fixed in r1335 .

Status: FixedInSVN
Labels: Compatibility

@giampaolo
Copy link
Owner Author

From g.rodola on June 27, 2012 11:54:03

0.5.0 is finally out. Closing out as fixed.

Status: Fixed

@giampaolo
Copy link
Owner Author

From g.rodola on March 02, 2013 04:08:37

Updated csets after the SVN -> Mercurial migration: r1335 == revision ???

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant