[Python-modules-team] Bug#768194: [python-psycopg2] extensions.ISOLATION_LEVEL_AUTOCOMMIT should disappear

Bzzzz lazyvirus at gmx.com
Wed Nov 5 21:10:52 UTC 2014


Package: python-psycopg2
Version: 2.5.4+dfsg-1
Severity: normal

--- Please enter the report below this line. ---

Ho folks,

Or at the very least, doc should clearly state that it MUST NOT
be used into 'set_session()')'.

Because issuing:
connection.set_session(psycopg2.extensions.ISOLATION_LEVEL_AUTOCOMMIT,
    readonly=True, deferrable=False, autocommit=True)

fails with the following message:
ValueError: isolation_level must be between 1 and 4
(œuf corse, as psycopg2.extensions.ISOLATION_LEVEL_AUTOCOMMIT == 0) 

Regards,
Jean-Yves

--- System information. ---
Architecture: amd64
Kernel:       Linux 3.16-3-amd64

Debian Release: jessie/sid
  500 unstable        www.deb-multimedia.org 
  500 unstable        ftp.fr.debian.org 
  500 trusty          ppa.launchpad.net 

--- Package information. ---
Depends      (Version) | Installed
======================-+-===========
python        (>= 2.7) | 2.7.8-2
python        (<< 2.8) | 2.7.8-2
libc6        (>= 2.14) | 2.19-12
libpq5       (>= 8.3~) | 9.4~beta3-3


Recommends                    (Version) | Installed
=======================================-+-===========
python-egenix-mxdatetime                | 3.2.8-1


Suggests                 (Version) | Installed
==================================-+-===========
python-psycopg2-doc                | 2.5.4+dfsg-1



More information about the Python-modules-team mailing list