Compare commits
4 Commits
Author | SHA256 | Date | |
---|---|---|---|
37fa0dc3ce | |||
1c7a9fb0f5 | |||
1a3d9dac2f | |||
3164fd84d4 |
@@ -1,3 +1,14 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
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>
|
Fri Jan 5 17:29:47 UTC 2024 - Dirk Müller <dmueller@suse.com>
|
||||||
|
|
||||||
|
@@ -25,6 +25,8 @@ 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 pip}
|
||||||
@@ -47,6 +49,7 @@ 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}"
|
||||||
@@ -54,6 +57,11 @@ export CFLAGS="%{optflags}"
|
|||||||
|
|
||||||
%install
|
%install
|
||||||
%pyproject_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
|
||||||
|
36
replace-private-function.patch
Normal file
36
replace-private-function.patch
Normal 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;
|
||||||
|
}
|
Reference in New Issue
Block a user