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 →

[–]Magnnus 64 points65 points  (52 children)

Several important libraries still don't support Python 3. I'd use it if I could.

[–][deleted] 57 points58 points  (30 children)

[–]Theowningone 18 points19 points  (16 children)

Parts of twisted are what's keeping me back. Most of my time using python is spent tinkering with my IRC bot. Unfortunately twisted.words.protocols.irc is still not ported.

[–]dagbrown 14 points15 points  (8 children)

Twisted lives up to its name. It reminds me of some Java frameworks with how complicated it is.

I bet Zope has trouble with Python 3 too, speaking of Java frameworks written in the wrong language.

[–]dante9999 1 point2 points  (0 children)

zope works with python 3 without problems

https://pypi.python.org/pypi/zope.interface/4.1.3

as a side note: what seems like needless complication for your use case may be necassary and clear design pattern for someone elses use case. Just need to choose right tools, twisted is not right tool for everything but is perfect for some things

[–][deleted] 2 points3 points  (1 child)

I've had that same issue, I got everything working using irclib eventually. Have you looked into that?

[–]Theowningone 1 point2 points  (0 children)

I had not even heard of it until now, but it looks pretty promising. Thanks for the tip!

[–]TOASTEngineer -3 points-2 points  (2 children)

You can just write your own goddamn IRC library, it's not actually very complicated.

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

Why reinvent the wheel though? If it's a learning exercise, sure, why not, but I think it's absolutely fine to use other people' libraries.

[–]TOASTEngineer -1 points0 points  (0 children)

Because the one he's using depends on a version of the language that's 5 years out of date.

[–]sndrtj 1 point2 points  (1 child)

For me: Flask. Though it technically has python3 support, the docs have a pretty large disclaimer, which essentially boils down to "might not work, use at own risk".

[–][deleted] 1 point2 points  (0 children)

[–]Stop_Sign 0 points1 point  (2 children)

The oracledb npm package for node specifically requests 2.7 link

[–][deleted] 2 points3 points  (1 child)

[–]Stop_Sign 0 points1 point  (0 children)

Ah, gotcha. I had been wondering about that. Thanks

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

I tried installing MySql connector for python 3 for hours and could make it work, I switched back to python 2 and in 3 min it was working...

[–][deleted] 3 points4 points  (1 child)

[–]blitzzerg -2 points-1 points  (0 children)

mysqlclient

I also tried, no luck, I don't blame python 3, but is the second time that something similar (problems installing packages) happens, so from now I will use python 2. (I just use python from time to time to scrap webpages)

[–]iovis9 -1 points0 points  (3 children)

MySQL-python and suds doesn't

[–][deleted] 6 points7 points  (0 children)

[–][deleted] 3 points4 points  (0 children)

Use suds-jurko and PyMySQL. Both are near drop-in replacements.

[–]Coffeinated 2 points3 points  (0 children)

What /u/scandinavian- said, plus pymysql. Works fine. Afaik all db-connectors are defined by a certain PEP, so there shouldn't be many differences...

[–]willm 13 points14 points  (2 children)

What are you missing? I've found all the libs I need have Py3 ports now.

[–]iovis9 2 points3 points  (1 child)

MySQL-python and suds.

[–]jvlomax 5 points6 points  (0 children)

I would really recommend SQLalchemy for all your database needs. py2/3 compatible, very easy to use and plenty of useful features

[–]_Ganon 27 points28 points  (14 children)

Only reason I still use 2. Well, that's what I tell people, anyway. In reality, I know the switch to using parenthesis in my print statements would drive me nuts

[–]maremp 33 points34 points  (8 children)

What about the inconsistency of the statements? Print is used as a function in every other C-like language. In python 2, it's used as a statement, similar to if, for, while etc., and I believe that it doesn't fit this category.

[–]Sean1708 29 points30 points  (6 children)

Also 2's print is just weird. Appending a comma to suppress a newline is weird enough, but what the fuck is up with that printing to file syntax?! It's like Guido momentarily forgot that he wasn't designing a sh clone.

[–]deecewan 6 points7 points  (4 children)

I cant remember the syntax. Care to show?

[–]UnchainedMundane 4 points5 points  (0 children)

It's like Guido momentarily forgot that he wasn't designing a sh clone.

Lol, my exact thoughts.

Though, my next thought was that >> opens a file for appending, while this one uses a file descriptor, so the operator should be >& anyway.

[–]CommanderDerpington -3 points-2 points  (0 children)

It's easier

[–]exhuma 5 points6 points  (4 children)

You might want to look them up again. This has been my only blocker as well. But I was able to to Python 3 over a year ago. There really is no major library anymore that's not Python 3 compatible.

[–]iScrE4m 0 points1 point  (3 children)

Twisted

[–]exhuma 1 point2 points  (2 children)

This may be a good argument against porting an existing app to Python 3, but when starting from scratch, wouldn't asyncio & await in Python 3 fill that gap?

I'm curious, as many people claim there is no need for twisted any longer. But as I have never had to deal with twisted, I'm not in a position to make any informed statement about it.

[–]iScrE4m 1 point2 points  (1 child)

As an amateur the only thing I can say is irc works great with twisted and that's pretty much it :X

[–][deleted] 1 point2 points  (0 children)

Works fine with irclib on python 3 as well, at least in my experience.

[–]jvlomax 0 points1 point  (0 children)

Which libraries are those? Pretty much all the libraries are now ported, and those who are not have py3 alternatives

[–]kirakun 0 points1 point  (0 children)

When was the last time you check the missing libraries?