summaryrefslogtreecommitdiffstats
path: root/meta-python
diff options
context:
space:
mode:
authorMing Liu <liu.ming50@gmail.com>2020-01-25 15:19:53 +0100
committerKhem Raj <raj.khem@gmail.com>2020-01-25 12:44:25 -0800
commitbd85cf0642b9e5467da0ba91a3308d53410e7ece (patch)
tree67b612381535bb4fa8d9efb5120a5a5861fff8a9 /meta-python
parent680aadb4bfd993a00bc75e02a9dfa4a580cdb86b (diff)
downloadmeta-openembedded-bd85cf0642b9e5467da0ba91a3308d53410e7ece.tar.gz
python3-pycrypto: drop time.clock
The use of time.clock() is deprecated in python 3.8, change to use time.process_time(). Reference: https://docs.python.org/3.3/library/time.html#time.clock Signed-off-by: Ming Liu <liu.ming50@gmail.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-python')
-rw-r--r--meta-python/recipes-devtools/python/python3-pycrypto/0001-Replace-time.clock-with-time.process_time.patch34
-rw-r--r--meta-python/recipes-devtools/python/python3-pycrypto_2.6.1.bb2
2 files changed, 36 insertions, 0 deletions
diff --git a/meta-python/recipes-devtools/python/python3-pycrypto/0001-Replace-time.clock-with-time.process_time.patch b/meta-python/recipes-devtools/python/python3-pycrypto/0001-Replace-time.clock-with-time.process_time.patch
new file mode 100644
index 000000000..282fdd3e2
--- /dev/null
+++ b/meta-python/recipes-devtools/python/python3-pycrypto/0001-Replace-time.clock-with-time.process_time.patch
@@ -0,0 +1,34 @@
1From 1d90727ff2368012d6e2f91b1a3198f626495b7f Mon Sep 17 00:00:00 2001
2From: Ming Liu <liu.ming50@gmail.com>
3Date: Sat, 25 Jan 2020 14:36:16 +0100
4Subject: [PATCH] Replace time.clock() with time.process_time()
5
6The use of time.clock() is deprecated in python 3.8, change to use
7time.process_time().
8
9Reference:
10https://docs.python.org/3.3/library/time.html#time.clock
11
12Upstream-Status: Pending
13
14Signed-off-by: Ming Liu <liu.ming50@gmail.com>
15---
16 lib/Crypto/Random/_UserFriendlyRNG.py | 2 +-
17 1 file changed, 1 insertion(+), 1 deletion(-)
18
19diff --git a/lib/Crypto/Random/_UserFriendlyRNG.py b/lib/Crypto/Random/_UserFriendlyRNG.py
20index 957e006..d2a0259 100644
21--- a/lib/Crypto/Random/_UserFriendlyRNG.py
22+++ b/lib/Crypto/Random/_UserFriendlyRNG.py
23@@ -74,7 +74,7 @@ class _EntropyCollector(object):
24 self._time_es.feed(struct.pack("@I", int(2**30 * (t - floor(t)))))
25
26 # Add the fractional part of time.clock()
27- t = time.clock()
28+ t = time.process_time()
29 self._clock_es.feed(struct.pack("@I", int(2**30 * (t - floor(t)))))
30
31
32--
332.7.4
34
diff --git a/meta-python/recipes-devtools/python/python3-pycrypto_2.6.1.bb b/meta-python/recipes-devtools/python/python3-pycrypto_2.6.1.bb
index 02d634cb0..a20eafec4 100644
--- a/meta-python/recipes-devtools/python/python3-pycrypto_2.6.1.bb
+++ b/meta-python/recipes-devtools/python/python3-pycrypto_2.6.1.bb
@@ -1,6 +1,8 @@
1inherit distutils3 1inherit distutils3
2require python-pycrypto.inc 2require python-pycrypto.inc
3 3
4SRC_URI += "file://0001-Replace-time.clock-with-time.process_time.patch"
5
4# We explicitly call distutils_do_install, since we want it to run, but 6# We explicitly call distutils_do_install, since we want it to run, but
5# *don't* want the autotools install to run, since this package doesn't 7# *don't* want the autotools install to run, since this package doesn't
6# provide a "make install" target. 8# provide a "make install" target.