| 1 |
Descriptionscip-debian debian j2cli 0.3.12b-7 j2cli/patches/`python3.12.patch`#Description.: Replace imp which is deprecated in Python3.12 by importlib |
| 2 |
Fix usage of ConfigParser in Python3.12 |
| 3 |
Bug-Debianscip-debian debian j2cli 0.3.12b-7 j2cli/patches/`python3.12.patch`#Bug-Debian.: https://bugs.debian.org/1061745scip-debian-bts debian-bts . . 1061745: |
| 4 |
Authorscip-debian debian j2cli 0.3.12b-7 j2cli/patches/`python3.12.patch`#Author.: Andreas Tille <[email protected]scip-debian . . . identity/`[email protected]`.> |
| 5 |
Last-Updatescip-debian debian j2cli 0.3.12b-7 j2cli/patches/`python3.12.patch`#Last-Update.: 2024-02-13 |
| 6 |
Forwardedscip-debian debian j2cli 0.3.12b-7 j2cli/patches/`python3.12.patch`#Forwarded.: not-needed |
| 7 |
|
| 8 |
--- a/j2cli/cli.pyscip-debian debian j2cli 0.3.12b-7 j2cli/upstream/`j2cli/cli.py`: |
| 9 |
+++ b/j2cli/cli.pyscip-debian debian j2cli 0.3.12b-7 j2cli/upstream/`j2cli/cli.py`: |
| 10 |
@@ -5,7 +5,7 @@ import jinja2 |
| 11 |
import jinja2.loaders |
| 12 |
from . import __version__ |
| 13 |
|
| 14 |
|
| 15 |
+import importlib, inspect |
| 16 |
|
| 17 |
from .context import read_context_data, FORMATS |
| 18 |
from .extras import filters |
| 19 |
@@ -70,7 +70,7 @@ class Jinja2TemplateRenderer(object): |
| 20 |
self.register_tests(self._import_functions(filename)) |
| 21 |
|
| 22 |
def _import_functions(self, filename): |
| 23 |
|
| 24 |
+ m = importlib.machinery.SourceFileLoader('imported-funcs', filename).load_module() |
| 25 |
return dict((name, func) for name, func in inspect.getmembers(m) if inspect.isfunction(func)) |
| 26 |
|
| 27 |
def render(self, template_path, context): |
| 28 |
@@ -167,7 +167,7 @@ def render_command(cwd, environ, stdin, |
| 29 |
# Customization |
| 30 |
if args.customize is not None: |
| 31 |
customize = CustomizationModule( |
| 32 |
|
| 33 |
+ importlib.machinery.SourceFileLoader('customize-module', args.customize).load_module() |
| 34 |
) |
| 35 |
else: |
| 36 |
customize = CustomizationModule(None) |
| 37 |
--- a/j2cli/context.pyscip-debian debian j2cli 0.3.12b-7 j2cli/upstream/`j2cli/context.py`: |
| 38 |
+++ b/j2cli/context.pyscip-debian debian j2cli 0.3.12b-7 j2cli/upstream/`j2cli/context.py`: |
| 39 |
@@ -41,7 +41,7 @@ def _parse_ini(data_string): |
| 40 |
|
| 41 |
# Parse |
| 42 |
ini = MyConfigParser() |
| 43 |
|
| 44 |
+ ini.read_file(ini_file_io(data_string)) |
| 45 |
|
| 46 |
# Export |
| 47 |
return ini.as_dict() |