From benjamin at python.org Sun Sep 1 23:24:29 2013 From: benjamin at python.org (Benjamin Peterson) Date: Sun, 1 Sep 2013 17:24:29 -0400 Subject: [Python-porting] [RELEASE] six 1.4.0 Message-ID: I'm pleased to announce the release of six 1.4.0. This release sees some nice improvements, most significantly a much-requested compatibility layer for the Py3 urllib package. I'd like to thank Marc Abramowitz for contributing that as well as Jason R. Coombs for several other helpful pull requests. See the appended changelog for a complete picture of the changes in this release. Download six at https://pypi.python.org/pypi/six Online documentation is at http://packages.python.org/six/. Bugs can be reported to http://bitbucket.org/gutworth/six. The code can also be found there. Changelog ----------------- - Issue #31: Add six.moves mapping for UserString. - Pull request #12: Add six.add_metaclass, a decorator for adding a metaclass to a class. - Add six.moves.zip_longest and six.moves.filterfalse, which correspond respectively to itertools.izip_longest and itertools.ifilterfalse on Python 2 and itertools.zip_longest and itertools.filterfalse on Python 3. - Issue #25: Add the unichr function, which returns a string for a Unicode codepoint. - Issue #26: Add byte2int function, which complements int2byte. - Add a PY2 constant with obvious semantics. - Add helpers for indexing and iterating over bytes: iterbytes and indexbytes. - Add create_bound_method() wrapper. - Issue #23: Allow multiple base classes to be passed to with_metaclass. - Issue #24: Add six.moves.range alias. This exactly the same as the current xrange alias. - Pull request #5: Create six.moves.urllib, which contains abstractions for a bunch of things which are in urllib in Python 3 and spread out across urllib, urllib2, and urlparse in Python 2. -- Regards, Benjamin From ed at pythoncharmers.com Tue Sep 24 10:23:11 2013 From: ed at pythoncharmers.com (Ed Schofield) Date: Tue, 24 Sep 2013 18:23:11 +1000 Subject: [Python-porting] [Announce] python-future package Message-ID: Hi everyone, I have been working on single-source compatibility layer for Python 3/2 called "future". It has a similar goal to Benjamin Peterson's "six" package but takes a different approach: allowing clean Python 3 code to run almost unchanged on Python 2. It contains Python 2 backports of various pieces of Python 3 functionality like the bytes object. It's on PyPI here: https://pypi.python.org/pypi/future and the code repository is here: http://github.com/edschofield/python-future My hope is that it will speed up the adoption of Python 3 by reducing the complexity of supporting both Py3 and Py2. Ideally it would help many people to start writing clean forward-compatible Py3 code today even if their dependencies aren't all ported yet. The source tree comes with a lib2to3-based conversion script called "futurize", which has similar aims to Armin Ronacher's "python-modernize", but produces clean Python 3 code that runs on both Py3 and Py2 using "future". The script translates both ways: from either Python 2-only or Python 3-only code, using a selection of fixers from 2to3, 3to2, python-modernize, and some custom ones. I ran the initial design ideas past Nick Coghlan and Richard Jones privately after PyCon AU and they gave valuable feedback that the initial design was too magical. I luckily found ways to implement it without most of the magic, so I expect it should be quite robust. I haven't announced it widely until now, but I've now got a high enough level of test coverage and documentation that I'm happy doing that. I'd be very interested in your feedback -- on the design or implementation, or feature requests, bug reports, or anything else! :) Best wishes, Ed -- Dr. Edward Schofield (M) +61 (0)405 676 229 Python Charmers http://pythoncharmers.com From ed at pythoncharmers.com Thu Sep 26 06:07:40 2013 From: ed at pythoncharmers.com (Ed Schofield) Date: Thu, 26 Sep 2013 14:07:40 +1000 Subject: [Python-porting] [Announce] python-future package In-Reply-To: References: Message-ID: <352D0F6647C94E06BA3B3F7F85F15180@pythoncharmers.com> Hi everyone, I have been working on single-source compatibility layer for Python 3/2 called "future". It has a similar goal to Benjamin Peterson's "six" package but takes a different approach: allowing clean Python 3 code to run almost unchanged on Python 2. It contains Python 2 backports of various pieces of Python 3 functionality like the bytes object. It's on PyPI here: https://pypi.python.org/pypi/future and the code repository is here: http://github.com/edschofield/python-future My hope is that it will speed up the adoption of Python 3 by reducing the complexity of supporting both Py3 and Py2. Ideally it would help many people to start writing clean forward-compatible Py3 code today even if their dependencies aren't all ported yet. The source tree comes with a lib2to3-based conversion script called "futurize", which has similar aims to Armin Ronacher's "python-modernize", but aims to produce standard Python 3 code that runs on both Py3 and Py2 using "future". The script translates both ways: from either Python 2-only or Python 3-only code, using a selection of fixers from 2to3, 3to2, python-modernize, and some custom ones. I ran the initial design ideas past Nick Coghlan and Richard Jones privately after PyCon AU and then presented it informally to the Melbourne Python user group. I expect the implementation should be quite robust; most of the magic got thrown away after the v0.0.x prototypes. I haven't announced the project widely until now, but I've now got a high enough level of test coverage and documentation that I'm happy doing that. I'd be very interested in your feedback -- on the design or implementation, or feature requests, bug reports, or anything else! :-) Best wishes, Ed -- Dr. Edward Schofield (M) +61 (0)405 676 229 Python Charmers http://pythoncharmers.com