Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-databases for
openSUSE:Factory checked in at 2021-04-15 16:57:37
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-databases (Old)
and /work/SRC/openSUSE:Factory/.python-databases.new.12324 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-databases"
Thu Apr 15 16:57:37 2021 rev:3 rq:885363 version:0.4.3
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-databases/python-databases.changes
2021-01-22 21:52:03.001825766 +0100
+++
/work/SRC/openSUSE:Factory/.python-databases.new.12324/python-databases.changes
2021-04-15 16:58:19.318760186 +0200
@@ -1,0 +2,9 @@
+Tue Apr 13 21:28:51 UTC 2021 - [email protected]
+
+- update to version 0.4.3
+ * Pin SQLAlchemy to < 1.4 (#314)
+- version 0.4.2
+ * Fix memory leak with asyncpg for SQLAlchemy generic functions (#273)
+- fix python version to "< 3.7" for aiocontextvars
+
+-------------------------------------------------------------------
Old:
----
databases-0.4.1.tar.gz
New:
----
databases-0.4.3.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-databases.spec ++++++
--- /var/tmp/diff_new_pack.Pj1T71/_old 2021-04-15 16:58:19.814760971 +0200
+++ /var/tmp/diff_new_pack.Pj1T71/_new 2021-04-15 16:58:19.818760977 +0200
@@ -19,7 +19,7 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define skip_python2 1
Name: python-databases
-Version: 0.4.1
+Version: 0.4.3
Release: 0
Summary: Async database support for Python
License: BSD-3-Clause
@@ -28,7 +28,7 @@
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
-Requires: python-sqlalchemy
+Requires: python-sqlalchemy >= 1.3
Suggests: python-aiocontextvars
Suggests: python-aiomysql
Suggests: python-aiopg
@@ -40,8 +40,8 @@
BuildRequires: %{python_module asyncpg}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module requests}
-BuildRequires: %{python_module sqlalchemy}
-BuildRequires: (python3-aiocontextvars if python3-base <= 3.6)
+BuildRequires: %{python_module sqlalchemy >= 1.3}
+BuildRequires: (python3-aiocontextvars if python3-base < 3.7)
BuildRequires: (python36-aiocontextvars if python36-base)
# /SECTION
%python_subpackages
++++++ databases-0.4.1.tar.gz -> databases-0.4.3.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/databases-0.4.1/.github/workflows/test-suite.yml
new/databases-0.4.3/.github/workflows/test-suite.yml
--- old/databases-0.4.1/.github/workflows/test-suite.yml 2020-11-16
21:48:29.000000000 +0100
+++ new/databases-0.4.3/.github/workflows/test-suite.yml 2021-03-26
16:17:54.000000000 +0100
@@ -47,5 +47,5 @@
run: "scripts/install"
- name: "Run tests"
env:
- TEST_DATABASE_URLS: "sqlite:///testsuite,
mysql://username:password@localhost:3306/testsuite,
postgresql://username:password@localhost:5432/testsuite,
postgresql+aiopg://username:password@localhost:5432/testsuite"
+ TEST_DATABASE_URLS: "sqlite:///testsuite,
mysql://username:password@localhost:3306/testsuite,
postgresql://username:password@localhost:5432/testsuite,
postgresql+aiopg://username:[email protected]:5432/testsuite"
run: "scripts/test"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/databases-0.4.1/CHANGELOG.md
new/databases-0.4.3/CHANGELOG.md
--- old/databases-0.4.1/CHANGELOG.md 2020-11-16 21:48:29.000000000 +0100
+++ new/databases-0.4.3/CHANGELOG.md 2021-03-26 16:17:54.000000000 +0100
@@ -4,7 +4,19 @@
The format is based on [Keep a
Changelog](https://keepachangelog.com/en/1.0.0/).
-## 0.4.1 (October 21st, 2020)
+## 0.4.3 (March 26th, 2021)
+
+### Fixed
+
+* Pin SQLAlchemy to 1.13.* (#314)
+
+## 0.4.2 (March 14th, 2021)
+
+### Fixed
+
+* Fix memory leak with asyncpg for SQLAlchemy generic functions (#273)
+
+## 0.4.1 (November 16th, 2020)
### Fixed
@@ -28,4 +40,3 @@
* Fix SQLAlchemy DDL statements (#226)
* Make fetch_val call fetch_one for type conversion (#246)
* Unquote username and password in DatabaseURL (#248)
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/databases-0.4.1/databases/__init__.py
new/databases-0.4.3/databases/__init__.py
--- old/databases-0.4.1/databases/__init__.py 2020-11-16 21:48:29.000000000
+0100
+++ new/databases-0.4.3/databases/__init__.py 2021-03-26 16:17:54.000000000
+0100
@@ -1,4 +1,4 @@
from databases.core import Database, DatabaseURL
-__version__ = "0.4.1"
+__version__ = "0.4.3"
__all__ = ["Database", "DatabaseURL"]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/databases-0.4.1/databases/backends/postgres.py
new/databases-0.4.3/databases/backends/postgres.py
--- old/databases-0.4.1/databases/backends/postgres.py 2020-11-16
21:48:29.000000000 +0100
+++ new/databases-0.4.3/databases/backends/postgres.py 2021-03-26
16:17:54.000000000 +0100
@@ -16,9 +16,6 @@
logger = logging.getLogger("databases")
-_result_processors = {} # type: dict
-
-
class PostgresBackend(DatabaseBackend):
def __init__(
self, database_url: typing.Union[DatabaseURL, str], **options:
typing.Any
@@ -44,7 +41,7 @@
def _get_connection_kwargs(self) -> dict:
url_options = self._database_url.options
- kwargs = {}
+ kwargs = {} # type: typing.Dict[str, typing.Any]
min_size = url_options.get("min_size")
max_size = url_options.get("max_size")
ssl = url_options.get("ssl")
@@ -62,15 +59,15 @@
async def connect(self) -> None:
assert self._pool is None, "DatabaseBackend is already running"
- kwargs = self._get_connection_kwargs()
- self._pool = await asyncpg.create_pool(
+ kwargs = dict(
host=self._database_url.hostname,
port=self._database_url.port,
user=self._database_url.username,
password=self._database_url.password,
database=self._database_url.database,
- **kwargs,
)
+ kwargs.update(self._get_connection_kwargs())
+ self._pool = await asyncpg.create_pool(**kwargs)
async def disconnect(self) -> None:
assert self._pool is not None, "DatabaseBackend is not running"
@@ -120,11 +117,7 @@
else:
idx, datatype = self._column_map[key]
raw = self._row[idx]
- try:
- processor = _result_processors[datatype]
- except KeyError:
- processor = datatype.result_processor(self._dialect, None)
- _result_processors[datatype] = processor
+ processor = datatype._cached_result_processor(self._dialect, None)
if processor is not None:
return processor(raw)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/databases-0.4.1/requirements.txt
new/databases-0.4.3/requirements.txt
--- old/databases-0.4.1/requirements.txt 2020-11-16 21:48:29.000000000
+0100
+++ new/databases-0.4.3/requirements.txt 2021-03-26 16:17:54.000000000
+0100
@@ -1,8 +1,7 @@
# Notes...
# The JSONField tests require sqlalchemy 1.3+. Other cases work at lower
versions.
# The aiocontextvars package is only required as a backport for Python 3.6.
-sqlalchemy>=1.3.0
-aiocontextvars;python_version<"3.7"
+-e .
# Async database drivers
aiomysql
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/databases-0.4.1/setup.py new/databases-0.4.3/setup.py
--- old/databases-0.4.1/setup.py 2020-11-16 21:48:29.000000000 +0100
+++ new/databases-0.4.3/setup.py 2021-03-26 16:17:54.000000000 +0100
@@ -48,7 +48,7 @@
packages=get_packages("databases"),
package_data={"databases": ["py.typed"]},
data_files=[("", ["LICENSE.md"])],
- install_requires=["sqlalchemy", 'aiocontextvars;python_version<"3.7"'],
+ install_requires=['sqlalchemy<1.4', 'aiocontextvars;python_version<"3.7"'],
extras_require={
"postgresql": ["asyncpg"],
"mysql": ["aiomysql"],
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/databases-0.4.1/tests/test_connection_options.py
new/databases-0.4.3/tests/test_connection_options.py
--- old/databases-0.4.1/tests/test_connection_options.py 2020-11-16
21:48:29.000000000 +0100
+++ new/databases-0.4.3/tests/test_connection_options.py 2021-03-26
16:17:54.000000000 +0100
@@ -43,6 +43,24 @@
assert kwargs == {"ssl": True}
+def test_postgres_no_extra_options():
+ backend = PostgresBackend("postgres://localhost/database")
+ kwargs = backend._get_connection_kwargs()
+ assert kwargs == {}
+
+
+def test_postgres_password_as_callable():
+ def gen_password():
+ return "Foo"
+
+ backend = PostgresBackend(
+ "postgres://:password@localhost/database", password=gen_password
+ )
+ kwargs = backend._get_connection_kwargs()
+ assert kwargs == {"password": gen_password}
+ assert kwargs["password"]() == "Foo"
+
+
def test_mysql_pool_size():
backend = MySQLBackend("mysql://localhost/database?min_size=1&max_size=20")
kwargs = backend._get_connection_kwargs()