Hello community,

here is the log from the commit of package python-SQLAlchemy-Utils for 
openSUSE:Factory checked in at 2019-12-13 12:04:19
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-SQLAlchemy-Utils (Old)
 and      /work/SRC/openSUSE:Factory/.python-SQLAlchemy-Utils.new.4691 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-SQLAlchemy-Utils"

Fri Dec 13 12:04:19 2019 rev:22 rq:756728 version:0.36.0

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/python-SQLAlchemy-Utils/python-SQLAlchemy-Utils.changes
  2019-11-27 13:52:48.140396978 +0100
+++ 
/work/SRC/openSUSE:Factory/.python-SQLAlchemy-Utils.new.4691/python-SQLAlchemy-Utils.changes
        2019-12-13 12:05:10.413384052 +0100
@@ -1,0 +2,7 @@
+Fri Dec 13 00:19:27 UTC 2019 - Arun Persaud <[email protected]>
+
+- update to version 0.36.0:
+  * Removed explain and explain_analyze due to the internal changes in
+    SQLAlchemy version 1.3.
+
+-------------------------------------------------------------------

Old:
----
  SQLAlchemy-Utils-0.35.0.tar.gz

New:
----
  SQLAlchemy-Utils-0.36.0.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-SQLAlchemy-Utils.spec ++++++
--- /var/tmp/diff_new_pack.8983sR/_old  2019-12-13 12:05:10.861383883 +0100
+++ /var/tmp/diff_new_pack.8983sR/_new  2019-12-13 12:05:10.861383883 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package python-SQLAlchemy-Utils
 #
-# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2019 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -18,7 +18,7 @@
 
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 Name:           python-SQLAlchemy-Utils
-Version:        0.35.0
+Version:        0.36.0
 Release:        0
 Summary:        Various utility functions for SQLAlchemy
 License:        BSD-3-Clause

++++++ SQLAlchemy-Utils-0.35.0.tar.gz -> SQLAlchemy-Utils-0.36.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/SQLAlchemy-Utils-0.35.0/CHANGES.rst 
new/SQLAlchemy-Utils-0.36.0/CHANGES.rst
--- old/SQLAlchemy-Utils-0.35.0/CHANGES.rst     2019-11-01 11:20:21.000000000 
+0100
+++ new/SQLAlchemy-Utils-0.36.0/CHANGES.rst     2019-12-08 18:38:14.000000000 
+0100
@@ -4,6 +4,12 @@
 Here you can see the full list of changes between each SQLAlchemy-Utils 
release.
 
 
+0.36.0 (2019-12-08)
+^^^^^^^^^^^^^^^^^^^
+
+- Removed explain and explain_analyze due to the internal changes in 
SQLAlchemy version 1.3.
+
+
 0.35.0 (2019-11-01)
 ^^^^^^^^^^^^^^^^^^^
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/SQLAlchemy-Utils-0.35.0/PKG-INFO 
new/SQLAlchemy-Utils-0.36.0/PKG-INFO
--- old/SQLAlchemy-Utils-0.35.0/PKG-INFO        2019-11-01 11:38:52.000000000 
+0100
+++ new/SQLAlchemy-Utils-0.36.0/PKG-INFO        2019-12-08 18:38:54.000000000 
+0100
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: SQLAlchemy-Utils
-Version: 0.35.0
+Version: 0.36.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.35.0/SQLAlchemy_Utils.egg-info/PKG-INFO 
new/SQLAlchemy-Utils-0.36.0/SQLAlchemy_Utils.egg-info/PKG-INFO
--- old/SQLAlchemy-Utils-0.35.0/SQLAlchemy_Utils.egg-info/PKG-INFO      
2019-11-01 11:38:52.000000000 +0100
+++ new/SQLAlchemy-Utils-0.36.0/SQLAlchemy_Utils.egg-info/PKG-INFO      
2019-12-08 18:38:54.000000000 +0100
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: SQLAlchemy-Utils
-Version: 0.35.0
+Version: 0.36.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.35.0/SQLAlchemy_Utils.egg-info/SOURCES.txt 
new/SQLAlchemy-Utils-0.36.0/SQLAlchemy_Utils.egg-info/SOURCES.txt
--- old/SQLAlchemy-Utils-0.35.0/SQLAlchemy_Utils.egg-info/SOURCES.txt   
2019-11-01 11:38:52.000000000 +0100
+++ new/SQLAlchemy-Utils-0.36.0/SQLAlchemy_Utils.egg-info/SOURCES.txt   
2019-12-08 18:38:54.000000000 +0100
@@ -122,7 +122,6 @@
 tests/aggregate/test_with_column_alias.py
 tests/aggregate/test_with_ondelete_cascade.py
 tests/functions/__init__.py
-tests/functions/test_analyze.py
 tests/functions/test_cast_if.py
 tests/functions/test_database.py
 tests/functions/test_dependent_objects.py
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/SQLAlchemy-Utils-0.35.0/sqlalchemy_utils/__init__.py 
new/SQLAlchemy-Utils-0.36.0/sqlalchemy_utils/__init__.py
--- old/SQLAlchemy-Utils-0.35.0/sqlalchemy_utils/__init__.py    2019-11-01 
11:32:25.000000000 +0100
+++ new/SQLAlchemy-Utils-0.36.0/sqlalchemy_utils/__init__.py    2019-12-08 
18:38:14.000000000 +0100
@@ -9,7 +9,6 @@
 from .exceptions import ImproperlyConfigured  # noqa
 from .expressions import Asterisk, row_to_json  # noqa
 from .functions import (  # noqa
-    analyze,
     cast_if,
     create_database,
     create_mock_engine,
@@ -101,4 +100,4 @@
     refresh_materialized_view
 )
 
-__version__ = '0.35.0'
+__version__ = '0.36.0'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/SQLAlchemy-Utils-0.35.0/sqlalchemy_utils/expressions.py 
new/SQLAlchemy-Utils-0.36.0/sqlalchemy_utils/expressions.py
--- old/SQLAlchemy-Utils-0.35.0/sqlalchemy_utils/expressions.py 2019-06-09 
14:58:48.000000000 +0200
+++ new/SQLAlchemy-Utils-0.36.0/sqlalchemy_utils/expressions.py 2019-12-08 
18:38:14.000000000 +0100
@@ -1,74 +1,12 @@
 import sqlalchemy as sa
 from sqlalchemy.dialects import postgresql
 from sqlalchemy.ext.compiler import compiles
-from sqlalchemy.sql.expression import (
-    _literal_as_text,
-    ClauseElement,
-    ColumnElement,
-    Executable,
-    FunctionElement
-)
+from sqlalchemy.sql.expression import ColumnElement, FunctionElement
 from sqlalchemy.sql.functions import GenericFunction
 
 from .functions.orm import quote
 
 
-class explain(Executable, ClauseElement):
-    """
-    Define EXPLAIN element.
-
-    http://www.postgresql.org/docs/devel/static/sql-explain.html
-    """
-    def __init__(
-        self,
-        stmt,
-        analyze=False,
-        verbose=False,
-        costs=True,
-        buffers=False,
-        timing=True,
-        format='text'
-    ):
-        self.statement = _literal_as_text(stmt)
-        self.analyze = analyze
-        self.verbose = verbose
-        self.costs = costs
-        self.buffers = buffers
-        self.timing = timing
-        self.format = format
-
-
-class explain_analyze(explain):
-    def __init__(self, stmt, **kwargs):
-        super(explain_analyze, self).__init__(
-            stmt,
-            analyze=True,
-            **kwargs
-        )
-
-
-@compiles(explain, 'postgresql')
-def pg_explain(element, compiler, **kw):
-    text = "EXPLAIN "
-    options = []
-    if element.analyze:
-        options.append('ANALYZE true')
-    if not element.timing:
-        options.append('TIMING false')
-    if element.buffers:
-        options.append('BUFFERS true')
-    if element.format != 'text':
-        options.append('FORMAT %s' % element.format)
-    if element.verbose:
-        options.append('VERBOSE true')
-    if not element.costs:
-        options.append('COSTS false')
-    if options:
-        text += '(%s) ' % ', '.join(options)
-    text += compiler.process(element.statement)
-    return text
-
-
 class array_get(FunctionElement):
     name = 'array_get'
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/SQLAlchemy-Utils-0.35.0/sqlalchemy_utils/functions/__init__.py 
new/SQLAlchemy-Utils-0.36.0/sqlalchemy_utils/functions/__init__.py
--- old/SQLAlchemy-Utils-0.35.0/sqlalchemy_utils/functions/__init__.py  
2016-04-25 16:20:06.000000000 +0200
+++ new/SQLAlchemy-Utils-0.36.0/sqlalchemy_utils/functions/__init__.py  
2019-12-08 18:38:14.000000000 +0100
@@ -1,5 +1,4 @@
 from .database import (  # noqa
-    analyze,
     create_database,
     database_exists,
     drop_database,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/SQLAlchemy-Utils-0.35.0/sqlalchemy_utils/functions/database.py 
new/SQLAlchemy-Utils-0.36.0/sqlalchemy_utils/functions/database.py
--- old/SQLAlchemy-Utils-0.35.0/sqlalchemy_utils/functions/database.py  
2019-07-15 14:44:13.000000000 +0200
+++ new/SQLAlchemy-Utils-0.36.0/sqlalchemy_utils/functions/database.py  
2019-12-08 18:38:14.000000000 +0100
@@ -10,92 +10,10 @@
 from sqlalchemy.engine.url import make_url
 from sqlalchemy.exc import OperationalError, ProgrammingError
 
-from ..expressions import explain_analyze
 from ..utils import starts_with
 from .orm import quote
 
 
-class PlanAnalysis(object):
-    def __init__(self, plan):
-        self.plan = plan
-
-    @property
-    def node_types(self):
-        types = [self.plan['Node Type']]
-        if 'Plans' in self.plan:
-            for plan in self.plan['Plans']:
-                analysis = PlanAnalysis(plan)
-                types.extend(analysis.node_types)
-        return types
-
-
-class QueryAnalysis(object):
-    def __init__(self, result_set):
-        self.plan = result_set[0]['Plan']
-        if 'Total Runtime' in result_set[0]:
-            # PostgreSQL versions < 9.4
-            self.runtime = result_set[0]['Total Runtime']
-        else:
-            # PostgreSQL versions >= 9.4
-            self.runtime = (
-                result_set[0]['Execution Time'] +
-                result_set[0]['Planning Time']
-            )
-
-    @property
-    def node_types(self):
-        return list(PlanAnalysis(self.plan).node_types)
-
-    def __repr__(self):
-        return '<QueryAnalysis runtime=%r>' % self.runtime
-
-
-def analyze(conn, query):
-    """
-    Analyze query using given connection and return :class:`QueryAnalysis`
-    object. Analysis is performed using database specific EXPLAIN ANALYZE
-    construct and then examining the results into structured format. Currently
-    only PostgreSQL is supported.
-
-
-    Getting query runtime (in database level) ::
-
-
-        from sqlalchemy_utils import analyze
-
-
-        analysis = analyze(conn, 'SELECT * FROM article')
-        analysis.runtime  # runtime as milliseconds
-
-
-    Analyze can be very useful when testing that query doesn't issue a
-    sequential scan (scanning all rows in table). You can for example write
-    simple performance tests this way.::
-
-
-        query = (
-            session.query(Article.name)
-            .order_by(Article.name)
-            .limit(10)
-        )
-        analysis = analyze(self.connection, query)
-        analysis.node_types  # [u'Limit', u'Index Only Scan']
-
-        assert 'Seq Scan' not in analysis.node_types
-
-
-    .. versionadded: 0.26.17
-
-    :param conn: SQLAlchemy Connection object
-    :param query: SQLAlchemy Query object or query as a string
-    """
-    return QueryAnalysis(
-        conn.execute(
-            explain_analyze(query, buffers=True, format='json')
-        ).scalar()
-    )
-
-
 def escape_like(string, escape_char='*'):
     """
     Escape the string paremeter used in SQL LIKE expressions.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/SQLAlchemy-Utils-0.35.0/sqlalchemy_utils/types/range.py 
new/SQLAlchemy-Utils-0.36.0/sqlalchemy_utils/types/range.py
--- old/SQLAlchemy-Utils-0.35.0/sqlalchemy_utils/types/range.py 2019-11-01 
11:21:03.000000000 +0100
+++ new/SQLAlchemy-Utils-0.36.0/sqlalchemy_utils/types/range.py 2019-12-08 
18:38:14.000000000 +0100
@@ -412,7 +412,7 @@
     comparator_factory = IntRangeComparator
 
     def __init__(self, *args, **kwargs):
-        super(IntRangeType, self).__init__(*args, **kwargs)
+        super(Int8RangeType, self).__init__(*args, **kwargs)
         self.interval_class = intervals.IntInterval
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/SQLAlchemy-Utils-0.35.0/tests/functions/test_analyze.py 
new/SQLAlchemy-Utils-0.36.0/tests/functions/test_analyze.py
--- old/SQLAlchemy-Utils-0.35.0/tests/functions/test_analyze.py 2016-04-25 
16:20:06.000000000 +0200
+++ new/SQLAlchemy-Utils-0.36.0/tests/functions/test_analyze.py 1970-01-01 
01:00:00.000000000 +0100
@@ -1,35 +0,0 @@
-import pytest
-
-from sqlalchemy_utils import analyze
-
-
[email protected]('postgresql_dsn')
-class TestAnalyzeWithPostgres(object):
-
-    def test_runtime(self, session, connection, Article):
-        query = session.query(Article)
-        assert analyze(connection, query).runtime
-
-    def test_node_types_with_join(self, session, connection, Article):
-        query = (
-            session.query(Article)
-            .join(Article.category)
-        )
-        analysis = analyze(connection, query)
-        assert analysis.node_types == [
-            u'Hash Join', u'Seq Scan', u'Hash', u'Seq Scan'
-        ]
-
-    def test_node_types_with_index_only_scan(
-        self,
-        session,
-        connection,
-        Article
-    ):
-        query = (
-            session.query(Article.name)
-            .order_by(Article.name)
-            .limit(10)
-        )
-        analysis = analyze(connection, query)
-        assert analysis.node_types == [u'Limit', u'Index Only Scan']
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/SQLAlchemy-Utils-0.35.0/tests/test_expressions.py 
new/SQLAlchemy-Utils-0.36.0/tests/test_expressions.py
--- old/SQLAlchemy-Utils-0.35.0/tests/test_expressions.py       2019-06-09 
14:58:44.000000000 +0200
+++ new/SQLAlchemy-Utils-0.36.0/tests/test_expressions.py       2019-12-08 
18:38:14.000000000 +0100
@@ -3,7 +3,6 @@
 from sqlalchemy.dialects import postgresql
 
 from sqlalchemy_utils import Asterisk, row_to_json
-from sqlalchemy_utils.expressions import explain, explain_analyze
 
 
 @pytest.fixture
@@ -27,81 +26,6 @@
     return Article
 
 
[email protected]('postgresql_dsn')
-class TestExplain(object):
-
-    def test_render_explain(self, session, assert_startswith, Article):
-        assert_startswith(
-            explain(session.query(Article)),
-            'EXPLAIN SELECT'
-        )
-
-    def test_render_explain_with_analyze(
-        self,
-        session,
-        assert_startswith,
-        Article
-    ):
-        assert_startswith(
-            explain(session.query(Article), analyze=True),
-            'EXPLAIN (ANALYZE true) SELECT'
-        )
-
-    def test_with_string_as_stmt_param(self, assert_startswith):
-        assert_startswith(
-            explain(sa.text('SELECT 1 FROM article')),
-            'EXPLAIN SELECT'
-        )
-
-    def test_format(self, assert_startswith):
-        assert_startswith(
-            explain(sa.text('SELECT 1 FROM article'), format='json'),
-            'EXPLAIN (FORMAT json) SELECT'
-        )
-
-    def test_timing(self, assert_startswith):
-        assert_startswith(
-            explain(
-                sa.text('SELECT 1 FROM article'),
-                analyze=True,
-                timing=False
-            ),
-            'EXPLAIN (ANALYZE true, TIMING false) SELECT'
-        )
-
-    def test_verbose(self, assert_startswith):
-        assert_startswith(
-            explain(sa.text('SELECT 1 FROM article'), verbose=True),
-            'EXPLAIN (VERBOSE true) SELECT'
-        )
-
-    def test_buffers(self, assert_startswith):
-        assert_startswith(
-            explain(
-                sa.text('SELECT 1 FROM article'),
-                analyze=True,
-                buffers=True
-            ),
-            'EXPLAIN (ANALYZE true, BUFFERS true) SELECT'
-        )
-
-    def test_costs(self, assert_startswith):
-        assert_startswith(
-            explain(sa.text('SELECT 1 FROM article'), costs=False),
-            'EXPLAIN (COSTS false) SELECT'
-        )
-
-
-class TestExplainAnalyze(object):
-    def test_render_explain_analyze(self, session, Article):
-        assert str(
-            explain_analyze(session.query(Article))
-            .compile(
-                dialect=postgresql.dialect()
-            )
-        ).startswith('EXPLAIN (ANALYZE true) SELECT')
-
-
 class TestAsterisk(object):
     def test_with_table_object(self):
         Base = sa.ext.declarative.declarative_base()


Reply via email to