This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "SQLObject development repository".
The branch, master has been updated
via 29ddb111df870457a1a79fd83a4457f872d815e0 (commit)
via f0311b04364b381df864352cc5a26328f297a9ab (commit)
via 4218b9c6bddc5c0206a14325d2a61d80a1d51ac8 (commit)
from 30fae4d4bdf41e056d8bb871450ebbe0206c64e0 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://sourceforge.net/p/sqlobject/sqlobject/ci/29ddb111df870457a1a79fd83a4457f872d815e0
commit 29ddb111df870457a1a79fd83a4457f872d815e0
Author: Oleg Broytman <ph...@ph...>
Date: Wed Dec 28 21:48:45 2016 +0300
Fix pg8000 driver
Pass the current OS user if not provided in the DB URI.
diff --git a/sqlobject/postgres/pgconnection.py b/sqlobject/postgres/pgconnection.py
index feebb1d..cba6ec7 100644
--- a/sqlobject/postgres/pgconnection.py
+++ b/sqlobject/postgres/pgconnection.py
@@ -1,3 +1,4 @@
+from getpass import getuser
import re
from sqlobject import col
from sqlobject import dberrors
@@ -140,11 +141,11 @@ class PostgresConnection(DBAPI):
if "unix" in dsn_dict:
del dsn_dict["unix"]
if driver == 'pg8000':
- if host.startswith('/'):
+ if host and host.startswith('/'):
dsn_dict["host"] = None
dsn_dict["unix_sock"] = host
if user is None:
- dsn_dict["user"] = ''
+ dsn_dict["user"] = getuser()
if password is None:
dsn_dict["password"] = ''
self.driver = driver
http://sourceforge.net/p/sqlobject/sqlobject/ci/f0311b04364b381df864352cc5a26328f297a9ab
commit f0311b04364b381df864352cc5a26328f297a9ab
Author: Oleg Broytman <ph...@ph...>
Date: Wed Dec 28 21:43:28 2016 +0300
Fix py-postgresql driver
Select next id from the sequence instead of using RETURNING id.
diff --git a/sqlobject/postgres/pgconnection.py b/sqlobject/postgres/pgconnection.py
index 0ae219e..feebb1d 100644
--- a/sqlobject/postgres/pgconnection.py
+++ b/sqlobject/postgres/pgconnection.py
@@ -132,12 +132,13 @@ class PostgresConnection(DBAPI):
if sslmode:
dsn.append('sslmode=%s' % sslmode)
dsn = ' '.join(dsn)
- if driver == 'pypostgresql':
- if host.startswith('/'):
+ if driver in ('py-postgresql', 'pypostgresql'):
+ if host and host.startswith('/'):
dsn_dict["host"] = dsn_dict["port"] = None
dsn_dict["unix"] = host
else:
- dsn_dict["unix"] = None
+ if "unix" in dsn_dict:
+ del dsn_dict["unix"]
if driver == 'pg8000':
if host.startswith('/'):
dsn_dict["host"] = None
@@ -234,6 +235,11 @@ class PostgresConnection(DBAPI):
table = soInstance.sqlmeta.table
idName = soInstance.sqlmeta.idName
c = conn.cursor()
+ if id is None and self.driver in ('py-postgresql', 'pypostgresql'):
+ sequenceName = soInstance.sqlmeta.idSequence or \
+ '%s_%s_seq' % (table, idName)
+ self._executeRetry(conn, c, "SELECT NEXTVAL('%s')" % sequenceName)
+ id = c.fetchone()[0]
if id is not None:
names = [idName] + names
values = [id] + values
http://sourceforge.net/p/sqlobject/sqlobject/ci/4218b9c6bddc5c0206a14325d2a61d80a1d51ac8
commit 4218b9c6bddc5c0206a14325d2a61d80a1d51ac8
Author: Oleg Broytman <ph...@ph...>
Date: Wed Dec 28 21:25:53 2016 +0300
Upgrade ez_setup.py
diff --git a/ez_setup.py b/ez_setup.py
index 950e120..83c0595 100644
--- a/ez_setup.py
+++ b/ez_setup.py
@@ -366,12 +366,13 @@ def _resolve_version(version):
meta_url = urljoin(DEFAULT_URL, '/pypi/setuptools/json')
resp = urlopen(meta_url)
+ fallback = 'UTF-8'
with contextlib.closing(resp):
try:
- charset = resp.info().get_content_charset()
+ charset = resp.info().get_content_charset(fallback)
except Exception:
- # Python 2 compat; assume UTF-8
- charset = 'UTF-8'
+ # Python 2 compat
+ charset = fallback
reader = codecs.getreader(charset)
doc = json.load(reader(resp))
-----------------------------------------------------------------------
Summary of changes:
ez_setup.py | 7 ++++---
sqlobject/postgres/pgconnection.py | 17 ++++++++++++-----
2 files changed, 16 insertions(+), 8 deletions(-)
hooks/post-receive
--
SQLObject development repository
|