python-peewee/python-peewee.spec
Dirk Mueller 82f3972b85 Accepting request 1008036 from home:yarunachalam:branches:devel:languages:python
- Update to 3.15.3
  Add scalars() query method (complements scalar()), roughly equivalent to writing [t[0] for t in query.tuples()].
  Small doc improvements
  Fix and remove some flaky test assertions with Sqlite INSERT + RETURNING.
  Fix innocuous failing Sqlite test on big-endian machines.
  View commits
- Update to 3.15.2
  Fix bug where field-specific conversions were being applied to the pattern used for LIKE / ILIKE operations. Refs #2609
  Fix possible infinite loop when accidentally invoking the __iter__ method on certain Column subclasses. Refs #2606
  Add new helper for specifying which Model a particular selected column-like should be bound to, in queries with joins that select from multiple sources.
  View commits
- Update to 3.15.1
  Fix issue introduced in Sqlite 3.39.0 regarding the propagation of column subtypes in subqueries.
  Fix bug where cockroachdb server version was not set when beginning a transaction on an unopened database.
  View commits
- Update to 3.15.0
  Rollback behavior change in commit ab43376697 (GH #2026). Peewee will no longer automatically return the cursor rowcount for certain bulk-inserts.
  This should only affect users of MySQL and Sqlite who relied on a bulk INSERT returning the rowcount (as opposed to the cursor's lastrowid).
  The rowcount behavior is still available chaining the as_rowcount() method:
  # NOTE: this change only affects MySQL or Sqlite.
  db = MySQLDatabase(...)
  # Previously, bulk inserts of the following forms would return the rowcount.
  query = User.insert_many(...)  # Bulk insert.
  query = User.insert_from(...)  # Bulk insert (INSERT INTO .. SELECT FROM).
  # Previous behavior (peewee 3.12 - 3.14.10):
  # rows_inserted = query.execute()
  # New behavior:
  last_id = query.execute()
  # To get the old behavior back:
  rows_inserted = query.as_rowcount().execute()

OBS-URL: https://build.opensuse.org/request/show/1008036
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-peewee?expand=0&rev=36
2022-10-07 08:11:28 +00:00

76 lines
2.2 KiB
RPMSpec

#
# spec file for package python-peewee
#
# Copyright (c) 2022 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/
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-peewee
Version: 3.15.2
Release: 0
Summary: An expressive ORM that supports multiple SQL backends
License: BSD-3-Clause
URL: https://github.com/coleifer/peewee
Source: https://github.com/coleifer/peewee/archive/refs/tags/%{version}.tar.gz#/peewee-%{version}.tar.gz
BuildRequires: %{python_module Cython}
BuildRequires: %{python_module Flask}
BuildRequires: %{python_module PyMySQL}
BuildRequires: %{python_module apsw}
BuildRequires: %{python_module devel}
BuildRequires: %{python_module psycopg2}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module setuptools}
BuildRequires: %{pythons}
BuildRequires: fdupes
BuildRequires: pkgconfig
BuildRequires: python-rpm-macros
BuildRequires: unzip
BuildRequires: pkgconfig(sqlite3)
Requires(post): update-alternatives
Requires(postun):update-alternatives
%python_subpackages
%description
An expressive ORM that supports PostgreSQL, MySQL and SQLite.
%prep
%setup -q -n peewee-%{version}
%build
%python_build
%install
%python_install
%python_clone -a %{buildroot}%{_bindir}/pwiz.py
%python_expand %fdupes %{buildroot}%{$python_sitearch}
%check
%pytest_arch tests
%post
%python_install_alternative pwiz.py
%postun
%python_uninstall_alternative pwiz.py
%files %{python_files}
%license LICENSE
%doc CHANGELOG.md README.rst TODO.rst
%{_bindir}/pwiz.py-%{python_bin_suffix}
%python_alternative %{_bindir}/pwiz.py
%{python_sitearch}/*
%changelog