From 0526abaa46612750ef332dbecd31291dee27a6c7 Mon Sep 17 00:00:00 2001 From: zangrc Date: Sat, 19 Sep 2020 05:22:03 +0800 Subject: python3-hp3parclient: Change to python3 Refresh the following patch: fix_hp3parclient_memory_leak.patch Signed-off-by: Zang Ruochen Signed-off-by: Bruce Ashfield --- .../fix_hp3parclient_memory_leak.patch | 37 ---------------------- .../python/python-hp3parclient_3.2.0.bb | 14 -------- .../fix_hp3parclient_memory_leak.patch | 37 ++++++++++++++++++++++ .../python/python3-hp3parclient_3.2.0.bb | 14 ++++++++ 4 files changed, 51 insertions(+), 51 deletions(-) delete mode 100644 meta-openstack/recipes-devtools/python/python-hp3parclient/fix_hp3parclient_memory_leak.patch delete mode 100644 meta-openstack/recipes-devtools/python/python-hp3parclient_3.2.0.bb create mode 100644 meta-openstack/recipes-devtools/python/python3-hp3parclient/fix_hp3parclient_memory_leak.patch create mode 100644 meta-openstack/recipes-devtools/python/python3-hp3parclient_3.2.0.bb (limited to 'meta-openstack/recipes-devtools/python') diff --git a/meta-openstack/recipes-devtools/python/python-hp3parclient/fix_hp3parclient_memory_leak.patch b/meta-openstack/recipes-devtools/python/python-hp3parclient/fix_hp3parclient_memory_leak.patch deleted file mode 100644 index ac196fd..0000000 --- a/meta-openstack/recipes-devtools/python/python-hp3parclient/fix_hp3parclient_memory_leak.patch +++ /dev/null @@ -1,37 +0,0 @@ ---- - hp3parclient/http.py | 10 ++++++++++ - 1 file changed, 10 insertions(+) - ---- a/hp3parclient/http.py -+++ b/hp3parclient/http.py -@@ -61,6 +61,7 @@ - self.set_debug_flag(http_log_debug) - - self.times = [] # [("item", starttime, endtime), ...] -+ self.times_max_len = 200 - - # httplib2 overrides - self.force_exception_to_status_code = True -@@ -141,6 +142,12 @@ - """ - self.times = [] - -+ def get_timings_max_len(self): -+ return self.times_max_len -+ -+ def set_timings_max_len(self, new_len): -+ self.times_max_len = new_len -+ - def _http_log_req(self, args, kwargs): - if not self.http_log_debug: - return -@@ -205,6 +212,9 @@ - resp, body = self.request(url, method, **kwargs) - self.times.append(("%s %s" % (method, url), - start_time, time.time())) -+ # remove oldest items until we maintain max length -+ while len(self.times) > self.times_max_len: -+ del self.times[0] - return resp, body - - diff --git a/meta-openstack/recipes-devtools/python/python-hp3parclient_3.2.0.bb b/meta-openstack/recipes-devtools/python/python-hp3parclient_3.2.0.bb deleted file mode 100644 index 269c73e..0000000 --- a/meta-openstack/recipes-devtools/python/python-hp3parclient_3.2.0.bb +++ /dev/null @@ -1,14 +0,0 @@ -DESCRIPTION = "HP 3PAR HTTP REST Client" -HOMEPAGE = "https://pypi.python.org/pypi/hp3parclient/2.0.0" -SECTION = "devel/python" -LICENSE = "Apache-2.0" -LIC_FILES_CHKSUM = "file://PKG-INFO;md5=497435a85c6b1376c82b18488e9bc907" - -SRC_URI += " \ - file://fix_hp3parclient_memory_leak.patch \ - " - -SRC_URI[md5sum] = "f4cc346281ae86c21b5f975cc3b4d759" -SRC_URI[sha256sum] = "83c0c00a5ba9fd5cecf6f32c6aea9d222e34abcb521548988b70ac8d062ec2f2" - -inherit setuptools3 pypi diff --git a/meta-openstack/recipes-devtools/python/python3-hp3parclient/fix_hp3parclient_memory_leak.patch b/meta-openstack/recipes-devtools/python/python3-hp3parclient/fix_hp3parclient_memory_leak.patch new file mode 100644 index 0000000..25aebc0 --- /dev/null +++ b/meta-openstack/recipes-devtools/python/python3-hp3parclient/fix_hp3parclient_memory_leak.patch @@ -0,0 +1,37 @@ +--- + hp3parclient/http.py | 10 ++++++++++ + 1 file changed, 10 insertions(+) + +--- a/hp3parclient/http.py ++++ b/hp3parclient/http.py +@@ -66,6 +66,7 @@ + self.set_debug_flag(http_log_debug) + + self.times = [] # [("item", starttime, endtime), ...] ++ self.times_max_len = 200 + + # httplib2 overrides + self.force_exception_to_status_code = True +@@ -141,6 +142,12 @@ + """ + self.times = [] + ++ def get_timings_max_len(self): ++ return self.times_max_len ++ ++ def set_timings_max_len(self, new_len): ++ self.times_max_len = new_len ++ + def _http_log_req(self, args, kwargs): + if not self.http_log_debug: + return +@@ -208,6 +215,9 @@ + resp, body = self.request(url, method, **kwargs) + self.times.append(("%s %s" % (method, url), + start_time, time.time())) ++ # remove oldest items until we maintain max length ++ while len(self.times) > self.times_max_len: ++ del self.times[0] + return resp, body + + def _do_reauth(self, url, method, ex, **kwargs): diff --git a/meta-openstack/recipes-devtools/python/python3-hp3parclient_3.2.0.bb b/meta-openstack/recipes-devtools/python/python3-hp3parclient_3.2.0.bb new file mode 100644 index 0000000..269c73e --- /dev/null +++ b/meta-openstack/recipes-devtools/python/python3-hp3parclient_3.2.0.bb @@ -0,0 +1,14 @@ +DESCRIPTION = "HP 3PAR HTTP REST Client" +HOMEPAGE = "https://pypi.python.org/pypi/hp3parclient/2.0.0" +SECTION = "devel/python" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://PKG-INFO;md5=497435a85c6b1376c82b18488e9bc907" + +SRC_URI += " \ + file://fix_hp3parclient_memory_leak.patch \ + " + +SRC_URI[md5sum] = "f4cc346281ae86c21b5f975cc3b4d759" +SRC_URI[sha256sum] = "83c0c00a5ba9fd5cecf6f32c6aea9d222e34abcb521548988b70ac8d062ec2f2" + +inherit setuptools3 pypi -- cgit v1.2.3-54-g00ecf