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/loky/, dev-python/loky/files/
Date: Thu,  5 Aug 2021 21:44:55 +0000 (UTC)	[thread overview]
Message-ID: <1628199849.3ecd1f9e7ec50320fe6f0430fbdef6da3a47ff9e.mgorny@gentoo> (raw)

commit:     3ecd1f9e7ec50320fe6f0430fbdef6da3a47ff9e
Author:     Arthur Zamarin <arthurzam <AT> gmail <DOT> com>
AuthorDate: Mon Aug  2 15:56:49 2021 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Thu Aug  5 21:44:09 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3ecd1f9e

dev-python/loky: enable py3.10, fix tests

patch from my PR here: https://github.com/joblib/loky/pull/295

Signed-off-by: Arthur Zamarin <arthurzam <AT> gmail.com>
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 .../loky/files/loky-2.9.0-fix-py3.10-tests.patch   | 41 ++++++++++++++++++++++
 dev-python/loky/loky-2.9.0.ebuild                  |  3 +-
 2 files changed, 43 insertions(+), 1 deletion(-)

diff --git a/dev-python/loky/files/loky-2.9.0-fix-py3.10-tests.patch b/dev-python/loky/files/loky-2.9.0-fix-py3.10-tests.patch
new file mode 100644
index 00000000000..51cbfb348a5
--- /dev/null
+++ b/dev-python/loky/files/loky-2.9.0-fix-py3.10-tests.patch
@@ -0,0 +1,41 @@
+From 0d31dc24ca9688c11d1fe53fa1283728ecc50706 Mon Sep 17 00:00:00 2001
+From: Arthur Zamarin <arthurzam@gmail.com>
+Date: Mon, 2 Aug 2021 18:35:31 +0300
+Subject: [PATCH] Fix no attribute import_module for python 3.10
+
+In python 3.10, the `import_module` has moved from the
+`test.support` module to `test.support.import_helper`.
+
+As fix, try to import the from the new place and if unknown try from
+the old place.
+---
+ tests/_test_process_executor.py | 11 +++++++----
+ 1 file changed, 7 insertions(+), 4 deletions(-)
+
+diff --git a/tests/_test_process_executor.py b/tests/_test_process_executor.py
+index 65d9a2c9..3bd0b12d 100644
+--- a/tests/_test_process_executor.py
++++ b/tests/_test_process_executor.py
+@@ -1,15 +1,18 @@
+ from __future__ import print_function
+ try:
+-    import test.support
++    try:
++        from test.support.import_helper import import_module
++    except ImportError:
++        from test.support import import_module
+ 
+     # Skip tests if _multiprocessing wasn't built.
+-    test.support.import_module('_multiprocessing')
++    import_module('_multiprocessing')
+     # Skip tests if sem_open implementation is broken.
+-    test.support.import_module('multiprocessing.synchronize')
++    import_module('multiprocessing.synchronize')
+     # import threading after _multiprocessing to raise a more revelant error
+     # message: "No module named _multiprocessing" if multiprocessing is not
+     # compiled without thread support.
+-    test.support.import_module('threading')
++    import_module('threading')
+ except ImportError:
+     pass
+ 

diff --git a/dev-python/loky/loky-2.9.0.ebuild b/dev-python/loky/loky-2.9.0.ebuild
index 1b5b6ffc1d4..25edf84e76a 100644
--- a/dev-python/loky/loky-2.9.0.ebuild
+++ b/dev-python/loky/loky-2.9.0.ebuild
@@ -3,7 +3,7 @@
 
 EAPI=7
 
-PYTHON_COMPAT=( python3_{7..9} )
+PYTHON_COMPAT=( python3_{8..10} )
 inherit distutils-r1
 
 DESCRIPTION="Robust and reusable Executor for joblib"
@@ -27,6 +27,7 @@ distutils_enable_tests pytest
 
 PATCHES=(
 	"${FILESDIR}"/${P}-libc.patch
+	"${FILESDIR}"/${P}-fix-py3.10-tests.patch
 )
 
 python_test() {


             reply	other threads:[~2021-08-05 21:45 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-05 21:44 Michał Górny [this message]
  -- strict thread matches above, loose matches on Subject: below --
2021-10-16  6:02 [gentoo-commits] repo/gentoo:master commit in: dev-python/loky/, dev-python/loky/files/ Michał Górny
2021-03-08 12:35 Michał Górny
2020-11-04  7:34 Michał Górny

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=1628199849.3ecd1f9e7ec50320fe6f0430fbdef6da3a47ff9e.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