From 25755782707e0895f15e9ed0d33aeaaae31ee50d6a41b384db717469fff2ede3 Mon Sep 17 00:00:00 2001 From: Daniel Garcia Date: Wed, 7 Dec 2022 13:14:17 +0000 Subject: [PATCH 1/3] - 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 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pymemcache?expand=0&rev=35 --- pymemcache-3.5.2.tar.gz | 3 --- pymemcache-4.0.0.tar.gz | 3 +++ python-pymemcache-no-mock.patch | 47 --------------------------------- python-pymemcache.changes | 24 +++++++++++++++++ python-pymemcache.spec | 23 ++++++++++------ 5 files changed, 42 insertions(+), 58 deletions(-) delete mode 100644 pymemcache-3.5.2.tar.gz create mode 100644 pymemcache-4.0.0.tar.gz delete mode 100644 python-pymemcache-no-mock.patch diff --git a/pymemcache-3.5.2.tar.gz b/pymemcache-3.5.2.tar.gz deleted file mode 100644 index 27c65c6..0000000 --- a/pymemcache-3.5.2.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:8923ab59840f0d5338f1c52dba229fa835545b91c3c2f691c118e678d0fb974e -size 65351 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-no-mock.patch b/python-pymemcache-no-mock.patch deleted file mode 100644 index cbc90dc..0000000 --- a/python-pymemcache-no-mock.patch +++ /dev/null @@ -1,47 +0,0 @@ -diff --git a/pymemcache/test/test_client.py b/pymemcache/test/test_client.py -index 8b323ded..f0aac442 100644 ---- a/pymemcache/test/test_client.py -+++ b/pymemcache/test/test_client.py -@@ -1,5 +1,4 @@ - # Copyright 2012 Pinterest.com --# -*- coding: utf-8 -*- - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. -@@ -20,8 +19,8 @@ - import functools - import json - import os --import mock - import platform -+from unittest import mock - import re - import socket - import sys -diff --git a/pymemcache/test/test_client_hash.py b/pymemcache/test/test_client_hash.py -index ad3f2dac..ceab7052 100644 ---- a/pymemcache/test/test_client_hash.py -+++ b/pymemcache/test/test_client_hash.py -@@ -7,7 +7,7 @@ - import unittest - import os - import pytest --import mock -+from unittest import mock - import socket - - -diff --git a/pymemcache/test/test_client_retry.py b/pymemcache/test/test_client_retry.py -index 230a941..de64a46 100644 ---- a/pymemcache/test/test_client_retry.py -+++ b/pymemcache/test/test_client_retry.py -@@ -2,8 +2,8 @@ - - import functools - import unittest -+from unittest import mock - --import mock - import pytest - - from .test_client import ClientTestMixin, MockSocket diff --git a/python-pymemcache.changes b/python-pymemcache.changes index c450505..2a75352 100644 --- a/python-pymemcache.changes +++ b/python-pymemcache.changes @@ -1,3 +1,27 @@ +------------------------------------------------------------------- +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 diff --git a/python-pymemcache.spec b/python-pymemcache.spec index ed075a6..3bb1087 100644 --- a/python-pymemcache.spec +++ b/python-pymemcache.spec @@ -17,30 +17,27 @@ # -%{?!python_module:%define python_module() python-%{**} python3-%{**}} %bcond_without python2 Name: python-pymemcache -Version: 3.5.2 +Version: 4.0.0 Release: 0 Summary: A pure Python memcached client License: Apache-2.0 Group: Development/Languages/Python URL: https://github.com/Pinterest/pymemcache Source: https://files.pythonhosted.org/packages/source/p/pymemcache/pymemcache-%{version}.tar.gz -# https://github.com/pinterest/pymemcache/commit/0bf1baa4f539dedf8e4e4b2e48f8da5d66ed57b5 -Patch0: python-pymemcache-no-mock.patch BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: memcached BuildRequires: python-rpm-macros -Requires: python-six BuildArch: noarch # SECTION test requirements BuildRequires: %{python_module gevent} +BuildRequires: %{python_module Faker} BuildRequires: %{python_module pylibmc} BuildRequires: %{python_module pytest} BuildRequires: %{python_module python-memcached} -BuildRequires: %{python_module six} +BuildRequires: %{python_module zstd} # /SECTION %if %{with python2} BuildRequires: python-future @@ -75,13 +72,23 @@ sed -i 's/tool:pytest/tool:ignore-pytest-cov/' setup.cfg %check %{_sbindir}/memcached & + +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 -%pytest -rs -k 'not tls' +%pytest -rs -k 'not tls' -m 'unit or integration' %files %{python_files} %license LICENSE.txt %doc README.rst -%{python_sitelib}/* +%{python_sitelib}/pymemcache +%{python_sitelib}/pymemcache-%{version}*-info %changelog From 9ba6a2bddab86b74cb6f8decd0dbc42f9bfe129ee7d80214a4064f6435f9092b Mon Sep 17 00:00:00 2001 From: Daniel Garcia Date: Wed, 7 Dec 2022 13:33:44 +0000 Subject: [PATCH 2/3] - Fix launch of memcached for tests OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pymemcache?expand=0&rev=36 --- python-pymemcache.changes | 5 +++++ python-pymemcache.spec | 6 +++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/python-pymemcache.changes b/python-pymemcache.changes index 2a75352..90d508f 100644 --- a/python-pymemcache.changes +++ b/python-pymemcache.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +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 diff --git a/python-pymemcache.spec b/python-pymemcache.spec index 3bb1087..6cf56d3 100644 --- a/python-pymemcache.spec +++ b/python-pymemcache.spec @@ -71,7 +71,11 @@ sed -i 's/tool:pytest/tool:ignore-pytest-cov/' setup.cfg %python_expand %fdupes %{buildroot}%{$python_sitelib} %check -%{_sbindir}/memcached & +if [ -f %{_sbindir}/memcached ]; then + %{_sbindir}/memcached & +elif [ -f %{_bindir}/memcached ]; then + %{_bindir}/memcached & +fi cat << EOF > pytest.ini [pytest] From c8e50015b250452522b62663a4d42d334fdd1e2f8afd8b4fa136828e220df953 Mon Sep 17 00:00:00 2001 From: Daniel Garcia Date: Mon, 12 Dec 2022 17:15:56 +0000 Subject: [PATCH 3/3] - Disable broken tests in i586. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pymemcache?expand=0&rev=37 --- python-pymemcache.changes | 5 +++++ python-pymemcache.spec | 6 +++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/python-pymemcache.changes b/python-pymemcache.changes index 90d508f..aa8392e 100644 --- a/python-pymemcache.changes +++ b/python-pymemcache.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +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 diff --git a/python-pymemcache.spec b/python-pymemcache.spec index 6cf56d3..17af6ab 100644 --- a/python-pymemcache.spec +++ b/python-pymemcache.spec @@ -87,7 +87,11 @@ EOF # TLS tests depend on setting up a memcached equivalent to # https://github.com/scoriacorp/docker-tls-memcached -%pytest -rs -k 'not tls' -m 'unit or integration' +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