public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Michał Górny" <mgorny@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/moto/files/, dev-python/moto/
Date: Sun, 14 Jun 2020 11:10:05 +0000 (UTC)	[thread overview]
Message-ID: <1592133000.afb4b0bdab99f1b464f5ec203700575d21766f5a.mgorny@gentoo> (raw)

commit:     afb4b0bdab99f1b464f5ec203700575d21766f5a
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sun Jun 14 10:50:41 2020 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sun Jun 14 11:10:00 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=afb4b0bd

dev-python/moto: Port to py3.9

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 dev-python/moto/files/moto-1.3.14-py39.patch | 38 ++++++++++++++++++++++++++++
 dev-python/moto/moto-1.3.14-r1.ebuild        |  3 ++-
 2 files changed, 40 insertions(+), 1 deletion(-)

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 00000000000..de00028179f
--- /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
+

diff --git a/dev-python/moto/moto-1.3.14-r1.ebuild b/dev-python/moto/moto-1.3.14-r1.ebuild
index e73600eb155..71f3637af83 100644
--- a/dev-python/moto/moto-1.3.14-r1.ebuild
+++ b/dev-python/moto/moto-1.3.14-r1.ebuild
@@ -2,7 +2,7 @@
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
-PYTHON_COMPAT=( python3_{6,7,8} )
+PYTHON_COMPAT=( python3_{6..9} )
 DISTUTILS_USE_SETUPTOOLS=rdepend
 inherit distutils-r1
 
@@ -59,6 +59,7 @@ BDEPEND="
 PATCHES=(
 	"${FILESDIR}/moto-1.3.14-newer-botocore.patch"
 	"${FILESDIR}/moto-1.3.14-tests.patch"
+	"${FILESDIR}/moto-1.3.14-py39.patch"
 )
 
 distutils_enable_tests nose


             reply	other threads:[~2020-06-14 11:10 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-14 11:10 Michał Górny [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-10-12  9:47 [gentoo-commits] repo/gentoo:master commit in: dev-python/moto/files/, dev-python/moto/ Michał Górny
2024-01-24 16:30 Michał Górny
2022-03-20 10:41 Michał Górny
2021-08-07  8:50 Michał Górny
2020-04-29 23:11 Patrick McLean

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1592133000.afb4b0bdab99f1b464f5ec203700575d21766f5a.mgorny@gentoo \
    --to=mgorny@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox