This project is archived and is in readonly mode.

#161 ✓invalid
Psycopg website

basestring in psycopg2 (2.5.1)

Reported by Psycopg website | May 7th, 2013 @ 09:05 AM

Submitted by: michael poeltl

dear all,

in is basestring in use

?> grep -r basestring ./* ./lib/ if isinstance(pgrange, basestring): ./lib/ if isinstance(pyrange, basestring): ?>

basestring does not exist anymore in python3! use 'str' instead.

secondly importing psycopg2 fails; it always tells me that it can't import tz

someone else with the same issue?

sorry; for sure I missed some news/infos - but I wasn't able to find them;
so could you point me to the latest releases where these bugs are fixed?

psycopg2 (2.4) works properly in python3.3
but of course I also liked to use the new features from the 2.5-version


Comments and changes to this ticket

  • Daniele Varrazzo

    Daniele Varrazzo May 7th, 2013 @ 10:10 AM

    • State changed from “new” to “invalid”


    psycopg works perfectly fine on Py3, and it would have been great if it was only a matter of changing basestring into str.

    Use "easy_install3 psycopg2" to install psycopg on Py3 (or any package manager) which will convert the module using 2to3.

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<b>WARNING:</b> the informations in this tracker are archived. Please submit new tickets or comments to <a href="">the new tracker</a>.
Psycopg is the most used PostgreSQL adapter for the Python programming language. At the core it fully implements the Python DB API 2.0 specifications. Several extensions allow access to many of the features offered by PostgreSQL.

Shared Ticket Bins