Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

basestring in psycopg2 (2.5.1)

#161

Submitted by: michael poeltl michael.poeltl@univie.ac.at

dear all,

in _range.py is basestring in use

?> grep -r basestring ./* ./lib/_range.py: if isinstance(pgrange, basestring): ./lib/_range.py: 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

thx
Michael

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

State: invalid
Milestone: none
Assigned to: nobody

Activity

  1. Daniele Varrazzo
    Daniele Varrazzo
    • State changed from new to invalid

    Michael,

    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.

    May 7th, 2013 @ 10:10 AM