Accepting request 1190485 from home:glaubitz:branches:devel:languages:python
- Cherry-pick upstream patch to fix compatibility with Python 3.13 * replace-private-function.patch OBS-URL: https://build.opensuse.org/request/show/1190485 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pyrsistent?expand=0&rev=33
This commit is contained in:
commit
9f93a02ee8
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
## Default LFS
|
||||
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||
*.bsp filter=lfs diff=lfs merge=lfs -text
|
||||
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.gem filter=lfs diff=lfs merge=lfs -text
|
||||
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||
*.jar filter=lfs diff=lfs merge=lfs -text
|
||||
*.lz filter=lfs diff=lfs merge=lfs -text
|
||||
*.lzma filter=lfs diff=lfs merge=lfs -text
|
||||
*.obscpio filter=lfs diff=lfs merge=lfs -text
|
||||
*.oxt filter=lfs diff=lfs merge=lfs -text
|
||||
*.pdf filter=lfs diff=lfs merge=lfs -text
|
||||
*.png filter=lfs diff=lfs merge=lfs -text
|
||||
*.rpm filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||
*.txz filter=lfs diff=lfs merge=lfs -text
|
||||
*.whl filter=lfs diff=lfs merge=lfs -text
|
||||
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||
*.zst filter=lfs diff=lfs merge=lfs -text
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
.osc
|
3
pyrsistent-0.20.0.tar.gz
Normal file
3
pyrsistent-0.20.0.tar.gz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:4c48f78f62ab596c679086084d0dd13254ae4f3d6c72a83ffdf5ebdef8f265a4
|
||||
size 103642
|
190
python-pyrsistent.changes
Normal file
190
python-pyrsistent.changes
Normal file
@ -0,0 +1,190 @@
|
||||
-------------------------------------------------------------------
|
||||
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>
|
||||
|
||||
- add sle15_python_module_pythons (jsc#PED-68)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Apr 13 22:43:54 UTC 2023 - Matej Cepl <mcepl@suse.com>
|
||||
|
||||
- Make calling of %{sle15modernpython} optional.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Jan 5 20:30:51 UTC 2023 - Dirk Müller <dmueller@suse.com>
|
||||
|
||||
- update to 0.19.3:
|
||||
* Fix #264, add wheels and official support for Python 3.11.
|
||||
* Fix #263, pmap regression in 0.19.1. Element access sometimes unreliable
|
||||
after insert.
|
||||
* Fix #159 (through PR #243). Pmap keys/values/items now behave more like the
|
||||
corresponding Python 3 methods on dicts. Previously they returned a
|
||||
materialized PVector holding the items, now they return
|
||||
views instead.
|
||||
* Fix #244, type for argument to PVector.delete missing.
|
||||
* Fix #249, rename perf test directory to avoid tripping up automatic
|
||||
discovery in more recent setuptools versions
|
||||
* Fix #247, performance bug when setting elements in maps and adding elements
|
||||
to sets
|
||||
* Fix #248, build pure Python wheels. This is used by some installers.
|
||||
* Fix #254, #258, support manylinux_2014_aarch64 wheels.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Feb 4 22:50:17 UTC 2022 - Dirk Müller <dmueller@suse.com>
|
||||
|
||||
- update to 0.18.1:
|
||||
* Add universal wheels for MacOS, thanks @ntamas for this!
|
||||
* Add support for Python 3.10, thanks @hugovk for this!
|
||||
* Fix #236 compilation errors under Python 3.10.
|
||||
* Drop official support for Python 3.6 since it's EOL since 2021-12-23.
|
||||
* Fix #238, failing doc tests on Python 3.11, thanks @musicinmybrain for this!
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Oct 16 22:02:35 UTC 2021 - Dirk Müller <dmueller@suse.com>
|
||||
|
||||
- update to 0.18.0:
|
||||
* Fix #209 Update freeze recurse into pyrsistent data structures and thaw to
|
||||
recurse into lists and dicts
|
||||
* Fix #226, stop using deprecated exception.message.
|
||||
* Fix #211, add union operator to persistent maps.
|
||||
* Fix #194, declare build dependencies through pyproject.toml.
|
||||
* Officially drop Python 3.5 support.
|
||||
* Fix #223, release wheels for all major platforms.
|
||||
* Fix #221, KeyError obscured by TypeError if key is a tuple.
|
||||
* Fix LICENSE file name spelling.
|
||||
* Fix #216, add abstractmethod decorator for CheckedType and ABCMeta for
|
||||
_CheckedTypeMeta.
|
||||
* Fix #228, rename example classes in tests to avoid name clashes with pytest.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Feb 15 21:26:17 UTC 2021 - Ben Greiner <code@bnavigator.de>
|
||||
|
||||
- Remove remnant requirements of six and numpy: These are neither
|
||||
used anywhere in the package code, nor in the tests.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Sep 28 11:11:31 UTC 2020 - Dirk Mueller <dmueller@suse.com>
|
||||
|
||||
- update to 0.17.3:
|
||||
* Fix #208, release v0.17.3 with proper meta data requiring Python >= 3.5.
|
||||
* Add "python_requires >= 2.7" to setup.py in preparation for Python 2.7 incompatible updates
|
||||
* Same as 0.17.1 released with more recent version of setuptools to get proper meta data for in place.
|
||||
* Restrict package to Python >= 3.5 to not break unpinned Python 2 dependencies. Thanks @vphilippon
|
||||
* Remove Python 2 support code. This includes dropping some compatibility code and the dependency on
|
||||
six. Thanks @djailla for this.
|
||||
* Fix #200, python 3 exception chaining. This is a minor backwards incompatibility, hence stepping
|
||||
to 0.17.0. Thanks @cool-RR for this!
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Jul 17 07:40:53 UTC 2020 - Dirk Mueller <dmueller@suse.com>
|
||||
|
||||
- update to 0.16.0:
|
||||
* No major updates but Python 2 support no longer guaranteed.
|
||||
* Fix #192, 'ignore_extra' for 'pvector_field'. Thanks @ss18 for this!
|
||||
* Fix #191, include LICENCE in distribution. Thanks @johnthagen for this!
|
||||
* Fix #190, minor MyPy errors. Thanks @Qhesz for this!
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Feb 28 22:03:26 UTC 2020 - Dirk Mueller <dmueller@suse.com>
|
||||
|
||||
- update to 0.15.7:
|
||||
* Fix #186, type errors with more recent versions of MyPy. Thanks @qhesz for this!
|
||||
* Build and test on ARM during CI. Thanks @ossdev07 for this!
|
||||
* Set absolute imports for python2 compatibility. Thanks @michalvi for this!
|
||||
* Fix #182 moduleinit name clash.
|
||||
* Fix #179 Fixed 'ignore_extra' factory parameter for pvector. Thanks @ss18 for this!
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Jul 29 08:24:54 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>
|
||||
|
||||
- Update to 0.15.4:
|
||||
* support new pytest
|
||||
* Fix #174, fix a GC traversal bug in pvector evolver C extension.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Jul 18 09:42:37 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>
|
||||
|
||||
- Use pytest4 for testing as pytest 5.x series do not work; bug
|
||||
was reported upstream
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Jul 18 09:38:13 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>
|
||||
|
||||
- Update to 0.15.3:
|
||||
* Fix #172, catch all exceptions during extension build to reduce chance of corner cases that prevents installation.
|
||||
* Fix #171, in PVector equality comparison don's assume that other object has a length, check before calling len.
|
||||
* Fix #168, write warning about failing build of C extension directly to stderr to avoid that pip silences it.
|
||||
* Fix #155, update PMapEvolver type stub to better reflect implementation.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Jun 5 09:20:42 UTC 2019 - Marketa Calabkova <mcalabkova@suse.com>
|
||||
|
||||
- Update to 0.15.2
|
||||
* Fix #166, Propagate 'ignore_extra' param in hierarchy. Thanks
|
||||
@ss18 for this!
|
||||
* Fix #167, thaw typing. Thanks @nattofriends for this!
|
||||
* Fix #154, not possible to insert empty pmap as leaf node with
|
||||
transform.
|
||||
* Python 3.4 is no longer officially supported since it is EOL
|
||||
since 2019-03-18.
|
||||
* Fix #157, major improvements to type hints. Thanks @je-l for
|
||||
working on this and @nattofriend for reviewing the PR!
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Mar 18 10:49:20 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>
|
||||
|
||||
- Update to 0.14.11:
|
||||
* Fix #152 Don't use __builtin_popcount, this hopefully fixes #147 Error in pvectorc.cp37-win_amd64.pyd file, as well.
|
||||
Thanks @benrg for this!
|
||||
* Fix #151 Fix compatibility for hypothesis 4. Thanks @felixonmars for this!
|
||||
* Fix #148, only require pytest-runner if running tests. Thanks @ccorbacho for this!
|
||||
* Fix #144, Compile pvectormodule.c on windows. Thanks @ganwell for this!
|
||||
* Fix #142, Improve type stubs. Thanks @arxanas for this!
|
||||
* Fix #102, add PEP 561 type annotation stubs for most pyrsistent types. Thanks @nattofriends for this!
|
||||
* Fix #135, Type classes for Python 3 type annotations of pyrsistent types. Thanks @nattofriends for this!
|
||||
* Fix #128, Allow PClass and PRecord to ignore input parameters to constructor that are not part of the spec
|
||||
instead of blowing up with a type error. Thanks @agberk for this!
|
||||
* Fix #137, deprecation warnings in Python 3.7. Thanks @thombashi for this!
|
||||
* Fix #129, building via setuptools and setup.py. Thanks @galuszkak for this!
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Aug 11 06:34:31 UTC 2018 - tchvatal@suse.com
|
||||
|
||||
- Drop the test conditional
|
||||
- Use %license macro
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Aug 10 23:33:25 UTC 2018 - jsikes@suse.de
|
||||
|
||||
- Version jump to 0.14.4
|
||||
* Fix PClass double-factory-ing in a few situations.
|
||||
* Fix #121, regression in PClass.set()
|
||||
* Fix regression where type names break sequence 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 #133 Python 3.7 compatibility
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Sep 7 22:41:57 UTC 2017 - toddrme2178@gmail.com
|
||||
|
||||
- initial version
|
74
python-pyrsistent.spec
Normal file
74
python-pyrsistent.spec
Normal file
@ -0,0 +1,74 @@
|
||||
#
|
||||
# spec file for package python-pyrsistent
|
||||
#
|
||||
# Copyright (c) 2024 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-pyrsistent
|
||||
Version: 0.20.0
|
||||
Release: 0
|
||||
Summary: Persistent, Functional, Immutable data structures
|
||||
License: MIT
|
||||
Group: Development/Languages/Python
|
||||
URL: http://github.com/tobgu/pyrsistent/
|
||||
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
|
||||
Patch: https://patch-diff.githubusercontent.com/raw/tobgu/pyrsistent/pull/284.patch#/replace-private-function.patch
|
||||
BuildRequires: %{python_module devel}
|
||||
BuildRequires: %{python_module hypothesis}
|
||||
BuildRequires: %{python_module pip}
|
||||
BuildRequires: %{python_module pytest}
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: %{python_module wheel}
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: python-rpm-macros
|
||||
%python_subpackages
|
||||
|
||||
%description
|
||||
Pyrsistent is a number of persistent collections
|
||||
(by some referred to as functional data structures).
|
||||
Persistent in the sense that they are immutable.
|
||||
|
||||
All methods on a data structure that would normally
|
||||
mutate it instead return a new copy of the structure
|
||||
containing the requested updates. The original structure
|
||||
is left untouched.
|
||||
|
||||
%prep
|
||||
%setup -q -n pyrsistent-%{version}
|
||||
%patch -P0 -p1
|
||||
|
||||
%build
|
||||
export CFLAGS="%{optflags}"
|
||||
%pyproject_wheel
|
||||
|
||||
%install
|
||||
%pyproject_install
|
||||
%python_expand %fdupes %{buildroot}%{$python_sitearch}
|
||||
|
||||
%check
|
||||
%pytest_arch -ra
|
||||
|
||||
%files %{python_files}
|
||||
%license LICENSE.mit
|
||||
%doc CHANGES.txt README.rst
|
||||
%pycache_only %{python_sitearch}/__pycache__/_pyrsistent*
|
||||
%{python_sitearch}/_pyrsistent*
|
||||
%{python_sitearch}/pvectorc*
|
||||
%{python_sitearch}/pyrsistent
|
||||
%{python_sitearch}/pyrsistent-%{version}.dist-info
|
||||
|
||||
%changelog
|
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;
|
||||
}
|
Loading…
Reference in New Issue
Block a user