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

Elaborate on 2.x vs 3 .x #48

Closed
benregn opened this issue Dec 30, 2011 · 16 comments
Closed

Elaborate on 2.x vs 3 .x #48

benregn opened this issue Dec 30, 2011 · 16 comments

Comments

@benregn
Copy link
Contributor

benregn commented Dec 30, 2011

Would it be beneficial to elaborate on choosing between those two?

@kennethreitz
Copy link
Contributor

Absolutely. That part of the guide is lacking at the moment.

@askedrelic
Copy link
Contributor

http://python3porting.com/ is a good resource covering porting and differences between 2 and 3

@flying-sheep
Copy link
Contributor

i don’t think the unreflected suggestion to use python 2 is still valid. see there for the discussion that lead me here.

@askedrelic porting is a wholly different matter. i guess this issue here is just about the phrase

If you’re choosing a Python interpreter to use, I highly recommend you Use Python 2.7.x, unless you have a strong reason not to.

however, if you want to write something about porting, i’d highly recommend reading this article, which is summarizing what was discovered during porting sqlalchemy.

@kennethreitz
Copy link
Contributor

@flying-sheep that was a funny joke :)

@DanBurton
Copy link

Library support for 3 is decent lately, should we really continue to point newbies at 2.7? It would be best if we could list a couple major libraries that don't have 3 ports coming anytime soon, and recommend the newbies use 3.x unless they anticipate needing one of those libraries.

Also, I don't get why it is recommended that module writers support 2.5 and 2.6, and add 3.x support later. Why not recommend that they support 3.x first, and add 2.x support as they get requests to do so?

In short, let's encourage newcomers to help adoption of 3.x.

@flying-sheep
Copy link
Contributor

@kennethreitz excuse me?

@DanBurton exactly this. there is a reason why python 3 exists and is incompatible: to fix errors in language design.

it’s counterproductive to advise newbies to start learning the obsolete language features and continue with the fixed ones “if they must”, quite the opposite. python 3 needs more adopting developers, not less.

i’m sure Dan’s solution is the way to go.

@kennethreitz
Copy link
Contributor

http://python3wos.appspot.com/

It'll be a good 6 months at least until we can recommend it. Likely 12–18.

@flying-sheep
Copy link
Contributor

better do it now and link to this list imho. then anyone can make an educated decision.

btw: i’ve never heard of most of these python2-packages besides django, werkzeug, flask, zope and plone. i also think the list is misleading since many addons for the mentioned libs are listed, and pylons is superseeded by pyramid: http://pylonshq.comhttp://www.pylonsproject.org/

@kennethreitz
Copy link
Contributor

django, werkzeug, flask, zope and plone are debatably some of the most heavily used modules around. It's a big deal.

I'm personally helping out with werkzeug and flask, and hope to have the next gen of these modules out within the next several months.

@flying-sheep
Copy link
Contributor

cool, thanks!

but what are we gonna do now? telling the users that python3 is the future, but some important projects aren’t ported to python3 yet, which does only matter if they want to use one of them?

i am certainly not interested in most of these python2-only packages, the only exceptions being flask and django (and thus necessarily werkzeug, since flask depends on it)

@mahmoudhossam
Copy link
Contributor

I started learning python recently, and I think python2.7 is still the way to go.

Differences between 2.7 and 3.0 aren't that significant, at least syntax-wise.

For the time being, most libraries work with 2.x, but don't with python 3, and until this changes, we should still recommend 2.7 to those new to the language.

@jabagawee
Copy link
Contributor

With big advances since half a year ago (Django finally becoming Py3k-compatible comes to mind, Python 3.3 being released), I feel like it'd be more wise to encourage Python 3 adoption. A major reason Python 2.x remains popular is because there are so many developers working on it, and I don't think we should be encouraging more.

@sigmavirus24
Copy link
Contributor

People should make up their own minds. I like the idea of saying "if you need these modules or think you will ever them, use python 2.7.x, otherwise you should be safe using python 3". Then again, when I first started using python (a couple years ago), I wasn't expecting to pick up django or flask and probably would have said "well, python 3.x for me" only to be kicking myself now.

@Itxaka
Copy link

Itxaka commented Jan 30, 2014

I think it should be written like this: "If you pretend to work in a business, learn python 2.5-2.7 as most servers are outdated and learning python 3 will get in the middle"

Seriously, In my experience, it's better to learn something established if you want to work for a third party as most servers, so I will strongly point that.

@syndbg
Copy link
Contributor

syndbg commented Aug 29, 2014

I think this can be closed.

In which-python.rst the issue is addressed. We might just insert an extra link to https://caniusepython3.com/ so people know how they can check if packages from a requirements file can be used with python3.

@flying-sheep
Copy link
Contributor

much more than the 18 months have passed, many projects were ported recently and not so recently (paramiko! flask! boto, …)

http://python3wos.appspot.com/ is green as a nuclear pasture.

“i strongly recommend python 2” is a recommendation the python community doesn’t need noobs to hear.

kennethreitz added a commit that referenced this issue Oct 12, 2014
updated python 2 vs 3 (fixes #48)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants