[packages/python3-pymemcache] - updated to 4.0.0 for python 3.7+; tests patched for size_t < 64 bits

qboosh qboosh at pld-linux.org
Sat Feb 21 17:43:00 CET 2026


commit 2688c3b44afd5c07bde85032f05e119c5547226f
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Sat Feb 21 17:42:38 2026 +0100

    - updated to 4.0.0 for python 3.7+; tests patched for size_t < 64 bits

 pymemcache-tests.patch  |   9 +++
 python-pymemcache.spec  | 186 ------------------------------------------------
 python3-pymemcache.spec | 109 ++++++++++++++++++++++++++++
 3 files changed, 118 insertions(+), 186 deletions(-)
---
diff --git a/python-pymemcache.spec b/python-pymemcache.spec
deleted file mode 100644
index 78d7dc9..0000000
--- a/python-pymemcache.spec
+++ /dev/null
@@ -1,186 +0,0 @@
-#
-# Conditional build:
-%bcond_with	doc	# Sphinx documentation (files missing in sdist)
-%bcond_without	tests	# unit tests
-%bcond_without	python2 # CPython 2.x module
-%bcond_with	python3 # CPython 3.x module (built from python3-pymemcache.spec)
-
-Summary:	A comprehensive, fast, pure Python memcached client
-Summary(pl.UTF-8):	W pełni funkcjonalny, szybki klient memcached w czystym Pythonie
-Name:		python-pymemcache
-# keep 3.x here for python2 support
-Version:	3.5.2
-Release:	0.1
-License:	Apache v2.0
-Group:		Libraries/Python
-#Source0Download: https://pypi.org/simple/pymemcache/
-Source0:	https://files.pythonhosted.org/packages/source/p/pymemcache/pymemcache-%{version}.tar.gz
-# Source0-md5:	6fa634ad18b317cab0721427fc7ea6b7
-URL:		https://pypi.org/project/pymemcache/
-%if %{with python2}
-BuildRequires:	python-modules >= 1:2.7
-BuildRequires:	python-setuptools
-%if %{with tests}
-BuildRequires:	python-future
-BuildRequires:	python-gevent >= 20.9.0
-BuildRequires:	python-mock
-BuildRequires:	python-pytest
-BuildRequires:	python-pytest-cov
-BuildRequires:	python-six
-%endif
-%endif
-%if %{with python3}
-BuildRequires:	python3-modules >= 1:3.6
-BuildRequires:	python3-setuptools
-%if %{with tests}
-BuildRequires:	python3-gevent >= 20.9.0
-BuildRequires:	python3-mock
-BuildRequires:	python3-pytest
-BuildRequires:	python3-pytest-cov
-BuildRequires:	python3-six
-%endif
-%endif
-BuildRequires:	rpm-pythonprov
-BuildRequires:	rpmbuild(macros) >= 1.714
-%if %{with doc}
-BuildRequires:	python3-sphinx_rtd_theme
-BuildRequires:	python3-sphinxcontrib-napoleon
-BuildRequires:	sphinx-pdg-3 >= 3.0.3
-%endif
-Requires:	python-modules >= 1:2.7
-BuildArch:	noarch
-BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
-
-%description
-A comprehensive, fast, pure-Python memcached client. pymemcache
-supports the following features:
-- Complete implementation of the memcached text protocol.
-- Connections using UNIX sockets, or TCP over IPv4 or IPv6.
-- Configurable timeouts for socket connect and send/recv calls.
-- Access to the "noreply" flag, which can significantly increase the
-  speed of writes.
-- Flexible, modular and simple approach to serialization and
-  deserialization.
-- The (optional) ability to treat network and memcached errors as
-  cache misses.
-
-%description -l pl.UTF-8
-W pełni funkcjonalny, szybki klient memcached w czystym Pythonie.
-pymemcache ma następujące cechy:
-- pełna implementacja protokołu tekstowego memcached
-- połączenia przy użyciu gniazd uniksowych lub TCP po IPv4 lub IPv6
-- konfigurowalne limity czasu dla łączenia z gniazdami oraz wywołań
-  send/recv
-- dostęp do flagi "noreply", która może znacząco przyspieszyć zapisy
-- elastyczne, modularne podejście do serializacji i deserializacji
-- (opcjonalna) możliwość traktowania błędów sieci i memcached jako
-  braki trafień w pamięci podręcznej.
-
-%package -n python3-pymemcache
-Summary:	A comprehensive, fast, pure Python memcached client
-Summary(pl.UTF-8):	W pełni funkcjonalny, szybki klient memcached w czystym Pythonie
-Group:		Libraries/Python
-Requires:	python3-modules >= 1:3.6
-
-%description -n python3-pymemcache
-A comprehensive, fast, pure-Python memcached client. pymemcache
-supports the following features:
-- Complete implementation of the memcached text protocol.
-- Connections using UNIX sockets, or TCP over IPv4 or IPv6.
-- Configurable timeouts for socket connect and send/recv calls.
-- Access to the "noreply" flag, which can significantly increase the
-  speed of writes.
-- Flexible, modular and simple approach to serialization and
-  deserialization.
-- The (optional) ability to treat network and memcached errors as
-  cache misses.
-
-%description -n python3-pymemcache -l pl.UTF-8
-W pełni funkcjonalny, szybki klient memcached w czystym Pythonie.
-pymemcache ma następujące cechy:
-- pełna implementacja protokołu tekstowego memcached
-- połączenia przy użyciu gniazd uniksowych lub TCP po IPv4 lub IPv6
-- konfigurowalne limity czasu dla łączenia z gniazdami oraz wywołań
-  send/recv
-- dostęp do flagi "noreply", która może znacząco przyspieszyć zapisy
-- elastyczne, modularne podejście do serializacji i deserializacji
-- (opcjonalna) możliwość traktowania błędów sieci i memcached jako
-  braki trafień w pamięci podręcznej.
-
-%package apidocs
-Summary:	API documentation for Python pymemcache module
-Summary(pl.UTF-8):	Dokumentacja API modułu Pythona pymemcache
-Group:		Documentation
-
-%description apidocs
-API documentation for Python pymemcache module.
-
-%description apidocs -l pl.UTF-8
-Dokumentacja API modułu Pythona pymemcache.
-
-%prep
-%setup -q -n pymemcache-%{version}
-
-%build
-%if %{with python2}
-%py_build
-
-%if %{with tests}
-PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
-PYTEST_PLUGINS=pytest_cov.plugin \
-%{__python} -m pytest pymemcache --ignore pymemcache/test/test_benchmark.py
-%endif
-%endif
-
-%if %{with python3}
-%py3_build
-
-%if %{with tests}
-PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
-PYTEST_PLUGINS=pytest_cov.plugin \
-%{__python3} -m pytest pymemcache --ignore pymemcache/test/test_benchmark.py
-%endif
-%endif
-
-%if %{with doc}
-%{__make} -C docs html \
-	SPHINXBUILD=sphinx-build-3
-%endif
-
-%install
-rm -rf $RPM_BUILD_ROOT
-
-%if %{with python2}
-%py_install
-
-%py_postclean
-%endif
-
-%if %{with python3}
-%py3_install
-%endif
-
-%clean
-rm -rf $RPM_BUILD_ROOT
-
-%if %{with python2}
-%files
-%defattr(644,root,root,755)
-%doc ChangeLog.rst README.rst
-%{py_sitescriptdir}/pymemcache
-%{py_sitescriptdir}/pymemcache-%{version}-py*.egg-info
-%endif
-
-%if %{with python3}
-%files -n python3-pymemcache
-%defattr(644,root,root,755)
-%doc ChangeLog.rst README.rst
-%{py3_sitescriptdir}/pymemcache
-%{py3_sitescriptdir}/pymemcache-%{version}-py*.egg-info
-%endif
-
-%if %{with doc}
-%files apidocs
-%defattr(644,root,root,755)
-%doc docs/_build/html/*
-%endif
diff --git a/python3-pymemcache.spec b/python3-pymemcache.spec
new file mode 100644
index 0000000..cfd4051
--- /dev/null
+++ b/python3-pymemcache.spec
@@ -0,0 +1,109 @@
+#
+# Conditional build:
+%bcond_with	doc	# Sphinx documentation (files missing in sdist)
+%bcond_without	tests	# unit tests
+
+Summary:	A comprehensive, fast, pure Python memcached client
+Summary(pl.UTF-8):	W pełni funkcjonalny, szybki klient memcached w czystym Pythonie
+Name:		python3-pymemcache
+Version:	4.0.0
+Release:	1
+License:	Apache v2.0
+Group:		Libraries/Python
+#Source0Download: https://pypi.org/simple/pymemcache/
+Source0:	https://files.pythonhosted.org/packages/source/p/pymemcache/pymemcache-%{version}.tar.gz
+# Source0-md5:	1feca786d1a0d52d351caea298aec2cb
+Patch0:		pymemcache-tests.patch
+URL:		https://pypi.org/project/pymemcache/
+BuildRequires:	python3-modules >= 1:3.7
+BuildRequires:	python3-setuptools
+%if %{with tests}
+BuildRequires:	python3-faker >= 15.1.0
+BuildRequires:	python3-gevent >= 22.10.1
+BuildRequires:	python3-pytest >= 7.1.1
+BuildRequires:	python3-pytest-cov >= 4.0.0
+BuildRequires:	python3-zstd >= 1.5.2.5
+%endif
+BuildRequires:	rpm-pythonprov
+BuildRequires:	rpmbuild(macros) >= 1.714
+%if %{with doc}
+BuildRequires:	python3-sphinx_rtd_theme >= 1.0.0
+BuildRequires:	python3-sphinxcontrib-apidoc >= 0.3.0
+BuildRequires:	python3-sphinxcontrib-napoleon >= 0.7
+BuildRequires:	sphinx-pdg-3 >= 5.2.1
+%endif
+Requires:	python3-modules >= 1:3.6
+BuildArch:	noarch
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+A comprehensive, fast, pure-Python memcached client. pymemcache
+supports the following features:
+- Complete implementation of the memcached text protocol.
+- Connections using UNIX sockets, or TCP over IPv4 or IPv6.
+- Configurable timeouts for socket connect and send/recv calls.
+- Access to the "noreply" flag, which can significantly increase the
+  speed of writes.
+- Flexible, modular and simple approach to serialization and
+  deserialization.
+- The (optional) ability to treat network and memcached errors as
+  cache misses.
+
+%description -l pl.UTF-8
+W pełni funkcjonalny, szybki klient memcached w czystym Pythonie.
+pymemcache ma następujące cechy:
+- pełna implementacja protokołu tekstowego memcached
+- połączenia przy użyciu gniazd uniksowych lub TCP po IPv4 lub IPv6
+- konfigurowalne limity czasu dla łączenia z gniazdami oraz wywołań
+  send/recv
+- dostęp do flagi "noreply", która może znacząco przyspieszyć zapisy
+- elastyczne, modularne podejście do serializacji i deserializacji
+- (opcjonalna) możliwość traktowania błędów sieci i memcached jako
+  braki trafień w pamięci podręcznej.
+
+%package apidocs
+Summary:	API documentation for Python pymemcache module
+Summary(pl.UTF-8):	Dokumentacja API modułu Pythona pymemcache
+Group:		Documentation
+
+%description apidocs
+API documentation for Python pymemcache module.
+
+%description apidocs -l pl.UTF-8
+Dokumentacja API modułu Pythona pymemcache.
+
+%prep
+%setup -q -n pymemcache-%{version}
+%patch -P0 -p1
+
+%build
+%if %{with tests}
+PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
+PYTEST_PLUGINS=pytest_cov.plugin \
+%{__python3} -m pytest pymemcache --ignore pymemcache/test/test_benchmark.py
+%endif
+
+%if %{with doc}
+%{__make} -C docs html \
+	SPHINXBUILD=sphinx-build-3
+%endif
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%py3_install
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(644,root,root,755)
+%doc ChangeLog.rst README.rst
+%{py3_sitescriptdir}/pymemcache
+%{py3_sitescriptdir}/pymemcache-%{version}-py*.egg-info
+
+%if %{with doc}
+%files apidocs
+%defattr(644,root,root,755)
+%doc docs/_build/html/*
+%endif
diff --git a/pymemcache-tests.patch b/pymemcache-tests.patch
new file mode 100644
index 0000000..be46fde
--- /dev/null
+++ b/pymemcache-tests.patch
@@ -0,0 +1,9 @@
+sys.maxsize is not enough for compression if it's 32 bit
+--- pymemcache-4.0.0/pymemcache/test/test_serde.py.orig	2022-09-20 21:54:34.000000000 +0200
++++ pymemcache-4.0.0/pymemcache/test/test_serde.py	2026-02-21 09:46:05.754710829 +0100
+@@ -144,4 +144,4 @@ def test_compressed_complex(serde):
+ 
+     # test_subtype
+     # Subclass of a native type will be restored as the same type
+-    check(serde, CustomInt(sys.maxsize), FLAG_PICKLE | FLAG_COMPRESSED)
++    check(serde, CustomInt(2**64 - 1), FLAG_PICKLE | FLAG_COMPRESSED)
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python3-pymemcache.git/commitdiff/2688c3b44afd5c07bde85032f05e119c5547226f



More information about the pld-cvs-commit mailing list