-
Notifications
You must be signed in to change notification settings - Fork 78
Vendored six raises ImportWarning #390
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
Comments
Thanks for the report. What did you do to trigger the warning? |
Any project using textx uses the vendored six module when importing other modules. On Python 3.10+, the vendored version of six throws an ImportWarning when it cannot find a module (before it throws the expected ImportError). This means I cannot use This problem was fixed in six 1.16.0 (latest version). import warnings
with warnings.catch_warnings():
# ensure we notice ImportWarning
warnings.simplefilter("error", category=ImportWarning)
# if commented, then vendored six not used and ImportWarning not thrown
import textx
try:
import missing
except ImportError:
print("Caught ImportError") |
Thanks for the detailed info. I think now is a good time to remove six as we are not supporting 2.x Python anymore. |
I plan to release textX 3.1 in the following days. |
Version 3.1.0 is released |
I've encountered warnings using textX on Python 3.10, which are caused by the vendored version of six. More details of this issue can be found at: secdev/scapy#3502
The text was updated successfully, but these errors were encountered: