Compare commits

...

10 Commits

Author SHA1 Message Date
openeuler-ci-bot
72babb1bd9
!15 Decoding in slab funcs, replacing 1 with True in while
From: @XIE-JING-2022 
Reviewed-by: @yangzhao_kl 
Signed-off-by: @yangzhao_kl
2024-05-13 10:41:25 +00:00
xiejing
8d86b29ef2 Decoding in slab funcs, replacing 1 with True in while 2024-05-11 11:37:04 +08:00
openeuler-ci-bot
ab3ed7f83d
!11 [sync] PR-10: delete python-nose Buildrequires
Merge pull request !11 from openeuler-sync-bot/sync-pr10-openEuler-22.03-LTS-Next-to-master
2022-01-24 01:40:57 +00:00
markeryang
daedce90ad delete python-nose Buildrequires
(cherry picked from commit 8abe8ae48f0a441190dc1f1922d45b8ff3d2ba2f)
2022-01-11 15:14:53 +08:00
openeuler-ci-bot
57b0e3b402 !8 Upgrade to 1.59 to support OpenStack-W
From: @huangtianhua
Reviewed-by: @shinwell_hu
Signed-off-by: @shinwell_hu
2021-07-26 01:43:34 +00:00
huangtianhua
da98c8d497 Upgrade to 1.59 to support OpenStack-W 2021-07-15 01:40:04 +00:00
openeuler-ci-bot
1ef96da9d5 !7 remove python2 dependency
From: @xinghe_1
Reviewed-by: @small_leek
Signed-off-by: @small_leek
2020-10-30 15:43:02 +08:00
jinzhimin369
3f1ce62e68 remove python2 dependency 2020-10-30 14:05:39 +08:00
openeuler-ci-bot
55c5b812e4 !2 python-memcached
Merge pull request !2 from wangef/master
2020-05-19 21:12:51 +08:00
wwx913452
8378947cbc added python-memcached.yaml 2020-05-07 14:47:21 +08:00
5 changed files with 78 additions and 37 deletions

View File

@ -0,0 +1,57 @@
From f5e4d4f39cee3d3489242387409af0de917fb84c Mon Sep 17 00:00:00 2001
From: Sean Reifschneider <sean@realgo.com>
Date: Sat, 15 Apr 2023 14:45:18 -0600
Subject: [PATCH] Decoding in slab funcs, replacing "1" with "True" in while.
The slab functions needed a decode (as noted in
https://github.com/linsomniac/python-memcached/pull/175), adapted that
patch. Also converted "while 1" to "while True" while I was in there.
---
memcache.py | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/memcache.py b/memcache.py
index 8c38e56..1aa9987 100644
--- a/memcache.py
+++ b/memcache.py
@@ -323,11 +323,13 @@ class Client(threading.local):
serverData = {}
data.append((name, serverData))
readline = s.readline
- while 1:
+ while True:
line = readline()
- if not line or line.decode('ascii').strip() == 'END':
+ if line:
+ line = line.decode('ascii')
+ if not line or line.strip() == 'END':
break
- stats = line.decode('ascii').split(' ', 2)
+ stats = line.split(' ', 2)
serverData[stats[1]] = stats[2]
return data
@@ -347,8 +349,10 @@ class Client(threading.local):
data.append((name, serverData))
s.send_cmd('stats slabs')
readline = s.readline
- while 1:
+ while True:
line = readline()
+ if line:
+ line = line.decode('ascii')
if not line or line.strip() == 'END':
break
item = line.split(' ', 2)
@@ -378,7 +382,7 @@ class Client(threading.local):
data.append((name, serverData))
s.send_cmd('stats items')
readline = s.readline
- while 1:
+ while True:
line = readline()
if not line or line.strip() == 'END':
break
--
2.43.0

Binary file not shown.

Binary file not shown.

View File

@ -1,20 +1,19 @@
Name: python-memcached Name: python-memcached
Version: 1.58 Version: 1.59
Release: 1 Release: 3
Summary: A Python memcached client library Summary: A Python memcached client library
License: Python License: Python
URL: https://github.com/linsomniac/python-memcached URL: https://github.com/linsomniac/python-memcached
Source0: https://files.pythonhosted.org/packages/source/p/%{name}/%{name}-%{version}.tar.gz Source0: https://files.pythonhosted.org/packages/source/p/%{name}/%{name}-%{version}.tar.gz
BuildArch: noarch BuildArch: noarch
Patch0: backport-Decoding-in-slab-funcs-replacing-1-with-True-in-while.patch
%bcond_without python2
%bcond_without python3 %bcond_without python3
%bcond_without check %bcond_without check
%{?with_python2:BuildRequires: python2-devel,python2-setuptools,python2-six,python2-nose} %{?with_python3:BuildRequires: python3-devel,python3-setuptools,python3-six}
%{?with_python3:BuildRequires: python3-devel,python3-setuptools,python3-six,python3-nose}
# Required for running test suite # Required for running test suite
%if %{with check} %if %{with check}
@ -30,23 +29,6 @@ for more information.
%{desc} %{desc}
%if %{with python2}
%package -n python2-memcached
Summary: %{summary}
%{?python_provide:%python_provide python2-memcached}
%description -n python2-memcached
%{desc}
%files -n python2-memcached
%doc ChangeLog README.md
%attr(755,root,root) %{python2_sitelib}/memcache.py
%{python2_sitelib}/memcache.py[co]
%{python2_sitelib}/python_memcached-%{version}-py*.egg-info/
%endif # python2
%package -n python3-memcached %package -n python3-memcached
Summary: %{summary} Summary: %{summary}
%{?python_provide:%python_provide python3-memcached} %{?python_provide:%python_provide python3-memcached}
@ -62,32 +44,30 @@ Summary: %{summary}
%{python3_sitelib}/python_memcached-%{version}-py*.egg-info/ %{python3_sitelib}/python_memcached-%{version}-py*.egg-info/
%prep %prep
%autosetup -n %{name}-%{version} %autosetup -n %{name}-%{version} -p1
%build %build
%py2_build
%py3_build %py3_build
%install %install
%if %{with python2}
%py2_install
%endif
%py3_install %py3_install
%check
pidfile=$(mktemp)
memcached -d -P $pidfile
%if %{with python2}
%{__python2} -m nose
%endif
%{__python3} -m nose
kill $(cat $pidfile)
%changelog %changelog
* Fri May 10 2024 xiejing <xiejing@kylinos.cn> - 1.59-3
- Decoding in slab funcs, replacing "1" with "True" in while
* Mon Jan 10 2022 yanglongkang <yanglongkang@huawei.com> - 1.59-2
- delete python-nose Buildrequires
* Thu Jul 15 2021 huangtianhua <huangtianhua@huawei.com> 1.59-1
- Upgrade to 1.59 to support OpenStack-W
* Fri Oct 30 2020 yanglongkang <yanglongkang@huawei.com> - 1.58.2
- remove python2 dependency
* Wed Feb 12 2020 openEuler Buildteam <buildteam@openeuler.org> - 1.58.1 * Wed Feb 12 2020 openEuler Buildteam <buildteam@openeuler.org> - 1.58.1
- Package init - Package init

4
python-memcached.yaml Normal file
View File

@ -0,0 +1,4 @@
version_control: github
src_repo: linsomniac/python-memcached
tag_prefix: release-
seperator: .