mirror of
https://github.com/psycopg/psycopg2.git
synced 2024-11-25 18:33:44 +03:00
parent
04f1f06b9f
commit
e0226fc46a
1
NEWS
1
NEWS
|
@ -18,6 +18,7 @@ What's new in psycopg 2.7.4
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
- Fixed Solaris 10 support (:ticket:`#532`).
|
- Fixed Solaris 10 support (:ticket:`#532`).
|
||||||
|
- `cursor.mogrify()` can be called on closed cursors (:ticket:`#579`).
|
||||||
- Fixed `~psycopg2.extras.MinTimeLoggingCursor` on Python 3 (:ticket:`#609`).
|
- Fixed `~psycopg2.extras.MinTimeLoggingCursor` on Python 3 (:ticket:`#609`).
|
||||||
- Fixed parsing of array of points as floats (:ticket:`#613`).
|
- Fixed parsing of array of points as floats (:ticket:`#613`).
|
||||||
- Fixed `~psycopg2.__libpq_version__` building with libpq >= 10.1
|
- Fixed `~psycopg2.__libpq_version__` building with libpq >= 10.1
|
||||||
|
|
|
@ -592,8 +592,6 @@ psyco_curs_mogrify(cursorObject *self, PyObject *args, PyObject *kwargs)
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
EXC_IF_CURS_CLOSED(self);
|
|
||||||
|
|
||||||
return _psyco_curs_mogrify(self, operation, vars);
|
return _psyco_curs_mogrify(self, operation, vars);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -118,6 +118,12 @@ class CursorTests(ConnectingTestCase):
|
||||||
nref2 = sys.getrefcount(foo)
|
nref2 = sys.getrefcount(foo)
|
||||||
self.assertEqual(nref1, nref2)
|
self.assertEqual(nref1, nref2)
|
||||||
|
|
||||||
|
def test_modify_closed(self):
|
||||||
|
cur = self.conn.cursor()
|
||||||
|
cur.close()
|
||||||
|
sql = cur.mogrify("select %s", (10,))
|
||||||
|
self.assertEqual(sql, b"select 10")
|
||||||
|
|
||||||
def test_bad_placeholder(self):
|
def test_bad_placeholder(self):
|
||||||
cur = self.conn.cursor()
|
cur = self.conn.cursor()
|
||||||
self.assertRaises(psycopg2.ProgrammingError,
|
self.assertRaises(psycopg2.ProgrammingError,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user