mirror of
https://github.com/psycopg/psycopg2.git
synced 2024-11-29 04:13:43 +03:00
Convert pool arguments to int
Failing to do so may cause dangerous misbehaviours such as an unbounded pool (because of lame comparison operators in Python 2). Fix ticket #220.
This commit is contained in:
parent
c475a0db95
commit
41a083cec3
2
NEWS
2
NEWS
|
@ -16,6 +16,8 @@ What's new in psycopg 2.5.4
|
||||||
- Added :sql:`jsonb` support for PostgreSQL 9.4.
|
- Added :sql:`jsonb` support for PostgreSQL 9.4.
|
||||||
- Fixed segfault if COPY statements are executed instead of using the
|
- Fixed segfault if COPY statements are executed instead of using the
|
||||||
proper methods (:ticket:`#219`).
|
proper methods (:ticket:`#219`).
|
||||||
|
- Force conversion of pool arguments to integer to avoid potentially unbounded
|
||||||
|
pools (:ticket:`#220`).
|
||||||
- Don't ignore silently the `cursor.callproc` argument without a length.
|
- Don't ignore silently the `cursor.callproc` argument without a length.
|
||||||
- Added a few errors missing from `~psycopg2.errorcodes`, defined by
|
- Added a few errors missing from `~psycopg2.errorcodes`, defined by
|
||||||
PostgreSQL but not documented.
|
PostgreSQL but not documented.
|
||||||
|
|
|
@ -42,8 +42,8 @@ class AbstractConnectionPool(object):
|
||||||
with given parameters. The connection pool will support a maximum of
|
with given parameters. The connection pool will support a maximum of
|
||||||
about 'maxconn' connections.
|
about 'maxconn' connections.
|
||||||
"""
|
"""
|
||||||
self.minconn = minconn
|
self.minconn = int(minconn)
|
||||||
self.maxconn = maxconn
|
self.maxconn = int(maxconn)
|
||||||
self.closed = False
|
self.closed = False
|
||||||
|
|
||||||
self._args = args
|
self._args = args
|
||||||
|
|
Loading…
Reference in New Issue
Block a user