[packages/python3-dogpile.cache] - python-dogpile.cache.spec updated to 1.5.0 for python 3.10+

qboosh qboosh at pld-linux.org
Sat Nov 1 22:59:37 CET 2025


commit 24f6f1337b07cb3bc73dd44025b5a763ba88d35b
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Sat Nov 1 22:59:37 2025 +0100

    - python-dogpile.cache.spec updated to 1.5.0 for python 3.10+

 dogpile.cache-mock.patch   |  57 --------------
 dogpile.cache-pytest.patch |  12 ---
 python-dogpile.cache.spec  | 192 ---------------------------------------------
 python3-dogpile.cache.spec | 116 +++++++++++++++++++++++++++
 4 files changed, 116 insertions(+), 261 deletions(-)
---
diff --git a/python-dogpile.cache.spec b/python-dogpile.cache.spec
deleted file mode 100644
index 7b33a65..0000000
--- a/python-dogpile.cache.spec
+++ /dev/null
@@ -1,192 +0,0 @@
-#
-# Conditional build:
-%bcond_with	doc	# Sphinx documentation (sdist contains prebuilt html)
-%bcond_without	tests	# unit tests
-%bcond_without	python2 # CPython 2.x module
-%bcond_without	python3 # CPython 3.x module
-
-Summary:	A caching front-end based on the Dogpile lock
-Summary(pl.UTF-8):	Frontend z pamięcią podręczną oparty na blokadzie Dogpile
-Name:		python-dogpile.cache
-# keep 0.9.x here for python2 support
-Version:	0.9.2
-Release:	3
-License:	MIT
-Group:		Libraries/Python
-#Source0Download: https://pypi.org/simple/dogpile.cache/
-Source0:	https://files.pythonhosted.org/packages/source/d/dogpile.cache/dogpile.cache-%{version}.tar.gz
-# Source0-md5:	ab35b826ca17477ab0db3dd76227e8aa
-Patch0:		dogpile.cache-mock.patch
-Patch1:		dogpile.cache-pytest.patch
-URL:		https://pypi.org/project/dogpile.cache/
-%if %{with python2}
-BuildRequires:	python-modules >= 1:2.5
-BuildRequires:	python-setuptools
-%if %{with tests}
-BuildRequires:	python-Mako
-BuildRequires:	python-decorator >= 4.0.0
-BuildRequires:	python-futures
-BuildRequires:	python-mock
-BuildRequires:	python-pytest
-%endif
-%endif
-%if %{with python3}
-BuildRequires:	python3-modules >= 1:3.2
-BuildRequires:	python3-setuptools
-%if %{with tests}
-BuildRequires:	python3-Mako
-BuildRequires:	python3-decorator >= 4.0.0
-BuildRequires:	python3-pytest
-%endif
-%endif
-BuildRequires:	rpm-pythonprov
-BuildRequires:	rpmbuild(macros) >= 1.714
-%if %{with doc}
-BuildRequires:	python-Mako
-BuildRequires:	python-changelog
-BuildRequires:	python-decorator
-BuildRequires:	python-sphinx-paramlinks
-BuildRequires:	sphinx-pdg-2
-%endif
-Requires:	python-modules >= 1:2.5
-BuildArch:	noarch
-BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
-
-%description
-Dogpile consists of two subsystems, one building on top of the other.
-
-dogpile provides the concept of a "dogpile lock", a control structure
-which allows a single thread of execution to be selected as the
-"creator" of some resource, while allowing other threads of execution
-to refer to the previous version of this resource as the creation
-proceeds; if there is no previous version, then those threads block
-until the object is available.
-
-dogpile.cache is a caching API which provides a generic interface to
-caching backends of any variety, and additionally provides API hooks
-which integrate these cache backends with the locking mechanism of
-dogpile.
-
-%description -l pl.UTF-8
-Dogpile składa się z dwóch podsystemów, jeden jest zbudowany na
-drugim.
-
-dogpile udostępnia koncept "blokady dogpile" - struktury sterującej,
-pozwalającej na wybór jednego z wątków jako "twórcy" jakiegoś zasobu,
-podczas gdy pozostałe wątki odwołują się do poprzedniej wersji zasobu
-w miarę procesu tworzenia; jeśli nie ma poprzedniej wersji, wątki te
-blokują się do czasu dostępności obiektu.
-
-dogpile.cache to API z pamięcią podręczną, zapewniające ogólny
-interfejs do dowolnych backendów pamięci podręcznej oraz uchwyty API
-integrujące te backendy z mechanizmem blokującym dogpile.
-
-%package -n python3-dogpile.cache
-Summary:	A caching front-end based on the Dogpile lock
-Summary(pl.UTF-8):	Frontend z pamięcią podręczną oparty na blokadzie Dogpile
-Group:		Libraries/Python
-Requires:	python3-modules >= 1:3.2
-
-%description -n python3-dogpile.cache
-Dogpile consists of two subsystems, one building on top of the other.
-
-dogpile provides the concept of a "dogpile lock", a control structure
-which allows a single thread of execution to be selected as the
-"creator" of some resource, while allowing other threads of execution
-to refer to the previous version of this resource as the creation
-proceeds; if there is no previous version, then those threads block
-until the object is available.
-
-dogpile.cache is a caching API which provides a generic interface to
-caching backends of any variety, and additionally provides API hooks
-which integrate these cache backends with the locking mechanism of
-dogpile.
-
-%description -n python3-dogpile.cache -l pl.UTF-8
-Dogpile składa się z dwóch podsystemów, jeden jest zbudowany na
-drugim.
-
-dogpile udostępnia koncept "blokady dogpile" - struktury sterującej,
-pozwalającej na wybór jednego z wątków jako "twórcy" jakiegoś zasobu,
-podczas gdy pozostałe wątki odwołują się do poprzedniej wersji zasobu
-w miarę procesu tworzenia; jeśli nie ma poprzedniej wersji, wątki te
-blokują się do czasu dostępności obiektu.
-
-dogpile.cache to API z pamięcią podręczną, zapewniające ogólny
-interfejs do dowolnych backendów pamięci podręcznej oraz uchwyty API
-integrujące te backendy z mechanizmem blokującym dogpile.
-
-%package apidocs
-Summary:	API documentation for Python dogpile.cache module
-Summary(pl.UTF-8):	Dokumentacja API modułu Pythona dogpile.cache
-Group:		Documentation
-
-%description apidocs
-API documentation for Python dogpile.cache module.
-
-%description apidocs -l pl.UTF-8
-Dokumentacja API modułu Pythona dogpile.cache.
-
-%prep
-%setup -q -n dogpile.cache-%{version}
-%patch -P 0 -p1
-%patch -P 1 -p1
-
-%build
-%if %{with python2}
-%py_build
-
-%if %{with tests}
-PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
-%{__python} -m pytest tests -k 'not test_dbm_backend and not test_memcached_backend and not test_redis_backend'
-%endif
-%endif
-
-%if %{with python3}
-%py3_build
-
-%if %{with tests}
-PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
-%{__python3} -m pytest tests -k 'not test_dbm_backend and not test_memcached_backend and not test_redis_backend'
-%endif
-%endif
-
-%if %{with doc}
-sphinx-build-2 -b html docs/build docs
-%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 LICENSE README.rst
-%{py_sitescriptdir}/dogpile
-%{py_sitescriptdir}/dogpile.cache-%{version}-py*.egg-info
-%endif
-
-%if %{with python3}
-%files -n python3-dogpile.cache
-%defattr(644,root,root,755)
-%doc LICENSE README.rst
-%{py3_sitescriptdir}/dogpile
-%{py3_sitescriptdir}/dogpile.cache-%{version}-py*.egg-info
-%endif
-
-%files apidocs
-%defattr(644,root,root,755)
-%doc docs/{_static,*.html,*.js}
diff --git a/python3-dogpile.cache.spec b/python3-dogpile.cache.spec
new file mode 100644
index 0000000..c19c375
--- /dev/null
+++ b/python3-dogpile.cache.spec
@@ -0,0 +1,116 @@
+#
+# Conditional build:
+%bcond_with	doc	# Sphinx documentation (sdist contains prebuilt html)
+%bcond_without	tests	# unit tests
+
+Summary:	A caching front-end based on the Dogpile lock
+Summary(pl.UTF-8):	Frontend z pamięcią podręczną oparty na blokadzie Dogpile
+Name:		python3-dogpile.cache
+Version:	1.5.0
+Release:	1
+License:	MIT
+Group:		Libraries/Python
+#Source0Download: https://pypi.org/simple/dogpile.cache/
+Source0:	https://files.pythonhosted.org/packages/source/d/dogpile.cache/dogpile_cache-%{version}.tar.gz
+# Source0-md5:	a60ad9511e7bbf45417bd89d16d5b222
+URL:		https://pypi.org/project/dogpile.cache/
+BuildRequires:	python3-modules >= 1:3.10
+BuildRequires:	python3-setuptools >= 1:77.0.3
+%if %{with tests}
+BuildRequires:	python3-Mako
+BuildRequires:	python3-decorator >= 4.0.0
+#BuildRequires:	python3-junitparser
+BuildRequires:	python3-pytest >= 8
+BuildRequires:	python3-stevedore >= 3.0.0
+%if "%{py3_ver}" == "3.10"
+BuildRequires:	python3-typing_extensions
+%endif
+%endif
+BuildRequires:	rpm-pythonprov
+BuildRequires:	rpmbuild(macros) >= 1.714
+%if %{with doc}
+BuildRequires:	python3-Mako
+BuildRequires:	python3-changelog
+BuildRequires:	python3-decorator
+BuildRequires:	python3-sphinx-paramlinks
+BuildRequires:	python3-sphinx_book_theme
+BuildRequires:	python3-stevedore
+BuildRequires:	sphinx-pdg-3
+%endif
+Requires:	python3-modules >= 1:3.10
+BuildArch:	noarch
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+Dogpile consists of two subsystems, one building on top of the other.
+
+dogpile provides the concept of a "dogpile lock", a control structure
+which allows a single thread of execution to be selected as the
+"creator" of some resource, while allowing other threads of execution
+to refer to the previous version of this resource as the creation
+proceeds; if there is no previous version, then those threads block
+until the object is available.
+
+dogpile.cache is a caching API which provides a generic interface to
+caching backends of any variety, and additionally provides API hooks
+which integrate these cache backends with the locking mechanism of
+dogpile.
+
+%description -l pl.UTF-8
+Dogpile składa się z dwóch podsystemów, jeden jest zbudowany na
+drugim.
+
+dogpile udostępnia koncept "blokady dogpile" - struktury sterującej,
+pozwalającej na wybór jednego z wątków jako "twórcy" jakiegoś zasobu,
+podczas gdy pozostałe wątki odwołują się do poprzedniej wersji zasobu
+w miarę procesu tworzenia; jeśli nie ma poprzedniej wersji, wątki te
+blokują się do czasu dostępności obiektu.
+
+dogpile.cache to API z pamięcią podręczną, zapewniające ogólny
+interfejs do dowolnych backendów pamięci podręcznej oraz uchwyty API
+integrujące te backendy z mechanizmem blokującym dogpile.
+
+%package apidocs
+Summary:	API documentation for Python dogpile.cache module
+Summary(pl.UTF-8):	Dokumentacja API modułu Pythona dogpile.cache
+Group:		Documentation
+
+%description apidocs
+API documentation for Python dogpile.cache module.
+
+%description apidocs -l pl.UTF-8
+Dokumentacja API modułu Pythona dogpile.cache.
+
+%prep
+%setup -q -n dogpile_cache-%{version}
+
+%build
+%py3_build
+
+%if %{with tests}
+# backend tests take long time
+PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
+%{__python3} -m pytest tests -k 'not test_dbm_backend and not test_memcached_backend and not test_redis_backend'
+%endif
+
+%if %{with doc}
+sphinx-build-3 -b html docs/build docs
+%endif
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%py3_install
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(644,root,root,755)
+%doc LICENSE README.rst
+%{py3_sitescriptdir}/dogpile
+%{py3_sitescriptdir}/dogpile.cache-%{version}-py*.egg-info
+
+%files apidocs
+%defattr(644,root,root,755)
+%doc docs/{_static,*.html,*.js}
diff --git a/dogpile.cache-mock.patch b/dogpile.cache-mock.patch
deleted file mode 100644
index 49eee8b..0000000
--- a/dogpile.cache-mock.patch
+++ /dev/null
@@ -1,57 +0,0 @@
---- dogpile.cache-0.9.2/tests/test_lock.py.orig	2020-05-04 22:19:04.000000000 +0200
-+++ dogpile.cache-0.9.2/tests/test_lock.py	2024-02-13 19:37:17.465546577 +0100
-@@ -5,7 +5,10 @@ import threading
- import time
- from unittest import TestCase
- 
--import mock
-+try:
-+    from unittest import mock
-+except ImportError:
-+    import mock
- 
- from dogpile import Lock
- from dogpile import NeedRegenerationException
---- dogpile.cache-0.9.2/tests/cache/test_redis_backend.py.orig	2024-02-13 19:38:39.485102239 +0100
-+++ dogpile.cache-0.9.2/tests/cache/test_redis_backend.py	2024-02-13 19:38:43.325081436 +0100
-@@ -4,8 +4,10 @@ from threading import Event
- import time
- from unittest import TestCase
- 
--from mock import Mock
--from mock import patch
-+try:
-+    from unittest.mock import Mock, patch
-+except ImportError:
-+    from mock import Mock, patch
- import pytest
- 
- from dogpile.cache.region import _backend_loader
---- dogpile.cache-0.9.2/tests/cache/test_region.py.orig	2020-05-04 22:19:04.000000000 +0200
-+++ dogpile.cache-0.9.2/tests/cache/test_region.py	2024-02-13 19:39:13.528251145 +0100
-@@ -4,7 +4,10 @@ import itertools
- import time
- from unittest import TestCase
- 
--import mock
-+try:
-+    from unittest import mock
-+except ImportError:
-+    import mock
- 
- from dogpile.cache import CacheRegion
- from dogpile.cache import exception
---- dogpile.cache-0.9.2/tests/cache/plugins/test_mako_cache.py.orig	2020-05-04 22:19:04.000000000 +0200
-+++ dogpile.cache-0.9.2/tests/cache/plugins/test_mako_cache.py	2024-02-13 19:57:49.548871809 +0100
-@@ -2,7 +2,10 @@ from unittest import TestCase
- 
- from mako.cache import register_plugin
- from mako.template import Template
--import mock
-+try:
-+    from unittest import mock
-+except ImportError:
-+    import mock
- import pytest
- 
- from .. import eq_
diff --git a/dogpile.cache-pytest.patch b/dogpile.cache-pytest.patch
deleted file mode 100644
index 117c913..0000000
--- a/dogpile.cache-pytest.patch
+++ /dev/null
@@ -1,12 +0,0 @@
---- dogpile.cache-0.9.2/tests/conftest.py.orig	2020-05-04 22:19:04.000000000 +0200
-+++ dogpile.cache-0.9.2/tests/conftest.py	2024-02-13 20:33:08.770724333 +0100
-@@ -26,6 +26,9 @@ def is_unittest(obj):
- 
- def pytest_pycollect_makeitem(collector, name, obj):
-     if is_unittest(obj) and not obj.__name__.startswith("_"):
-+      if sys.version_info[0] == 2:
-         return UnitTestCase(name, parent=collector)
-+      else:
-+        return UnitTestCase.from_parent(collector, name=name, obj=obj)
-     else:
-         return []
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python3-dogpile.cache.git/commitdiff/24f6f1337b07cb3bc73dd44025b5a763ba88d35b



More information about the pld-cvs-commit mailing list