1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
|
Description: Replace imp which is deprecated in Python3.12 by importlib
Author: Emmanuel Arias <eamanu@debian.org>
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1056410
Last-Update: 2024-04-23
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/i3pystatus/__init__.py
+++ b/i3pystatus/__init__.py
@@ -6,7 +6,7 @@
from i3pystatus.core.util import formatp, get_module
import argparse
-import imp
+import importlib
import logging
import os
@@ -44,6 +44,6 @@
if args.config:
module_name = "i3pystatus-config"
- imp.load_source(module_name, args.config)
+ importlib.import_module(module_name, args.config)
else:
clock_example()
|