| 1 |
Description: Python 3.12 compatibility: adjust submodule imports |
| 2 |
importlib imports behave differently in py 3.11 and py 3.12: py 3.12 |
| 3 |
requires explicit imports of the submodules. |
| 4 |
. |
| 5 |
While fixing this, reduce the imports to the used submodules. Currently, |
| 6 |
the base is still imported automatically. |
| 7 |
Forwarded: https://sourceforge.net/p/dblatex/patches/13/ |
| 8 |
Author: Michael J Gruber <[email protected]> |
| 9 |
Last-Update: 2023-07-06 |
| 10 |
|
| 11 |
--- a/lib/dbtexmf/core/dbtex.py |
| 12 |
+++ b/lib/dbtexmf/core/dbtex.py |
| 13 |
@@ -15,7 +15,8 @@ |
| 14 |
except ImportError: |
| 15 |
from urllib.request import pathname2url |
| 16 |
import glob |
| 17 |
-import importlib |
| 18 |
+import importlib.machinery |
| 19 |
+import importlib.util |
| 20 |
from optparse import OptionParser |
| 21 |
from io import open |
| 22 |
|
| 23 |
--- a/lib/dbtexmf/dblatex/grubber/plugins.py |
| 24 |
+++ b/lib/dbtexmf/dblatex/grubber/plugins.py |
| 25 |
@@ -4,7 +4,8 @@ |
| 26 |
Mechanisms to dynamically load extra modules to help the LaTeX compilation. |
| 27 |
All the modules must be derived from the TexModule class. |
| 28 |
""" |
| 29 |
-import importlib |
| 30 |
+import importlib.machinery |
| 31 |
+import importlib.util |
| 32 |
|
| 33 |
from os.path import * |
| 34 |
from dbtexmf.dblatex.grubber.msg import _, msg |
| 35 |
--- a/lib/dbtexmf/xslt/xslt.py |
| 36 |
+++ b/lib/dbtexmf/xslt/xslt.py |
| 37 |
@@ -2,7 +2,8 @@ |
| 38 |
# Very simple plugin loader for Xslt classes |
| 39 |
# |
| 40 |
import os |
| 41 |
-import importlib |
| 42 |
+import importlib.machinery |
| 43 |
+import importlib.util |
| 44 |
import glob |
| 45 |
import sys |
| 46 |
|