[Python-porting] Port of psycopg2

Brett Cannon brett at python.org
Mon Dec 8 19:58:28 CET 2008

On Mon, Dec 8, 2008 at 05:46, Mark Hammond <mhammond at skippinet.com.au> wrote:
>> > Is there anyone else here for whom the step of "port to python 2.6"
>> is a deal-breaker?
>> I'm not sure where the problems would lie in porting to Python 2.6
>> first.
> It's more about moving to Python 2.6 syntax *only*.  eg, using 'bytes' or
> memory views etc as porting aids isn't that useful when targetting earlier
> versions.  Further, I meant "deal breaker" in a figurative sense - ie, not a
> real blocker, just an extra complication than what the "general" porting
> guide might bother considering - but by implication, something that might be
> worth addressing *somewhere*; eg, I'm finding '.encode('ascii')' a
> reasonable porting aid for bytes objects in many 'demo' byte literal cases,
> such as appending \0 chars, etc.

Should we consider recommending that people who are willing to put in
the time to switch to unicode for strings and str for bytes if they
need to support < 2.6? Obviously a bit of work but it will make the
distinction clear and allow support for earlier Python versions.


More information about the Python-porting mailing list