Commit 475d682
MNT: do not use deprecated load_module method (#218)
The load_module method has been deprecated from py34 and will be removed in
py315 [1] (it is already gone on CPython main).
The recommended replacement is exec_module, however the documentation [2]
suggests to use a simpler approach than using the loaders directly and runpy
[3] seemed better than sys.path hacking.
Given that this is a one-line file simply reading the file and parsing it 'by
hand' is an option.
[1] https://docs.python.org/3/library/importlib.html#importlib.abc.Loader.load_module
[2] https://docs.python.org/3/library/importlib.html#importing-a-source-file-directly
[3] https://docs.python.org/3/library/runpy.html#runpy.run_path
Co-authored-by: Igor Malinovskiy <[email protected]>1 parent 8c2fcc6 commit 475d682
1 file changed
Lines changed: 2 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
| 14 | + | |
18 | 15 | | |
19 | 16 | | |
20 | 17 | | |
| |||
0 commit comments