#
# spec file for package python-SQLAlchemy
#
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#


%bcond_without tests

%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define oldpython python
Name:           python-SQLAlchemy
Version:        1.2.5
Release:        1.1
Url:            http://www.sqlalchemy.org
Summary:        Database Abstraction Library
License:        MIT
Group:          Development/Languages/Python
Source:         https://files.pythonhosted.org/packages/source/S/SQLAlchemy/SQLAlchemy-%{version}.tar.gz
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  %{python_module devel}
BuildRequires:  %{python_module setuptools}
BuildRequires:  fdupes
BuildRequires:  python-rpm-macros
# Test requirements:
BuildRequires:  %{python_module mock}
BuildRequires:  %{python_module pytest-xdist}
BuildRequires:  %{python_module pytest}
#BuildRequires:  python-pysqlite
%ifpython2
Obsoletes:      %{oldpython}-sqlalchemy < %{version}
Provides:       %{oldpython}-sqlalchemy = %{version}
%endif
%ifpython3
Provides:       python3-sqlalchemy = %{version}
Obsoletes:      python3-sqlalchemy < %{version}
%endif
%python_subpackages

%description
SQLAlchemy is an Object Relational Mappper (ORM) that provides a flexible,
high-level interface to SQL databases.  Database and domain concepts are
decoupled, allowing both sides maximum flexibility and power. SQLAlchemy
provides a powerful mapping layer that can work as automatically or as manually
as you choose, determining relationships based on foreign keys or letting you
define the join conditions explicitly, to bridge the gap between database and
domain.

%package -n %{name}-doc
Summary:        Documentation for python-SQLAlchemy
Group:          Documentation/Other
Provides:       python-SQLAlchemy-doc = %{version}
Provides:       python2-SQLAlchemy-doc = %{version}
Provides:       python3-SQLAlchemy-doc = %{version}
BuildArch:      noarch

%description -n %{name}-doc
This package contains HTML documentation, including tutorials and API
reference for python-SQLAlchemy.

%prep
%setup -q -n SQLAlchemy-%{version}
rm -rf doc/build # Remove unnecessary scripts for building documentation
sed -i 's/\r$//' examples/dynamic_dict/dynamic_dict.py

%build
export CFLAGS="%{optflags} -fno-strict-aliasing"
%python_build

%install
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitearch}

%if %{with tests}
%check
%python_expand py.test-%{$python_bin_suffix}
%endif

%files %{python_files}
%defattr(-,root,root,-)
%doc CHANGES LICENSE README.rst README.dialects.rst README.unittests.rst
%{python_sitearch}/sqlalchemy/
%{python_sitearch}/SQLAlchemy-%{version}-py%{py_ver}.egg-info

%files -n %{name}-doc
%defattr(-,root,root)
%doc doc/
%doc examples/

%changelog
* Thu Mar  8 2018 arun@gmx.de
- update to version 1.2.5:
  * orm
    + [orm] [feature] Added new feature
    Query.only_return_tuples(). Causes the Query object to return
    keyed tuple objects unconditionally even if the query is against
    a single entity. Pull request courtesy Eric Atkin.
    + [orm] [bug] Fixed bug in new “polymorphic selectin” loading when
    a selection of polymorphic objects were to be partially loaded
    from a relationship lazy loader, leading to an “empty IN”
    condition within the load that raises an error for the “inline”
    form of “IN”. References: #4199
    + [orm] [bug] Fixed 1.2 regression where a mapper option that
    contains an AliasedClass object, as is typical when using the
    QueryableAttribute.of_type() method, could not be pickled. 1.1’s
    behavior was to omit the aliased class objects from the path, so
    this behavior is restored.  References: #4209
  * sql
    + [sql] [bug] Fixed bug in :class:.`CTE` construct along the same
    lines as that of #4204 where a CTE that was aliased would not
    copy itself correctly during a “clone” operation as is frequent
    within the ORM as well as when using the ClauseElement.params()
    method.  References: #4210
    + [sql] [bug] Fixed bug in CTE rendering where a CTE that was also
    turned into an Alias would not render its “ctename AS aliasname”
    clause appropriately if there were more than one reference to
    the CTE in a FROM clause.  References: #4204
    + [sql] [bug] Fixed bug in new “expanding IN parameter” feature
    where the bind parameter processors for values wasn’t working at
    all, tests failed to cover this pretty basic case which includes
    that ENUM values weren’t working.  References: #4198
  * postgresql
    + [postgresql] [bug] [py3k] Fixed bug in Postgresql COLLATE /
    ARRAY adjustment first introduced in #4006 where new behaviors
    in Python 3.7 regular expressions caused the fix to fail.  This
    change is also backported to: 1.1.18 References: #4208
  * mysql
    + [mysql] [bug] MySQL dialects now query the server version using
    SELECT @@version explicitly to the server to ensure we are
    getting the correct version information back. Proxy servers like
    MaxScale interfere with the value that is passed to the DBAPI’s
    connection.server_version value so this is no longer reliable.
    This change is also backported to: 1.1.18 References: #4205
