...
 
Commits (6)
......@@ -26,104 +26,104 @@ addons:
matrix:
include:
- python: "2.7"
env: TOXENV=py27-mysqldb
- python: "3.4"
env: TOXENV=py34-mysqlclient
- python: "3.5"
env: TOXENV=py35-mysqlclient
- python: "3.6"
env: TOXENV=py36-mysqlclient
- python: "2.7"
env: TOXENV=py27-mysql-connector
- python: "3.4"
env: TOXENV=py34-mysql-connector
- python: "3.5"
env: TOXENV=py35-mysql-connector
- python: "3.6"
env: TOXENV=py36-mysql-connector
- python: "2.7"
env: TOXENV=py27-mysql-oursql
- python: "3.4"
env: TOXENV=py34-mysql-oursql3
- python: "3.5"
env: TOXENV=py35-mysql-oursql3
- python: "3.6"
env: TOXENV=py36-mysql-oursql3
- python: "2.7"
env: TOXENV=py27-pymysql
- python: "3.4"
env: TOXENV=py34-pymysql
- python: "3.5"
env: TOXENV=py35-pymysql
- python: "3.6"
env: TOXENV=py36-pymysql
- python: "2.7"
env: TOXENV=py27-postgres-psycopg
- python: "3.4"
env: TOXENV=py34-postgres-psycopg
- python: "3.5"
env: TOXENV=py35-postgres-psycopg
- python: "3.6"
env: TOXENV=py36-postgres-psycopg
- python: "2.7"
env: TOXENV=py27-postgres-pygresql
- python: "3.4"
env: TOXENV=py34-postgres-pygresql
- python: "3.5"
env: TOXENV=py35-postgres-pygresql
- python: "3.6"
env: TOXENV=py36-postgres-pygresql
- python: "3.4"
env: TOXENV=py34-pypostgresql
- python: "3.5"
env: TOXENV=py35-pypostgresql
- python: "3.6"
env: TOXENV=py36-pypostgresql
- python: "2.7"
env: TOXENV=py27-postgres-pg8000
- python: "3.4"
env: TOXENV=py34-postgres-pg8000
- python: "3.5"
env: TOXENV=py35-postgres-pg8000
- python: "3.6"
env: TOXENV=py36-postgres-pg8000
- python: "2.7"
env: TOXENV=py27-sqlite
- python: "3.4"
env: TOXENV=py34-sqlite
- python: "3.5"
env: TOXENV=py35-sqlite
- python: "3.6"
env: TOXENV=py36-sqlite
- python: "2.7"
env: TOXENV=py27-sqlite-memory
- python: "3.4"
env: TOXENV=py34-sqlite-memory
- python: "3.5"
env: TOXENV=py35-sqlite-memory
- python: "3.6"
env: TOXENV=py36-sqlite-memory
- python: "2.7"
env: TOXENV=py27-flake8
- python: "3.4"
env: TOXENV=py34-flake8
- python: "2.7"
env: TOXENV=py27-firebird-fdb
- python: "3.4"
env: TOXENV=py34-firebird-fdb
- python: "3.5"
env: TOXENV=py35-firebird-fdb
- python: "3.6"
env: TOXENV=py36-firebird-fdb
- python: "2.7"
env: TOXENV=py27-firebirdsql
- python: "3.4"
env: TOXENV=py34-firebirdsql
- python: "3.5"
env: TOXENV=py35-firebirdsql
- python: "3.6"
env: TOXENV=py36-firebirdsql
- python: "2.7"
env: TOXENV=py27-mysqldb
- python: "3.4"
env: TOXENV=py34-mysqlclient
- python: "3.5"
env: TOXENV=py35-mysqlclient
- python: "3.6"
env: TOXENV=py36-mysqlclient
- python: "2.7"
env: TOXENV=py27-mysql-connector
- python: "3.4"
env: TOXENV=py34-mysql-connector
- python: "3.5"
env: TOXENV=py35-mysql-connector
- python: "3.6"
env: TOXENV=py36-mysql-connector
- python: "2.7"
env: TOXENV=py27-mysql-oursql
- python: "3.4"
env: TOXENV=py34-mysql-oursql3
- python: "3.5"
env: TOXENV=py35-mysql-oursql3
- python: "3.6"
env: TOXENV=py36-mysql-oursql3
- python: "2.7"
env: TOXENV=py27-pymysql
- python: "3.4"
env: TOXENV=py34-pymysql
- python: "3.5"
env: TOXENV=py35-pymysql
- python: "3.6"
env: TOXENV=py36-pymysql
- python: "2.7"
env: TOXENV=py27-postgres-psycopg
- python: "3.4"
env: TOXENV=py34-postgres-psycopg
- python: "3.5"
env: TOXENV=py35-postgres-psycopg
- python: "3.6"
env: TOXENV=py36-postgres-psycopg
- python: "2.7"
env: TOXENV=py27-postgres-pygresql
- python: "3.4"
env: TOXENV=py34-postgres-pygresql
- python: "3.5"
env: TOXENV=py35-postgres-pygresql
- python: "3.6"
env: TOXENV=py36-postgres-pygresql
- python: "3.4"
env: TOXENV=py34-pypostgresql
- python: "3.5"
env: TOXENV=py35-pypostgresql
- python: "3.6"
env: TOXENV=py36-pypostgresql
- python: "2.7"
env: TOXENV=py27-postgres-pg8000
- python: "3.4"
env: TOXENV=py34-postgres-pg8000
- python: "3.5"
env: TOXENV=py35-postgres-pg8000
- python: "3.6"
env: TOXENV=py36-postgres-pg8000
- python: "2.7"
env: TOXENV=py27-sqlite
- python: "3.4"
env: TOXENV=py34-sqlite
- python: "3.5"
env: TOXENV=py35-sqlite
- python: "3.6"
env: TOXENV=py36-sqlite
- python: "2.7"
env: TOXENV=py27-sqlite-memory
- python: "3.4"
env: TOXENV=py34-sqlite-memory
- python: "3.5"
env: TOXENV=py35-sqlite-memory
- python: "3.6"
env: TOXENV=py36-sqlite-memory
- python: "2.7"
env: TOXENV=py27-flake8
- python: "3.4"
env: TOXENV=py34-flake8
- python: "2.7"
env: TOXENV=py27-firebird-fdb
- python: "3.4"
env: TOXENV=py34-firebird-fdb
- python: "3.5"
env: TOXENV=py35-firebird-fdb
- python: "3.6"
env: TOXENV=py36-firebird-fdb
- python: "2.7"
env: TOXENV=py27-firebirdsql
- python: "3.4"
env: TOXENV=py34-firebirdsql
- python: "3.5"
env: TOXENV=py35-firebirdsql
- python: "3.6"
env: TOXENV=py36-firebirdsql
allow_failures:
- env: TOXENV=py27-firebird-fdb
......
Hello!
I'm pleased to announce version 3.6.0, the first stable release of branch
3.6 of SQLObject.
I'm pleased to announce version 3.7.0, the first stable release of branch
3.7 of SQLObject.
What's new in SQLObject
=======================
Contributor for this release is Michael S. Root.
Contributors for this release are Scott Stahl and Christophe Popov.
Minor features
--------------
Features
--------
* Close cursors after using to free resources immediately
instead of waiting for gc.
* Add signals on commit and rollback; pull request by Scott Stahl.
Bug fixes
---------
* Fix for TypeError using selectBy on a BLOBCol. PR by Michael S. Root.
* Fix SSL-related parameters for MySQL-connector (connector uses
a different param style). Bug reported by Christophe Popov.
Drivers
-------
* Extend support for oursql and Python 3 (requires our fork of the driver).
* Remove psycopg1. Driver ``psycopg`` is now just an alias for ``psycopg2``.
* Fix cursor.arraysize - pymssql doesn't have arraysize.
* Set timeout for ODBC with MSSQL.
* Fix _setAutoCommit for MSSQL.
Documentation
-------------
* Document extras that are available for installation.
Build
Tests
-----
* Use ``python_version`` environment marker in ``setup.py`` to make
``install_requires`` and ``extras_require`` declarative. This makes
the universal wheel truly universal.
* Install psycopg2 from `psycopg2-binary`_ package.
* Use ``python_requires`` keyword in ``setup.py``.
.. _`psycopg2-binary`: https://pypi.org/project/psycopg2-binary/
For a more complete list, please see the news:
http://sqlobject.org/News.html
......@@ -75,7 +62,7 @@ Mailing list:
https://lists.sourceforge.net/mailman/listinfo/sqlobject-discuss
Download:
https://pypi.python.org/pypi/SQLObject/3.6.0
https://pypi.org/project/SQLObject/3.7.0/
News and changes:
http://sqlobject.org/News.html
......
Metadata-Version: 1.2
Metadata-Version: 2.1
Name: SQLObject
Version: 3.6.0
Version: 3.7.0
Summary: Object-Relational Manager, aka database wrapper
Home-page: http://sqlobject.org/
Author: Oleg Broytman
Author-email: phd@phdru.name
Author: Ian Bicking
Author-email: ianb@colorstudy.com
Maintainer: Oleg Broytman
Maintainer-email: phd@phdru.name
License: LGPL
Download-URL: https://pypi.python.org/pypi/SQLObject/3.6.0
Description-Content-Type: UNKNOWN
Download-URL: https://pypi.org/project/SQLObject/3.7.0/
Project-URL: Issue tracker, https://github.com/sqlobject/sqlobject/issues
Project-URL: Wikipedia, https://en.wikipedia.org/wiki/SQLObject
Project-URL: Development docs, http://sqlobject.org/devel/
Project-URL: Download, https://pypi.org/project/SQLObject/3.7.0/
Project-URL: Github repo, https://github.com/sqlobject
Project-URL: SourceForge project, https://sourceforge.net/projects/sqlobject/
Project-URL: Homepage, http://sqlobject.org/
Project-URL: Twitter, https://twitter.com/SQLObject
Description: SQLObject is a popular *Object Relational Manager* for providing an
object interface to your database, with tables as classes, rows as
instances, and columns as attributes.
......@@ -44,3 +53,27 @@ Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires: FormEncode
Requires: PyDispatcher
Requires-Python: >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*
Description-Content-Type: text/x-rst
Provides-Extra: sqlite
Provides-Extra: py-postgresql
Provides-Extra: pymysql
Provides-Extra: mysql
Provides-Extra: pypyodbc
Provides-Extra: pyodbc
Provides-Extra: firebirdsql
Provides-Extra: psycopg2
Provides-Extra: sybase
Provides-Extra: pypostgresql
Provides-Extra: pg8000
Provides-Extra: kinterbasdb
Provides-Extra: postgres
Provides-Extra: adodbapi
Provides-Extra: fdb
Provides-Extra: pymssql
Provides-Extra: pygresql
Provides-Extra: sapdb
Provides-Extra: postgresql
Provides-Extra: odbc
Provides-Extra: mysql-connector
Provides-Extra: psycopg
Provides-Extra: oursql
SQLObject 3.6.0
SQLObject 3.7.0
===============
Thanks for looking at SQLObject. SQLObject is an object-relational
......
Metadata-Version: 1.2
Metadata-Version: 2.1
Name: SQLObject
Version: 3.6.0
Version: 3.7.0
Summary: Object-Relational Manager, aka database wrapper
Home-page: http://sqlobject.org/
Author: Oleg Broytman
Author-email: phd@phdru.name
Author: Ian Bicking
Author-email: ianb@colorstudy.com
Maintainer: Oleg Broytman
Maintainer-email: phd@phdru.name
License: LGPL
Download-URL: https://pypi.python.org/pypi/SQLObject/3.6.0
Description-Content-Type: UNKNOWN
Download-URL: https://pypi.org/project/SQLObject/3.7.0/
Project-URL: Issue tracker, https://github.com/sqlobject/sqlobject/issues
Project-URL: Wikipedia, https://en.wikipedia.org/wiki/SQLObject
Project-URL: Development docs, http://sqlobject.org/devel/
Project-URL: Download, https://pypi.org/project/SQLObject/3.7.0/
Project-URL: Github repo, https://github.com/sqlobject
Project-URL: SourceForge project, https://sourceforge.net/projects/sqlobject/
Project-URL: Homepage, http://sqlobject.org/
Project-URL: Twitter, https://twitter.com/SQLObject
Description: SQLObject is a popular *Object Relational Manager* for providing an
object interface to your database, with tables as classes, rows as
instances, and columns as attributes.
......@@ -44,3 +53,27 @@ Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires: FormEncode
Requires: PyDispatcher
Requires-Python: >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*
Description-Content-Type: text/x-rst
Provides-Extra: sqlite
Provides-Extra: py-postgresql
Provides-Extra: pymysql
Provides-Extra: mysql
Provides-Extra: pypyodbc
Provides-Extra: pyodbc
Provides-Extra: firebirdsql
Provides-Extra: psycopg2
Provides-Extra: sybase
Provides-Extra: pypostgresql
Provides-Extra: pg8000
Provides-Extra: kinterbasdb
Provides-Extra: postgres
Provides-Extra: adodbapi
Provides-Extra: fdb
Provides-Extra: pymssql
Provides-Extra: pygresql
Provides-Extra: sapdb
Provides-Extra: postgresql
Provides-Extra: odbc
Provides-Extra: mysql-connector
Provides-Extra: psycopg
Provides-Extra: oursql
......@@ -526,11 +526,13 @@ docs/html/_static/css3-mediaqueries.js
docs/html/_static/css3-mediaqueries_src.js
docs/html/_static/default.css
docs/html/_static/doctools.js
docs/html/_static/documentation_options.js
docs/html/_static/down-pressed.png
docs/html/_static/down.png
docs/html/_static/file.png
docs/html/_static/jquery-1.11.1.js
docs/html/_static/jquery-3.1.0.js
docs/html/_static/jquery-3.2.1.js
docs/html/_static/jquery.js
docs/html/_static/minus.png
docs/html/_static/plus.png
......
......@@ -45,9 +45,6 @@ psycopg2
[psycopg]
psycopg2
[psycopg1]
psycopg1
[psycopg2]
psycopg2
......
sqlobject (3.6.0+dfsg-2) UNRELEASED; urgency=medium
sqlobject (3.7.0+dfsg-1) UNRELEASED; urgency=low
[Ondřej Nový ]
* Use 'python3 -m sphinx' instead of sphinx-build for building docs
-- Ondřej Nový <onovy@debian.org> Mon, 27 Aug 2018 15:03:32 +0200
[ Neil Muller ]
* Update to the latest upstream release.
* Drop no longer required get_rid_of_setuptools patch.
* Standards-Version: 4.2.1 (no changes needed).
-- Neil Muller <drnlmuller+debian@gmail.com> Sat, 13 Oct 2018 11:04:09 +0200
sqlobject (3.6.0+dfsg-1) unstable; urgency=low
......
......@@ -6,9 +6,11 @@ Build-Depends: debhelper (>= 9),
python-all,
python-formencode,
python-pydispatch,
python-setuptools,
python3-all,
python3-formencode,
python3-pydispatch,
python3-setuptools,
# Documentation
python3-sphinx,
# Used in the test suite
......@@ -16,7 +18,7 @@ Build-Depends: debhelper (>= 9),
python3-pytest
Maintainer: Debian Python Modules Team <python-modules-team@lists.alioth.debian.org>
Uploaders: Neil Muller <drnlmuller+debian@gmail.com>
Standards-Version: 4.1.4
Standards-Version: 4.2.1
Vcs-Git: https://salsa.debian.org/python-team/modules/sqlobject.git
Vcs-Browser: https://salsa.debian.org/python-team/modules/sqlobject
Homepage: http://www.sqlobject.org
......
From: Neil <neil@dip.sun.ac.za>
Date: Thu, 29 Oct 2015 13:33:31 +0200
From: Neil Muller <Neil Muller drnlmuller+debian@gmail.com>
Date: Sat, 13 Oct 2018 12:06:33 +0200
Subject: Remove docs from installed files
We don't want to install the documentation in the package as well,
since we already install it under /usr/share/doc, so we exclude
it from setup.py
---
setup.py | 3 ---
1 file changed, 3 deletions(-)
diff --git a/setup.py b/setup.py
index 28ca928..d5cc8e9 100755
index b0fb383..52e7855 100755
--- a/setup.py
+++ b/setup.py
@@ -114,9 +114,6 @@ and `GitHub <https://github.com/sqlobject>`_.
packages=["sqlobject"] +
['sqlobject.%s' % package for package in subpackages],
scripts=["scripts/sqlobject-admin", "scripts/sqlobject-convertOldURI"],
- package_data={
- "sqlobject.maxdb": ["readme.txt"],
- },
requires=['FormEncode', 'PyDispatcher'],
**kw
)
@@ -77,9 +77,6 @@ and `GitHub <https://github.com/sqlobject>`_.
packages=["sqlobject"] +
['sqlobject.%s' % package for package in subpackages],
scripts=["scripts/sqlobject-admin", "scripts/sqlobject-convertOldURI"],
- package_data={
- "sqlobject.maxdb": ["readme.txt"],
- },
entry_points="""
[paste.filter_app_factory]
main = sqlobject.wsgi_middleware:make_middleware
From: Bernd Zeimetz <bzed@debian.org>
Date: Thu, 8 Oct 2015 14:08:54 -0700
Subject: Remove the unnecessary setuptools requirement.
Last-Update: 2014-04-13
Patch-Name: get_rid_of_setuptools
---
setup.py | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/setup.py b/setup.py
index 4018c69..28ca928 100755
--- a/setup.py
+++ b/setup.py
@@ -3,12 +3,8 @@
from imp import load_source
from os.path import abspath, dirname, join
-try:
- from setuptools import setup
- is_setuptools = True
-except ImportError:
- from distutils.core import setup
- is_setuptools = False
+from distutils.core import setup
+is_setuptools = False
versionpath = join(abspath(dirname(__file__)), "sqlobject", "__version__.py")
sqlobject_version = load_source("sqlobject_version", versionpath)
......@@ -35,11 +35,11 @@ Patch-Name: replace_logos
22 files changed, 74 insertions(+), 166 deletions(-)
diff --git a/docs/Authors.rst b/docs/Authors.rst
index 3f3d55b..a727cc5 100644
index 92f936e..4f61677 100644
--- a/docs/Authors.rst
+++ b/docs/Authors.rst
@@ -38,10 +38,6 @@ Contributions have been made by:
* Michael S. Root <miker at tippett.com>
@@ -39,10 +39,6 @@ Contributions have been made by:
* Scott Stahl <sstahl at onshift.com>
* Oleg Broytman <phd@phdru.name>
-.. image:: https://sourceforge.net/sflogo.php?group_id=74338&type=10
......@@ -53,7 +53,7 @@ index 3f3d55b..a727cc5 100644
+
+.. _Sourceforge.net: http://sourceforge.net/projects/sqlobject
diff --git a/docs/DeveloperGuide.rst b/docs/DeveloperGuide.rst
index 5e889c8..670c682 100644
index 966c379..ae565bf 100644
--- a/docs/DeveloperGuide.rst
+++ b/docs/DeveloperGuide.rst
@@ -270,13 +270,11 @@ forced to write the test. That's no fun for us, to just be writing
......@@ -75,7 +75,7 @@ index 5e889c8..670c682 100644
To avoid triggering unnecessary test run at CI services add text `[skip ci]
<https://docs.travis-ci.com/user/customizing-the-build/#skipping-a-build>`_ or
@@ -286,13 +284,11 @@ code (documentation updates and such).
We use `coverage.py <https://pypi.python.org/pypi/coverage>`_
We use `coverage.py <https://pypi.org/project/coverage/>`_
to measures code coverage by tests and upload the result for analyzis to
`Coveralls <https://coveralls.io/github/sqlobject/sqlobject>`_ and
-`Codecov <https://codecov.io/gh/sqlobject/sqlobject>`_:
......@@ -143,10 +143,10 @@ index 38ed2e6..351a874 100644
+
+.. _Sourceforge.net: http://sourceforge.net/projects/sqlobject
diff --git a/docs/News.rst b/docs/News.rst
index 66ef00e..b86e798 100644
index fe8965f..26b63d2 100644
--- a/docs/News.rst
+++ b/docs/News.rst
@@ -344,10 +344,6 @@ Documentation
@@ -372,10 +372,6 @@ Documentation
.. __: News5.html
......@@ -251,7 +251,7 @@ index 32f6659..d5414d5 100644
+
+.. _Sourceforge.net: http://sourceforge.net/projects/sqlobject
diff --git a/docs/Python3.rst b/docs/Python3.rst
index f14b106..8d7b08c 100644
index ad4fb56..93404e6 100644
--- a/docs/Python3.rst
+++ b/docs/Python3.rst
@@ -81,10 +81,6 @@ Python 3.
......@@ -287,7 +287,7 @@ index f2678fe..d27a40a 100644
+
+.. _Sourceforge.net: http://sourceforge.net/projects/sqlobject
diff --git a/docs/SQLObject.rst b/docs/SQLObject.rst
index 1ccc222..0a0323a 100644
index 46d820e..8889706 100644
--- a/docs/SQLObject.rst
+++ b/docs/SQLObject.rst
@@ -2159,10 +2159,6 @@ Documentation`_.
......@@ -323,10 +323,10 @@ index c6bbd0e..67492e0 100644
+
+.. _Sourceforge.net: http://sourceforge.net/projects/sqlobject
diff --git a/docs/TODO.rst b/docs/TODO.rst
index 1ce1467..d8f511a 100644
index 106a599..cb293b9 100644
--- a/docs/TODO.rst
+++ b/docs/TODO.rst
@@ -147,10 +147,6 @@ TODO
@@ -142,10 +142,6 @@ TODO
* Type annotations and mypy tests.
......@@ -395,7 +395,7 @@ index c312385..fd295f3 100644
+
+.. _Sourceforge.net: http://sourceforge.net/projects/sqlobject
diff --git a/docs/download.rst b/docs/download.rst
index a028998..6f22294 100644
index 1d9e546..563e61e 100644
--- a/docs/download.rst
+++ b/docs/download.rst
@@ -91,10 +91,6 @@ https://sourceforge.net/p/sqlobject/_list/git
......
get_rid_of_setuptools
remove_pkg_resources
replace_logos
0004-Remove-docs-from-installed-files.patch
......@@ -36,6 +36,7 @@ Contributions have been made by:
* Lutz Steinborn <l.steinborn at 4c-gmbh.de>
* Shailesh Mungikar <shailesh.mungikar at druva.com>
* Michael S. Root <miker at tippett.com>
* Scott Stahl <sstahl at onshift.com>
* Oleg Broytman <phd@phdru.name>
.. image:: https://sourceforge.net/sflogo.php?group_id=74338&type=10
......
......@@ -234,7 +234,7 @@ Tests are important. Tests keep everything from falling apart. All
new additions should have tests.
Testing uses pytest, an alternative to ``unittest``. It is available
at http://pytest.org/ and https://pypi.python.org/pypi/pytest. Read its
at http://pytest.org/ and https://pypi.org/project/pytest/. Read its
`getting started`_ document for more.
.. _getting started: http://docs.pytest.org/en/latest/getting-started.html
......@@ -283,7 +283,7 @@ To avoid triggering unnecessary test run at CI services add text `[skip ci]
``[ci skip]`` anywhere in your commit messages for commits that don't change
code (documentation updates and such).
We use `coverage.py <https://pypi.python.org/pypi/coverage>`_
We use `coverage.py <https://pypi.org/project/coverage/>`_
to measures code coverage by tests and upload the result for analyzis to
`Coveralls <https://coveralls.io/github/sqlobject/sqlobject>`_ and
`Codecov <https://codecov.io/gh/sqlobject/sqlobject>`_:
......
......@@ -5,6 +5,34 @@ News
.. contents:: Contents:
:backlinks: none
SQLObject 3.7.0
===============
Released 6 June 2018.
Features
--------
* Add signals on commit and rollback; pull request by Scott Stahl.
Bug fixes
---------
* Fix SSL-related parameters for MySQL-connector (connector uses
a different param style). Bug reported by Christophe Popov.
Drivers
-------
* Remove psycopg1. Driver ``psycopg`` is now just an alias for ``psycopg2``.
Tests
-----
* Install psycopg2 from `psycopg2-binary`_ package.
.. _`psycopg2-binary`: https://pypi.org/project/psycopg2-binary/
SQLObject 3.6.0
===============
......@@ -60,7 +88,7 @@ Minor features
Drivers
-------
* Add support for `pg8000 <https://pypi.python.org/pypi/pg8000>`_
* Add support for `pg8000 <https://pypi.org/project/pg8000/>`_
PostgreSQL driver.
* Fix autoreconnect with pymysql driver. Contributed by Shailesh Mungikar.
......@@ -194,7 +222,7 @@ Minor features
'connector', 'oursql' and 'pymysql'. Default is to test for mysqldb only.
* Add support for `MySQL Connector
<https://pypi.python.org/pypi/mysql-connector>`_ (pure python; `binary
<https://pypi.org/project/mysql-connector/>`_ (pure python; `binary
packages <https://dev.mysql.com/doc/connector-python/en/>`_ are not at
PyPI and hence are hard to install and test).
......@@ -216,11 +244,11 @@ Drivers (work in progress)
* Extend support for PyGreSQL driver. There are still some problems.
* Add support for `py-postgresql
<https://pypi.python.org/pypi/py-postgresql>`_ PostgreSQL driver. There
<https://pypi.org/project/py-postgresql/>`_ PostgreSQL driver. There
are still problems with the driver.
* Add support for `pyfirebirdsql
<https://pypi.python.org/pypi/firebirdsql>`_.There are still problems with
<https://pypi.org/project/firebirdsql/>`_.There are still problems with
the driver.
Bug fixes
......
......@@ -40,7 +40,7 @@ Note that the default encoding of MySQL databases is *latin1*, which can cause
problems with general Unicode strings. We recommend specifying the character
set as *utf8* when using MySQL to protect against these issues.
.. _mysqlclient: https://pypi.python.org/pypi/mysqlclient
.. _mysqlclient: https://pypi.org/project/mysqlclient/
Using databases created with SQLObject and Python 2 in Python 3
......
......@@ -48,7 +48,7 @@ Requirements
Currently SQLObject supports MySQL_ via MySQLdb_ aka MySQL-python (called
mysqlclient_ for Python 3), `MySQL Connector`_, oursql_, PyMySQL_, PyODBC_
and PyPyODBC_. For PostgreSQL_ psycopg2_ or psycopg1 are recommended;
and PyPyODBC_. For PostgreSQL_ psycopg2_ is recommended;
PyGreSQL_, py-postgresql_ and pg8000_ are supported; SQLite_ has a
built-in driver or PySQLite_. Firebird_ is supported via fdb_ or
kinterbasdb_; pyfirebirdsql_ is supported but has problems. `MAX DB`_
......@@ -59,21 +59,21 @@ problems (not all tests passed).
.. _MySQL: https://www.mysql.com/
.. _MySQLdb: https://sourceforge.net/projects/mysql-python/
.. _mysqlclient: https://pypi.python.org/pypi/mysqlclient
.. _`MySQL Connector`: https://pypi.python.org/pypi/mysql-connector
.. _mysqlclient: https://pypi.org/project/mysqlclient/
.. _`MySQL Connector`: https://pypi.org/project/mysql-connector/
.. _oursql: https://github.com/python-oursql/oursql
.. _PyMySQL: https://github.com/PyMySQL/PyMySQL/
.. _PostgreSQL: https://postgresql.org
.. _psycopg2: http://initd.org/psycopg/
.. _PyGreSQL: http://www.pygresql.org/
.. _py-postgresql: https://pypi.python.org/pypi/py-postgresql
.. _pg8000: https://pypi.python.org/pypi/pg8000
.. _py-postgresql: https://pypi.org/project/py-postgresql/
.. _pg8000: https://pypi.org/project/pg8000/
.. _SQLite: https://sqlite.org/
.. _PySQLite: https://github.com/ghaering/pysqlite
.. _Firebird: http://www.firebirdsql.org/en/python-driver/
.. _fdb: http://www.firebirdsql.org/en/devel-python-driver/
.. _kinterbasdb: http://kinterbasdb.sourceforge.net/
.. _pyfirebirdsql: https://pypi.python.org/pypi/firebirdsql
.. _pyfirebirdsql: https://pypi.org/project/firebirdsql/
.. _`MAX DB`: http://maxdb.sap.com/
.. _sapdb: http://maxdb.sap.com/doc/7_8/50/01923f25b842438a408805774f6989/frameset.htm
.. _Sybase: http://www.object-craft.com.au/projects/sybase/
......@@ -81,8 +81,8 @@ problems (not all tests passed).
.. _pymssql: http://www.pymssql.org/en/latest/index.html
.. _FreeTDS: http://www.freetds.org/
.. _adodbapi: http://adodbapi.sourceforge.net/
.. _PyODBC: https://pypi.python.org/pypi/pyodbc
.. _PyPyODBC: https://pypi.python.org/pypi/pypyodbc
.. _PyODBC: https://pypi.org/project/pyodbc/
.. _PyPyODBC: https://pypi.org/project/pypyodbc/
Python 2.7 or 3.4+ is required.
......@@ -1832,8 +1832,8 @@ PostgresConnection supports transactions and all other features.
The user can choose a DB API driver for PostgreSQL by using a ``driver``
parameter in DB URI or PostgresConnection that can be a comma-separated
list of driver names. Possible drivers are: ``psycopg2``, psycopg1,
``psycopg`` (tries psycopg2 and psycopg1), ``pygresql``, ``pypostgresql``,
list of driver names. Possible drivers are: ``psycopg2``,
``psycopg`` (alias for ``psycopg2``), ``pygresql``, ``pypostgresql``,
``pg8000``, ``pyodbc``, ``pypyodbc`` or ``odbc`` (try ``pyodbc`` and
``pypyodbc``). Default is ``psycopg``.
......
......@@ -7,21 +7,16 @@ TODO
* Resolve timeout problems with MSSQL.
* https://github.com/d33tah/bpgsql,
https://github.com/olopez32/py-bpgsql,
https://pypi.python.org/pypi/ocpgdb/2.0.2,
https://magicstack.github.io/asyncpg/current/.
* PyPy.
* Use https://pypi.python.org/pypi/psycopg2cffi to run SQLObject
* Use https://pypi.org/project/psycopg2cffi/ to run SQLObject
under PyPy.
* https://pypi.python.org/pypi/turbodbc
* https://pypi.org/project/turbodbc/
* PyODBC and PyPyODBC for linux and w32: SQLite (libsqliteodbc).
* https://pypi.python.org/pypi/JayDeBeApi
* https://pypi.org/project/JayDeBeApi/
* Jython.
......@@ -97,7 +92,7 @@ TODO
* Support PyODBC driver for all backends.
* `dbms <https://pypi.python.org/pypi/dbms>`_ is a DB API wrapper for DB
* `dbms <https://pypi.org/project/dbms/>`_ is a DB API wrapper for DB
API drivers for IBM DB2, Firebird, MSSQL Server, MySQL, Oracle,
PostgreSQL, SQLite and ODBC.
......@@ -114,7 +109,7 @@ TODO
* Use DBUtils_, especially SolidConnection.
.. _DBUtils: https://pypi.python.org/pypi/DBUtils
.. _DBUtils: https://pypi.org/project/DBUtils/
* ``_fromDatabase`` currently doesn't support IDs that don't fit into the
normal naming scheme. It should do so. You can still use ``_idName``
......
......@@ -2,7 +2,7 @@ Download SQLObject
++++++++++++++++++
The latest releases are always available on the `Python Package Index
<https://pypi.python.org/pypi/SQLObject>`_, and is installable
<https://pypi.org/project/SQLObject/>`_, and is installable
with `pip <https://pip.pypa.io/en/latest/>`_ or `easy_install
<https://setuptools.readthedocs.io/en/latest/easy_install.html>`_.
......@@ -73,7 +73,7 @@ pyodbc pypyodbc odbc (synonym for pyodbc)
PostgreSQL
^^^^^^^^^^
psycopg1 psycopg2 psycopg postgres postgresql (synonyms for psycopg2)
psycopg2 psycopg postgres postgresql (synonyms for psycopg2)
pygresql pypostgresql py-postgresql pg8000
The rest
......
......@@ -4,12 +4,11 @@ universal = 1
[easy_install]
optimize = 2
[egg_info]
tag_build =
tag_date = 0
tag_svn_revision = 0
[flake8]
exclude = .git,.tox,docs/europython/*.py
ignore = E305
[egg_info]
tag_build =
tag_date = 0
......@@ -2,13 +2,7 @@
from imp import load_source
from os.path import abspath, dirname, join
try:
from setuptools import setup
is_setuptools = True
except ImportError:
from distutils.core import setup
is_setuptools = False
from setuptools import setup
versionpath = join(abspath(dirname(__file__)), "sqlobject", "__version__.py")
sqlobject_version = load_source("sqlobject_version", versionpath)
......@@ -19,19 +13,85 @@ subpackages = ['firebird', 'include', 'include.tests',
'sqlite', 'sybase', 'tests', 'util',
'versioning', 'versioning.test']
kw = {}
if is_setuptools:
kw['entry_points'] = """
setup(
name="SQLObject",
version=sqlobject_version.version,
description="Object-Relational Manager, aka database wrapper",
long_description="""\
SQLObject is a popular *Object Relational Manager* for providing an
object interface to your database, with tables as classes, rows as
instances, and columns as attributes.
SQLObject includes a Python-object-based query language that makes SQL
more abstract, and provides substantial database independence for
applications.
Supports MySQL, PostgreSQL, SQLite, Firebird, Sybase, MSSQL and MaxDB (SAPDB).
Python 2.7 or 3.4+ is required.
For development see the projects at
`SourceForge <https://sourceforge.net/projects/sqlobject/>`_
and `GitHub <https://github.com/sqlobject>`_.
.. image:: https://travis-ci.org/sqlobject/sqlobject.svg?branch=master
:target: https://travis-ci.org/sqlobject/sqlobject
""",
long_description_content_type="text/x-rst",
classifiers=[
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"License :: OSI Approved :: "
"GNU Library or Lesser General Public License (LGPL)",
"Programming Language :: Python",
"Programming Language :: Python :: 2",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.4",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
"Topic :: Database",
"Topic :: Database :: Front-Ends",
"Topic :: Software Development :: Libraries :: Python Modules",
],
author="Ian Bicking",
author_email="ianb@colorstudy.com",
maintainer="Oleg Broytman",
maintainer_email="phd@phdru.name",
url="http://sqlobject.org/",
download_url="https://pypi.org/project/SQLObject/%s/" %
sqlobject_version.version,
project_urls={
'Homepage': 'http://sqlobject.org/',
'Development docs': 'http://sqlobject.org/devel/',
'Download': 'https://pypi.org/project/SQLObject/%s/' %
sqlobject_version.version,
'Github repo': 'https://github.com/sqlobject',
'Issue tracker': 'https://github.com/sqlobject/sqlobject/issues',
'SourceForge project': 'https://sourceforge.net/projects/sqlobject/',
'Twitter': 'https://twitter.com/SQLObject',
'Wikipedia': 'https://en.wikipedia.org/wiki/SQLObject',
},
keywords=["sql", "orm", "object-relational mapper"],
license="LGPL",
platforms="Any",
packages=["sqlobject"] +
['sqlobject.%s' % package for package in subpackages],
scripts=["scripts/sqlobject-admin", "scripts/sqlobject-convertOldURI"],
package_data={
"sqlobject.maxdb": ["readme.txt"],
},
entry_points="""
[paste.filter_app_factory]
main = sqlobject.wsgi_middleware:make_middleware
"""
kw['install_requires'] = [
""",
python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*',
requires=['FormEncode', 'PyDispatcher'],
install_requires=[
"FormEncode>=1.1.1,!=1.3.0; python_version=='2.7'",
"FormEncode>=1.3.1; python_version>='3.4'",
"PyDispatcher>=2.0.4",
]
kw['extras_require'] = {
],
extras_require={
# Firebird/Interbase
'fdb': ['fdb'],
'firebirdsql': ['firebirdsql'],
......@@ -50,7 +110,6 @@ if is_setuptools:
'pyodbc': ['pyodbc'],
'pypyodbc': ['pypyodbc'],
# PostgreSQL
'psycopg1': ['psycopg1'],
'psycopg2': ['psycopg2'],
'psycopg': ['psycopg2'],
'postgres': ['psycopg2'],
......@@ -63,67 +122,8 @@ if is_setuptools:
'sapdb': ['sapdb'],
'sqlite': ['pysqlite'],
'sybase': ['Sybase'],
}
kw['python_requires'] = '>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*'
setup(name="SQLObject",
version=sqlobject_version.version,
description="Object-Relational Manager, aka database wrapper",
long_description="""\
SQLObject is a popular *Object Relational Manager* for providing an
object interface to your database, with tables as classes, rows as
instances, and columns as attributes.
SQLObject includes a Python-object-based query language that makes SQL
more abstract, and provides substantial database independence for
applications.
Supports MySQL, PostgreSQL, SQLite, Firebird, Sybase, MSSQL and MaxDB (SAPDB).
Python 2.7 or 3.4+ is required.
For development see the projects at
`SourceForge <https://sourceforge.net/projects/sqlobject/>`_
and `GitHub <https://github.com/sqlobject>`_.
.. image:: https://travis-ci.org/sqlobject/sqlobject.svg?branch=master
:target: https://travis-ci.org/sqlobject/sqlobject
""",
classifiers=[
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"License :: OSI Approved :: "
"GNU Library or Lesser General Public License (LGPL)",
"Programming Language :: Python",
"Programming Language :: Python :: 2",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.4",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
"Topic :: Database",
"Topic :: Database :: Front-Ends",
"Topic :: Software Development :: Libraries :: Python Modules",
],
author="Ian Bicking",
author_email="ianb@colorstudy.com",
maintainer="Oleg Broytman",
maintainer_email="phd@phdru.name",
url="http://sqlobject.org/",
download_url="https://pypi.python.org/pypi/SQLObject/%s" %
sqlobject_version.version,
keywords=["sql", "orm", "object-relational mapper"],
license="LGPL",
platforms="Any",
packages=["sqlobject"] +
['sqlobject.%s' % package for package in subpackages],
scripts=["scripts/sqlobject-admin", "scripts/sqlobject-convertOldURI"],
package_data={
"sqlobject.maxdb": ["readme.txt"],
},
requires=['FormEncode', 'PyDispatcher'],
**kw
)
},
)
# Send announce to:
# sqlobject-discuss@lists.sourceforge.net
......@@ -167,7 +167,7 @@ Mailing list:
https://lists.sourceforge.net/mailman/listinfo/sqlobject-discuss
Download:
https://pypi.python.org/pypi/SQLObject/@@
https://pypi.org/project/SQLObject/@@/
News and changes:
http://sqlobject.org/docs/News.html
......
version = '3.6.0'
version = '3.7.0'
major = 3
minor = 6
minor = 7
micro = 0
release_level = 'final'
serial = 0
......
import sys
import types
# Credit to six authors: https://pypi.python.org/pypi/six
# Credit to six authors: https://pypi.org/project/six/
# License: MIT
......
......@@ -13,17 +13,17 @@ except ImportError:
import warnings
import weakref
from .cache import CacheSet
from . import classregistry
from . import col
from .converters import sqlrepr
from . import sqlbuilder
from .util.threadinglocal import local as threading_local
from .cache import CacheSet
from .compat import PY2, string_type, unicode_type
from .converters import sqlrepr
from .events import send, CommitSignal, RollbackSignal
from .util.threadinglocal import local as threading_local
warnings.filterwarnings("ignore", "DB-API extension cursor.lastrowid used")
_connections = {}
warnings.filterwarnings("ignore", "DB-API extension cursor.lastrowid used")
def _closeConnection(ref):
......@@ -855,6 +855,7 @@ class Transaction(object):
return
if self._dbConnection.debug:
self._dbConnection.printDebug(self._connection, '', 'COMMIT')
self._send_event(CommitSignal)
self._connection.commit()
subCaches = [(sub[0], sub[1].allIDs())
for sub in self.cache.allSubCachesByClassNames().items()]
......@@ -874,6 +875,7 @@ class Transaction(object):
if self._dbConnection.debug:
self._dbConnection.printDebug(self._connection, '', 'ROLLBACK')
subCaches = [(sub, sub.allIDs()) for sub in self.cache.allSubCaches()]
self._send_event(RollbackSignal)
self._connection.rollback()
for subCache, ids in subCaches:
......@@ -883,6 +885,20 @@ class Transaction(object):
inst.expire()
self._makeObsolete()
def _send_event(self, signal):
"""
Pushes a list of class_names and related ids in cache.
:param signal: Type of event signal to use
"""
cached_classes_and_ids = [
(class_name, cache.allIDs()) for class_name, cache in
self.cache.allSubCachesByClassNames().items()
]
if cached_classes_and_ids:
from .main import sqlmeta # Import here to avoid circular import
send(signal, sqlmeta, cached_classes_and_ids)
def __getattr__(self, attr):
"""
If nothing else works, let the parent connection handle it.
......
......@@ -211,6 +211,19 @@ class DropTableSignal(Signal):
after the table has been dropped.
"""
class CommitSignal(Signal):
"""
Called on transaction commit
"""
class RollbackSignal(Signal):
"""
Called on transaction rollback
"""
############################################################
# Event Debugging
############################################################
......
......@@ -111,11 +111,16 @@ class MySQLConnection(DBAPI):
"client_flag", "local_infile"):
if key in kw:
self.kw[key] = int(kw.pop(key))
for key in ("ssl_key", "ssl_cert", "ssl_ca", "ssl_capath"):
if key in kw:
if "ssl" not in self.kw:
self.kw["ssl"] = {}
self.kw["ssl"][key[4:]] = kw.pop(key)
if driver == 'connector':
for key in ("ssl_key", "ssl_cert", "ssl_ca", "ssl_capath"):
if key in kw:
self.kw[key] = kw.pop(key)
else:
for key in ("ssl_key", "ssl_cert", "ssl_ca", "ssl_capath"):
if key in kw:
if "ssl" not in self.kw:
self.kw["ssl"] = {}
self.kw["ssl"][key[4:]] = kw.pop(key)
if "charset" in kw:
self.dbEncoding = self.kw["charset"] = kw.pop("charset")
else:
......
......@@ -38,18 +38,9 @@ class PostgresConnection(DBAPI):
if not driver:
continue
try:
if driver == 'psycopg2':
if driver in ('psycopg', 'psycopg2'):
import psycopg2 as psycopg
self.module = psycopg
elif driver == 'psycopg1':
import psycopg
self.module = psycopg
elif driver == 'psycopg':
try:
import psycopg2 as psycopg
except ImportError:
import psycopg
self.module = psycopg
elif driver == 'pygresql':
import pgdb
self.module = pgdb
......@@ -74,7 +65,7 @@ class PostgresConnection(DBAPI):
else:
raise ValueError(
'Unknown PostgreSQL driver "%s", '
'expected psycopg, psycopg2, psycopg1, '
'expected psycopg, psycopg2, '
'pygresql, pypostgresql, pg8000, '
'odbc, pyodbc or pypyodbc' % driver)
except ImportError:
......
import pytest
from sqlobject import SQLObject, SQLObjectNotFound, StringCol
from sqlobject.tests.dbtest import raises, setupClass, supports
from sqlobject import events
from sqlobject.main import sqlmeta
########################################
# Transaction test
......@@ -24,7 +25,25 @@ class SOTestSOTrans(SQLObject):
name = StringCol(length=10, alternateID=True, dbName='name_col')
def make_watcher():
log = []
def watch(*args):
log.append(args)
watch.log = log
return watch
def make_listen(signal):
watcher = make_watcher()
events.listen(watcher, sqlmeta, signal)
return watcher
def test_transaction():
commit_watcher = make_listen(events.CommitSignal)
rollback_watcher = make_listen(events.RollbackSignal)
setupClass(SOTestSOTrans)
SOTestSOTrans(name='bob')
SOTestSOTrans(name='tim')
......@@ -44,6 +63,14 @@ def test_transaction():
trans.rollback()
trans.begin()
assert b.name == 'robert'
assert len(commit_watcher.log) == 1
assert commit_watcher.log[0][0][0][0] == 'SOTestSOTrans'
assert commit_watcher.log[0][0][0][1] == [1, 2]
assert len(rollback_watcher.log) == 2
assert rollback_watcher.log[0][0][0][0] == 'SOTestSOTrans'
assert rollback_watcher.log[0][0][0][1] == [3]
assert rollback_watcher.log[1][0][0][0] == 'SOTestSOTrans'
assert rollback_watcher.log[1][0][0][1] == [1, 2]
finally:
SOTestSOTrans._connection.autoCommit = True
......
......@@ -23,7 +23,7 @@ deps =
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: pymysql
postgres-psycopg: psycopg2
postgres-psycopg: psycopg2-binary
postgres-pygresql: pygresql
pypostgresql: git+https://github.com/sqlobject/py-postgresql.git@fix_w32#egg=pypostgresql
postgres-pg8000: git+https://github.com/sqlobject/pg8000.git@getuser#egg=pg8000
......