summaryrefslogtreecommitdiff
path: root/dev-python/moto/files/moto-1.3.14-py39.patch
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-06-21 17:50:24 +0100
committerV3n3RiX <venerix@redcorelinux.org>2020-06-21 17:50:24 +0100
commitfeb0daf81d888e9160f9f94502de09b66f2a63fd (patch)
treeb6e5c40ce2abef3da27ed50a023153f475e0ddef /dev-python/moto/files/moto-1.3.14-py39.patch
parent9452a6e87b6c2c70513bc47a2470bf9f1168920e (diff)
gentoo resync : 21.06.2020
Diffstat (limited to 'dev-python/moto/files/moto-1.3.14-py39.patch')
-rw-r--r--dev-python/moto/files/moto-1.3.14-py39.patch38
1 files changed, 38 insertions, 0 deletions
diff --git a/dev-python/moto/files/moto-1.3.14-py39.patch b/dev-python/moto/files/moto-1.3.14-py39.patch
new file mode 100644
index 000000000000..de00028179fa
--- /dev/null
+++ b/dev-python/moto/files/moto-1.3.14-py39.patch
@@ -0,0 +1,38 @@
+From af66a281ee2bcc7cc6c48bb3c8d033d385c12875 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
+Date: Sun, 14 Jun 2020 12:31:00 +0200
+Subject: [PATCH] Fix use of base64.decodestring() in tests
+
+Use base64.decodebytes() instead of deprecated/removed .decodestring()
+in test_user_data_with_run_instance(). Fixes tests on py3.9.
+---
+ tests/test_ec2/test_instances.py | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/tests/test_ec2/test_instances.py b/tests/test_ec2/test_instances.py
+index 041bc8c8..1def1734 100644
+--- a/tests/test_ec2/test_instances.py
++++ b/tests/test_ec2/test_instances.py
+@@ -9,6 +9,7 @@ from nose.tools import assert_raises
+ import base64
+ import datetime
+ import ipaddress
++import sys
+
+ import six
+ import boto
+@@ -765,7 +766,10 @@ def test_user_data_with_run_instance():
+ instance_attribute = instance.get_attribute("userData")
+ instance_attribute.should.be.a(InstanceAttribute)
+ retrieved_user_data = instance_attribute.get("userData").encode("utf-8")
+- decoded_user_data = base64.decodestring(retrieved_user_data)
++ if sys.version_info[0] == 2:
++ decoded_user_data = base64.decodestring(retrieved_user_data)
++ else:
++ decoded_user_data = base64.decodebytes(retrieved_user_data)
+ decoded_user_data.should.equal(b"some user data")
+
+
+--
+2.27.0
+