Sync from SUSE:SLFO:Main python-pyrsistent revision 539cda027ef6aa263dda21a8954e42c1

This commit is contained in:
Adrian Schröter 2024-12-13 12:07:24 +01:00
parent fd9c00d8d5
commit 9616535dc8
5 changed files with 87 additions and 16 deletions

BIN
pyrsistent-0.19.3.tar.gz (Stored with Git LFS)

Binary file not shown.

BIN
pyrsistent-0.20.0.tar.gz (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -1,3 +1,30 @@
-------------------------------------------------------------------
Tue Sep 24 11:32:02 UTC 2024 - ecsos <ecsos@opensuse.org>
- Fix build error under Leap.
-------------------------------------------------------------------
Tue Jul 30 13:00:09 UTC 2024 - John Paul Adrian Glaubitz <adrian.glaubitz@suse.com>
- Cherry-pick upstream patch to fix compatibility with Python 3.13
* replace-private-function.patch
-------------------------------------------------------------------
Fri Jan 5 17:29:47 UTC 2024 - Dirk Müller <dmueller@suse.com>
- update to 0.20.0:
* Fix #245, never introduce new nodes during discard.
* Fix #268, do not rely on well implemented __ne__ for keys in
pmaps, instead do explicit inversion of equality
comparison when checking for inequality.
* Officially support Python 3.12.
* Officially drop support for Python 3.7.
* Fix #273, build more types of wheels.
* Fix #282, add generic types to types
* Fix #281, defaultdict can now be frozen. NB! This is a
backwards incompatible fix since defaultdict was not
previously frozen.
------------------------------------------------------------------- -------------------------------------------------------------------
Fri Apr 21 12:31:16 UTC 2023 - Dirk Müller <dmueller@suse.com> Fri Apr 21 12:31:16 UTC 2023 - Dirk Müller <dmueller@suse.com>
@ -71,7 +98,7 @@ Mon Sep 28 11:11:31 UTC 2020 - Dirk Mueller <dmueller@suse.com>
* Remove Python 2 support code. This includes dropping some compatibility code and the dependency on * Remove Python 2 support code. This includes dropping some compatibility code and the dependency on
six. Thanks @djailla for this. six. Thanks @djailla for this.
* Fix #200, python 3 exception chaining. This is a minor backwards incompatibility, hence stepping * Fix #200, python 3 exception chaining. This is a minor backwards incompatibility, hence stepping
to 0.17.0. Thanks @cool-RR for this! to 0.17.0. Thanks @cool-RR for this!
------------------------------------------------------------------- -------------------------------------------------------------------
Fri Jul 17 07:40:53 UTC 2020 - Dirk Mueller <dmueller@suse.com> Fri Jul 17 07:40:53 UTC 2020 - Dirk Mueller <dmueller@suse.com>
@ -118,14 +145,14 @@ Thu Jul 18 09:38:13 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>
Wed Jun 5 09:20:42 UTC 2019 - Marketa Calabkova <mcalabkova@suse.com> Wed Jun 5 09:20:42 UTC 2019 - Marketa Calabkova <mcalabkova@suse.com>
- Update to 0.15.2 - Update to 0.15.2
* Fix #166, Propagate 'ignore_extra' param in hierarchy. Thanks * Fix #166, Propagate 'ignore_extra' param in hierarchy. Thanks
@ss18 for this! @ss18 for this!
* Fix #167, thaw typing. Thanks @nattofriends for this! * Fix #167, thaw typing. Thanks @nattofriends for this!
* Fix #154, not possible to insert empty pmap as leaf node with * Fix #154, not possible to insert empty pmap as leaf node with
transform. transform.
* Python 3.4 is no longer officially supported since it is EOL * Python 3.4 is no longer officially supported since it is EOL
since 2019-03-18. since 2019-03-18.
* Fix #157, major improvements to type hints. Thanks @je-l for * Fix #157, major improvements to type hints. Thanks @je-l for
working on this and @nattofriend for reviewing the PR! working on this and @nattofriend for reviewing the PR!
------------------------------------------------------------------- -------------------------------------------------------------------
@ -156,7 +183,7 @@ Fri Aug 10 23:33:25 UTC 2018 - jsikes@suse.de
- Version jump to 0.14.4 - Version jump to 0.14.4
* Fix PClass double-factory-ing in a few situations. * Fix PClass double-factory-ing in a few situations.
* Fix #121, regression in PClass.set() * Fix #121, regression in PClass.set()
* Fix regression where type names break sequence fields * Fix regression where type names break sequence fields
* Allowing 'set' as a valid container for multiple fields. * Allowing 'set' as a valid container for multiple fields.
* Fix #131 Clarify that dot-notation can be used for element access on PMaps * Fix #131 Clarify that dot-notation can be used for element access on PMaps

View File

@ -1,7 +1,7 @@
# #
# spec file for package python-pyrsistent # spec file for package python-pyrsistent
# #
# Copyright (c) 2023 SUSE LLC # Copyright (c) 2024 SUSE LLC
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@ -16,21 +16,23 @@
# #
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%global skip_python2 1
%{?sle15_python_module_pythons} %{?sle15_python_module_pythons}
Name: python-pyrsistent Name: python-pyrsistent
Version: 0.19.3 Version: 0.20.0
Release: 0 Release: 0
Summary: Persistent, Functional, Immutable data structures Summary: Persistent, Functional, Immutable data structures
License: MIT License: MIT
Group: Development/Languages/Python Group: Development/Languages/Python
URL: http://github.com/tobgu/pyrsistent/ URL: http://github.com/tobgu/pyrsistent/
Source: https://files.pythonhosted.org/packages/source/p/pyrsistent/pyrsistent-%{version}.tar.gz Source: https://files.pythonhosted.org/packages/source/p/pyrsistent/pyrsistent-%{version}.tar.gz
# PATCH-FIX-UPSTREAM - gh/tobgu/pyrsistent#284 - Replace _PyList_Extend with PyList_SetSlice
Patch1: https://patch-diff.githubusercontent.com/raw/tobgu/pyrsistent/pull/284.patch#/replace-private-function.patch
BuildRequires: %{python_module devel} BuildRequires: %{python_module devel}
BuildRequires: %{python_module hypothesis} BuildRequires: %{python_module hypothesis}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module pytest} BuildRequires: %{python_module pytest}
BuildRequires: %{python_module setuptools} BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module wheel}
BuildRequires: fdupes BuildRequires: fdupes
BuildRequires: python-rpm-macros BuildRequires: python-rpm-macros
%python_subpackages %python_subpackages
@ -47,13 +49,19 @@ is left untouched.
%prep %prep
%setup -q -n pyrsistent-%{version} %setup -q -n pyrsistent-%{version}
%patch -P 1 -p1
%build %build
export CFLAGS="%{optflags}" export CFLAGS="%{optflags}"
%python_build %pyproject_wheel
%install %install
%python_install %pyproject_install
# Fix python-bytecode-inconsistent-mtime
pushd %{buildroot}%{python_sitearch}
find . -name '*.pyc' -exec rm -f '{}' ';'
python%python_bin_suffix -m compileall *.py ';'
popd
%python_expand %fdupes %{buildroot}%{$python_sitearch} %python_expand %fdupes %{buildroot}%{$python_sitearch}
%check %check
@ -66,6 +74,6 @@ export CFLAGS="%{optflags}"
%{python_sitearch}/_pyrsistent* %{python_sitearch}/_pyrsistent*
%{python_sitearch}/pvectorc* %{python_sitearch}/pvectorc*
%{python_sitearch}/pyrsistent %{python_sitearch}/pyrsistent
%{python_sitearch}/pyrsistent-%{version}*-info %{python_sitearch}/pyrsistent-%{version}.dist-info
%changelog %changelog

