summaryrefslogtreecommitdiff
path: root/meta-openembedded/meta-python/recipes-devtools/python/python3-pycrypto/0001-Replace-time.clock-with-time.process_time.patch
diff options
context:
space:
mode:
authorjmbills <42755197+jmbills@users.noreply.github.com>2020-07-11 02:37:34 +0300
committerGitHub <noreply@github.com>2020-07-11 02:37:34 +0300
commit2a11ae52fca0d1c0e12b4f18da637645eecc213c (patch)
tree05a1d365e0faa6ce8570b2d0c2d0f100dc8df1d4 /meta-openembedded/meta-python/recipes-devtools/python/python3-pycrypto/0001-Replace-time.clock-with-time.process_time.patch
parentefa39df15c70a1ab300cfa87e9895d5ee1feb5be (diff)
parentd071adf43ac87f21dde2f84287120960c723962c (diff)
downloadopenbmc-2a11ae52fca0d1c0e12b4f18da637645eecc213c.tar.xz
Merge pull request #44 from Intel-BMC/update
Update
Diffstat (limited to 'meta-openembedded/meta-python/recipes-devtools/python/python3-pycrypto/0001-Replace-time.clock-with-time.process_time.patch')
-rw-r--r--meta-openembedded/meta-python/recipes-devtools/python/python3-pycrypto/0001-Replace-time.clock-with-time.process_time.patch34
1 files changed, 34 insertions, 0 deletions
diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-pycrypto/0001-Replace-time.clock-with-time.process_time.patch b/meta-openembedded/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-openembedded/meta-python/recipes-devtools/python/python3-pycrypto/0001-Replace-time.clock-with-time.process_time.patch
@@ -0,0 +1,34 @@
+From 1d90727ff2368012d6e2f91b1a3198f626495b7f Mon Sep 17 00:00:00 2001
+From: Ming Liu <liu.ming50@gmail.com>
+Date: Sat, 25 Jan 2020 14:36:16 +0100
+Subject: [PATCH] Replace time.clock() with time.process_time()
+
+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
+
+Upstream-Status: Pending
+
+Signed-off-by: Ming Liu <liu.ming50@gmail.com>
+---
+ lib/Crypto/Random/_UserFriendlyRNG.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/lib/Crypto/Random/_UserFriendlyRNG.py b/lib/Crypto/Random/_UserFriendlyRNG.py
+index 957e006..d2a0259 100644
+--- a/lib/Crypto/Random/_UserFriendlyRNG.py
++++ b/lib/Crypto/Random/_UserFriendlyRNG.py
+@@ -74,7 +74,7 @@ class _EntropyCollector(object):
+ self._time_es.feed(struct.pack("@I", int(2**30 * (t - floor(t)))))
+
+ # Add the fractional part of time.clock()
+- t = time.clock()
++ t = time.process_time()
+ self._clock_es.feed(struct.pack("@I", int(2**30 * (t - floor(t)))))
+
+
+--
+2.7.4
+