15
0
Files
python-alembic/python-alembic.spec

94 lines
3.0 KiB
RPMSpec
Raw Normal View History

#
# spec file for package python-alembic
#
# Copyright (c) 2023 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/
#
%{?sle15_python_module_pythons}
Name: python-alembic
- update to 1.12.1: * Fixed regression caused by :ticket:`879` released in 1.7.0 where the ".info" dictionary of ``Table`` would not render in autogenerate create table statements. This can be useful for custom create table DDL rendering schemes so it is restored. * Improved typing in the :paramref:`.EnvironmentContext.configure.process_revision_dir ectives` callable to better indicate that the passed-in type is :class:`.MigrationScript`, not the :class:`.MigrationOperation` base class, and added typing to the example at :ref:`cookbook_no_empty_migrations` to illustrate. * Repaired :class:`.ExecuteSQLOp` so that it can participate in "diff" operations; while this object is typically not present in a reflected operation stream, custom hooks may be adding this construct where it needs to have the correct ``to_diff_tuple()`` method. * Improved the ``op.execute()`` method to correctly accept the * ``Executable`` type that is the same which is used in SQLAlchemy ``Connection.execute()``. * Improve typing of the revision parameter in various command functions. * Fixed autogen render issue where expressions inside of indexes for PG need to be double-parenthesized, meaning a single parens must be present within the generated ``text()`` construct. * Alembic now accommodates for Sequence and Identity that support dialect kwargs. This is a change that will be added to SQLAlchemy v2.1. not use semver, nor does its parent project SQLAlchemy; OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-alembic?expand=0&rev=153
2023-11-14 12:42:00 +00:00
Version: 1.12.1
Release: 0
Summary: A database migration tool for SQLAlchemy
License: MIT
URL: https://github.com/sqlalchemy/alembic
Source0: https://files.pythonhosted.org/packages/source/a/alembic/alembic-%{version}.tar.gz
BuildRequires: %{python_module Mako}
- update to 1.10.4: * Added support for autogenerate comparison of indexes on PostgreSQL which include SQL sort option, such as ``ASC`` or ``NULLS FIRST``. * Fixed various typing issues observed with pyright, including issues involving the combination of :class:`.Function` and :meth:`.MigrationContext.begin_transaction`. * Fixed error raised by alembic when running autogenerate after removing a function based index. * Fixed regression where Alembic would not run with older SQLAlchemy 1.3 versions prior to 1.3.24 due to a missing symbol. Workarounds have been applied for older 1.3 versions. * Fixed issue regarding PostgreSQL :class:`.ExcludeConstraint`, where constraint elements which made use of :func:`.literal_column` could not be rendered for autogenerate. Additionally, using SQLAlchemy 2.0.5 or greater, :func:`.text()` constructs are also supported within PostgreSQL :class:`.ExcludeConstraint` objects for autogenerate render. * Fixed issue in index detection where autogenerate change detection would consider indexes with the same columns but with different order as equal, while in general they are not equivalent in how a database will use them. * Recursive traversal of revision files in a particular revision directory is now supported, by indicating ``recursive_version_locations = true`` in alembic.ini. * Fixed issue where indexes on SQLite which include SQL expressions would not compare correctly, generating false positives under autogenerate. These indexes are now skipped, generating a warning, in the same way that expression-based indexes on PostgreSQL are skipped and OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-alembic?expand=0&rev=142
2023-05-05 22:20:37 +00:00
BuildRequires: %{python_module SQLAlchemy >= 2.0.0}
BuildRequires: %{python_module importlib-metadata if %python-base < 3.9}
BuildRequires: %{python_module importlib-resources if %python-base < 3.9}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module pytest-xdist}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module python-dateutil}
- update to 1.10.4: * Added support for autogenerate comparison of indexes on PostgreSQL which include SQL sort option, such as ``ASC`` or ``NULLS FIRST``. * Fixed various typing issues observed with pyright, including issues involving the combination of :class:`.Function` and :meth:`.MigrationContext.begin_transaction`. * Fixed error raised by alembic when running autogenerate after removing a function based index. * Fixed regression where Alembic would not run with older SQLAlchemy 1.3 versions prior to 1.3.24 due to a missing symbol. Workarounds have been applied for older 1.3 versions. * Fixed issue regarding PostgreSQL :class:`.ExcludeConstraint`, where constraint elements which made use of :func:`.literal_column` could not be rendered for autogenerate. Additionally, using SQLAlchemy 2.0.5 or greater, :func:`.text()` constructs are also supported within PostgreSQL :class:`.ExcludeConstraint` objects for autogenerate render. * Fixed issue in index detection where autogenerate change detection would consider indexes with the same columns but with different order as equal, while in general they are not equivalent in how a database will use them. * Recursive traversal of revision files in a particular revision directory is now supported, by indicating ``recursive_version_locations = true`` in alembic.ini. * Fixed issue where indexes on SQLite which include SQL expressions would not compare correctly, generating false positives under autogenerate. These indexes are now skipped, generating a warning, in the same way that expression-based indexes on PostgreSQL are skipped and OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-alembic?expand=0&rev=142
2023-05-05 22:20:37 +00:00
BuildRequires: %{python_module typing-extensions >= 4}
BuildRequires: %{python_module wheel}
BuildRequires: %{pythons}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python-Mako
- update to 1.10.4: * Added support for autogenerate comparison of indexes on PostgreSQL which include SQL sort option, such as ``ASC`` or ``NULLS FIRST``. * Fixed various typing issues observed with pyright, including issues involving the combination of :class:`.Function` and :meth:`.MigrationContext.begin_transaction`. * Fixed error raised by alembic when running autogenerate after removing a function based index. * Fixed regression where Alembic would not run with older SQLAlchemy 1.3 versions prior to 1.3.24 due to a missing symbol. Workarounds have been applied for older 1.3 versions. * Fixed issue regarding PostgreSQL :class:`.ExcludeConstraint`, where constraint elements which made use of :func:`.literal_column` could not be rendered for autogenerate. Additionally, using SQLAlchemy 2.0.5 or greater, :func:`.text()` constructs are also supported within PostgreSQL :class:`.ExcludeConstraint` objects for autogenerate render. * Fixed issue in index detection where autogenerate change detection would consider indexes with the same columns but with different order as equal, while in general they are not equivalent in how a database will use them. * Recursive traversal of revision files in a particular revision directory is now supported, by indicating ``recursive_version_locations = true`` in alembic.ini. * Fixed issue where indexes on SQLite which include SQL expressions would not compare correctly, generating false positives under autogenerate. These indexes are now skipped, generating a warning, in the same way that expression-based indexes on PostgreSQL are skipped and OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-alembic?expand=0&rev=142
2023-05-05 22:20:37 +00:00
Requires: python-SQLAlchemy >= 2.0.0
Requires: python-typing-extensions >= 4
Requires(post): update-alternatives
Requires(postun):update-alternatives
BuildArch: noarch
%if 0%{?python_version_nodots} < 39
Requires: python-importlib-metadata
Requires: python-importlib-resources
%endif
%python_subpackages
%description
Alembic is a new database migrations tool, written by the author
of SQLAlchemy <http://www.sqlalchemy.org>. A migrations tool
offers the following functionality:
* Can emit ALTER statements to a database in order to change
the structure of tables and other constructs
* Provides a system whereby "migration scripts" may be constructed;
each script indicates a particular series of steps that can "upgrade" a
target database to a new version, and optionally a series of steps that can
"downgrade" similarly, doing the same steps in reverse.
* Allows the scripts to execute in some sequential manner.
%prep
%setup -q -n alembic-%{version}
%autopatch -p1
%build
%pyproject_wheel
%install
%pyproject_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%python_clone -a %{buildroot}%{_bindir}/alembic
%check
%pytest -n auto
%post
%python_install_alternative alembic
%postun
%python_uninstall_alternative alembic
%files %{python_files}
%license LICENSE
%doc CHANGES README.rst
%python_alternative %{_bindir}/alembic
%{python_sitelib}/alembic
%{python_sitelib}/alembic-%{version}*-info
%changelog