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

Update deprecated "imp" module on Raw and HTTP listeners. #188

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

endlaze
Copy link

@endlaze endlaze commented Jun 1, 2024

ModuleNotFoundError exceptions are being raised in the Raw and HTTP Listeners when using Python 3.12.X versions.

The exception is raised since the HTTP and Raw Listeners use the imp module, and it is "Deprecated since version 3.4, will be removed in version 3.12: The imp module is deprecated in favor of importlib".

Both listeners were updated to import the importlib module instead of the deprecated imp module.

Screenshots

  • Raw Listener error

raw-listener-error

  • HTTP Listener error

http-listener-error

@tinajohnson
Copy link
Contributor

Thanks for the PR. Please update the references to the imp module in the code as well.

@endlaze
Copy link
Author

endlaze commented Jun 28, 2024

@tinajohnson

The references to the imp module in the code were already updated. I didn't find any more references to that module.

image

Files Changed:

code_references

Thank you!

@tinajohnson
Copy link
Contributor

I still see imp.load_source() in both the files you have changed. These need to be updated to use the appropriate functions from importlib.

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