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 9770622c4a1d5a2ea286e4ddf57bc40009889afa (commit)
via 30447df1495f7192a6bea7241cc13ef4942b059c (commit)
from e69b735685ee068ba7468adbdfe1d3051b5ecb1e (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/9770622c4a1d5a2ea286e4ddf57bc40009889afa
commit 9770622c4a1d5a2ea286e4ddf57bc40009889afa
Author: Oleg Broytman <ph...@ph...>
Date: Fri Feb 2 01:44:47 2018 +0300
Fix(mysql): Fix oursql
Encode queries to bytes to fix unicode problems in binary data.
Enable autoreconnect.
diff --git a/.travis.yml b/.travis.yml
index 4525649..5a6b8e9 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -126,9 +126,6 @@ matrix:
env: TOXENV=py36-firebirdsql
allow_failures:
- - env: TOXENV=py34-mysql-oursql3
- - env: TOXENV=py35-mysql-oursql3
- - env: TOXENV=py36-mysql-oursql3
- env: TOXENV=py27-firebird-fdb
- env: TOXENV=py34-firebird-fdb
- env: TOXENV=py35-firebird-fdb
diff --git a/docs/News.rst b/docs/News.rst
index 9e5d127..9ce26cf 100644
--- a/docs/News.rst
+++ b/docs/News.rst
@@ -11,8 +11,7 @@ SQLObject 3.6.0 (master)
Drivers
-------
-* Extend support for oursql and Python 3 (require our fork). There are
- some unicode-related problems.
+* Extend support for oursql and Python 3 (require our fork of the driver).
Documentation
-------------
diff --git a/docs/TODO.rst b/docs/TODO.rst
index b226405..1ce1467 100644
--- a/docs/TODO.rst
+++ b/docs/TODO.rst
@@ -3,8 +3,6 @@ TODO
* Fix test ordering problem with Postgres.
-* Fix unicode problems with oursql.
-
* Fix unicode problems with pyodbc at AppVeyor.
* Resolve timeout problems with MSSQL.
diff --git a/sqlobject/mysql/mysqlconnection.py b/sqlobject/mysql/mysqlconnection.py
index ba7e726..96517dd 100644
--- a/sqlobject/mysql/mysqlconnection.py
+++ b/sqlobject/mysql/mysqlconnection.py
@@ -131,6 +131,12 @@ class MySQLConnection(DBAPI):
self.CR_SERVER_LOST = 2013
self.ER_DUP_ENTRY = '23000'
+ elif self.driver == 'oursql':
+ if "use_unicode" not in self.kw:
+ self.kw["use_unicode"] = not PY2
+ # oursql doesn't implement ping(True) yet
+ self.kw["autoreconnect"] = True
+
global mysql_Bin
if not PY2 and mysql_Bin is None:
mysql_Bin = self.module.Binary
@@ -218,7 +224,7 @@ class MySQLConnection(DBAPI):
self.printDebug(conn, query, 'QueryR')
dbEncoding = self.dbEncoding
if dbEncoding and not isinstance(query, bytes) and (
- self.driver == 'connector'):
+ self.driver in ('connector', 'oursql')):
query = query.encode(dbEncoding, 'surrogateescape')
# When a server connection is lost and a query is attempted, most of
# the time the query will raise a SERVER_LOST exception, then at the
http://sourceforge.net/p/sqlobject/sqlobject/ci/30447df1495f7192a6bea7241cc13ef4942b059c
commit 30447df1495f7192a6bea7241cc13ef4942b059c
Author: Oleg Broytman <ph...@ph...>
Date: Sun Jan 14 07:12:40 2018 +0300
Docs: Fix subsection header
[skip ci]
diff --git a/docs/News.rst b/docs/News.rst
index 9dc8125..9e5d127 100644
--- a/docs/News.rst
+++ b/docs/News.rst
@@ -11,7 +11,7 @@ SQLObject 3.6.0 (master)
Drivers
-------
-* Extend support for oursql and Python 3 (require our fork); there are
+* Extend support for oursql and Python 3 (require our fork). There are
some unicode-related problems.
Documentation
@@ -20,7 +20,7 @@ Documentation
* Document extras that are available for installation.
Build
-=====
+-----
* Use ``python_version`` environment marker in ``setup.py`` to make
``install_requires`` and ``extras_require`` declarative. This makes
-----------------------------------------------------------------------
Summary of changes:
.travis.yml | 3 ---
docs/News.rst | 5 ++---
docs/TODO.rst | 2 --
sqlobject/mysql/mysqlconnection.py | 8 +++++++-
4 files changed, 9 insertions(+), 9 deletions(-)
hooks/post-receive
--
SQLObject development repository
|