Hello community,
here is the log from the commit of package python-SQLAlchemy-Utils for
openSUSE:Factory checked in at 2020-06-10 00:47:33
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-SQLAlchemy-Utils (Old)
and /work/SRC/openSUSE:Factory/.python-SQLAlchemy-Utils.new.3606 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-SQLAlchemy-Utils"
Wed Jun 10 00:47:33 2020 rev:27 rq:812913 version:0.36.6
Changes:
--------
---
/work/SRC/openSUSE:Factory/python-SQLAlchemy-Utils/python-SQLAlchemy-Utils.changes
2020-05-11 13:44:02.193461053 +0200
+++
/work/SRC/openSUSE:Factory/.python-SQLAlchemy-Utils.new.3606/python-SQLAlchemy-Utils.changes
2020-06-10 00:47:35.626815897 +0200
@@ -1,0 +2,13 @@
+Tue Jun 9 12:14:36 UTC 2020 - Tomáš Chvátal <[email protected]>
+
+- Add missing deps
+- Reenable testsuite by skipping the tests needing pgsql
+
+-------------------------------------------------------------------
+Mon Jun 8 13:33:49 UTC 2020 - Dirk Mueller <[email protected]>
+
+- update to 0.36.6:
+ - Reverted #426 and added support for Legacy Encrypted Type (#450, pull
request courtesy of rushilsrivastava)
+ - Added psycopg2cffi support for create_database and drop_database (#447,
pull request courtesy of DominicBurkart)
+
+-------------------------------------------------------------------
Old:
----
SQLAlchemy-Utils-0.36.5.tar.gz
New:
----
SQLAlchemy-Utils-0.36.6.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-SQLAlchemy-Utils.spec ++++++
--- /var/tmp/diff_new_pack.tt0FFC/_old 2020-06-10 00:47:36.486818147 +0200
+++ /var/tmp/diff_new_pack.tt0FFC/_new 2020-06-10 00:47:36.490818157 +0200
@@ -19,26 +19,33 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define skip_python2 1
Name: python-SQLAlchemy-Utils
-Version: 0.36.5
+Version: 0.36.6
Release: 0
Summary: Various utility functions for SQLAlchemy
License: BSD-3-Clause
URL: https://github.com/kvesteri/sqlalchemy-utils
Source:
https://files.pythonhosted.org/packages/source/S/SQLAlchemy-Utils/SQLAlchemy-Utils-%{version}.tar.gz
BuildRequires: %{python_module Babel >= 1.3}
+BuildRequires: %{python_module Jinja2 >= 2.3}
+BuildRequires: %{python_module Pygments >= 1.2}
BuildRequires: %{python_module SQLAlchemy >= 1.0}
BuildRequires: %{python_module anyjson >= 0.3.3}
BuildRequires: %{python_module arrow >= 0.3.4}
BuildRequires: %{python_module colour >= 0.0.4}
BuildRequires: %{python_module cryptography >= 0.6}
+BuildRequires: %{python_module docutils >= 0.10}
BuildRequires: %{python_module flexmock >= 0.9.7}
BuildRequires: %{python_module furl >= 0.4.1}
BuildRequires: %{python_module intervals >= 0.7.1}
-BuildRequires: %{python_module mock}
+BuildRequires: %{python_module mock >= 2.0.0}
BuildRequires: %{python_module passlib >= 1.6}
+BuildRequires: %{python_module pendulum >= 2.0.5}
BuildRequires: %{python_module phonenumbers >= 5.9.2}
+BuildRequires: %{python_module psycopg2 >= 2.5.1}
+BuildRequires: %{python_module psycopg2cffi >= 2.8.1}
+BuildRequires: %{python_module pyodbc}
BuildRequires: %{python_module pytest >= 2.7.1}
-BuildRequires: %{python_module python-dateutil}
+BuildRequires: %{python_module python-dateutil >= 2.6}
BuildRequires: %{python_module pytz >= 2014.2}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module six}
@@ -55,6 +62,7 @@
Recommends: python-furl >= 0.4.1
Recommends: python-intervals >= 0.7.1
Recommends: python-passlib >= 1.6
+Recommends: python-pendulum >= 2.0.5
Recommends: python-phonenumbers >= 5.9.2
BuildArch: noarch
%python_subpackages
@@ -73,8 +81,23 @@
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
-# requires initialized pgsql database
-#%%pytest
+# needs running pgsql / mssql / mysql
+rm tests/test_asserts.py
+rm tests/test_translation_hybrid.py
+rm tests/aggregate/test_o2m_o2m_o2m.py
+rm tests/aggregate/test_search_vectors.py
+rm tests/aggregate/test_with_ondelete_cascade.py
+rm tests/observes/test_column_property.py
+rm tests/observes/test_m2m_m2m_m2m.py
+rm tests/observes/test_o2m_o2o_o2m.py
+rm tests/observes/test_o2m_o2m_o2m.py
+rm tests/observes/test_o2o_o2o.py
+rm tests/observes/test_o2o_o2o_o2o.py
+rm tests/relationships/test_select_correlated_expression.py
+rm tests/types/test_composite.py
+rm tests/types/test_ltree.py
+rm tests/types/test_tsvector.py
+%pytest -k 'not (TestDatabasePostgres or TestDatabaseMssql or OnPostgres or
OnMysql or TestPostgres or TestMysql or TestSortQueryRelationshipCounts or
TestSortQueryWithPolymorphicInheritance or TestMaterializedViews or
TestLazyEvaluatedSelectExpressionsForAggregates or
TestAggregatesWithManyToManyRelationships or
TestAggregateManyToManyAndManyToMany or TestAggregateOneToManyAndOneToMany or
TestJSONSQL or TestJSONBSQL or TestSortQueryWithCustomPolymorphic or
TestAggregateOneToManyAndManyToMany or test_timezone)'
%files %{python_files}
%license LICENSE
++++++ SQLAlchemy-Utils-0.36.5.tar.gz -> SQLAlchemy-Utils-0.36.6.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/SQLAlchemy-Utils-0.36.5/CHANGES.rst
new/SQLAlchemy-Utils-0.36.6/CHANGES.rst
--- old/SQLAlchemy-Utils-0.36.5/CHANGES.rst 2020-05-03 20:11:20.000000000
+0200
+++ new/SQLAlchemy-Utils-0.36.6/CHANGES.rst 2020-05-24 20:29:41.000000000
+0200
@@ -4,6 +4,13 @@
Here you can see the full list of changes between each SQLAlchemy-Utils
release.
+0.36.6 (2020-05-24)
+^^^^^^^^^^^^^^^^^^^
+
+- Reverted #426 and added support for Legacy Encrypted Type (#450, pull
request courtesy of rushilsrivastava)
+- Added psycopg2cffi support for create_database and drop_database (#447, pull
request courtesy of DominicBurkart)
+
+
0.36.5 (2020-05-03)
^^^^^^^^^^^^^^^^^^^
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/SQLAlchemy-Utils-0.36.5/PKG-INFO
new/SQLAlchemy-Utils-0.36.6/PKG-INFO
--- old/SQLAlchemy-Utils-0.36.5/PKG-INFO 2020-05-03 20:21:42.000000000
+0200
+++ new/SQLAlchemy-Utils-0.36.6/PKG-INFO 2020-05-24 20:36:31.000000000
+0200
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: SQLAlchemy-Utils
-Version: 0.36.5
+Version: 0.36.6
Summary: Various utility functions for SQLAlchemy.
Home-page: https://github.com/kvesteri/sqlalchemy-utils
Author: Konsta Vesterinen, Ryan Leckey, Janne Vanhala, Vesa Uimonen
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/SQLAlchemy-Utils-0.36.5/SQLAlchemy_Utils.egg-info/PKG-INFO
new/SQLAlchemy-Utils-0.36.6/SQLAlchemy_Utils.egg-info/PKG-INFO
--- old/SQLAlchemy-Utils-0.36.5/SQLAlchemy_Utils.egg-info/PKG-INFO
2020-05-03 20:21:42.000000000 +0200
+++ new/SQLAlchemy-Utils-0.36.6/SQLAlchemy_Utils.egg-info/PKG-INFO
2020-05-24 20:36:30.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: SQLAlchemy-Utils
-Version: 0.36.5
+Version: 0.36.6
Summary: Various utility functions for SQLAlchemy.
Home-page: https://github.com/kvesteri/sqlalchemy-utils
Author: Konsta Vesterinen, Ryan Leckey, Janne Vanhala, Vesa Uimonen
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/SQLAlchemy-Utils-0.36.5/SQLAlchemy_Utils.egg-info/requires.txt
new/SQLAlchemy-Utils-0.36.6/SQLAlchemy_Utils.egg-info/requires.txt
--- old/SQLAlchemy-Utils-0.36.5/SQLAlchemy_Utils.egg-info/requires.txt
2020-05-03 20:21:42.000000000 +0200
+++ new/SQLAlchemy-Utils-0.36.6/SQLAlchemy_Utils.egg-info/requires.txt
2020-05-24 20:36:30.000000000 +0200
@@ -40,6 +40,7 @@
flexmock>=0.9.7
mock==2.0.0
psycopg2>=2.5.1
+psycopg2cffi>=2.8.1
pg8000>=1.12.4
pytz>=2014.2
python-dateutil>=2.6
@@ -65,6 +66,7 @@
flexmock>=0.9.7
mock==2.0.0
psycopg2>=2.5.1
+psycopg2cffi>=2.8.1
pg8000>=1.12.4
pytz>=2014.2
python-dateutil>=2.6
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/SQLAlchemy-Utils-0.36.5/setup.py
new/SQLAlchemy-Utils-0.36.6/setup.py
--- old/SQLAlchemy-Utils-0.36.5/setup.py 2020-05-03 19:55:01.000000000
+0200
+++ new/SQLAlchemy-Utils-0.36.6/setup.py 2020-05-24 20:27:07.000000000
+0200
@@ -31,6 +31,7 @@
'flexmock>=0.9.7',
'mock==2.0.0',
'psycopg2>=2.5.1',
+ 'psycopg2cffi>=2.8.1',
'pg8000>=1.12.4',
'pytz>=2014.2',
'python-dateutil>=2.6',
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/SQLAlchemy-Utils-0.36.5/sqlalchemy_utils/__init__.py
new/SQLAlchemy-Utils-0.36.6/sqlalchemy_utils/__init__.py
--- old/SQLAlchemy-Utils-0.36.5/sqlalchemy_utils/__init__.py 2020-05-03
19:57:02.000000000 +0200
+++ new/SQLAlchemy-Utils-0.36.6/sqlalchemy_utils/__init__.py 2020-05-24
20:19:30.000000000 +0200
@@ -103,4 +103,4 @@
refresh_materialized_view
)
-__version__ = '0.36.5'
+__version__ = '0.36.6'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/SQLAlchemy-Utils-0.36.5/sqlalchemy_utils/functions/database.py
new/SQLAlchemy-Utils-0.36.6/sqlalchemy_utils/functions/database.py
--- old/SQLAlchemy-Utils-0.36.5/sqlalchemy_utils/functions/database.py
2020-04-30 09:45:37.000000000 +0200
+++ new/SQLAlchemy-Utils-0.36.6/sqlalchemy_utils/functions/database.py
2020-05-24 20:27:07.000000000 +0200
@@ -546,12 +546,6 @@
result_proxy = None
if engine.dialect.name == 'postgresql':
- if engine.driver == 'psycopg2':
- from psycopg2.extensions import ISOLATION_LEVEL_AUTOCOMMIT
- engine.raw_connection().set_isolation_level(
- ISOLATION_LEVEL_AUTOCOMMIT
- )
-
if not template:
template = 'template1'
@@ -560,7 +554,19 @@
encoding,
quote(engine, template)
)
- result_proxy = engine.execute(text)
+
+ if engine.driver == 'psycopg2cffi':
+ connection = engine.connect()
+ connection.connection.set_session(autocommit=True)
+ connection.execute(text)
+ else:
+ if engine.driver == 'psycopg2':
+ from psycopg2.extensions import ISOLATION_LEVEL_AUTOCOMMIT
+ engine.raw_connection().set_isolation_level(
+ ISOLATION_LEVEL_AUTOCOMMIT
+ )
+
+ result_proxy = engine.execute(text)
elif engine.dialect.name == 'mysql':
text = "CREATE DATABASE {0} CHARACTER SET = '{1}'".format(
@@ -619,11 +625,19 @@
if database:
os.remove(database)
- elif engine.dialect.name == 'postgresql' and engine.driver == 'psycopg2':
- from psycopg2.extensions import ISOLATION_LEVEL_AUTOCOMMIT
-
- connection = engine.connect()
- connection.connection.set_isolation_level(ISOLATION_LEVEL_AUTOCOMMIT)
+ elif (
+ engine.dialect.name == 'postgresql' and
+ engine.driver in {'psycopg2', 'psycopg2cffi'}
+ ):
+ if engine.driver == 'psycopg2':
+ from psycopg2.extensions import ISOLATION_LEVEL_AUTOCOMMIT
+ connection = engine.connect()
+ connection.connection.set_isolation_level(
+ ISOLATION_LEVEL_AUTOCOMMIT
+ )
+ else:
+ connection = engine.connect()
+ connection.connection.set_session(autocommit=True)
# Disconnect all users from the database we are dropping.
version = connection.dialect.server_version_info
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/SQLAlchemy-Utils-0.36.5/sqlalchemy_utils/types/encrypted/encrypted_type.py
new/SQLAlchemy-Utils-0.36.6/sqlalchemy_utils/types/encrypted/encrypted_type.py
---
old/SQLAlchemy-Utils-0.36.5/sqlalchemy_utils/types/encrypted/encrypted_type.py
2020-05-03 20:08:22.000000000 +0200
+++
new/SQLAlchemy-Utils-0.36.6/sqlalchemy_utils/types/encrypted/encrypted_type.py
2020-05-24 20:18:13.000000000 +0200
@@ -3,9 +3,10 @@
import datetime
import json
import os
+import warnings
import six
-from sqlalchemy.types import String, TypeDecorator
+from sqlalchemy.types import LargeBinary, String, TypeDecorator
from sqlalchemy_utils.exceptions import ImproperlyConfigured
from sqlalchemy_utils.types.encrypted.padding import PADDING_MECHANISM
@@ -25,7 +26,6 @@
except ImportError:
pass
-
dateutil = None
try:
import dateutil
@@ -221,7 +221,7 @@
return decrypted
-class EncryptedType(TypeDecorator, ScalarCoercible):
+class StringEncryptedType(TypeDecorator, ScalarCoercible):
"""
EncryptedType provides a way to encrypt and decrypt values,
to and from databases, that their type is a basic SQLAlchemy type.
@@ -355,7 +355,7 @@
raise ImproperlyConfigured(
"'cryptography' is required to use EncryptedType"
)
- super(EncryptedType, self).__init__(**kwargs)
+ super(StringEncryptedType, self).__init__(**kwargs)
# set the underlying type
if type_in is None:
type_in = String()
@@ -446,6 +446,30 @@
return value
+class EncryptedType(StringEncryptedType):
+ impl = LargeBinary
+
+ def __init__(self, *args, **kwargs):
+ warnings.warn(
+ "The 'EncryptedType' class will change implementation from "
+ "'LargeBinary' to 'String' in a future version. Use "
+ "'StringEncryptedType' to use the 'String' implementation.",
+ DeprecationWarning)
+ super().__init__(*args, **kwargs)
+
+ def process_bind_param(self, value, dialect):
+ value = super().process_bind_param(value=value, dialect=dialect)
+ if isinstance(value, str):
+ value = value.encode()
+ return value
+
+ def process_result_value(self, value, dialect):
+ if isinstance(value, bytes):
+ value = value.decode()
+ value = super().process_result_value(value=value, dialect=dialect)
+ return value
+
+
class DatetimeHandler(object):
"""
DatetimeHandler is responsible for parsing strings and
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/SQLAlchemy-Utils-0.36.5/tests/functions/test_database.py
new/SQLAlchemy-Utils-0.36.6/tests/functions/test_database.py
--- old/SQLAlchemy-Utils-0.36.5/tests/functions/test_database.py
2019-06-09 14:59:02.000000000 +0200
+++ new/SQLAlchemy-Utils-0.36.6/tests/functions/test_database.py
2020-05-24 20:27:07.000000000 +0200
@@ -91,6 +91,16 @@
)
+class TestDatabasePostgresPsycoPG2CFFI(DatabaseTest):
+
+ @pytest.fixture
+ def dsn(self, postgresql_db_user):
+ return 'postgresql+psycopg2cffi://{0}@localhost/{1}'.format(
+ postgresql_db_user,
+ 'db_to_test_create_and_drop_via_psycopg2cffi_driver'
+ )
+
+
@pytest.mark.usefixtures('postgresql_dsn')
class TestDatabasePostgresWithQuotedName(DatabaseTest):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/SQLAlchemy-Utils-0.36.5/tests/types/encrypted/test_padding.py
new/SQLAlchemy-Utils-0.36.6/tests/types/encrypted/test_padding.py
--- old/SQLAlchemy-Utils-0.36.5/tests/types/encrypted/test_padding.py
2018-03-19 15:48:30.000000000 +0100
+++ new/SQLAlchemy-Utils-0.36.6/tests/types/encrypted/test_padding.py
2020-05-24 20:22:59.000000000 +0200
@@ -12,11 +12,11 @@
self.padder = PKCS5Padding(self.BLOCK_SIZE)
def test_various_lengths_roundtrip(self):
- for l in range(0, 3 * self.BLOCK_SIZE):
- val = b'*' * l
+ for number in range(0, 3 * self.BLOCK_SIZE):
+ val = b'*' * number
padded = self.padder.pad(val)
unpadded = self.padder.unpad(padded)
- assert val == unpadded, 'Round trip error for length %d' % l
+ assert val == unpadded, 'Round trip error for length %d' % number
def test_invalid_unpad(self):
with pytest.raises(InvalidPaddingError):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/SQLAlchemy-Utils-0.36.5/tests/types/test_encrypted.py
new/SQLAlchemy-Utils-0.36.6/tests/types/test_encrypted.py
--- old/SQLAlchemy-Utils-0.36.5/tests/types/test_encrypted.py 2020-05-03
20:08:22.000000000 +0200
+++ new/SQLAlchemy-Utils-0.36.6/tests/types/test_encrypted.py 2020-05-24
20:21:58.000000000 +0200
@@ -474,11 +474,13 @@
self.engine._initialize_engine(TestAesGcmEngine.KEY)
def test_roundtrip(self):
- for l in range(0, 36):
- plaintext = '0123456789abcdefghijklmnopqrstuvwxyz'[:l]
+ for number in range(0, 36):
+ plaintext = '0123456789abcdefghijklmnopqrstuvwxyz'[:number]
encrypted = self.engine.encrypt(plaintext)
decrypted = self.engine.decrypt(encrypted)
- assert plaintext == decrypted, "Round-trip failed for len: %d" % l
+ assert plaintext == decrypted, (
+ "Round-trip failed for len: %d" % number
+ )
def test_modified_iv_fails_to_decrypt(self):
plaintext = 'abcdefgh'