1 |
commit: 4d31a290407d773d60c21b5ae1ac7687756fde08 |
2 |
Author: Michael Mair-Keimberger <mmk <AT> levelnine <DOT> at> |
3 |
AuthorDate: Wed Jun 1 06:55:41 2022 +0000 |
4 |
Commit: Matt Turner <mattst88 <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Jun 1 13:56:09 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4d31a290 |
7 |
|
8 |
dev-python/pygobject: remove unused patch(es) |
9 |
|
10 |
Closes: https://github.com/gentoo/gentoo/pull/25716 |
11 |
Signed-off-by: Michael Mair-Keimberger <mmk <AT> levelnine.at> |
12 |
Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org> |
13 |
|
14 |
.../pygobject-3.42.0-dynamicimporter-py310.patch | 61 ---------------------- |
15 |
1 file changed, 61 deletions(-) |
16 |
|
17 |
diff --git a/dev-python/pygobject/files/pygobject-3.42.0-dynamicimporter-py310.patch b/dev-python/pygobject/files/pygobject-3.42.0-dynamicimporter-py310.patch |
18 |
deleted file mode 100644 |
19 |
index cf292ffbf7c6..000000000000 |
20 |
--- a/dev-python/pygobject/files/pygobject-3.42.0-dynamicimporter-py310.patch |
21 |
+++ /dev/null |
22 |
@@ -1,61 +0,0 @@ |
23 |
-From dea457c0754550e210ab3cca9da8be1ae52d1d31 Mon Sep 17 00:00:00 2001 |
24 |
-From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= <miro@×××××××.cz> |
25 |
-Date: Tue, 18 May 2021 12:31:51 +0200 |
26 |
-Subject: [PATCH] Implement DynamicImporter.find_spec() |
27 |
- |
28 |
-On Python 3.10, the code raised an ImportWarning: |
29 |
- |
30 |
- ImportWarning: DynamicImporter.find_spec() not found; falling back to find_module() |
31 |
- |
32 |
-See https://docs.python.org/3.10/whatsnew/3.10.html#deprecated |
33 |
- |
34 |
-> Starting in this release, there will be a concerted effort to begin cleaning |
35 |
-> up old import semantics that were kept for Python 2.7 compatibility. |
36 |
-> Specifically, find_loader()/find_module() (superseded by find_spec()), |
37 |
-> load_module() (superseded by exec_module()), module_repr() |
38 |
-> (which the import system takes care of for you), |
39 |
-> the __package__ attribute (superseded by __spec__.parent), |
40 |
-> the __loader__ attribute (superseded by __spec__.loader), |
41 |
-> and the __cached__ attribute (superseded by __spec__.cached) |
42 |
-> will slowly be removed (as well as other classes and methods in importlib). |
43 |
-> ImportWarning and/or DeprecationWarning will be raised as appropriate to help |
44 |
-> identify code which needs updating during this transition. |
45 |
- |
46 |
-Fixes https://gitlab.gnome.org/GNOME/pygobject/-/issues/473 |
47 |
---- |
48 |
- gi/importer.py | 15 ++++++++++----- |
49 |
- 1 file changed, 10 insertions(+), 5 deletions(-) |
50 |
- |
51 |
-diff --git a/gi/importer.py b/gi/importer.py |
52 |
-index 32967974..63788776 100644 |
53 |
---- a/gi/importer.py |
54 |
-+++ b/gi/importer.py |
55 |
-@@ -107,15 +107,20 @@ class DynamicImporter(object): |
56 |
- def __init__(self, path): |
57 |
- self.path = path |
58 |
- |
59 |
-- def find_module(self, fullname, path=None): |
60 |
-+ def _find_module_check(self, fullname): |
61 |
- if not fullname.startswith(self.path): |
62 |
-- return |
63 |
-+ return False |
64 |
- |
65 |
- path, namespace = fullname.rsplit('.', 1) |
66 |
-- if path != self.path: |
67 |
-- return |
68 |
-+ return path == self.path |
69 |
-+ |
70 |
-+ def find_spec(self, fullname, path=None, target=None): |
71 |
-+ if self._find_module_check(fullname): |
72 |
-+ return importlib.util.spec_from_loader(fullname, self) |
73 |
- |
74 |
-- return self |
75 |
-+ def find_module(self, fullname, path=None): |
76 |
-+ if self._find_module_check(fullname): |
77 |
-+ return self |
78 |
- |
79 |
- def load_module(self, fullname): |
80 |
- if fullname in sys.modules: |
81 |
--- |
82 |
-2.32.0 |
83 |
- |