Compare commits
No commits in common. "72babb1bd918136956d6d3d7854718d6af9d21fb" and "b16e0549e9ff9efa596373b8778ce3bcc4cc3592" have entirely different histories.
72babb1bd9
...
b16e0549e9
@ -1,57 +0,0 @@
|
|||||||
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
|
|
||||||
|
|
||||||
BIN
python-memcached-1.58.tar.gz
Normal file
BIN
python-memcached-1.58.tar.gz
Normal file
Binary file not shown.
Binary file not shown.
@ -1,19 +1,20 @@
|
|||||||
Name: python-memcached
|
Name: python-memcached
|
||||||
Version: 1.59
|
Version: 1.58
|
||||||
Release: 3
|
Release: 1
|
||||||
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_python3:BuildRequires: python3-devel,python3-setuptools,python3-six}
|
%{?with_python2:BuildRequires: python2-devel,python2-setuptools,python2-six,python2-nose}
|
||||||
|
%{?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}
|
||||||
@ -29,6 +30,23 @@ 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}
|
||||||
@ -44,30 +62,32 @@ Summary: %{summary}
|
|||||||
%{python3_sitelib}/python_memcached-%{version}-py*.egg-info/
|
%{python3_sitelib}/python_memcached-%{version}-py*.egg-info/
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup -n %{name}-%{version} -p1
|
%autosetup -n %{name}-%{version}
|
||||||
|
|
||||||
|
|
||||||
%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
|
||||||
|
|||||||
@ -1,4 +0,0 @@
|
|||||||
version_control: github
|
|
||||||
src_repo: linsomniac/python-memcached
|
|
||||||
tag_prefix: release-
|
|
||||||
seperator: .
|
|
||||||
Loading…
x
Reference in New Issue
Block a user