ComplianceAsCode / content-test-filtering

System for Automatic Filtering of Tests for ComplianceAsCode project
8 stars 6 forks source link

Stop using deprecated find_module method #46

Closed jan-cerny closed 10 months ago

jan-cerny commented 10 months ago

This method has been removed in Python 3.12.

Addressing: Traceback (most recent call last): File "/w/content/content/./ctf/content_test_filtering.py", line 44, in diff_structure = diff_analysis.analyse_file(file_record) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/w/content/content/ctf/ctf/diff_analysis.py", line 40, in analyse_file module = importer.find_module(full_package_name).load_module( ^^^^^^^^^^^^^^^^^^^^ AttributeError: 'FileFinder' object has no attribute 'find_module'

mildas commented 10 months ago

Test fails are not relevant to this PR. They are caused by changed content which is used in tests. I'll fix those in subsequent PR. Thanks for the fix