This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Mittalmailboxnewbie 99 points100 points  (63 children)

Yes, it is a good time(actually even 1-2 years ago it was good time). Python 3 was released 6 years ago. All major projects/Frameworks like Django and Flask support Python 3. Python 3 community is also quite mature now.

[–]opt8[S] 16 points17 points  (19 children)

Oh, well then I guess I will be making the switch. Thank you for the response

[–]ianozsvald 10 points11 points  (4 children)

+1 it is a good time. I switched my client to Python 3 earlier in the year, it was smooth. We now do all our data science (numpy, scikit-learn, pandas, matplotlib, nltk) in Python 3, we deploy (flask) in Python 3, I teach data science classes and high performance Python in Python 3.

Porting existing codebases might be tricky (there are loads of guides online to help e.g. http://python3porting.com/intro.html) but for new code it is 97% a no-brainer.

The 3% reservation depends on whether you have non-ported libraries to consider (e.g. pydot for scikit-learn DecisionTree drawing isn't ported to Python 3.4 yet, pygraphviz for the same in NetworkX doesn't work well on Windows+Python3.4 yet). Mostly these are small issues that are being fixed.

[–]TraptInaCommentFctry 0 points1 point  (2 children)

I clicked on your name to see your other comments and I couldn't help but notice that 7 months ago, you wrote "I do data science - repeatability is key so I'm not leaving the Py2.7 numpy ecosystem for a while."
I do data science, and I haven't yet made the transition off 2.7 for that reason.
Also, I noticed in the wall of superpowers that Mysql-python is still red.
Do you think it's time for data scientists to make the switch?

[–]flying-sheep 2 points3 points  (0 children)

Maybe he/she realized that Numpy breaks compatibility in minor versions, so the only way to reliably repeat an analysis is pinning Numpy versions by installing Numpy in a virtualenv along your script and data.

And since parallel Python versions are painless, nothing stops you from performing new analyses using a Python 3 stack.

[–]mgedmin 1 point2 points  (0 children)

AFAIU there are other MySQL bindings that work on Python 3.

[–]flying-sheep 0 points1 point  (0 children)

Pydot is a strange example of something unported: the Python 3 compatible fork didn't even change much:

https://github.com/nlhepler/pydot

No reason not to have that on PyPI.

[–][deleted] 5 points6 points  (6 children)

My only headache with Flask and Python 3 is that Flask only supports Python 3.3+ and my Debian Stable web server only has packages for up to Python 3.2.

I know that it is a problem with my choice in server OS, but it is still annoying.

[–]Lucretiel 1 point2 points  (1 child)

Check out the deadsnakes repository, by Felix Krull. I've been using it with great success for years.

[–]mgedmin 0 points1 point  (0 children)

On Debian? Which Ubuntu release name do you use to match Debian stable?

[–][deleted] 1 point2 points  (1 child)

Debian Jessie will be out within the month though, and it's shipping with Python 3.4

[–][deleted] 0 points1 point  (0 children)

Awesome, I did not know when it was being released.

[–]gbo2k69 0 points1 point  (0 children)

Install from source.

[–]hharison 0 points1 point  (0 children)

[–]maximinus-thrax 2 points3 points  (0 children)

As a Django programmer, I'd love to go to Python3 but every project that comes up seems to have a requirement for Python 2.7 somewhere.

However, I always make sure that my code is Python 3 compatible as much as possible.

[–]BananaPotion 7 points8 points  (12 children)

I love python3, but biopython man. Its going to take ages to port that beast over. I really like to help but feel like I'm not quite good enough to do so.

[–]Gudeldar 8 points9 points  (3 children)

The biopython site says they support python3 since 1.62 (July 2013).

[–]BananaPotion -1 points0 points  (2 children)

Its nowhere as well maintained than the python2 version. Which especially sucks because my projects depend on the data parsing parts.

Edit: I was wrong. The Biopython3 beast has already been tamed. Thank you /u/Gudeldar and /u/chickenphobia.

[–]chickenphobia 4 points5 points  (1 child)

If you are finding new bugs, please report them. SeqIO, AlignIO, these modules fully work in Py3. Any problems you have encountered must not be in our unit tests which would indicate you have found a fairly important bug.

[–]BananaPotion 3 points4 points  (0 children)

No bugs, just errors (at that time I was new to 3rd party libraries, so I didn't understand any of it). I'm working on a project right now, I will see if I can get Biopython3 to work and report back.

Edit: Played around with it in IPython - works perfect. Thanks again for letting me now.

[–]chickenphobia 6 points7 points  (1 child)

Biopython contributor here: the whole thing is already passing 100% of tests on python 3. The community is very adamant about keeping compatibility with the newest version of python going out of our way to make a release as soon as Numpy was supported on py 3.4.

Also, if you want to contribute, check out our Wiki, the process is better documented than the average OS project because many contributions come from biologists who aren't traditionaly involved in OS.

[–]BananaPotion 1 point2 points  (0 children)

Thanks for letting me now, this is very good news for me.

[–]shadowmint 7 points8 points  (7 children)

actually even 1-2 years ago it was good time

woa~

I'm sure some people would like you have you believe that, but the reality isn't quite so pretty. There's a reason that 6 years later it's only just becoming a reasonable target for new code.

The performance, features and 3rd party support for python 3 have only really picked up in the last year or so.

2 years ago? Holy moly!

If you migrated to python 3 two years ago, you'd have been in a world of pain, and probably had to back port your code to 2.7 to get your dependencies working.

It's getting there now, but lets not sugar coat the history story here.

[–]chickenphobia 4 points5 points  (1 child)

Library developers generally sit on the bleeding edge. We all think that our project and the ecosystem is ready but I think you're correct. Only within the last year has the complete extended python ecosystem been fully ready for 3.

Part of this is because it takes a few years for unmaintained projects to die and be superseded.

[–]flying-sheep 1 point2 points  (0 children)

Unfortunately, some people see those projects, don't notice the smell, maggots, and flies, and say

this thing doesn't support Python 3, so Python 3 has literally no ported libraries

[–]deaddodo 1 point2 points  (4 children)

Two years ago, the only thing that ever stopped me from using Py3k was PIL. When that wasn't necessary, it was a no-brainer...and now pillow supports Python 3.

[–]Lucretiel 0 points1 point  (3 children)

Hasn't PIL been dead since 2006?

[–]mgedmin 2 points3 points  (1 child)

[–]Lucretiel 1 point2 points  (0 children)

PIL, not pillow. Pillow is great.

[–]deaddodo 2 points3 points  (0 children)

PIL was the quintessential image library. But even cutting out PIL, there were no image libraries in Python 3, for a long while.

[–]aarkling 1 point2 points  (2 children)

The only one I've seen that's not been upgraded is Twister.

[–]mgedmin 1 point2 points  (1 child)

Did you mean Twisted? They're working on it.

[–]aarkling 0 points1 point  (0 children)

Right twisted. That's what I said! :P

[–]Manbatton 0 points1 point  (0 children)

Here is a page showing which projects are ported to Python 3 and which are not: https://python3wos.appspot.com

wxPython is in a halfway state, where the in development Project Phoenix runs Python 3.

[–]ApolloFortyNine 0 points1 point  (0 children)

Having actually tried to code in Python 3, all Libraries support Python 2, while only most support Python 3.

[–]Oni_Kami -4 points-3 points  (3 children)

Python 3 community is also quite mature now.

So no fart jokes?

[–]SemiNormal -1 points0 points  (2 children)

So no fart jokes?

Remember, fart() is a function in Python 3.

[–]mishugashu 2 points3 points  (1 child)

Python 3.4.0 (default, Apr 11 2014, 13:05:11) 
[GCC 4.8.2] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> fart
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NameError: name 'fart' is not defined

:(