11 ms·
Python 2.7 released
- uggedal 16y agoThe obligatory What's New in Python 2.7 document: http://docs.python.org/dev/whatsnew/2.7.html http://docs.python.org/dev/whatsnew/2.7.html
- erlanger 16y ago> The syntax for set literals ({1,2,3} is a mutable set). > Dictionary and set comprehensions ({ i: i*2 for i in range(3)}). Neat.
- barnaby 16y agoLooks like a nice batch of new features added.
- jvdh 16y agoLink is broken now, should be: http://docs.python.org/whatsnew/2.7.html http://docs.python.org/whatsnew/2.7.html (Which is actually from the future! "Python 2.7 was released on July 7, 2010.")
- deleted 16y ago[deleted]
- j_baker 16y agoI'm disappointed that distutils2 didn't make it in this release. Does that mean it won't be in the standard library until the 3.x series?
- kingkilr 16y agoThat's correct. This was a decision made at the language summit at PyCon 2010.
- jnoller 16y agoIt simply was not going to be ready - and with the amount of churn and changes going on in that space, it was felt that the community would be better served with something stable, later (but still install-able via pip/etc) then something unstable and still cooking.
- simonista 16y agoI'm confused by why the python 2.x branch is still being actively developed with new features rather than just being maintained for bug fixes. What are the roadmaps and goals of the 2.x verses the 3.x branches?
- xi 16y ago2.7 is the last major release of the 2.x series. The goal was to ease transition to 3.x by backporting some of the features and provide a stable base for people unable or unwilling to jump to 3.x.
- mkramlich 16y agoif you read the release notes and related material you would have found the answer to that question pretty quickly ;)
- AaronMT 16y agoHow does one go about updating Python on OSX Snow Leopard?
- watmough 16y agoThere's a useful page here: http://www.python.org/download/mac/ http://www.python.org/download/mac/ Basically, since the OS X Python is usually a bit behind, you are recommended to get the full install package.
- babo 16y agoCompiled from source and using it from a separate folder it's fine for me. Also added easy_install from source and used that to install a few libraries like boto, readline, ipython, etc. without a problem.
- rbanffy 16y agoYou can also use ports. I assume it will have a 2.7 port shortly, if it doesn't already.
- ant5 16y agoLooks like 2.7rc2 is in the repository. If you don't want to wait for the maintainer, you can: sudo port edit python27 This will use your $EDITOR (mine is vi, yours might be textmate). Change the version from 2.7rc2 to 2.7: version 2.7 and set the checksum value to: sha1 6bbcd1ab16d07765a7a405671e1e43a2e74b8e6a Then simply: sudo port install python27 Boom. You can make it the default 'python' (if /opt/local/bin comes first in your path) via: sudo port install python_select sudo python_select python27 python --version Python 2.7 The next 'port sync' will override your local portfile changes. If you want to keep them, you can also copy the port somewhere else, or even set up your own local tree of port files. ('port dir python27' to get the path to the port for copying). Also, if you fail to update the checksum, port(1) will tell you what it should be (which is how I got the line to use above).
- telemachos 16y agoI wouldn't recommend overwriting OSX's Python. You can install yourself from source into /usr/local, but a package manager like MacPorts or Homebrew helps a lot. It's a little more work up front - to install the package manager - but it pays itself back over time. Homebrew has 2.6.5 in its main branch, and 2.7 in a fork. See the notes here: http://github.com/mxcl/homebrew/blob/master/Library/Formula/python.rb http://github.com/mxcl/homebrew/blob/master/Library/Formula/... I've tried Fink, MacPorts, Rudix and Homebrew. Homebrew isn't perfect, but it's damn good.
- tomjen3 16y agoDid they remove the global interpreter lock? And if not, how can the language be used for high concurrency (ala Facebooks tornado).
- troutwine 16y agoIn short: epoll. Network IO bound servers need only deal with sockets that have some event ready. Unless I'm mistaken, Tornado isn't written to be highly concurrent, it is, rather, quite asynchronous: they make it very simple to deal with IO only when there is data to process. You _can_ block the whole process with a long lived handler.
- rbanffy 16y ago> You _can_ block the whole process with a long lived handler. Or you could handle the event out-of-process.
- troutwine 16y agoQuite so.I made my statement more to dissuade the notion that Tornado was in any way a magic concurrency machine, that, ultimately, careful programming is still required.
- rbanffy 16y ago+1. Out-of-process handling is no silver bullet either. Careful programming is, but it's a skillfully handcrafted bullet, made from the most exotic materials in addition to its silvery base and that kills only the specific problem it was designed to kill. Getting rid of the GIL would be like having a machine gun for mass-produced silver bullets.
- frognibble 16y agoTornado achieves concurrency using async network IO and multiple instances per core.
- tomazmuraus 16y agoGreat, now we finally have long awaited ordered dictionary in 2.x branch as well :)
- inferno0069 16y agoUnfortunately they have non-transitive equality when used with standard dictionaries. For example, if O and R are ordered dictionaries with the same entries in different orders, and D is a standard dictionary with the same entries, then O == D == R but O != R.