[packages/python3-sqlalchemy] - python-sqlalchemy.spec updated to 2.0.41 for python 3.7+
qboosh
qboosh at pld-linux.org
Thu Jul 10 18:30:39 CEST 2025
commit e0d6afd32de9124de24f14c0456034e5ef3b4a77
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Thu Jul 10 18:32:12 2025 +0200
- python-sqlalchemy.spec updated to 2.0.41 for python 3.7+
pep263.patch | 28 ------
python-sqlalchemy-tests.patch | 30 ------
python-sqlalchemy.spec | 223 ------------------------------------------
python3-sqlalchemy.spec | 135 +++++++++++++++++++++++++
4 files changed, 135 insertions(+), 281 deletions(-)
---
diff --git a/python-sqlalchemy.spec b/python-sqlalchemy.spec
deleted file mode 100644
index be49a12..0000000
--- a/python-sqlalchemy.spec
+++ /dev/null
@@ -1,223 +0,0 @@
-#
-# Conditional build:
-%bcond_without python2 # CPython 2.x module
-%bcond_without python3 # CPython 3.x module
-%bcond_without tests # unit tests
-
-# TODO: tests hang on x32
-%ifarch x32
-%undefine with_tests
-%endif
-
-%define module sqlalchemy
-Summary: Database Abstraction Library for Python 2
-Summary(pl.UTF-8): Biblioteka abstrakcji baz danych dla Pythona 2
-Name: python-%{module}
-# keep 1.x here for python2 support
-Version: 1.4.54
-Release: 1
-License: MIT
-Group: Libraries/Python
-#Source0Download: https://pypi.org/simple/sqlalchemy/
-Source0: https://files.pythonhosted.org/packages/source/s/sqlalchemy/sqlalchemy-%{version}.tar.gz
-# Source0-md5: 8f156a25d7ad78a62eebd3da6de1442d
-Patch0: %{name}-tests.patch
-Patch1: pep263.patch
-URL: https://www.sqlalchemy.org/
-BuildRequires: rpm-build >= 4.6
-BuildRequires: rpm-pythonprov
-BuildRequires: rpmbuild(macros) >= 1.714
-%if %{with python2}
-BuildRequires: python-devel >= 1:2.7
-BuildRequires: python-modules >= 1:2.7
-BuildRequires: python-setuptools >= 0.6-0.a9.1
-%if %{with tests}
-BuildRequires: python-mock
-BuildRequires: python-pytest >= 4.6.11
-BuildRequires: python-pytest-xdist
-%endif
-%endif
-%if %{with python3}
-BuildRequires: python3-devel >= 1:3.4
-BuildRequires: python3-modules >= 1:3.4
-BuildRequires: python3-setuptools >= 0.6-0.a9.1
-%if %{with tests}
-BuildRequires: python3-pytest >= 6.2
-BuildRequires: python3-pytest-xdist
-%endif
-%endif
-Requires: python-modules
-Provides: python-SQLAlchemy = %{version}-%{release}
-Obsoletes: python-SQLAlchemy < 0.9.8
-BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
-
-%description
-The Python SQL toolkit and Object Relational Mapper that gives
-application developers the full power and flexibility of SQL.
-SQLAlchemy provides a full suite of well known enterprise-level
-persistence patterns, designed for efficient and high-performing
-database access, adapted into a simple and Pythonic domain language.
-
-Python 2.x version.
-
-%description -l pl.UTF-8
-Zestaw narzędzi SQL oraz odwzorowań obiektowo-relacyjnych dla Pythona,
-dający programistom całą potęgę i elastyczność SQL-a. SQLAlchemy
-udostępnia pełny zbiór dobrze znanych wzorców trwałości,
-zaprojektowanych z myślą o efektywny i wydajnym dostępem do baz
-danych, zaadaptowanych do prostego, pythonowego języka.
-
-Wersja dla pythona 2.x.
-
-%package -n python3-%{module}
-Summary: Database Abstraction Library for Python 3
-Summary(pl.UTF-8): Biblioteka abstrakcji baz danych dla Pythona 3
-Group: Libraries/Python
-Provides: python3-SQLAlchemy = %{version}-%{release}
-Obsoletes: python3-SQLAlchemy < 0.9.8
-
-%description -n python3-%{module}
-The Python SQL toolkit and Object Relational Mapper that gives
-application developers the full power and flexibility of SQL.
-SQLAlchemy provides a full suite of well known enterprise-level
-persistence patterns, designed for efficient and high-performing
-database access, adapted into a simple and Pythonic domain language.
-
-Python 3.x version.
-
-%description -n python3-%{module} -l pl.UTF-8
-Zestaw narzędzi SQL oraz odwzorowań obiektowo-relacyjnych dla Pythona,
-dający programistom całą potęgę i elastyczność SQL-a. SQLAlchemy
-udostępnia pełny zbiór dobrze znanych wzorców trwałości,
-zaprojektowanych z myślą o efektywny i wydajnym dostępem do baz
-danych, zaadaptowanych do prostego, pythonowego języka.
-
-Wersja dla Pythona 3.x.
-
-%package apidocs
-Summary: API documentation for Python SQLAlchemy module
-Summary(pl.UTF-8): Dokumentacja API modułu Pythona SQLAlchemy
-Group: Documentation
-BuildArch: noarch
-
-%description apidocs
-API documentation for Python SQLAlchemy module.
-
-%description apidocs -l pl.UTF-8
-Dokumentacja API modułu Pythona SQLAlchemy.
-
-%package examples
-Summary: Examples for Python SQLAlchemy module
-Summary(pl.UTF-8): Przykłady do modułu Pythona SQLAlchemy
-Group: Documentation
-BuildArch: noarch
-
-%description examples
-Examples for Python SQLAlchemy module.
-
-%description examples -l pl.UTF-8
-Przykłady do modułu Pythona SQLAlchemy.
-
-%prep
-%setup -q -n sqlalchemy-%{version}
-%patch -P 0 -p1
-%patch -P 1 -p1
-
-%build
-%if %{with python2}
-%py_build
-
-%if %{with tests}
-PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
-PYTHONPATH=$(echo $(pwd)/build-2/lib.linux-*) \
-LANG=C.UTF-8 \
-%{__python} -m pytest test -k 'not test_fixture_five'
-# in OverlappingFksSiblingTest.test_fixture_five[False] reported warnings differ from reference
-%endif
-%endif
-
-%if %{with python3}
-%py3_build
-
-%if %{with tests}
-PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
-PYTHONPATH=$(echo $(pwd)/build-3/lib.linux-*) \
-%{__python3} -m pytest test
-%endif
-%endif
-
-%install
-rm -rf $RPM_BUILD_ROOT
-
-%if %{with python2}
-%py_install
-
-%py_postclean
-%endif
-
-%if %{with python3}
-%py3_install
-%endif
-
-install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
-cp -pr examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
-
-%clean
-rm -rf $RPM_BUILD_ROOT
-
-%if %{with python2}
-%files
-%defattr(644,root,root,755)
-%doc AUTHORS CHANGES LICENSE README.rst
-%dir %{py_sitedir}/sqlalchemy
-%{py_sitedir}/sqlalchemy/connectors
-%{py_sitedir}/sqlalchemy/databases
-%{py_sitedir}/sqlalchemy/dialects
-%{py_sitedir}/sqlalchemy/engine
-%{py_sitedir}/sqlalchemy/event
-%{py_sitedir}/sqlalchemy/ext
-%{py_sitedir}/sqlalchemy/future
-%{py_sitedir}/sqlalchemy/orm
-%{py_sitedir}/sqlalchemy/pool
-%{py_sitedir}/sqlalchemy/sql
-%{py_sitedir}/sqlalchemy/testing
-%{py_sitedir}/sqlalchemy/util
-%attr(755,root,root) %{py_sitedir}/sqlalchemy/cimmutabledict.so
-%attr(755,root,root) %{py_sitedir}/sqlalchemy/cprocessors.so
-%attr(755,root,root) %{py_sitedir}/sqlalchemy/cresultproxy.so
-%{py_sitedir}/sqlalchemy/*.py[co]
-%{py_sitedir}/SQLAlchemy-%{version}-py*.egg-info
-%endif
-
-%if %{with python3}
-%files -n python3-%{module}
-%defattr(644,root,root,755)
-%doc AUTHORS CHANGES LICENSE README.rst
-%dir %{py3_sitedir}/sqlalchemy
-%{py3_sitedir}/sqlalchemy/connectors
-%{py3_sitedir}/sqlalchemy/databases
-%{py3_sitedir}/sqlalchemy/dialects
-%{py3_sitedir}/sqlalchemy/engine
-%{py3_sitedir}/sqlalchemy/event
-%{py3_sitedir}/sqlalchemy/ext
-%{py3_sitedir}/sqlalchemy/future
-%{py3_sitedir}/sqlalchemy/orm
-%{py3_sitedir}/sqlalchemy/pool
-%{py3_sitedir}/sqlalchemy/sql
-%{py3_sitedir}/sqlalchemy/testing
-%{py3_sitedir}/sqlalchemy/util
-%attr(755,root,root) %{py3_sitedir}/sqlalchemy/cimmutabledict.cpython-*.so
-%attr(755,root,root) %{py3_sitedir}/sqlalchemy/cprocessors.cpython-*.so
-%attr(755,root,root) %{py3_sitedir}/sqlalchemy/cresultproxy.cpython-*.so
-%{py3_sitedir}/sqlalchemy/*.py
-%{py3_sitedir}/sqlalchemy/__pycache__
-%{py3_sitedir}/SQLAlchemy-%{version}-py*.egg-info
-%endif
-
-%files apidocs
-%defattr(644,root,root,755)
-%doc doc/{_images,_modules,_static,changelog,core,dialects,faq,orm,*.html,*.js}
-
-%files examples
-%defattr(644,root,root,755)
-%{_examplesdir}/%{name}-%{version}
diff --git a/python3-sqlalchemy.spec b/python3-sqlalchemy.spec
new file mode 100644
index 0000000..5779a6b
--- /dev/null
+++ b/python3-sqlalchemy.spec
@@ -0,0 +1,135 @@
+#
+# Conditional build:
+%bcond_without tests # unit tests
+
+%define module sqlalchemy
+Summary: Database Abstraction Library for Python
+Summary(pl.UTF-8): Biblioteka abstrakcji baz danych dla Pythona
+Name: python3-%{module}
+Version: 2.0.41
+Release: 1
+License: MIT
+Group: Libraries/Python
+#Source0Download: https://pypi.org/simple/sqlalchemy/
+Source0: https://files.pythonhosted.org/packages/source/s/sqlalchemy/sqlalchemy-%{version}.tar.gz
+# Source0-md5: 76ade8b13f77b9ceaff6c91f5617c668
+URL: https://www.sqlalchemy.org/
+BuildRequires: python3-Cython
+BuildRequires: python3-devel >= 1:3.7
+BuildRequires: python3-modules >= 1:3.7
+BuildRequires: python3-setuptools >= 0.6-0.a9.1
+%if %{with tests}
+%if "%{py3_ver}" == "3.7"
+BuildRequires: python3-importlib_metadata
+%endif
+BuildRequires: python3-greenlet >= 1
+BuildRequires: python3-pytest >= 7.0.0
+BuildRequires: python3-pytest-xdist
+BuildRequires: python3-typing_extensions >= 4.6.0
+%endif
+BuildRequires: rpm-build >= 4.6
+BuildRequires: rpm-pythonprov
+BuildRequires: rpmbuild(macros) >= 1.714
+Requires: python3-modules >= 1:3.7
+Provides: python3-SQLAlchemy = %{version}-%{release}
+Obsoletes: python3-SQLAlchemy < 0.9.8
+BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+The Python SQL toolkit and Object Relational Mapper that gives
+application developers the full power and flexibility of SQL.
+SQLAlchemy provides a full suite of well known enterprise-level
+persistence patterns, designed for efficient and high-performing
+database access, adapted into a simple and Pythonic domain language.
+
+%description -l pl.UTF-8
+Zestaw narzędzi SQL oraz odwzorowań obiektowo-relacyjnych dla Pythona,
+dający programistom całą potęgę i elastyczność SQL-a. SQLAlchemy
+udostępnia pełny zbiór dobrze znanych wzorców trwałości,
+zaprojektowanych z myślą o efektywny i wydajnym dostępem do baz
+danych, zaadaptowanych do prostego, pythonowego języka.
+
+%package apidocs
+Summary: API documentation for Python SQLAlchemy module
+Summary(pl.UTF-8): Dokumentacja API modułu Pythona SQLAlchemy
+Group: Documentation
+BuildArch: noarch
+
+%description apidocs
+API documentation for Python SQLAlchemy module.
+
+%description apidocs -l pl.UTF-8
+Dokumentacja API modułu Pythona SQLAlchemy.
+
+%package examples
+Summary: Examples for Python SQLAlchemy module
+Summary(pl.UTF-8): Przykłady do modułu Pythona SQLAlchemy
+Group: Documentation
+BuildArch: noarch
+
+%description examples
+Examples for Python SQLAlchemy module.
+
+%description examples -l pl.UTF-8
+Przykłady do modułu Pythona SQLAlchemy.
+
+%prep
+%setup -q -n sqlalchemy-%{version}
+
+%build
+%py3_build
+
+%if %{with tests}
+# =================================== FAILURES ===================================
+# ____________ MypyPlainTest.test_mypy_no_plugin[mapped_covariant.py] ____________
+# [...]
+# AssertionError: .../mapped_covariant.py:35: error: Incompatible return value type (got "Mapped[str]", expected "str") [return-value]
+PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
+PYTHONPATH=$(echo $(pwd)/build-3/lib.linux-*) \
+%{__python3} -m pytest test -k 'not test_mypy_no_plugin[mapped_covariant.py]'
+%endif
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%py3_install
+
+install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
+cp -pr examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(644,root,root,755)
+%doc AUTHORS CHANGES.rst LICENSE README.rst
+%dir %{py3_sitedir}/sqlalchemy
+%{py3_sitedir}/sqlalchemy/connectors
+%dir %{py3_sitedir}/sqlalchemy/cyextension
+%{py3_sitedir}/sqlalchemy/cyextension/__init__.py
+%{py3_sitedir}/sqlalchemy/cyextension/__pycache__
+%attr(755,root,root) %{py3_sitedir}/sqlalchemy/cyextension/*.so
+%{py3_sitedir}/sqlalchemy/cyextension/*.pxd
+%{py3_sitedir}/sqlalchemy/cyextension/*.pyx
+%{py3_sitedir}/sqlalchemy/dialects
+%{py3_sitedir}/sqlalchemy/engine
+%{py3_sitedir}/sqlalchemy/event
+%{py3_sitedir}/sqlalchemy/ext
+%{py3_sitedir}/sqlalchemy/future
+%{py3_sitedir}/sqlalchemy/orm
+%{py3_sitedir}/sqlalchemy/pool
+%{py3_sitedir}/sqlalchemy/sql
+%{py3_sitedir}/sqlalchemy/testing
+%{py3_sitedir}/sqlalchemy/util
+%{py3_sitedir}/sqlalchemy/py.typed
+%{py3_sitedir}/sqlalchemy/*.py
+%{py3_sitedir}/sqlalchemy/__pycache__
+%{py3_sitedir}/SQLAlchemy-%{version}-py*.egg-info
+
+%files apidocs
+%defattr(644,root,root,755)
+%doc doc/{_images,_modules,_static,changelog,core,dialects,faq,orm,tutorial,*.html,*.js}
+
+%files examples
+%defattr(644,root,root,755)
+%{_examplesdir}/%{name}-%{version}
diff --git a/pep263.patch b/pep263.patch
deleted file mode 100644
index c7d4592..0000000
--- a/pep263.patch
+++ /dev/null
@@ -1,28 +0,0 @@
---- sqlalchemy-1.4.54/lib/sqlalchemy/testing/suite/test_unicode_ddl.py.orig 2024-09-05 17:50:09.000000000 +0200
-+++ sqlalchemy-1.4.54/lib/sqlalchemy/testing/suite/test_unicode_ddl.py 2025-03-26 23:33:53.985935475 +0100
-@@ -1,10 +1,10 @@
-+# coding: utf-8
- # testing/suite/test_unicode_ddl.py
- # Copyright (C) 2005-2024 the SQLAlchemy authors and contributors
- # <see AUTHORS file>
- #
- # This module is part of SQLAlchemy and is released under
- # the MIT License: https://www.opensource.org/licenses/mit-license.php
--# coding: utf-8
- """verrrrry basic unicode column name testing"""
-
- from sqlalchemy import desc
---- sqlalchemy-1.4.54/lib/sqlalchemy/testing/suite/test_types.py.orig 2024-09-05 17:50:09.000000000 +0200
-+++ sqlalchemy-1.4.54/lib/sqlalchemy/testing/suite/test_types.py 2025-03-26 23:32:04.274036851 +0100
-@@ -1,10 +1,10 @@
-+# coding: utf-8
- # testing/suite/test_types.py
- # Copyright (C) 2005-2024 the SQLAlchemy authors and contributors
- # <see AUTHORS file>
- #
- # This module is part of SQLAlchemy and is released under
- # the MIT License: https://www.opensource.org/licenses/mit-license.php
--# coding: utf-8
-
- import datetime
- import decimal
diff --git a/python-sqlalchemy-tests.patch b/python-sqlalchemy-tests.patch
deleted file mode 100644
index c253392..0000000
--- a/python-sqlalchemy-tests.patch
+++ /dev/null
@@ -1,30 +0,0 @@
---- SQLAlchemy-1.3.24/test/dialect/mssql/test_engine.py~ 2021-03-31 00:58:18.000000000 +0200
-+++ SQLAlchemy-1.3.24/test/dialect/mssql/test_engine.py 2022-03-31 08:03:00.006533320 +0200
-@@ -158,26 +158,6 @@ class ParseConnectTest(fixtures.TestBase
- True,
- )
-
-- def test_pyodbc_extra_connect_azure(self):
-- # issue #5592
-- dialect = pyodbc.dialect()
-- u = url.make_url(
-- "mssql+pyodbc://@server_name/db_name?"
-- "driver=ODBC+Driver+17+for+SQL+Server&"
-- "authentication=ActiveDirectoryIntegrated"
-- )
-- connection = dialect.create_connect_args(u)
-- eq_(connection[1], {})
-- eq_(
-- connection[0][0]
-- in (
-- "DRIVER={ODBC Driver 17 for SQL Server};"
-- "Server=server_name;Database=db_name;"
-- "Authentication=ActiveDirectoryIntegrated",
-- ),
-- True,
-- )
--
- def test_pyodbc_odbc_connect(self):
- dialect = pyodbc.dialect()
- u = url.make_url(
-
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/python3-sqlalchemy.git/commitdiff/e0d6afd32de9124de24f14c0456034e5ef3b4a77
More information about the pld-cvs-commit
mailing list