summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2020-06-10 16:00:45 +0200
committerMichał Górny <mgorny@gentoo.org>2020-06-10 16:02:06 +0200
commitb929540acb2a7c73096a03f264f4f5b1e732f8e2 (patch)
tree3aa0eb9c33610955d6b4370b874f8d7e61e45a68 /dev-python/s3transfer/files
parentdev-python/s3transfer: Port to py3.9 (diff)
downloadgentoo-b929540acb2a7c73096a03f264f4f5b1e732f8e2.tar.gz
gentoo-b929540acb2a7c73096a03f264f4f5b1e732f8e2.tar.bz2
gentoo-b929540acb2a7c73096a03f264f4f5b1e732f8e2.zip
dev-python/s3transfer: Bump to 0.3.3
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'dev-python/s3transfer/files')
-rw-r--r--dev-python/s3transfer/files/s3transfer-0.3.3-py38.patch32
1 files changed, 32 insertions, 0 deletions
diff --git a/dev-python/s3transfer/files/s3transfer-0.3.3-py38.patch b/dev-python/s3transfer/files/s3transfer-0.3.3-py38.patch
new file mode 100644
index 000000000000..89f3d4b5ab32
--- /dev/null
+++ b/dev-python/s3transfer/files/s3transfer-0.3.3-py38.patch
@@ -0,0 +1,32 @@
+From f211b9851698d07cf218e78ebb39a337c8751df8 Mon Sep 17 00:00:00 2001
+From: Christopher Baines <mail@cbaines.net>
+Date: Sat, 2 May 2020 15:19:58 +0100
+Subject: [PATCH] Fix test_download_futures_fail_triggers_shutdown with Python
+ 3.8
+
+The behaviour of set_exception for futures changed in Python 3.8, it'll now
+raise concurrent.futures.InvalidStateError if the future is already done [1],
+which is the case in this test because set_result has already been called on
+the future.
+
+1: https://bugs.python.org/issue33238
+
+Fix the test by not using the future from SequentialExecutor, and instead
+creating a future which doesn't have a result.
+---
+ tests/unit/test_s3transfer.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/tests/unit/test_s3transfer.py b/tests/unit/test_s3transfer.py
+index a87b4dd..4715be2 100644
+--- a/tests/unit/test_s3transfer.py
++++ b/tests/unit/test_s3transfer.py
+@@ -465,7 +465,7 @@ def __init__(self, max_workers):
+ self.is_first = True
+
+ def submit(self, function):
+- future = super(FailedDownloadParts, self).submit(function)
++ future = futures.Future()
+ if self.is_first:
+ # This is the download_parts_thread.
+ future.set_exception(