* Fri Feb 23 2018 arun@gmx.de
- update to version 1.2.4:
  * orm
    + [orm] [bug] Fixed 1.2 regression in ORM versioning feature where
    a mapping against a select() or alias() that also used a
    versioning column against the underlying table would fail due to
    the check added as part of #3673.  References: #4193
  * engine
    + [engine] [bug] Fixed regression caused in 1.2.3 due to fix from
    [#4181] where the changes to the event system involving Engine and
    OptionEngine did not accommodate for event removals, which would
    raise an AttributeError when invoked at the class level.
    References: #4190
  * sql
    + [sql] [bug] Fixed bug where CTE expressions would not have their
    name or alias name quoted when the given name is case sensitive
    or otherwise requires quoting. Pull request courtesy Eric Atkin.
    References: #4197
* Sun Feb 18 2018 arun@gmx.de
- update to version 1.2.3:
  * orm
    + [orm] [feature] Added new argument
    attributes.set_attribute.inititator to the
    attributes.set_attribute() function, allowing an event token
    received from a listener function to be propagated to subsequent
    set events.
    + [orm] [bug] Fixed issue in post_update feature where an UPDATE
    is emitted when the parent object has been deleted but the
    dependent object is not. This issue has existed for a long time
    however since 1.2 now asserts rows matched for post_update, this
    was raising an error.  This change is also backported to: 1.1.16
    References: #4187
    + [orm] [bug] Fixed regression caused by fix for issue #4116
    affecting versions 1.2.2 as well as 1.1.15, which had the effect
    of mis-calculation of the “owning class” of an AssociationProxy
    as the NoneType class in some declarative mixin/inheritance
    situations as well as if the association proxy were accessed off
    of an un-mapped class. The “figure out the owner” logic has been
    replaced by an in-depth routine that searches through the
    complete mapper hierarchy assigned to the class or subclass to
    determine the correct (we hope) match; will not assign the owner
    if no match is found. An exception is now raised if the proxy is
    used against an un-mapped instance.  This change is also
    backported to: 1.1.16 References: #4185
    + [orm] [bug] Fixed bug where the Bundle object did not correctly
    report upon the primary Mapper object represened by the bundle,
    if any. An immediate side effect of this issue was that the new
    selectinload loader strategy wouldn’t work with the horizontal
    sharding extension.  References: #4175
    + [orm] [bug] Fixed bug in concrete inheritance mapping where
    user-defined attributes such as hybrid properties that mirror
    the names of mapped attributes from sibling classes would be
    overwritten by the mapper as non-accessible at the instance
    level. Additionally ensured that user-bound descriptors are not
    implicitly invoked at the class level during the mapper
    configuration stage.  References: #4188
    + [orm] [bug] Fixed bug where the orm.reconstructor() event helper
    would not be recognized if it were applied to the __init__()
    method of the mapped class.  References: #4178
  * engine
    + [engine] [bug] Fixed bug where events associated with an Engine
    at the class level would be doubled when the
    Engine.execution_options() method were used. To achieve this,
    the semi-private class OptionEngine no longer accepts events
    directly at the class level and will raise an error; the class
    only propagates class-level events from its parent
    Engine. Instance-level events continue to work as before.
    References: #4181
    + [engine] [bug] The URL object now allows query keys to be
    specified multiple times where their values will be joined into
    a list. This is to support the plugins feature documented at
    CreateEnginePlugin which documents that “plugin” can be passed
    multiple times. Additionally, the plugin names can be passed to
    create_engine() outside of the URL using the new
    create_engine.plugins parameter.  References: #4170
  * sql
    + [sql] [feature] Added support for Enum to persist the values of
    the enumeration, rather than the keys, when using a Python
    pep-435 style enumerated object. The user supplies a callable
    function that will return the string values to be
    persisted. This allows enumerations against non-string values to
    be value-persistable as well. Pull request courtesy Jon Snyder.
    References: #3906
    + [sql] [bug] Fixed bug where the Enum type wouldn’t handle enum
    “aliases” correctly, when more than one key refers to the same
    value. Pull request courtesy Daniel Knell.  References: #4180
  * postgresql
    + [postgresql] [bug] Added “SSL SYSCALL error: Operation timed
    out” to the list of messages that trigger a “disconnect”
    scenario for the psycopg2 driver. Pull request courtesy André
    Cruz.  This change is also backported to: 1.1.16
    + [postgresql] [bug] Added “TRUNCATE” to the list of keywords
    accepted by the Postgresql dialect as an “autocommit”-triggering
    keyword. Pull request courtesy Jacob Hayes.  This change is also
    backported to: 1.1.16
  * sqlite
    + [sqlite] [bug] Fixed the import error raised when a platform has
    neither pysqlite2 nor sqlite3 installed, such that the
    sqlite3-related import error is raised, not the pysqlite2 one
    which is not the actual failure mode. Pull request courtesy
    Robin.
  * oracle
    + [oracle] [feature] The ON DELETE options for foreign keys are
    now part of Oracle reflection. Oracle does not support ON UPDATE
    cascades. Pull request courtesy Miroslav Shubernetskiy.
    + [oracle] [bug] Fixed bug in cx_Oracle disconnect detection, used
    by pre_ping and other features, where an error could be raised
    as DatabaseError which includes a numeric error code; previously
    we weren’t checking in this case for a disconnect code.
    References: #4182
  * misc
    + [bug] [pool] Fixed a fairly serious connection pool bug where a
    connection that is acquired after being refreshed as a result of
    a user-defined DisconnectionError or due to the 1.2-released
    “pre_ping” feature would not be correctly reset if the
    connection were returned to the pool by weakref cleanup
    (e.g. the front-facing object is garbage collected); the weakref
    would still refer to the previously invalidated DBAPI connection
    which would have the reset operation erroneously called upon it
    instead. This would lead to stack traces in the logs and a
    connection being checked into the pool without being reset,
    which can cause locking issues.  This change is also backported
    to: 1.1.16 References: #4184
    + [bug] [tests] A test added in 1.2 thought to confirm a Python
    2.7 behavior turns out to be confirming the behavior only as of
    Python 2.7.8. Python bug #8743 still impacts set comparison in
    Python 2.7.7 and earlier, so the test in question involving
    AssociationSet no longer runs for these older Python 2.7
    versions.  References: #3265
* Sun Jan 28 2018 arun@gmx.de
- update to version 1.2.2:
  * orm
    + [orm] [bug] Fixed 1.2 regression regarding new bulk_replace
    event where a backref would fail to remove an object from the
    previous owner when a bulk-assignment assigned the object to a
    new owner.  References: #4171
  * mysql
    + [mysql] [bug] Added more MySQL 8.0 reserved words to the MySQL
    dialect for quoting purposes. Pull request courtesy Riccardo
    Magliocchetti.
  * mssql
    + [mssql] [bug] Added ODBC error code 10054 to the list of error
    codes that count as a disconnect for ODBC / MSSQL server.
    References: #4164
  * oracle
    + [oracle] [bug] The cx_Oracle dialect now calls setinputsizes()
    with cx_Oracle.NCHAR unconditionally when the NVARCHAR2
    datatype, in SQLAlchemy corresponding to sqltypes.Unicode(), is
    in use. Per cx_Oracle’s author this allows the correct
    conversions to occur within the Oracle client regardless of the
    setting for NLS_NCHAR_CHARACTERSET.  References: #4163
* Wed Jan 17 2018 arun@gmx.de
- update to version 1.2.1:
  * orm
    + [orm] [bug] Fixed bug where an object that is expunged during a
    rollback of a nested or subtransaction which also had its
    primary key mutated would not be correctly removed from the
    session, causing subsequent issues in using the session.
    + [orm] [bug] Fixed regression where pickle format of a Load /
    _UnboundLoad object (e.g. loader options) changed and
    __setstate__() was raising an UnboundLocalError for an object
    received from the legacy format, even though an attempt was made
    to do so. tests are now added to ensure this works.
    + [orm] [bug] Fixed regression caused by new lazyload caching
    scheme in #3954 where a query that makes use of loader options
    with of_type would cause lazy loads of unrelated paths to fail
    with a TypeError.
    + [orm] [bug] Fixed bug in new “selectin” relationship loader
    where the loader could try to load a non-existent relationship
    when loading a collection of polymorphic objects, where only
    some of the mappers include that relationship, typically when
    PropComparator.of_type() is being used.
  * sql
    + [sql] [bug] Fixed bug in Insert.values() where using the
    “multi-values” format in combination with Column objects as keys
    rather than strings would fail. Pull request courtesy Aubrey
    Stark-Toller.
  * mssql
    + [mssql] [bug] Fixed regression in 1.2 where newly repaired
    quoting of collation names in #3785 breaks SQL Server, which
    explicitly does not understand a quoted collation name. Whether
    or not mixed-case collation names are quoted or not is now
    deferred down to a dialect-level decision so that each dialect
    can prepare these identifiers directly.
  * oracle
    + [oracle] [bug] Fixed regression where the removal of most
    setinputsizes rules from cx_Oracle dialect impacted the
    TIMESTAMP datatype’s ability to retrieve fractional seconds.
    + [oracle] [bug] Fixed regression in Oracle imports where a
    missing comma caused an undefined symbol to be present. Pull
    request courtesy Miroslav Shubernetskiy.
  * misc
    + [bug] [ext] Fixed regression in association proxy due to #3769
    (allow for chained any() / has()) where contains() against an
    association proxy chained in the form (o2m relationship,
    associationproxy(m2o relationship, m2o relationship)) would
    raise an error regarding the re-application of contains() on the
    final link of the chain.
    + [bug] [tests] Removed an oracle-specific requirements rule from
    the public test suite that was interfering with third party
    dialect suites.
    + [bug] [tests] Added a new exclusion rule
    group_by_complex_expression which disables tests that use “GROUP
    BY <expr>”, which seems to be not viable for at least two third
    party dialects.
* Wed Jan  3 2018 arun@gmx.de
- specfile:
  * updated test requirements
* Sun Dec 31 2017 arun@gmx.de
- update to version 1.2.0:
  * See https://docs.sqlalchemy.org/en/latest/changelog/changelog_12.html
* Mon Sep 25 2017 arun@gmx.de
- update to version 1.1.14:
  * orm
    + [orm] [bug] Fixed bug in Session.merge() following along similar
    lines as that of #4030, where an internal check for a target
    object in the identity map could lead to an error if it were to
    be garbage collected immediately before the merge routine
    actually retrieves the object. References: #4069
    + [orm] [bug] Fixed bug where an undefer_group() option would not
    be recognized if it extended from a relationship that was
    loading using joined eager loading. Additionally, as the bug led
    to excess work being performed, Python function call counts are
    also improved by 20%% within the initial calculation of result
    set columns, complementing the joined eager load improvements of
    [#3915].    References: #4048
    + [orm] [bug] Fixed race condition in ORM identity map which would
    cause objects to be inappropriately removed during a load
    operation, causing duplicate object identities to occur,
    particularly under joined eager loading which involves
    deduplication of objects. The issue is specific to garbage
    collection of weak references and is observed only under the
    Pypy interpreter.    References: #4068
    + [orm] [bug] Fixed bug in Session.merge() where objects in a
    collection that had the primary key attribute set to None for a
    key that is typically autoincrementing would be considered to be
    a database-persisted key for part of the internal deduplication
    process, causing only one object to actually be inserted in the
    database.    References: #4056
    + [orm] [bug] An InvalidRequestError is raised when a synonym() is
    used against an attribute that is not against a MapperProperty,
    such as an association proxy. Previously, a recursion overflow
    would occur trying to locate non-existent attributes.  References: #4067
  * sql
    + [sql] [bug] Altered the range specification for window functions
    to allow for two of the same PRECEDING or FOLLOWING keywords in
    a range by allowing for the left side of the range to be
    positive and for the right to be negative, e.g. (1, 3) is “1
    FOLLOWING AND 3 FOLLOWING”.    References: #4053
- changes from version 1.1.13:
  * oracle
    + [oracle] [bug] [py2k] [performance] Fixed performance regression
    caused by the fix for #3937 where cx_Oracle as of version 5.3
    dropped the .UNICODE symbol from its namespace, which was
    interpreted as cx_Oracle’s “WITH_UNICODE” mode being turned on
    unconditionally, which invokes functions on the SQLAlchemy side
    which convert all strings to unicode unconditionally and causing
    a performance impact. In fact, per cx_Oracle’s author the
    “WITH_UNICODE” mode has been removed entirely as of 5.1, so the
    expensive unicode conversion functions are no longer necessary
    and are disabled if cx_Oracle 5.1 or greater is detected under
    Python 2. The warning against “WITH_UNICODE” mode that was
    removed under #3937 is also restored.
    This change is also backported to: 1.0.19
    References: #4035
* Tue Aug  8 2017 tbechtold@suse.com
- update to 1.1.12:
  * See http://docs.sqlalchemy.org/en/latest/changelog/changelog_11.html#change-1.1.12
* Fri Jul  7 2017 tbechtold@suse.com
- Update to 1.1.11:
  * See http://docs.sqlalchemy.org/en/latest/changelog/changelog_11.html#change-1.1.11
- Update to 1.1.10:
  * See http://docs.sqlalchemy.org/en/latest/changelog/changelog_11.html#change-1.1.10
* Sat May  6 2017 toddrme2178@gmail.com
- Don't provide python2-sqlalchemy, singlespec packages should use
  correct name.
* Mon May  1 2017 toddrme2178@gmail.com
- Add literal python-sqlalchemy provides.
* Tue Apr 18 2017 toddrme2178@gmail.com
- Update to 1.1.9:
  * See http://docs.sqlalchemy.org/en/latest/changelog/changelog_11.html#change-1.1.9
- Update to 1.1.8:
  * See http://docs.sqlalchemy.org/en/latest/changelog/changelog_11.html#change-1.1.8
- Update to 1.1.7:
  * See http://docs.sqlalchemy.org/en/latest/changelog/changelog_11.html#change-1.1.7
- Update to 1.1.6:
  * See http://docs.sqlalchemy.org/en/latest/changelog/changelog_11.html#change-1.1.6
- Update to 1.1.5:
  * See http://docs.sqlalchemy.org/en/latest/changelog/changelog_11.html#change-1.1.5
- Update to 1.1.4:
  * See http://docs.sqlalchemy.org/en/latest/changelog/changelog_11.html#change-1.1.4
- Update to 1.1.3:
  * See http://docs.sqlalchemy.org/en/latest/changelog/changelog_11.html#change-1.1.3
- Update to 1.1.2:
  * See http://docs.sqlalchemy.org/en/latest/changelog/changelog_11.html#change-1.1.2
- Update to 1.1.1:
  * See http://docs.sqlalchemy.org/en/latest/changelog/changelog_11.html#change-1.1.1
- Update to 1.1.0:
  * See http://docs.sqlalchemy.org/en/latest/changelog/changelog_11.html#change-1.1.0
- Update to 1.0.18:
  * See http://docs.sqlalchemy.org/en/latest/changelog/changelog_10.html#change-1.0.18
- Update to 1.0.17:
  * See http://docs.sqlalchemy.org/en/latest/changelog/changelog_10.html#change-1.0.17
- Update to 1.0.16:
  * See http://docs.sqlalchemy.org/en/latest/changelog/changelog_10.html#change-1.0.16
- Implement single-spec version.
* Thu Sep 15 2016 toddrme2178@gmail.com
- Update to 1.0.15:
  * See http://docs.sqlalchemy.org/en/latest/changelog/changelog_10.html#change-1.0.15
  http://docs.sqlalchemy.org/en/latest/changelog/changelog_10.html#change-1.0.14
* Mon Jun  6 2016 dmueller@suse.com
- fix source url
* Fri Jun  3 2016 tbechtold@suse.com
- update to 1.0.13:
  * see http://docs.sqlalchemy.org/en/latest/changelog/changelog_10.html#change-1.0.12
    and http://docs.sqlalchemy.org/en/latest/changelog/changelog_10.html#change-1.0.13
  Remove 0001-fix-sqlite3.10.0-test.patch. Applied upstream.
* Thu Feb 11 2016 aplanas@suse.com
- Add 0001-fix-sqlite3.10.0-test.patch
  Backport fix after SQLite3.10 upgrade
* Mon Jan 11 2016 bwiedemann@suse.com
- update to 1.0.11:
  * see http://docs.sqlalchemy.org/en/latest/changelog/changelog_10.html#change-1.0.11
* Sun Oct  4 2015 tbechtold@suse.com
- update to 1.0.8:
  * see http://docs.sqlalchemy.org/en/latest/changelog/changelog_10.html#change-1.0.8
* Mon Jun 15 2015 bruno@ioda-net.ch
- update to version 1.0.5:
  * see http://docs.sqlalchemy.org/en/latest/changelog/changelog_10.html#change-1.0.5
* Sun May 24 2015 bruno@ioda-net.ch
- update to 1.0.4:
  + see http://docs.sqlalchemy.org/en/latest/changelog/changelog_10.html#change-1.0.4
  + see http://docs.sqlalchemy.org/en/latest/changelog/migration_10.html
* Wed Apr 22 2015 tbechtold@suse.com
- update to 0.9.9:
  + See http://docs.sqlalchemy.org/en/latest/changelog/changelog_09.html#change-0.9.9
* Thu Jan  8 2015 tbechtold@suse.com
- Update to version 0.9.8:
  + See http://docs.sqlalchemy.org/en/latest/changelog/changelog_09.html#change-0.9.8
* Fri Sep 12 2014 dmueller@suse.com
- update to 0.9.7:
  + See http://docs.sqlalchemy.org/en/latest/changelog/changelog_09.html#change-0.9.7
* Wed Jul  2 2014 nevion@gmail.com
-update to 0.9.6:
  + See http://docs.sqlalchemy.org/en/rel_0_9/changelog/changelog_09.html#change-0.9.6
-Remove obsolete sqlalchemy-0.7-setup_test.patch
-Add python-pytest dependency
* Tue Apr  8 2014 dmueller@suse.com
- update to 0.8.6:
  + See http://docs.sqlalchemy.org/en/rel_0_9/changelog/changelog_08.html#change-0.8.6
* Wed Oct 30 2013 speilicke@suse.com
- Update to version 0.8.3:
  + See http://docs.sqlalchemy.org/en/latest/changelog/changelog_08.html#change-0.8.3
- Drop outdated patches
  + SQLAlchemy-0.7.10-SLES-drop-failing-tests.patch
  + sqlalchemy-0.7-logging.patch
* Thu Oct 24 2013 speilicke@suse.com
- Require python-setuptools instead of distribute (upstreams merged)
* Thu Aug  1 2013 speilicke@suse.com
- Add SQLAlchemy-0.7.10-SLES-drop-failing-tests.patch: Cheat with
  dropping tests to fix testsuite on SLE-11
* Mon Jul 22 2013 berendt@b1-systems.de
- fixing build requirement from python-sqlite to python-pysqlite
* Mon Jul 15 2013 hpj@urpla.net
- apply patch to fix TypeError, when running python setup.py test
* Sun Jul 14 2013 hpj@urpla.net
- add python-sqlite build dep for the test rig
- apply a patch, that fixes TB of the test rig
* Fri Mar  8 2013 lars@linux-schulserver.de
- update to 0.7.10:
  * orm
  + [bug] Fixed Session accounting bug whereby replacing
    a deleted object in the identity map with another
    object of the same primary key would raise a
    "conflicting state" error on rollback(),
    if the replaced primary key were established either
    via non-unitofwork-established INSERT statement
    or by primary key switch of another instance.
    [ticket:2583]
  * oracle
  + [bug] changed the list of cx_oracle types that are
    excluded from the setinputsizes() step to only include
    STRING and UNICODE; CLOB and NCLOB are removed.  This
    is to work around cx_oracle behavior which is broken
    for the executemany() call.  In 0.8, this same change
    is applied however it is also configurable via the
    exclude_setinputsizes argument. [ticket:2561]
  * mysql
  + [feature] Added "raise_on_warnings" flag to OurSQL
    dialect.  [ticket:2523]
  + [feature] Added "read_timeout" flag to MySQLdb
    dialect.  [ticket:2554]
* Wed Jan  2 2013 toddrme2178@gmail.com
- Fix building on SLES
* Wed Dec 19 2012 saschpe@suse.de
- The doc package is noarch
* Fri Nov  2 2012 termim@gmail.com
- do not require python-pysqlite package.
- update to 0.7.9:
  * orm
  - [bug] Fixed bug mostly local to new AbstractConcreteBase helper
    where the "type" attribute from the superclass would not be overridden
    on the subclass to produce the "reserved for base" error message,
    instead placing a do-nothing attribute there. This was inconsistent
    vs. using ConcreteBase as well as all the behavior of classical
    concrete mappings, where the "type" column from the polymorphic base
    would be explicitly disabled on subclasses, unless overridden
    explicitly.
  - [bug] A warning is emitted when lazy='dynamic' is combined with
    uselist=False. This is an exception raise in 0.8.
  - [bug] Fixed bug whereby user error in related-object assignment could
    cause recursion overflow if the assignment triggered a backref of the
    same name as a bi-directional attribute on the incorrect class to the
    same target. An informative error is raised now.
  - [bug] Fixed bug where incorrect type information would be passed when
    the ORM would bind the "version" column, when using the "version"
    feature. Tests courtesy Daniel Miller. [ticket:2539]
  - [bug] Extra logic has been added to the "flush" that occurs within
    Session.commit(), such that the extra state added by an after_flush()
    or after_flush_postexec() hook is also flushed in a subsequent flush,
    before the "commit" completes. Subsequent calls to flush() will
    continue until the after_flush hooks stop adding new state. An
    "overflow" counter of 100 is also in place, in the event of a broken
    after_flush() hook adding new content each time.  [ticket:2566]
  * engine
  - [feature] Dramatic improvement in memory usage of the event system;
    instance-level collections are no longer created for a particular type of
    event until instance-level listeners are established for that
    event. [ticket:2516]
  - [bug] Fixed bug whereby a disconnect detect + dispose that occurs when
    the QueuePool has threads waiting for connections would leave those
    threads waiting for the duration of the timeout on the old pool (or
    indefinitely if timeout was disabled). The fix now notifies those
    waiters with a special exception case and has them move onto the new
    pool. [ticket:2522]
  - [bug] Added gaerdbms import to mysql/__init__.py, the absense of which
    was preventing the new GAE dialect from being loaded. [ticket:2529]
  - [bug] Fixed cextension bug whereby the "ambiguous column error" would
    fail to function properly if the given index were a Column object and
    not a string. Note there are still some column-targeting issues here
    which are fixed in 0.8. [ticket:2553]
  - [bug] Fixed the repr() of Enum to include the "name" and "native_enum"
    flags. Helps Alembic autogenerate.
  * sql
  - [bug] Fixed the DropIndex construct to support an Index associated with
    a Table in a remote schema. [ticket:2571]
  - [bug] Fixed bug in over() construct whereby passing an empty list for
    either partition_by or order_by, as opposed to None, would fail to
    generate correctly. Courtesy Gunnlaugur Þór Briem. [ticket:2574]
  - [bug] Fixed CTE bug whereby positional bound parameters present in the
    CTEs themselves would corrupt the overall ordering of bound
    parameters. This primarily affected SQL Server as the platform with
    positional binds + CTE support. [ticket:2521]
  - [bug] Fixed more un-intuitivenesses in CTEs which prevented referring
    to a CTE in a union of itself without it being aliased. CTEs now render
    uniquely on name, rendering the outermost CTE of a given name only -
    all other references are rendered just as the name. This even includes
    other CTE/SELECTs that refer to different versions of the same CTE
    object, such as a SELECT or a UNION ALL of that SELECT. We are somewhat
    loosening the usual link between object identity and lexical identity
    in this case. A true name conflict between two unrelated CTEs now
    raises an error.
  - [bug] quoting is applied to the column names inside the WITH RECURSIVE
    clause of a common table expression according to the quoting rules for
    the originating Column. [ticket:2512]
  - [bug] Fixed regression introduced in 0.7.6 whereby the FROM list of a
    SELECT statement could be incorrect in certain "clone+replace"
    scenarios. [ticket:2518]
  - [bug] Fixed bug whereby usage of a UNION or similar inside of an
    embedded subquery would interfere with result-column targeting, in the
    case that a result-column had the same ultimate name as a name inside
    the embedded UNION. [ticket:2552]
  - [bug] Fixed a regression since 0.6 regarding result-row targeting. It
    should be possible to use a select() statement with string based
    columns in it, that is select(['id', 'name']).select_from('mytable'),
    and have this statement be targetable by Column objects with those
    names; this is the mechanism by which
    query(MyClass).from_statement(some_statement) works. At some point the
    specific case of using select(['id']), which is equivalent to
    select([literal_column('id')]), stopped working here, so this has been
    re-instated and of course tested. [ticket:2558]
  - [bug] Added missing operators is_(), isnot() to the ColumnOperators
    base, so that these long-available operators are present as methods
    like all the other operators. [ticket:2544]
  * postgresql
  - [bug] Columns in reflected primary key constraint are now returned in
    the order in which the constraint itself defines them, rather than how
    the table orders them. Courtesy Gunnlaugur Þór Briem.. [ticket:2531]
  - [bug] Added 'terminating connection' to the list of messages we use to
    detect a disconnect with PG, which appears to be present in some
    versions when the server is restarted. [ticket:2570]
  * mysql
  - [bug] Updated mysqlconnector interface to use updated "client flag" and
    "charset" APIs, courtesy David McNelis.
  * sqlite
  - [feature] Added support for the localtimestamp() SQL function
    implemented in SQLite, courtesy Richard Mitchell.
  - [bug] Adjusted a very old bugfix which attempted to work around a
    SQLite issue that itself was "fixed" as of sqlite 3.6.14, regarding
    quotes surrounding a table name when using the "foreign_key_list"
    pragma. The fix has been adjusted to not interfere with quotes that are
    actually in the name of a column or table, to as much a degree as
    possible; sqlite still doesn't return the correct result for
    foreign_key_list() if the target table actually has quotes surrounding
    its name, as part of its name (i.e. """mytable"""). [ticket:2568]
  - [bug] Adjusted column default reflection code to convert non-string
    values to string, to accommodate old SQLite versions that don't deliver
    default info as a string. [ticket:2265]
  * mssql
  - [bug] Fixed compiler bug whereby using a correlated subquery within an
    ORDER BY would fail to render correctly if the stament also used
    LIMIT/OFFSET, due to mis-rendering within the ROW_NUMBER() OVER
    clause. Fix courtesy sayap [ticket:2538]
  - [bug] Fixed compiler bug whereby a given select() would be modified if
    it had an "offset" attribute, causing the construct to not compile
    correctly a second time. [ticket:2545]
  - [bug] Fixed bug where reflection of primary key constraint would double
    up columns if the same constraint/table existed in multiple schemas.
- update to 0.7.8:
  * orm
  - [feature] The 'objects' argument to flush() is no longer deprecated, as
    some valid use cases have been identified.
  - [bug] Fixed bug whereby subqueryload() from a polymorphic mapping to a
    target would incur a new invocation of the query for each distinct
    class encountered in the polymorphic result. [ticket:2480]
  - [bug] Fixed bug in declarative whereby the precedence of columns in a
    joined-table, composite column (typically for id) would fail to be
    correct if the columns contained names distinct from their attribute
    names. This would cause things like primaryjoin conditions made against
    the entity attributes to be incorrect. Related to as this was supposed
    to be part of that, this is. [ticket:2491, 1892]
  - [bug] Fixed identity_key() function which was not accepting a scalar
    argument for the identity. . [ticket:2508]
  - [bug] Fixed bug whereby populate_existing option would not propagate to
    subquery eager loaders. . [ticket:2497]
  * engine
  - [bug] Fixed memory leak in C version of result proxy whereby DBAPIs
    which don't deliver pure Python tuples for result rows would fail to
    decrement refcounts correctly. The most prominently affected DBAPI is
    pyodbc. [ticket:2489]
  - [bug] Fixed bug affecting Py3K whereby string positional parameters
    passed to engine/connection execute() would fail to be interpreted
    correctly, due to __iter__ being present on Py3K string.. [ticket:2503]
  * sql
  - [bug] added BIGINT to types.__all__, BIGINT, BINARY, VARBINARY to
    sqlalchemy module namespace, plus test to ensure this breakage doesn't
    occur again. [ticket:2499]
  - [bug] Repaired common table expression rendering to function correctly
    when the SELECT statement contains UNION or other compound expressions,
    courtesy btbuilder. [ticket:2490]
  - [bug] Fixed bug whereby append_column() wouldn't function correctly on
    a cloned select() construct, courtesy Gunnlaugur Þór
    Briem. [ticket:2482]
  * postgresql
  - [bug] removed unnecessary table clause when reflecting enums,. Courtesy
    Gunnlaugur Þór Briem. [ticket:2510]
  * mysql
  - [feature] Added a new dialect for Google App Engine. Courtesy Richie
    Foreman. [ticket:2484]
  * oracle
  - [bug] Added ROWID to oracle.*. [ticket:2483]
* Wed May 23 2012 highwaystar.ru@gmail.com
- python3 package added
- removed BuildRequires update-desktop-files, because there is no
  desktop files in package
- minor spec improvement
* Sun May  6 2012 lars@linux-schulserver.de
- update to 0.7.7:
  * orm
  - [bug] Fixed issue in unit of work whereby setting a non-None
    self-referential many-to-one relationship to None would fail
    to persist the change if the former value was not already loaded.
    [ticket:2477].
  - [feature] Added prefix_with() method to Query, calls upon
    select().prefix_with() to allow placement of MySQL SELECT
    directives in statements.  Courtesy Diana Clarke [ticket:2443]
  - [bug] Fixed bug in 0.7.6 introduced by [ticket:2409] whereby
    column_mapped_collection used against columns that were mapped as
    joins or other indirect selectables would fail to function.
  - [feature] Added new flag to @validates include_removes. When True,
    collection remove and attribute del events will also be sent to
    the validation function, which accepts an additional argument
    "is_remove" when this flag is used.
  - [bug] Fixed bug whereby polymorphic_on column that's not otherwise
    mapped on the class would be incorrectly included in a merge()
    operation, raising an error. [ticket:2449]
  - [bug] Fixed bug in expression annotation mechanics which could
    lead to incorrect rendering of SELECT statements with aliases
    and joins, particularly when using column_property(). [ticket:2453]
  - [bug] Fixed bug which would prevent OrderingList from being
    pickleable [ticket:2454].  Courtesy Jeff Dairiki
  - [bug] Fixed bug in relationship comparisons whereby calling
    unimplemented methods like SomeClass.somerelationship.like()
    would produce a recursion overflow, instead of NotImplementedError.
  * sql
  - [bug] Removed warning when Index is created with no columns;
    while this might not be what the user intended, it is a valid use case
    as an Index could be a placeholder for just an index of a certain name.
  - [feature] Added new connection event dbapi_error(). Is called for
    all DBAPI-level errors passing the original DBAPI exception before
    SQLAlchemy modifies the state of the cursor. "with engine.begin()",
    the newly acquired Connection is closed explicitly before propagating
    the exception onward normally.
  - [bug] Add BINARY, VARBINARY to types.__all__, [ticket:2474]
  * mssql
  - [feature] Added interim create_engine flag supports_unicode_binds
    to PyODBC dialect, to force whether or not the dialect passes
    Python unicode literals to PyODBC or not.
  - [bug] Repaired the use_scope_identity create_engine() flag when
    using the pyodbc dialect. Previously this flag would be ignored if
    set to False.  When set to False, you'll get "SELECT @@identity"
    after each INSERT to get at the last inserted ID, for those tables
    which have "implicit_returning" set to False.
  - [bug] UPDATE..FROM syntax with SQL Server requires that the updated
    table be present in the FROM clause when an alias of that table is
    also present in the FROM clause. The updated table is now always present
    in the FROM, when FROM is present in the first place.  Courtesy sayap.
    [ticket:2468]
  * postgresql
  - [feature] Added new for_update/with_lockmode() options for Postgresql:
    for_update="read"/ with_lockmode("read"), for_update="read_nowait"/
    with_lockmode("read_nowait"). These emit "FOR SHARE" and "FOR SHARE
    NOWAIT", respectively.  Courtesy Diana Clarke [ticket:2445]
  - [bug] removed unnecessary table clause when reflecting domains, [ticket:2473]
  * mysql
  - [bug] Fixed bug whereby column name inside of "KEY" clause for autoincrement
    composite column with InnoDB would double quote a name that's a reserved
    word.  Courtesy Jeff Dairiki. [ticket:2460]
  - [bug] Fixed bug whereby get_view_names() for "information_schema" schema
    would fail to retrieve views marked as "SYSTEM VIEW". courtesy Matthew Turland.
  - [bug] Fixed bug whereby if cast() is used on a SQL expression whose type
    is not supported by cast() and therefore CAST isn't rendered by the
    dialect, the order of evaluation could change if the casted expression
    required that it be grouped; grouping is now applied to those expressions.
  * sqlite
  - [feature] Added SQLite execution option "sqlite_raw_colnames=True", will
    bypass attempts to remove "." from column names returned by SQLite
    cursor.description. [ticket:2475]
* Mon Apr 30 2012 cfarrell@suse.com
- Update to 0.7.6
  * orm
  - [bug] Fixed event registration bug
    which would primarily show up as
    events not being registered with
    sessionmaker() instances created
    after the event was associated
    with the Session class.  [ticket:2424]
  - [bug] Fixed bug whereby a primaryjoin
    condition with a "literal" in it would
    raise an error on compile with certain
    kinds of deeply nested expressions
    which also needed to render the same
    bound parameter name more than once.
    [ticket:2425]
  - [feature] Added "no_autoflush" context
    manager to Session, used with with:
    will temporarily disable autoflush.
  - [feature] Added cte() method to Query,
    invokes common table expression support
    from the Core (see below). [ticket:1859]
  - [bug] Removed the check for number of
    rows affected when doing a multi-delete
    against mapped objects.   If an ON DELETE
    CASCADE exists between two rows, we can't
    get an accurate rowcount from the DBAPI;
    this particular count is not supported
    on most DBAPIs in any case, MySQLdb
    is the notable case where it is.
    [ticket:2403]
  - [bug] Fixed bug whereby objects using
    attribute_mapped_collection or
    column_mapped_collection could not be
    pickled.  [ticket:2409]
  - [bug] Fixed bug whereby MappedCollection
    would not get the appropriate collection
    instrumentation if it were only used
    in a custom subclass that used
    @collection.internally_instrumented.
    [ticket:2406]
  - [bug] Fixed bug whereby SQL adaption mechanics
    would fail in a very nested scenario involving
    joined-inheritance, joinedload(), limit(), and a
    derived function in the columns clause.
    [ticket:2419]
  - [bug] Fixed the repr() for CascadeOptions to
    include refresh-expire.  Also reworked
    CascadeOptions to be a <frozenset>.
    [ticket:2417]
  - [feature] Added the ability to query for
    Table-bound column names when using
    query(sometable).filter_by(colname=value).
    [ticket:2400]
  - [bug] Improved the "declarative reflection"
    example to support single-table inheritance,
    multiple calls to prepare(), tables that
    are present in alternate schemas,
    establishing only a subset of classes
    as reflected.
  - [bug] Scaled back the test applied within
    flush() to check for UPDATE against partially
    NULL PK within one table to only actually
    happen if there's really an UPDATE to occur.
    [ticket:2390]
  - [bug] Fixed bug whereby if a method name
    conflicted with a column name, a
    TypeError would be raised when the mapper
    tried to inspect the __get__() method
    on the method object.  [ticket:2352]
  * sql
  - [bug] Fixed memory leak in core which would
    occur when C extensions were used with
    particular types of result fetches,
    in particular when orm query.count()
    were called.  [ticket:2427]
  - [bug] Fixed issue whereby attribute-based
    column access on a row would raise
    AttributeError with non-C version,
    NoSuchColumnError with C version.  Now
    raises AttributeError in both cases.
    [ticket:2398]
  - [feature] Added support for SQL standard
    common table expressions (CTE), allowing
    SELECT objects as the CTE source (DML
    not yet supported).  This is invoked via
    the cte() method on any select() construct.
    [ticket:1859]
  - [bug] Added support for using the .key
    of a Column as a string identifier in a
    result set row.   The .key is currently
    listed as an "alternate" name for a column,
    and is superseded by the name of a column
    which has that key value as its regular name.
    For the next major release
    of SQLAlchemy we may reverse this precedence
    so that .key takes precedence, but this
    is not decided on yet.  [ticket:2392]
  - [bug] A warning is emitted when a not-present
    column is stated in the values() clause
    of an insert() or update() construct.
    Will move to an exception in 0.8.
    [ticket:2413]
  - [bug] A significant change to how labeling
    is applied to columns in SELECT statements
    allows "truncated" labels, that is label names
    that are generated in Python which exceed
    the maximum identifier length (note this is
    configurable via label_length on create_engine()),
    to be properly referenced when rendered inside
    of a subquery, as well as to be present
    in a result set row using their original
    in-Python names.   [ticket:2396]
  - [bug] Fixed bug in new "autoload_replace" flag
    which would fail to preserve the primary
    key constraint of the reflected table.
    [ticket:2402]
  - [bug] Index will raise when arguments passed
    cannot be interpreted as columns or expressions.
    Will warn when Index is created
    with no columns at all.  [ticket:2380]
  * engine
  - [feature] Added "no_parameters=True" execution
    option for connections.   If no parameters
    are present, will pass the statement
    as cursor.execute(statement), thereby invoking
    the DBAPIs behavior when no parameter collection
    is present; for psycopg2 and mysql-python, this
    means not interpreting %% signs in the string.
    This only occurs with this option, and not
    just if the param list is blank, as otherwise
    this would produce inconsistent behavior
    of SQL expressions that normally escape percent
    signs (and while compiling, can't know ahead of
    time if parameters will be present in
    some cases).  [ticket:2407]
  - [bug] Added execution_options() call to
    MockConnection (i.e., that used with
    strategy="mock") which acts as a pass through
    for arguments.
  - [feature] Added pool_reset_on_return argument
    to create_engine, allows control over
    "connection return" behavior.  Also added
    new arguments 'rollback', 'commit', None
    to pool.reset_on_return to allow more control
    over connection return activity. [ticket:2378]
  - [feature] Added some decent context managers
    to Engine, Connection:
    with engine.begin() as conn:
    <work with conn in a transaction>
    and:
    with engine.connect() as conn:
    <work with conn>
    Both close out the connection when done,
    commit or rollback transaction with errors
    on engine.begin().
  * sqlite
  - [bug] Fixed bug in C extensions whereby
    string format would not be applied to a
    Numeric value returned as integer; this
    affected primarily SQLite which does
    not maintain numeric scale settings.
    [ticket:2432]
  * mssql
  - [feature] Added support for MSSQL INSERT,
    UPDATE, and DELETE table hints, using
    new with_hint() method on UpdateBase.
    [ticket:2430]
  * mysql
  - [feature] Added support for MySQL index and
    primary key constraint types
    (i.e. USING) via new mysql_using parameter
    to Index and PrimaryKeyConstraint,
    courtesy Diana Clarke.  [ticket:2386]
  - [feature] Added support for the "isolation_level"
    parameter to all MySQL dialects.  Thanks
    to mu_mind for the patch here. [ticket:2394]
  * oracle
  - [feature] Added a new create_engine() flag
    coerce_to_decimal=False, disables the precision
    numeric handling which can add lots of overhead
    by converting all numeric values to
    Decimal.  [ticket:2399]
  - [bug] Added missing compilation support for
    LONG [ticket:2401]
  - [bug] Added 'LEVEL' to the list of reserved
    words for Oracle.  [ticket:2435]
  * examples
  - [bug] Altered _params_from_query() function
    in Beaker example to pull bindparams from the
    fully compiled statement, as a quick means
    to get everything including subqueries in the
    columns clause, etc.
* Wed Feb 22 2012 saschpe@suse.de
- Fixed SLE_11 build by disabling the testsuite for it
* Thu Feb  9 2012 rhafer@suse.de
- Update to 0.7.5:
  * Fixed issue where modified session state established after a
    failed flush would be committed as part of the subsequent
    transaction that begins automatically after manual call to
    rollback().
  * Improved the API for add_column() such that if the same column
    is added to its own table, an error is not raised and the
    constraints don't get doubled up.
  * Fixed issue where the "required" exception would not be raised
    for bindparam() with required=True, if the statement were given
    no parameters at all.
  * for more details see the CHANGES file.
* Thu Nov 10 2011 saschpe@suse.de
- Add depenendency on pysqlite
* Wed Sep 21 2011 saschpe@suse.de
- Update to version 0.7.2:
  * A rework of "replacement traversal"
  * Fixed bug where query.join() + aliased=True
  * Fixed regression from 0.6 where Session.add()
    against an object which contained None
  - See CHANGES for more...
- Run testsuite
* Wed Jul 20 2011 saschpe@gmx.de
- Let doc package require base package instead of recommends
* Wed Jul 20 2011 saschpe@gmx.de
- Dropped unused BuildRequires for fdupes and python-sqlite2
* Wed Jul 20 2011 saschpe@gmx.de
- Initial version, replaces python-sqlalchemy
  * Much simpler spec file
  * Packaged LICENSE, CHANGES and README files