python-SQLAlchemy1/python-SQLAlchemy1.spec

101 lines
3.4 KiB
RPMSpec
Raw Permalink Normal View History

- Update to 1.4.54: * Fixed regression from 1.3 where the column key used for a hybrid property might be populated with that of the underlying column that it returns. * The pin for ``setuptools<69.3`` in ``pyproject.toml`` has been removed. * Set up full Python 3.13 support to the extent currently possible, repairing issues within internal language helpers as well as the serializer extension module. * Adjustments to the C extensions, which are specific to the SQLAlchemy 1.x series, to work under Python 3.13. * Fixed regression going back to 1.4 where accessing a collection using the "dynamic" strategy on a transient object and attempting to query would raise an internal error. * Fixed bug where ORM :func:`_orm.with_loader_criteria` would not apply itself to a :meth:`_sql.Select.join` where the ON clause were given as a plain SQL comparison, rather than as a relationship target or similar. * Fixed regression introduced by the fix when using pool pre-ping with PyMySQL version older than 1.0. * Fixed critical issue in asyncio version of the connection pool where calling :meth:`_asyncio.AsyncEngine.dispose` would produce a new connection pool that did not fully re-establish the use of asyncio-compatible mutexes * Fixed fundamental issue which prevented some forms of ORM "annotations" from taking place for subqueries which made use of :meth:`_sql.Select.join` against a relationship target * Repaired a new incompatibility in the MySQL "pre-ping" routine where the ``False`` argument passed to ``connection.ping()``, which is intended to disable an unwanted "automatic reconnect" feature - Switch to pyproject macros. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-SQLAlchemy1?expand=0&rev=18
2024-09-19 07:18:17 +00:00
#
# spec file for package python-SQLAlchemy1
#
# Copyright (c) 2024 SUSE LLC
#
# 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 https://bugs.opensuse.org/
#
%define skip_python2 1
%define oldpython python
%{?sle15_python_module_pythons}
Name: python-SQLAlchemy1
Version: 1.4.54
Release: 0
Summary: Database Abstraction Library
License: MIT
URL: https://www.sqlalchemy.org
Source: https://files.pythonhosted.org/packages/source/s/sqlalchemy/sqlalchemy-%{version}.tar.gz
Source1: SQLAlchemy.keyring
# devel is needed for optional C extensions cprocessors.so, cresultproxy.so and cutils.so
BuildRequires: %{python_module devel}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module wheel}
BuildRequires: %{pythons}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python
Requires: python-greenlet
Provides: python-SQLAlchemy = %{version}
Provides: python-sqlalchemy = %{version}
Conflicts: python-SQLAlchemy
%if %{python_version_nodots} < 38
Requires: python-importlib-metadata
%endif
# SECTION test requirements
BuildRequires: %{python_module greenlet}
BuildRequires: %{python_module importlib-metadata}
BuildRequires: %{python_module pytest >= 4.4.0}
# /SECTION
%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
Provides: %{python_module SQLAlchemy-doc = %{version}}
BuildArch: noarch
%description -n %{name}-doc
This package contains HTML documentation, including tutorials and API
reference for python-SQLAlchemy.
%prep
%autosetup -p1 -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"
%pyproject_wheel
%install
%pyproject_install
%python_expand %fdupes %{buildroot}%{$python_sitearch}
%check
# One test fails on Python 3.6
# packaging.version.InvalidVersion: Invalid version: 'SQLAlchemy'
%pytest_arch -k 'not (test_parseconnect and CreateEngineTest and test_bad_args)'
%files %{python_files}
%license LICENSE
%doc CHANGES README.rst README.dialects.rst README.unittests.rst
%{python_sitearch}/sqlalchemy/
%{python_sitearch}/SQLAlchemy-%{version}.dist-info
%files -n %{name}-doc
%doc doc/
%doc examples/
%changelog