Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stop using deprecated find_module method #46

Merged
merged 1 commit into from
Nov 8, 2023

Conversation

jan-cerny
Copy link
Contributor

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'

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 <module>
    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
Copy link
Collaborator

mildas commented Nov 8, 2023

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

@mildas mildas merged commit 552403f into ComplianceAsCode:master Nov 8, 2023
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants