Hello community,
here is the log from the commit of package python-SQLAlchemy-Utils for
openSUSE:Factory checked in at 2019-11-27 13:52:38
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-SQLAlchemy-Utils (Old)
and /work/SRC/openSUSE:Factory/.python-SQLAlchemy-Utils.new.26869 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-SQLAlchemy-Utils"
Wed Nov 27 13:52:38 2019 rev:21 rq:747338 version:0.35.0
Changes:
--------
---
/work/SRC/openSUSE:Factory/python-SQLAlchemy-Utils/python-SQLAlchemy-Utils.changes
2019-08-27 10:22:28.447935219 +0200
+++
/work/SRC/openSUSE:Factory/.python-SQLAlchemy-Utils.new.26869/python-SQLAlchemy-Utils.changes
2019-11-27 13:52:48.140396978 +0100
@@ -1,0 +2,7 @@
+Sat Nov 9 14:47:11 UTC 2019 - Arun Persaud <[email protected]>
+
+- update to version 0.35.0:
+ * Removed some deprecation warnings
+ * Added Int8RangeType (#401, pull request courtesy of lpsinger)
+
+-------------------------------------------------------------------
Old:
----
SQLAlchemy-Utils-0.34.2.tar.gz
New:
----
SQLAlchemy-Utils-0.35.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-SQLAlchemy-Utils.spec ++++++
--- /var/tmp/diff_new_pack.cD3ho2/_old 2019-11-27 13:52:48.820396413 +0100
+++ /var/tmp/diff_new_pack.cD3ho2/_new 2019-11-27 13:52:48.820396413 +0100
@@ -18,11 +18,10 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-SQLAlchemy-Utils
-Version: 0.34.2
+Version: 0.35.0
Release: 0
Summary: Various utility functions for SQLAlchemy
License: BSD-3-Clause
-Group: Development/Languages/Python
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}
++++++ SQLAlchemy-Utils-0.34.2.tar.gz -> SQLAlchemy-Utils-0.35.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/SQLAlchemy-Utils-0.34.2/CHANGES.rst
new/SQLAlchemy-Utils-0.35.0/CHANGES.rst
--- old/SQLAlchemy-Utils-0.34.2/CHANGES.rst 2019-08-20 14:00:48.000000000
+0200
+++ new/SQLAlchemy-Utils-0.35.0/CHANGES.rst 2019-11-01 11:20:21.000000000
+0100
@@ -4,6 +4,13 @@
Here you can see the full list of changes between each SQLAlchemy-Utils
release.
+0.35.0 (2019-11-01)
+^^^^^^^^^^^^^^^^^^^
+
+- Removed some deprecation warnings
+- Added Int8RangeType (#401, pull request courtesy of lpsinger)
+
+
0.34.2 (2019-08-20)
^^^^^^^^^^^^^^^^^^^
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/SQLAlchemy-Utils-0.34.2/PKG-INFO
new/SQLAlchemy-Utils-0.35.0/PKG-INFO
--- old/SQLAlchemy-Utils-0.34.2/PKG-INFO 2019-08-20 14:13:22.000000000
+0200
+++ new/SQLAlchemy-Utils-0.35.0/PKG-INFO 2019-11-01 11:38:52.000000000
+0100
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: SQLAlchemy-Utils
-Version: 0.34.2
+Version: 0.35.0
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.34.2/SQLAlchemy_Utils.egg-info/PKG-INFO
new/SQLAlchemy-Utils-0.35.0/SQLAlchemy_Utils.egg-info/PKG-INFO
--- old/SQLAlchemy-Utils-0.34.2/SQLAlchemy_Utils.egg-info/PKG-INFO
2019-08-20 14:13:22.000000000 +0200
+++ new/SQLAlchemy-Utils-0.35.0/SQLAlchemy_Utils.egg-info/PKG-INFO
2019-11-01 11:38:52.000000000 +0100
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: SQLAlchemy-Utils
-Version: 0.34.2
+Version: 0.35.0
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.34.2/sqlalchemy_utils/__init__.py
new/SQLAlchemy-Utils-0.35.0/sqlalchemy_utils/__init__.py
--- old/SQLAlchemy-Utils-0.34.2/sqlalchemy_utils/__init__.py 2019-08-20
14:00:46.000000000 +0200
+++ new/SQLAlchemy-Utils-0.35.0/sqlalchemy_utils/__init__.py 2019-11-01
11:32:25.000000000 +0100
@@ -73,6 +73,7 @@
EncryptedType,
instrumented_list,
InstrumentedList,
+ Int8RangeType,
IntRangeType,
IPAddressType,
JSONType,
@@ -100,4 +101,4 @@
refresh_materialized_view
)
-__version__ = '0.34.2'
+__version__ = '0.35.0'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/SQLAlchemy-Utils-0.34.2/sqlalchemy_utils/observer.py
new/SQLAlchemy-Utils-0.35.0/sqlalchemy_utils/observer.py
--- old/SQLAlchemy-Utils-0.34.2/sqlalchemy_utils/observer.py 2016-12-18
10:08:56.000000000 +0100
+++ new/SQLAlchemy-Utils-0.35.0/sqlalchemy_utils/observer.py 2019-11-01
11:18:12.000000000 +0100
@@ -173,7 +173,7 @@
"""
import itertools
-from collections import defaultdict, Iterable, namedtuple
+from collections import defaultdict, namedtuple
import sqlalchemy as sa
@@ -181,6 +181,11 @@
from .path import AttrPath
from .utils import is_sequence
+try:
+ from collections.abc import Iterable
+except ImportError: # For python 2.7 support
+ from collections import Iterable
+
Callback = namedtuple('Callback', ['func', 'backref', 'fullpath'])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/SQLAlchemy-Utils-0.34.2/sqlalchemy_utils/types/__init__.py
new/SQLAlchemy-Utils-0.35.0/sqlalchemy_utils/types/__init__.py
--- old/SQLAlchemy-Utils-0.34.2/sqlalchemy_utils/types/__init__.py
2018-02-18 15:38:57.000000000 +0100
+++ new/SQLAlchemy-Utils-0.35.0/sqlalchemy_utils/types/__init__.py
2019-11-01 11:32:40.000000000 +0100
@@ -28,6 +28,7 @@
from .range import ( # noqa
DateRangeType,
DateTimeRangeType,
+ Int8RangeType,
IntRangeType,
NumericRangeType
)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/SQLAlchemy-Utils-0.34.2/sqlalchemy_utils/types/choice.py
new/SQLAlchemy-Utils-0.35.0/sqlalchemy_utils/types/choice.py
--- old/SQLAlchemy-Utils-0.34.2/sqlalchemy_utils/types/choice.py
2017-11-05 16:23:59.000000000 +0100
+++ new/SQLAlchemy-Utils-0.35.0/sqlalchemy_utils/types/choice.py
2019-11-01 11:18:12.000000000 +0100
@@ -29,6 +29,9 @@
def __unicode__(self):
return six.text_type(self.value)
+ def __str__(self):
+ return six.ensure_str(self.__unicode__())
+
def __repr__(self):
return 'Choice(code={code}, value={value})'.format(
code=self.code,
@@ -65,7 +68,7 @@
user = User(type=u'admin')
- user.type # Choice(type='admin', value=u'Admin')
+ user.type # Choice(code='admin', value=u'Admin')
Or::
@@ -109,7 +112,7 @@
user = User(type=u'admin')
- user.type # Choice(type='admin', value=u'Admin')
+ user.type # Choice(code='admin', value=u'Admin')
print user.type # u'Admin'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/SQLAlchemy-Utils-0.34.2/sqlalchemy_utils/types/range.py
new/SQLAlchemy-Utils-0.35.0/sqlalchemy_utils/types/range.py
--- old/SQLAlchemy-Utils-0.34.2/sqlalchemy_utils/types/range.py 2019-08-20
13:55:26.000000000 +0200
+++ new/SQLAlchemy-Utils-0.35.0/sqlalchemy_utils/types/range.py 2019-11-01
11:21:03.000000000 +0100
@@ -146,6 +146,7 @@
from sqlalchemy.dialects.postgresql import (
DATERANGE,
INT4RANGE,
+ INT8RANGE,
NUMRANGE,
TSRANGE
)
@@ -359,6 +360,58 @@
comparator_factory = IntRangeComparator
def __init__(self, *args, **kwargs):
+ super(IntRangeType, self).__init__(*args, **kwargs)
+ self.interval_class = intervals.IntInterval
+
+
+class Int8RangeType(RangeType):
+ """
+ Int8RangeType provides way for saving ranges of 8-byte integers into
+ database. On PostgreSQL this type maps to native INT8RANGE type while on
+ other drivers this maps to simple string column.
+
+ Example::
+
+
+ from sqlalchemy_utils import IntRangeType
+
+
+ class Event(Base):
+ __tablename__ = 'user'
+ id = sa.Column(sa.Integer, autoincrement=True)
+ name = sa.Column(sa.Unicode(255))
+ estimated_number_of_persons = sa.Column(Int8RangeType)
+
+
+ party = Event(name=u'party')
+
+ # we estimate the party to contain minium of 10 persons and at max
+ # 100 persons
+ party.estimated_number_of_persons = [10, 100]
+
+ print party.estimated_number_of_persons
+ # '10-100'
+
+
+ Int8RangeType returns the values as IntInterval objects. These objects
+ support many arithmetic operators::
+
+
+ meeting = Event(name=u'meeting')
+
+ meeting.estimated_number_of_persons = [20, 40]
+
+ total = (
+ meeting.estimated_number_of_persons +
+ party.estimated_number_of_persons
+ )
+ print total
+ # '30-140'
+ """
+ impl = INT8RANGE
+ comparator_factory = IntRangeComparator
+
+ def __init__(self, *args, **kwargs):
super(IntRangeType, self).__init__(*args, **kwargs)
self.interval_class = intervals.IntInterval
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/SQLAlchemy-Utils-0.34.2/tests/types/test_arrow.py
new/SQLAlchemy-Utils-0.35.0/tests/types/test_arrow.py
--- old/SQLAlchemy-Utils-0.34.2/tests/types/test_arrow.py 2016-05-11
13:24:06.000000000 +0200
+++ new/SQLAlchemy-Utils-0.35.0/tests/types/test_arrow.py 2019-11-01
11:16:50.000000000 +0100
@@ -39,7 +39,7 @@
def test_string_coercion(self, Article):
article = Article(
- created_at='1367900664'
+ created_at='2013-01-01'
)
assert article.created_at.year == 2013