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 d85fd1c45bc700cd1233afb34d124c75be538847 (commit)
via ea5eb96b06800024edb745b9a2e120466203a425 (commit)
via 857297c3ae774e180c58e16118ca261d61f73cda (commit)
via eeb61ea9059372d005cd5fe3398f0d73b827bd0f (commit)
via 613839ed6f4948b1504f762d1622a987cdce0407 (commit)
via 8b1204c5983ded07f95a20db96553de7d9d9f431 (commit)
via 4927a0677762005a794862e940209b7046ea695d (commit)
via 89a7e24d7de75c745c60481d0da68aa204427f59 (commit)
via 089c9885aebbce49bae7f0388ee57df5b182ffd0 (commit)
via b46a80e04bb2c5f3a873549edd5947527f0088d1 (commit)
via 0745abd1c5a2c0123c18879ed9f1baa08f7bc5ef (commit)
via 295eb1aee711bcbc7c01612a5e4657415fef7f25 (commit)
from 44c441439545d48f9eccf172ff0b0b76bb18ac8d (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/d85fd1c45bc700cd1233afb34d124c75be538847
commit d85fd1c45bc700cd1233afb34d124c75be538847
Author: Oleg Broytman <ph...@ph...>
Date: Fri Dec 16 00:30:41 2022 +0300
CI(GHActions): More descriptive step names
Add OS name.
diff --git a/.github/workflows/run-tests.yaml b/.github/workflows/run-tests.yaml
index bc67698..31b170b 100644
--- a/.github/workflows/run-tests.yaml
+++ b/.github/workflows/run-tests.yaml
@@ -27,11 +27,11 @@ jobs:
# Setup PostgreSQL
- uses: ankane/setup-postgres@v1
- - name: Setup Postgres user
+ - name: Setup Postgres user @ Linux
run: |
sudo -u postgres psql --command="ALTER USER runner CREATEDB ENCRYPTED PASSWORD 'test'"
if: ${{ runner.os == 'Linux' }}
- - name: Setup Postgres user
+ - name: Setup Postgres user @ w32
run: |
psql --command="CREATE USER runner CREATEDB ENCRYPTED PASSWORD 'test'"
if: ${{ runner.os == 'Windows' }}
http://sourceforge.net/p/sqlobject/sqlobject/ci/ea5eb96b06800024edb745b9a2e120466203a425
commit ea5eb96b06800024edb745b9a2e120466203a425
Merge: 857297c eeb61ea
Author: Oleg Broytman <ph...@ph...>
Date: Fri Dec 16 00:25:13 2022 +0300
Merge branch 'mysql-connector-python'
Add driver `mysql-connector-python`.
http://sourceforge.net/p/sqlobject/sqlobject/ci/857297c3ae774e180c58e16118ca261d61f73cda
commit 857297c3ae774e180c58e16118ca261d61f73cda
Merge: 295eb1a 089c988
Author: Oleg Broytman <ph...@ph...>
Date: Fri Dec 16 00:15:10 2022 +0300
Merge branch 'conda-install-old-pythons'
Use `conda` to install older Pythons.
http://sourceforge.net/p/sqlobject/sqlobject/ci/eeb61ea9059372d005cd5fe3398f0d73b827bd0f
commit eeb61ea9059372d005cd5fe3398f0d73b827bd0f
Author: Oleg Broytman <ph...@ph...>
Date: Sun Dec 4 21:01:09 2022 +0300
Tests(mysql-connector-python): Limit versions
Versions 8.0.30+ require charset `utf8mb4` on the server
which is not available on old MySQL and MariaDB servers.
diff --git a/devscripts/requirements/requirements_connector_python.txt b/devscripts/requirements/requirements_connector_python.txt
index d06b191..e4bffe7 100644
--- a/devscripts/requirements/requirements_connector_python.txt
+++ b/devscripts/requirements/requirements_connector_python.txt
@@ -3,8 +3,9 @@ protobuf < 3.19; python_version == '3.4'
mysql-connector-python <= 8.0.22, > 2.0; python_version == '3.4'
mysql-connector-python <= 8.0.23, >= 8.0.5; python_version == '3.5'
mysql-connector-python <= 8.0.28, >= 8.0.6; python_version == '3.6'
-mysql-connector-python >= 8.0.13; python_version == '3.7'
-mysql-connector-python >= 8.0.19; python_version == '3.8'
-mysql-connector-python >= 8.0.24; python_version == '3.9'
-mysql-connector-python >= 8.0.28; python_version == '3.10'
-mysql-connector-python >= 8.0.31; python_version >= '3.11'
+mysql-connector-python <= 8.0.29, >= 8.0.13; python_version == '3.7'
+mysql-connector-python <= 8.0.29, >= 8.0.19; python_version == '3.8'
+mysql-connector-python <= 8.0.29, >= 8.0.24; python_version == '3.9'
+mysql-connector-python <= 8.0.29, >= 8.0.28; python_version == '3.10'
+#mysql-connector-python >= 8.0.31; python_version >= '3.11'
+mysql-connector-python == 8.0.29; python_version >= '3.11'
http://sourceforge.net/p/sqlobject/sqlobject/ci/613839ed6f4948b1504f762d1622a987cdce0407
commit 613839ed6f4948b1504f762d1622a987cdce0407
Author: Oleg Broytman <ph...@ph...>
Date: Sun Dec 4 20:58:15 2022 +0300
Tests: Skip some inheritance tests under `mysql-connector-python`
M-C-P falls into an infinite loop.
diff --git a/sqlobject/inheritance/tests/test_deep_inheritance.py b/sqlobject/inheritance/tests/test_deep_inheritance.py
index 1ef4d36..4bdc8e3 100644
--- a/sqlobject/inheritance/tests/test_deep_inheritance.py
+++ b/sqlobject/inheritance/tests/test_deep_inheritance.py
@@ -72,6 +72,11 @@ def test_creation_fail2():
def test_deep_inheritance():
+ conn = getConnection()
+ if conn.module.__name__ == 'mysql.connector' \
+ and conn.connector_type == 'mysql.connector-python':
+ skip("connector-python falls into an infinite loop here")
+
setupClass([DIManager, DIEmployee, DIPerson])
manager = DIManager(firstName='Project', lastName='Manager',
@@ -81,7 +86,6 @@ def test_deep_inheritance():
so_position='Project leader', manager=manager).id
DIPerson(firstName='Oneof', lastName='Authors', manager=manager)
- conn = getConnection()
cache = conn.cache
cache.clear()
diff --git a/sqlobject/inheritance/tests/test_inheritance.py b/sqlobject/inheritance/tests/test_inheritance.py
index cc26c8f..2dfd0e3 100644
--- a/sqlobject/inheritance/tests/test_inheritance.py
+++ b/sqlobject/inheritance/tests/test_inheritance.py
@@ -1,7 +1,21 @@
+import pytest
from pytest import raises
from sqlobject import IntCol, StringCol
from sqlobject.inheritance import InheritableSQLObject
-from sqlobject.tests.dbtest import setupClass
+from sqlobject.tests.dbtest import getConnection, setupClass
+
+
+try:
+ connection = getConnection()
+except (AttributeError, NameError):
+ # The module was imported during documentation building
+ pass
+else:
+ if connection.module.__name__ == 'mysql.connector' \
+ and connection.connector_type == 'mysql.connector-python':
+ pytestmark = pytest.mark.skip(
+ "connector-python falls into an infinite loop here")
+
########################################
# Inheritance
diff --git a/sqlobject/inheritance/tests/test_inheritance_tree.py b/sqlobject/inheritance/tests/test_inheritance_tree.py
index 58cdb7e..34666c3 100644
--- a/sqlobject/inheritance/tests/test_inheritance_tree.py
+++ b/sqlobject/inheritance/tests/test_inheritance_tree.py
@@ -1,6 +1,7 @@
+from pytest import skip
from sqlobject import StringCol
from sqlobject.inheritance import InheritableSQLObject
-from sqlobject.tests.dbtest import setupClass
+from sqlobject.tests.dbtest import getConnection, setupClass
########################################
# Inheritance Tree
@@ -28,6 +29,11 @@ class Tree5(Tree2):
def test_tree():
+ conn = getConnection()
+ if conn.module.__name__ == 'mysql.connector' \
+ and conn.connector_type == 'mysql.connector-python':
+ skip("connector-python falls into an infinite loop here")
+
setupClass([Tree1, Tree2, Tree3, Tree4, Tree5])
Tree1(aprop='t1') # t1
diff --git a/sqlobject/mysql/mysqlconnection.py b/sqlobject/mysql/mysqlconnection.py
index ac3e062..76b1172 100644
--- a/sqlobject/mysql/mysqlconnection.py
+++ b/sqlobject/mysql/mysqlconnection.py
@@ -67,6 +67,10 @@ class MySQLConnection(DBAPI):
self.CR_SERVER_LOST = \
mysql.connector.errorcode.CR_SERVER_LOST
self.ER_DUP_ENTRY = mysql.connector.errorcode.ER_DUP_ENTRY
+ if driver == 'connector-python':
+ self.connector_type = 'mysql.connector-python'
+ else:
+ self.connector_type = 'mysql.connector'
elif driver == 'oursql':
import oursql
self.module = oursql
http://sourceforge.net/p/sqlobject/sqlobject/ci/8b1204c5983ded07f95a20db96553de7d9d9f431
commit 8b1204c5983ded07f95a20db96553de7d9d9f431
Author: Oleg Broytman <ph...@ph...>
Date: Sun Dec 4 20:56:57 2022 +0300
Tests: Allow transactions with MySQL
MySQL (mostly MariaDB these days) enabled transactions by default
long ago.
diff --git a/sqlobject/tests/dbtest.py b/sqlobject/tests/dbtest.py
index c7c8b0e..e934ac5 100644
--- a/sqlobject/tests/dbtest.py
+++ b/sqlobject/tests/dbtest.py
@@ -43,7 +43,7 @@ supportsMatrix = {
'+memorydb': 'sqlite',
'+rlike': 'mysql postgres sqlite',
'+schema': 'postgres',
- '-transactions': 'mysql',
+ '-transactions': ' ',
}
http://sourceforge.net/p/sqlobject/sqlobject/ci/4927a0677762005a794862e940209b7046ea695d
commit 4927a0677762005a794862e940209b7046ea695d
Author: Oleg Broytman <ph...@ph...>
Date: Sun Dec 4 20:55:57 2022 +0300
Fix(dbconnection): autocommit value must be bool
diff --git a/sqlobject/dbconnection.py b/sqlobject/dbconnection.py
index 6a383e7..e691f2d 100644
--- a/sqlobject/dbconnection.py
+++ b/sqlobject/dbconnection.py
@@ -799,7 +799,7 @@ class Transaction(object):
self._obsolete = True
self._dbConnection = dbConnection
self._connection = dbConnection.getConnection()
- self._dbConnection._setAutoCommit(self._connection, 0)
+ self._dbConnection._setAutoCommit(self._connection, False)
self.cache = CacheSet(cache=dbConnection.doCache)
self._deletedCache = {}
self._obsolete = False
@@ -924,7 +924,7 @@ class Transaction(object):
def _makeObsolete(self):
self._obsolete = True
if self._dbConnection.autoCommit:
- self._dbConnection._setAutoCommit(self._connection, 1)
+ self._dbConnection._setAutoCommit(self._connection, True)
self._dbConnection.releaseConnection(self._connection,
explicit=True)
self._connection = None
@@ -938,7 +938,7 @@ class Transaction(object):
"without rolling back this one"
self._obsolete = False
self._connection = self._dbConnection.getConnection()
- self._dbConnection._setAutoCommit(self._connection, 0)
+ self._dbConnection._setAutoCommit(self._connection, False)
def __del__(self):
if self._obsolete:
http://sourceforge.net/p/sqlobject/sqlobject/ci/89a7e24d7de75c745c60481d0da68aa204427f59
commit 89a7e24d7de75c745c60481d0da68aa204427f59
Author: Oleg Broytman <ph...@ph...>
Date: Sun Dec 4 20:54:55 2022 +0300
Feat(MySQL): Add `mysql-connector-python`
diff --git a/devscripts/requirements/requirements_connector_python.txt b/devscripts/requirements/requirements_connector_python.txt
new file mode 100644
index 0000000..d06b191
--- /dev/null
+++ b/devscripts/requirements/requirements_connector_python.txt
@@ -0,0 +1,10 @@
+mysql-connector-python <= 8.0.23; python_version == '2.7'
+protobuf < 3.19; python_version == '3.4'
+mysql-connector-python <= 8.0.22, > 2.0; python_version == '3.4'
+mysql-connector-python <= 8.0.23, >= 8.0.5; python_version == '3.5'
+mysql-connector-python <= 8.0.28, >= 8.0.6; python_version == '3.6'
+mysql-connector-python >= 8.0.13; python_version == '3.7'
+mysql-connector-python >= 8.0.19; python_version == '3.8'
+mysql-connector-python >= 8.0.24; python_version == '3.9'
+mysql-connector-python >= 8.0.28; python_version == '3.10'
+mysql-connector-python >= 8.0.31; python_version >= '3.11'
diff --git a/docs/News.rst b/docs/News.rst
index 02bcdb4..c9d65c9 100644
--- a/docs/News.rst
+++ b/docs/News.rst
@@ -14,6 +14,11 @@ Minor features
* Use ``module_loader.exec_module(module_loader.create_module())``
instead of ``module_loader.load_module()`` when available.
+Drivers
+-------
+
+* Added ``mysql-connector-python``.
+
Tests
-----
@@ -468,7 +473,8 @@ Minor features
'kinterbasdb' in that order. pyfirebirdsql is supported but has problems.
* Add ``driver`` keyword for MySQLConnection. Allowed values are 'mysqldb',
- 'connector', 'oursql' and 'pymysql'. Default is to test for mysqldb only.
+ 'connector', 'connector-python', 'oursql' and 'pymysql'. Default is to
+ test for mysqldb only.
* Add support for `MySQL Connector
<https://pypi.org/project/mysql-connector/>`_ (pure python; `binary
diff --git a/setup.py b/setup.py
index b67aa31..db82465 100755
--- a/setup.py
+++ b/setup.py
@@ -117,6 +117,7 @@ and `GitHub <https://github.com/sqlobject>`_.
'mysql:python_version=="2.7"': ['MySQL-python'],
'mysql:python_version>="3.4"': ['mysqlclient'],
'mysql-connector': ['mysql-connector'],
+ 'mysql-connector-python': ['mysql-connector-python'],
'oursql:python_version=="2.7"': [
'oursql @ git+https://github.com/sqlobject/oursql.git@master'],
'oursql:python_version>="3.4"': [
diff --git a/sqlobject/mysql/mysqlconnection.py b/sqlobject/mysql/mysqlconnection.py
index c4a72a6..ac3e062 100644
--- a/sqlobject/mysql/mysqlconnection.py
+++ b/sqlobject/mysql/mysqlconnection.py
@@ -59,7 +59,7 @@ class MySQLConnection(DBAPI):
self.CR_SERVER_LOST = \
MySQLdb.constants.CR.CR_SERVER_LOST
self.ER_DUP_ENTRY = MySQLdb.constants.ER.DUP_ENTRY
- elif driver == 'connector':
+ elif driver in ('connector', 'connector-python'):
import mysql.connector
self.module = mysql.connector
self.CR_SERVER_GONE_ERROR = \
@@ -92,7 +92,7 @@ class MySQLConnection(DBAPI):
else:
raise ValueError(
'Unknown MySQL driver "%s", '
- 'expected mysqldb, connector, '
+ 'expected mysqldb, connector, connector-python, '
'oursql, pymysql, mariadb, '
'odbc, pyodbc or pypyodbc' % driver)
except ImportError:
@@ -118,7 +118,7 @@ class MySQLConnection(DBAPI):
"client_flag", "local_infile"):
if key in kw:
self.kw[key] = int(kw.pop(key))
- if driver == 'connector':
+ if driver in ('connector', 'connector-python'):
for key in ("ssl_key", "ssl_cert", "ssl_ca", "ssl_capath"):
if key in kw:
self.kw[key] = kw.pop(key)
@@ -154,7 +154,7 @@ class MySQLConnection(DBAPI):
elif driver == 'mariadb':
self.kw.pop("charset", None)
- elif driver == 'connector':
+ elif driver in ('connector', 'connector-python'):
registerConverter(bytes, ConnectorBytesConverter)
global mysql_Bin
@@ -185,7 +185,7 @@ class MySQLConnection(DBAPI):
def character_set_name(self):
return dbEncoding + '_' + dbEncoding
Connection.character_set_name = character_set_name
- if self.driver == 'connector':
+ if self.driver in ('connector', 'connector-python'):
self.kw['consume_results'] = True
try:
if self.driver in ('odbc', 'pyodbc', 'pypyodbc'):
@@ -237,7 +237,7 @@ class MySQLConnection(DBAPI):
try:
conn.autocommit(auto)
except TypeError:
- # mysql-connector has autocommit as a property
+ # mysql-connector{-python} has autocommit as a property
conn.autocommit = auto
def _force_reconnect(self, conn):
@@ -252,7 +252,8 @@ class MySQLConnection(DBAPI):
self.printDebug(conn, query, 'QueryR')
dbEncoding = self.dbEncoding
if dbEncoding and not isinstance(query, bytes) and (
- self.driver in ('mysqldb', 'connector', 'oursql', 'mariadb')):
+ self.driver in ('mysqldb', 'connector', 'connector-python',
+ 'oursql', 'mariadb')):
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
diff --git a/tox.ini b/tox.ini
index 81df7f6..9d1bd95 100644
--- a/tox.ini
+++ b/tox.ini
@@ -19,6 +19,7 @@ deps =
mysqldb: mysql-python
mysqlclient: mysqlclient
mysql-connector: mysql-connector <= 2.2.2
+ mysql-connector-python: -rdevscripts/requirements/requirements_connector_python.txt
mysql-oursql: git+https://github.com/sqlobject/oursql.git@master#egg=oursql
mysql-oursql3: git+https://github.com/sqlobject/oursql.git@py3k#egg=oursql
pymysql: -rdevscripts/requirements/requirements_pymysql.txt
@@ -97,6 +98,22 @@ commands =
[testenv:py3{4,5,6,7,8,9,10,11}-mysql-connector]
commands = {[mysql-connector]commands}
+[mysql-connector-python]
+commands =
+ {[testenv]commands}
+ -mysql --execute="drop database sqlobject_test;"
+ mysql --execute="create database sqlobject_test;"
+ pytest -D "mysql://runner:@localhost/sqlobject_test?driver=connector-python&charset=utf8&debug=1"
+ mysql --execute="drop database sqlobject_test;"
+
+[testenv:py27-mysql-connector-python{,-w32}]
+commands =
+ easy_install -i https://downloads.egenix.com/python/index/ucs2/ egenix-mx-base
+ {[mysql-connector-python]commands}
+
+[testenv:py3{4,5,6,7,8,9,10,11}-mysql-connector-python{,-w32}]
+commands = {[mysql-connector-python]commands}
+
[oursql]
commands =
{[testenv]commands}
http://sourceforge.net/p/sqlobject/sqlobject/ci/089c9885aebbce49bae7f0388ee57df5b182ffd0
commit 089c9885aebbce49bae7f0388ee57df5b182ffd0
Author: Oleg Broytman <ph...@ph...>
Date: Thu Dec 15 19:55:37 2022 +0300
Tests(tox): Limit "tox < 4"
`tox` 4+ has incompatible `tox.ini` syntax.
It's impossible to use one `tox.ini` for Pythons < 3.7 and 3.7+.
diff --git a/.github/workflows/run-tests.yaml b/.github/workflows/run-tests.yaml
index 5eb73dc..bc67698 100644
--- a/.github/workflows/run-tests.yaml
+++ b/.github/workflows/run-tests.yaml
@@ -58,7 +58,7 @@ jobs:
python --version
python -m pip install --upgrade pip setuptools wheel
pip --version
- pip install --upgrade virtualenv tox
+ pip install --upgrade virtualenv "tox < 4"
- name: Set PYVER
run: |
import os, sys
diff --git a/devscripts/requirements/requirements_tox.txt b/devscripts/requirements/requirements_tox.txt
index 8b5960b..b72a322 100644
--- a/devscripts/requirements/requirements_tox.txt
+++ b/devscripts/requirements/requirements_tox.txt
@@ -1 +1 @@
-tox >= 3.15
+tox >= 3.15, < 4
http://sourceforge.net/p/sqlobject/sqlobject/ci/b46a80e04bb2c5f3a873549edd5947527f0088d1
commit b46a80e04bb2c5f3a873549edd5947527f0088d1
Author: Oleg Broytman <ph...@ph...>
Date: Fri Dec 9 15:17:15 2022 +0300
CI(GHActions): Set `$LD_LIBRARY_PATH`
Python 2.7 on Linux requires `$LD_LIBRARY_PATH`.
diff --git a/.github/workflows/run-tests.yaml b/.github/workflows/run-tests.yaml
index a0fc314..5eb73dc 100644
--- a/.github/workflows/run-tests.yaml
+++ b/.github/workflows/run-tests.yaml
@@ -62,8 +62,15 @@ jobs:
- name: Set PYVER
run: |
import os, sys
+ ld_library_path = None
pyver = '%d%d' % tuple(sys.version_info[:2])
+ if os.name == 'posix':
+ if pyver == '27': # Python 2.7 on Linux requires `$LD_LIBRARY_PATH`
+ ld_library_path = os.path.join(
+ os.path.dirname(os.path.dirname(sys.executable)), 'lib')
with open(os.environ['GITHUB_ENV'], 'a') as f:
+ if ld_library_path:
+ f.write('LD_LIBRARY_PATH=' + ld_library_path + '\n')
f.write('PYVER=' + pyver + '\n')
f.write('PGPASSWORD=test\n')
shell: python
http://sourceforge.net/p/sqlobject/sqlobject/ci/0745abd1c5a2c0123c18879ed9f1baa08f7bc5ef
... 98 lines suppressed ...
hooks/post-receive
--
SQLObject development repository
|