[Python-porting] Port of psycopg2

Mark Hammond mhammond at skippinet.com.au
Mon Dec 8 14:46:43 CET 2008


> > 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.

'Cheers'.encode('ascii'), ly,

Mark



More information about the Python-porting mailing list