Skip to content

Commit 552403f

Browse files
authored
Merge pull request #46 from jan-cerny/py312
Stop using deprecated find_module method
2 parents 61f8214 + 1e401d6 commit 552403f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ctf/diff_analysis.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ def analyse_file(file_record):
3737
for importer, package_name, _ in pkgutil.iter_modules([path.dirname(__file__)
3838
+ "/analysis"]):
3939
full_package_name = "%s.%s" % ("ctf.analysis", package_name)
40-
module = importer.find_module(full_package_name).load_module(
41-
full_package_name)
40+
spec = importer.find_spec(full_package_name)
41+
module = spec.loader.load_module()
4242
analysis_modules.append(module)
4343

4444
# Get all classes with "is_valid" method

0 commit comments

Comments
 (0)