View File

@ -0,0 +1,36 @@
From c876adc774e7bb3c896b013f13d7c6ce80e79544 Mon Sep 17 00:00:00 2001
From: "Benjamin A. Beasley" <code@musicinmybrain.net>
Date: Thu, 26 Oct 2023 09:53:40 -0400
Subject: [PATCH] Replace _PyList_Extend with PyList_SetSlice
This private function is no longer exported in Python 3.13.
It is possible that a PyList_Extend() function-like macro may be added
before Python 3.13 final, but using PyList_SetSlice() directly will
still work.
https://github.com/python/cpython/pull/108451
https://github.com/python/cpython/issues/111138
---
pvectorcmodule.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/pvectorcmodule.c b/pvectorcmodule.c
index 8667abb..9b83a56 100644
--- a/pvectorcmodule.c
+++ b/pvectorcmodule.c
@@ -1313,12 +1313,10 @@ static PyObject *PVectorEvolver_append(PVectorEvolver *self, PyObject *args) {
}
static PyObject *PVectorEvolver_extend(PVectorEvolver *self, PyObject *args) {
- PyObject *retVal = _PyList_Extend((PyListObject *)self->appendList, args);
- if (retVal == NULL) {
+ if (PyList_SetSlice(self->appendList, PY_SSIZE_T_MAX, PY_SSIZE_T_MAX, args) < 0) {
return NULL;
}
- Py_DECREF(retVal);
Py_INCREF(self);
return (PyObject*)self;
}