9 ms·
Can I Use Python 3?
- IgorPartola 13y agoSucks that there is no way to paste a requirements.txt file. Lots of projects I work on are in private GitHub repos. Edit: Ah, here we go: https://pypi.python.org/pypi/caniusepython3 https://pypi.python.org/pypi/caniusepython3. This is the command-line version.
- jonesetc 13y agoaside: I was secretly hoping it only supported python2. Thanks for that though. It will be much more useful with requirements files.
- jonalmeida 13y agoExcuse the ignorance, but wouldn't requirement checking be equivalent to see if a 'python3-<package_name>' is available in your package manager? You can then download that, and use something like 2to3 to convert it.
- mapleoin 13y agoNo, because the packages provided by your distribution are a subset of all the python3 packages available.
- viraptor 13y ago> You can then download that, and use something like 2to3 to convert it. Only in some cases. Pretty much anything that handles binary formats on the wire will need some tweaking.
- pekk 13y agoNo, distributions are way behind 2to3 is bad and the code involved has to be tested using it anyway. The normal way to install Python packages is not by manually downloading them
- hdevalence 13y agoDepends on your distro, I guess. Arch has python -> python3, so it's quite rare that you'd have a python2-foobar package but not a python-foobar package, unless there was no python3 version.
- joyinsky 13y agoThe answer is no.
- alexmorse 13y agoDoesn't seem to work. I get a created_at time, but no started_at in the resulting json blob for job status.
- melling 13y agoIt's kind of disappointing that developers aren't self-aware enough to understand that they are essentially screwing themselves by not moving quickly in dropping "legacy" support. "Python 3 will be available in 2008 but we understand that you won't use it for at least 5 years." There's an entire class of developers who won't upgrade until they absolutely have to. There's also a class of administrator that won't upgrade their current PC browser from IE6-IE8 until they absolutely have to. Developers are basically screwing themselves by not drawing a firm line.
- IgorPartola 13y agoYou know, when I am working on an existing project for a client that's allotted 15 hours a week to it, and I have to get actual features pushed out, I don't have time to check which of the 25+ dependencies I list are going to work in Python 3. Sure, maybe I can start a new project in Python 3, but there are enough existing projects to not be able to do this. Also, even if I am starting an existing project, what if down the line I must use a library that's only available for Python 2? I am not going to rewrite something like that because it will cost my client money if I spend time on it. The problem with Python 2 is that it's good enough. Python 3 is a huge improvement, yet until I can be reasonably sure that all libraries I am likely to use are available for both, Python 2 is the winner. Having said that, any personal projects I have started recently have all used Python 3 and it's been great. I also try to make sure that any libraries I write work in both.
- sentenza 13y agoYou are right that Python 2 is good enough, but I'd add a majestically large "yet", because that will change from one day to the other. My primary machine runs Arch Linux, a distro that switched the /usr/bin/python link to python3 some months ago, thus generating a sort of "majority Python 3" environment. I myself, having been rather apathetic on the switchover before, have switched completely to Python 3 just because using Python 2.x has become a hassle. Admittedly, I am in the fortunate position that all my active python projects could be moved over easily, once boost-python and matplotlib were solidly 3-ready. Other libaries are more problematic (looking at you, every Django-plugin out there). My point is, Python 2 won't be good enough for long and for some of us it already isn't any more.
- keketiko 13y agoCan I walk around with an artificial limp? Is it sensible?
- deleted 13y ago[deleted]
- tibbon 13y agoWould love to see some example URLs. I'm a Rubyist and don't have any Python URLs to post in there.
- Too 13y agoIs there any static table where you can see the status of all packages this tool knows about in one glance? It would be interesting to see the overall status of how many packages that are available instead of asking for each one.
- vially 13y agoThis is a list containing some of the more popular python libraries: http://python3wos.appspot.com/ http://python3wos.appspot.com/
- deleted 13y ago[deleted]
- neokya 13y agoThis is actually what you want http://py3readiness.org http://py3readiness.org - site that uses `caniusepython3` and shows support graph for popular packages.
- bagels 13y agoWell, the tool timed out, so I looked up my dependencies on google: flask: yes, mysqldb: no, pycassa: no I guess I can't use python 3 yet still. From what I have read, a lot of people have had trouble installing pymysql, the proposed python 3 mysql library.
- glimcat 13y agoFlask: you can, but you really shouldn't, at least not for anything you plan to deploy. http://flask.pocoo.org/docs/python3/#python3-support http://flask.pocoo.org/docs/python3/#python3-support http://lucumr.pocoo.org/2014/1/5/unicode-in-2-and-3/ http://lucumr.pocoo.org/2014/1/5/unicode-in-2-and-3/ Which kind of sums up the whole Python 3 situation.
- jessaustin 13y agoUmm, FUD much? It's a real stretch from Ronacher's (entirely reasonable, from what I can see) complaints to "not for anything you plan to deploy."
- grueful 13y agoAre we reading the same articles? The Python 3 support page is full of "this should work in theory, it's very under-tested, almost nobody is using it, don't blame us if you try it anyway and get rooted." They did everything to warn you short of installing giant neon signs saying "radioactive, don't use in production."
- rodelrod 13y agoWe've been working with the Oracle connector for MySQL [1] without any problems. [1] https://dev.mysql.com/downloads/connector/python/ https://dev.mysql.com/downloads/connector/python/
- gsnedders 13y agoThere's also oursql, which isn't API compatible with MySQL-db, but is generally better (and works fine, in my experience).
- daGrevis 13y agoService seems to be down-ish. You can check it using CLI! http://vpaste.net/UuOFT http://vpaste.net/UuOFT Source code is available here! https://github.com/jezdez/caniusepython3.com https://github.com/jezdez/caniusepython3.com Disclaimer: I'm NOT the author.
- chhantyal 13y agoShameless plug: http://py3readiness.org/ http://py3readiness.org/ If you just want to get overview of which popular packages support Python 3.
- ehPReth 13y agoIs referer still worth it to prevent CSRF? They seem to be using a CSRF token in their <form> and that should be all that's needed from what I understand.. Forbidden (403) CSRF verification failed. Request aborted. You are seeing this message because this HTTPS site requires a 'Referer header' to be sent by your Web browser, but none was sent. This header is required for security reasons, to ensure that your browser is not being hijacked by third parties. If you have configured your browser to disable 'Referer' headers, please re-enable them, at least for this site, or for HTTPS connections, or for 'same-origin' requests.
- wirrbel 13y agoThe fatal fact about python and python 3 is, that python 2.7 seems to be considered a convenient and stable plattform by its users. A dream come true for all the "prudent" folks out there who do not want anything to change. The lesson learned will be, to implement changes more incrementally so people are gradually upgrading instead of having a high step.
- pekk 13y agoBy your advice, the bad unicode situation in Python 2 would never have been fixed.
- jrochkind1 13y agoI think it would be very valuable to try and do a big compare-and-contrast analysis of the Python 2->3 transition vs the ruby 1.8->1.9(->2) transition. ruby 1.9 transition was actually a pretty big pain (I have no idea whether as big a pain as python2->3 or not, that'd be something to look at). But the ruby ecosystem/community has successfully moved to 1.9, there is little left on 1.8. On the other hand, sometimes it's _really_ frustrating how much work I need to spend upgrading my ruby stuff to use the latest and greatest. Ruby community is relatively uncaring about backwards compat (less than python? I am not sure. Is that uncaringness part of the tradeoff that got us to all move to ruby 1.9 somehow? I don't know, but that's what I'm wondering. Many interesting questions.)
- nahname 13y agoLots of apps die in the wake of the new.
- pornel 13y agoPHP4->PHP5 was a big breaking change as well. It took several years for all projects nad hosting companies to upgrade and switch to v5 by default. But there was a strong push from developers. I don't see that happening when Python developers' attitude is "Meh, Python 2 is all right, I don't need to upgrade anything ever".
- Macha 13y agoPython 2 is nowhere near as lacking as PHP4. Which is probably a big part. But even then it took a big campaign and large software like Wordpress declaring that they would go PHP5 only.
- Vultaire 13y agoVery cool. Would like to see proxy support on the xmlrpclib bits; http_proxy=... doesn't work at present and I don't see command line flags. (Not a hard fix, but I can't offer a patch right now.)
- codexon 13y agoI ported a python2 app with py2to3 a couple months ago and it wasn't completely painless. The worst problem I ran into was that it didn't know which strings were supposed to be bytes or unicode. And the program would throw a runtime error when it tried to do something like use a byte regex on a unicode string.
- Pacabel 13y agoThat's not a bad thing, though. That signifies ambiguity in your code. You're better off fixing problems like that than you are letting them go undetected or unfixed.
- ciupicri 13y agoIt would be great if it wouldn't fail with: Forbidden (403) CSRF verification failed. Request aborted. just because the referrer is missing.
- Derbasti 13y agoI very recently was looking for a way to do some scientific 3D visualizations in Python 3. Requirements: OpenGL 3+ (for shaders) and some basic windowing and mouse event handling. I looked at - PyOpenGL, no windowing. - PyGlet, Python 2.7. - PyQt, only OpenGL 2. - PySide, outdated Qt version and more or less unmaintained. - wxPython, Python 2.7. - PyGame, Python 2.7. So, no dice. This is really terrible. Also, the hoops I had to jump through to get some of these installed was just ridiculous. The solution I ended up with? Tornado, websockets and WebGL. Because that is the easiest way I could find to write 3D visualizations for scientific Python. Not Python.
- JoachimS 13y agoHow very recently was this? The pyglet dev version from 2012 at least claims to be for Python3.
- JoachimS 13y agoPyGame also claims Python3 support for several releases back. I agree on the installation part though. Pyglet is really the one I've found easiest to install and get started with.
- Macha 13y agoPyglet and Pygame both support Python 3.