File: python3.12.patch

package info (click to toggle)
i3pystatus 3.35%2Bgit20191126.5a8eaf4-2.3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,228 kB
  • sloc: python: 12,517; makefile: 145; sh: 19
file content (25 lines) | stat: -rw-r--r-- 715 bytes parent folder | download | duplicates (2)
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()