From f30e1dfb3aa97867c4170784cd1c5ad29eb6efd16f77a976cf4a8d727a10d6f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mark=C3=A9ta=20Machov=C3=A1?= Date: Tue, 10 Jun 2025 09:03:30 +0000 Subject: [PATCH] - Convert to pip-based build OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pymemcache?expand=0&rev=43 --- .gitattributes | 23 +++ .gitignore | 1 + pymemcache-4.0.0.tar.gz | 3 + python-pymemcache.changes | 368 ++++++++++++++++++++++++++++++++++++++ python-pymemcache.spec | 97 ++++++++++ 5 files changed, 492 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 pymemcache-4.0.0.tar.gz create mode 100644 python-pymemcache.changes create mode 100644 python-pymemcache.spec diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -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 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/pymemcache-4.0.0.tar.gz b/pymemcache-4.0.0.tar.gz new file mode 100644 index 0000000..508d8ff --- /dev/null +++ b/pymemcache-4.0.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:27bf9bd1bbc1e20f83633208620d56de50f14185055e49504f4f5e94e94aff94 +size 70176 diff --git a/python-pymemcache.changes b/python-pymemcache.changes new file mode 100644 index 0000000..d41460f --- /dev/null +++ b/python-pymemcache.changes @@ -0,0 +1,368 @@ +------------------------------------------------------------------- +Tue Jun 10 09:03:10 UTC 2025 - Markéta Machová + +- Convert to pip-based build + +------------------------------------------------------------------- +Fri Apr 21 12:31:00 UTC 2023 - Dirk Müller + +- add sle15_python_module_pythons (jsc#PED-68) + +------------------------------------------------------------------- +Thu Apr 13 22:43:47 UTC 2023 - Matej Cepl + +- Make calling of %{sle15modernpython} optional. + +------------------------------------------------------------------- +Thu Dec 15 06:47:56 UTC 2022 - Steve Kowalik + +- Remove unneeded BuildRequires on python-memcached. +- Clean up python 2 gubbins. + +------------------------------------------------------------------- +Mon Dec 12 17:10:07 UTC 2022 - Daniel Garcia + +- Disable broken tests in i586. + +------------------------------------------------------------------- +Wed Dec 7 13:33:02 UTC 2022 - Daniel Garcia + +- Fix launch of memcached for tests + +------------------------------------------------------------------- +Wed Dec 7 13:11:08 UTC 2022 - Daniel Garcia + +- Remove python-pymemcache-no-mock.patch +- More specific python_sitelib in %files +- Remove python_module macro definition +- Update to 4.0.0: + * Drop python support for 2.7, 3.4 and 3.5 by @jogo in #321 + * Use default for get ignore_exc by @jogo in #351 + * Return default from hash client by @Pankrat in #352 + * Return default from hash client when using positional argument by @Pankrat + in #354 + * Support noreply for hash flush_all by @jogo in #361 + * Drop support for Python 3.6 by @jparise in #363 + * Add official support for Python 3.10 by @jparise in #365 + * Handle a blank stat value by @liquidpele in #388 + * Small buffer pass optimization as discussed in #395. by @martinnj in #402 + * Expand Client with a method for sending arbitrary commands. by @martinnj in + #395 + * add pluggable compression serde by @sontek in #407 + * Start to add type hints by @jogo in #415 + * Add py.typed file by @jogo in #421 + * Fix key_prefix issue with stats and cache_memlimit by @jogo in #433 + +------------------------------------------------------------------- +Thu Apr 7 09:31:23 UTC 2022 - pgajdos@suse.com + +- version update to 3.5.2 + * Handle blank ``STAT`` values. + * ``Client.get`` returns the default when using ``ignore_exc`` and if memcached + is unavailable + * Added ``noreply`` support to ``HashClient.flush_all``. +- add python-pymemcache-no-mock.patch, do not require python-mock for build + +------------------------------------------------------------------- +Sat Oct 16 20:29:06 UTC 2021 - Dirk Müller + +- update to 3.5.0: + * Sockets are now closed on ``MemcacheUnexpectedCloseError``. + * Added support for TCP keepalive for client sockets on Linux platforms. + * Added retrying mechanisms by wrapping clients. +- drop merged_pr_327.patch (upstream) + +------------------------------------------------------------------- +Sat Jun 19 02:18:02 UTC 2021 - John Vandenberg + +- Switch to using pytest +- Add merged_pr_327.patch to fix mocked tests +- Update to v3.4.4 + * Idle connections will be removed from the pool after pool_idle_timeout +- from v3.4.3 + * Fix `HashClient.{get,set}_many()` with UNIX sockets. +- from v3.4.2 + * Remove trailing space for commands that don't take arguments, such + as `stats`. This was a violation of the memcached protocol. +- from v3.4.1 + * CAS operations will now raise MemcacheIllegalInputError when + None is given as the `cas` value. +- from v3.4.0 + * Added IPv6 support for TCP socket connections. Note that IPv6 may + be used in preference to IPv4 when passing a domain name as the + host if an IPv6 address can be resolved for that domain. + * `HashClient` now supports UNIX sockets. + +------------------------------------------------------------------- +Tue Jun 1 10:41:18 UTC 2021 - pgajdos@suse.com + +- %check: use %pyunittest rpm macro + +------------------------------------------------------------------- +Tue Oct 13 07:29:30 UTC 2020 - Dirk Mueller + +- update to 3.3.0: + * ``HashClient`` can now be imported from the top-level ``pymemcache`` package + (e.g. ``pymemcache.HashClient``). + * ``HashClient.get_many()`` now longer stores ``False`` for missing keys from + unavailable clients. Instead, the result won't contain the key at all. + * Added missing ``HashClient.close()`` and ``HashClient.quit()``. + +------------------------------------------------------------------- +Sun Jun 14 09:30:56 UTC 2020 - Dirk Mueller + +- update to 3.2.0: + * ``PooledClient`` and ``HashClient`` now support custom ``Client`` classes + +------------------------------------------------------------------- +Tue May 12 08:26:33 UTC 2020 - Dirk Mueller + +- update to 3.1.0: + * Add TLS support for TCP sockets. + * Fix corner case when dead hashed server comes back alive. + +------------------------------------------------------------------- +Thu Apr 23 09:34:22 UTC 2020 - Tomáš Chvátal + +- Fix build without python 2 + +------------------------------------------------------------------- +Mon Mar 23 14:54:06 UTC 2020 - pgajdos@suse.com + +- version update to 3.0.1 + * Make MockMemcacheClient more consistent with the real client. + * Pass ``encoding`` from HashClient to its pooled clients when ``use_pooling`` + is enabled. + +------------------------------------------------------------------- +Fri Mar 20 12:04:30 UTC 2020 - Marketa Calabkova + +- Update to 3.0.0 + * The serialization API has been reworked. Instead of consuming a serializer + and deserializer as separate arguments, client objects now expect an argument + ``serde`` to be an object which implements ``serialize`` and ``deserialize`` + as methods. (``serialize`` and ``deserialize`` are still supported but + considered deprecated.) + * Validate integer inputs for ``expire``, ``delay``, ``incr``, ``decr``, and + ``memlimit`` -- non-integer values now raise ``MemcacheIllegalInputError`` + * Validate inputs for ``cas`` -- values which are not integers or strings of + 0-9 now raise ``MemcacheIllegalInputError`` + * Add ``prepend`` and ``append`` support to ``MockMemcacheClient``. + * Add the ``touch`` method to ``HashClient``. + * Added official support for Python 3.8. + +------------------------------------------------------------------- +Tue Sep 10 11:58:40 UTC 2019 - Tomáš Chvátal + +- Update to 2.2.2: + * Fix long_description string in Python packaging. + * Fix flags when setting multiple differently-typed values at once. + * Use setup.cfg metadata instead setup.py config to generate package. + * Add default_noreply parameter to HashClient. + * Add encoding parameter to Client constructors (defaults to ascii). + * Add flags parameter to write operation methods. + * Handle unicode key values in MockMemcacheClient correctly. + * Improve ASCII encoding failure exception. + * Fix setup.py dependency on six already being installed. + +------------------------------------------------------------------- +Mon Mar 18 18:19:22 UTC 2019 - Jan Engelhardt + +- Trim filler wording from descriptions. + +------------------------------------------------------------------- +Wed Feb 27 15:51:01 UTC 2019 - Thomas Bechtold + +- update to 2.1.0: + * Check reStructuredText along with flake8 + * Hotfix broken path + * fix result + * Update changelog + * Fix syntax errors + * Use byte strings after serializing with serde + * correct spelling mistake + * Remove deprecated Python version. + * Add tests for serde module + * Kill python 2.6 + * Add optional support for unicode keys + * Update README to mention tox + * Fix support newbytes from future + * Final touches for 1.3.7 + * Make tuple once, instead of on every call + * Use only the highest, premium quality picklers available at runtime. + * Enforce version for sphinx + * Don't Raise Generic Exception (#164) + * DocString: `gets` returns values, not keys + * Always send command keys in their original order + * Bump version to 1.4.3 + * Bump version to 1.4.2 + * Bump version to 1.4.1 + * Bump version to 1.4.0 + * Import Classes, Function into package level + * new Patch version for minor change + * trevor sucks + * Remove docs from being run when you're running tests + * Add integration environment to tox + * Remove py26 detritus from .travis.yml (#181) + * We only need to import cPickle explicitly if Python 2 + * Add test for subclasses of builtin types + * Added default parameter support for "get" and "gets" methods in Client + * Always close the existing socket on _connect() (#208) + * Add support for stats cachedump + * Add test coverage for the 'cache_memlimit' command + * Comparing ord(character) so its compatible with python 2 and 3 + * Introduce some missing .set() assertions + * Add Code of Conduct and Contributing guides + * Finish preparing the 2.1.0 release + * Make serde use BytesIO for Python 3 compat + * fixed markdown syntax to rst link format (#205) + * Test against py35 and py36 + * Update ChangeLog.rst + * Release 1.3.7 + * Return default value instead of False when all clients are down + * Make pickle version for python_memcache_serializer adjustable + * Add virtualenv env/ and .cache/ to gitignore + * remove suggestion to use python-clandestined + * add delete and delete_multi benchmarks + * Fix typo in doc + * Bump version + * split benchmarks by method and include get_multi and set_multi + * Fixed a small typo in the doc string of the pooled client + * Add Nicholas Charriere to contributors :D + * Remove 'sudo: false' from Travis configuration (#204) + * Update release notes for version 2.0.0 + * fix return object + * ensure that client 'if not self.sock: self._connect()' behavior is tested + * minor tweaks for an extra 7.5% gain + * Prevent pytest-warning on pytest 3.0+ + * Add CODEOWNERS listing global project reviewers (#203) + * Bump docs' the copyright year to 2018 + * Improve MemcacheIllegalInputError messages + * add validation code with NOT_STORED + * Start a list of project adopters + * Improve syntax + * Bumpversion + * allow friendly imports + * removed apidoc directory from repo + * update comparison to pylibmc + * Raising MemcacheIllegalInputError when a key contains null byte, new line, or carriage return + * Fixed docs + * fix ChangeLog.rst + * Clean up some changelog links + * Use simpler Travis pip caching syntax + * refactor BaseClient._store_cmd() to handle multiple key-value pairs so set_many can work as desired + * Use a bytes string + * Add gevent to test-requirements + * Simplify README for running tests. Only tox + * Use cPickle for six.moves + * test for default_noreply for both clients + * Added changelog + * gevent 1.3 is required for Python 3.7 support + * Switch to is bytes for bytes comparision + * Improve the cache_memlimit documentation + * Renaming byte to character + * Improve serde + * typo: alwais -> always + * Update getting_started.rst + * gevent 1.3.6 has some additional Python 3.7 fixes + * Refactor _delete_many() to batch its keys + * Fixes tox six pkg ImportError #198 (#199) + * Switch to an SVG Travis-CI build badge (#207) + * added OK as acceptable response + * Test for expected flags with serde tests + * Bump version to 2.0.0 + * Add UNIX domain socket support (#206) + * Changelog for 1.4.2 + * Add gets_many to HashClient. + * Iterating over characters in key once + * Using bytearray + * Add that we're hiring on README + * Use cPickle as pickle if available + * Add cPickle change to Changelog + * Exclude well-known non-code paths from flake8 + * Imports the right path in doc building step + * Make restriction wider to avoid breaking client + * Fix #117, illegal unicode character in middle of key (or value now) + * add apidoc to .gitignore + * Lint with Python 3.4 too + * Bump version to 1.3.8 + * Doc about keys + * Fix flake8 issues + * Added Python 3.5 and 3.6 to the build. + * Make line length reqs explicit + * Fixed stats evictions conversion + * Reverse backwards compatible change + * Add more serde unit tests for bytes/unicode + * Add a few more serde integration tests + * Fix #99 unsanitized input + * fix failed keys + * fix pep8 + * Ensure serde integration tests return the same type + * Try fix import error six + * Fix flake8 and cleanup build + * Update documentation to cover serde module + * Add changelog for 1.4.1 + * Updating exception message + * Preparing for release 1.3.6: adding bumpversion config and changelog + * fix comment for set_many + * Run full benchmark test in travis + * Automate doc building + * refactor + * Fix the MockMemcacheClient implementation + * Add pypy3 to travis test matrix + * Changelog changes for 1.4.3 + * Add default_noreply property to PooledClient + * Add FLAG_BYTES + * Moving test cases + * Assert bytes string + * Add failing test of MockMemcacheClient serializer/deserializer + * Omit test/* code from the coverage report + * Have MockMemcacheClient support non-ascii strings (#169) + * Start preparing the 2.1.0 release (#202) + * Use is type for type comparisons + * fix implementation HashClient + * Make serde import on Python 3 + * Close client socket if it fails to connect (#165) + * Add official Python 3.7 support + * Adding test case for null character + * Fix encode/decode wrong way around + * Add integration test for serde serialization + * Improve stats parsing + * Parse version directly from pymemcache/__init__.py + * Fix an issue in Travis where the build breaks because of a gevent bump + * Mention the `no_delay` connection flag + * PooledClient now use default_noreply arg set on init + * Convert readthedocs link for their .org -> .io migration for hosted projects + * simplify and speed up _check_key() performance + * fix test +- Convert to singlespec + +------------------------------------------------------------------- +Tue Nov 21 12:31:19 UTC 2017 - dmueller@suse.com + +- update to 1.2.9: + * Introduced PooledClient a thread-safe pool of clients + +------------------------------------------------------------------- +Sun Mar 13 21:44:20 UTC 2016 - dmueller@suse.com + +- add LICENSE.txt + +------------------------------------------------------------------- +Tue Feb 24 14:42:54 UTC 2015 - tbechtold@suse.com + +- update to 1.2.8: + * Increasing version number for pypi + * Merge pull request #30 from methane/patch-1 + * Move nose to tests_requires + * Bumping version to fix upload issues with pypi + * Adding James Socol to contributors and bumping version for pypi + * Merge pull request #27 from jsocol/connect-error + * Include _connect in ignore_exc try/except block + * Adding the LICENSE.txt file to the distribution + +------------------------------------------------------------------- +Fri Jun 6 08:31:19 UTC 2014 - thomasbechtold@jpberlin.de + +- Initial version. + diff --git a/python-pymemcache.spec b/python-pymemcache.spec new file mode 100644 index 0000000..384cfe0 --- /dev/null +++ b/python-pymemcache.spec @@ -0,0 +1,97 @@ +# +# spec file for package python-pymemcache +# +# Copyright (c) 2025 SUSE LLC +# Copyright (c) 2014 Thomas Bechtold +# +# 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/ +# + + +%bcond_without python2 +%{?sle15_python_module_pythons} +Name: python-pymemcache +Version: 4.0.0 +Release: 0 +Summary: A pure Python memcached client +License: Apache-2.0 +URL: https://github.com/Pinterest/pymemcache +Source: https://files.pythonhosted.org/packages/source/p/pymemcache/pymemcache-%{version}.tar.gz +BuildRequires: %{python_module pip} +BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module wheel} +BuildRequires: fdupes +BuildRequires: memcached +BuildRequires: python-rpm-macros +BuildArch: noarch +# SECTION test requirements +BuildRequires: %{python_module Faker} +BuildRequires: %{python_module gevent} +BuildRequires: %{python_module pylibmc} +BuildRequires: %{python_module pytest} +BuildRequires: %{python_module zstd} +# /SECTION +%python_subpackages + +%description +A pure-Python memcached client. + +pymemcache supports the following features: + +* Complete implementation of the memcached text protocol. +* Configurable timeouts for socket connect and send/recv calls. +* Access to the "noreply" flag, which can significantly increase the speed of writes. +* Flexible, simple approach to serialization and deserialization. +* The (optional) ability to treat network and memcached errors as cache misses. + +%prep +%autosetup -p1 -n pymemcache-%{version} +# Disable pytest-cov +sed -i 's/tool:pytest/tool:ignore-pytest-cov/' setup.cfg + +%build +%pyproject_wheel + +%install +%pyproject_install +%python_expand %fdupes %{buildroot}%{$python_sitelib} + +%check +if [ -f %{_sbindir}/memcached ]; then + %{_sbindir}/memcached & +elif [ -f %{_bindir}/memcached ]; then + %{_bindir}/memcached & +fi + +cat << EOF > pytest.ini +[pytest] +markers = + unit + integration + benchmark +EOF + +# TLS tests depend on setting up a memcached equivalent to +# https://github.com/scoriacorp/docker-tls-memcached +donttest="tls" +# In i586 zlib.compress doesn't compress the CustomInt instance so these tests +# fails +donttest+=" or test_compressed_complex" +%pytest -rs -k "not (${donttest})" -m "unit or integration" + +%files %{python_files} +%license LICENSE.txt +%doc README.rst +%{python_sitelib}/pymemcache +%{python_sitelib}/pymemcache-%{version}*-info + +%changelog