We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hello,
On recent Python version (worked with 3.9, fails with 3.11), Python script crash because Iterable import namespace has changed.
The following patch fixes it:
--- a/harisekhon/utils.py +++ b/harisekhon/utils.py @@ -54,6 +54,10 @@ import defusedxml.ElementTree as ET # pass # Python 2.6 throws ExpatError instead of ParseError # from xml.parsers.expat import ExpatError +try: + from collections import Iterable +except ImportError: # Recent Python like 3.11 + from collections.abc import Iterable __author__ = 'Hari Sekhon' __version__ = '0.14.0' @@ -1105,12 +1109,12 @@ def isIP(arg): def isIterable(arg): # collections.Iterable Python 2.6+ - return isinstance(arg, collections.Iterable) + return isinstance(arg, Iterable) def isIterableNotStr(arg): # collections.Iterable Python 2.6+ - return isinstance(arg, collections.Iterable) and not isStr(arg) + return isinstance(arg, Iterable) and not isStr(arg) def isJavaException(arg):
The text was updated successfully, but these errors were encountered:
Thanks for raising this.
If you want to raise it as a pull request to the
https://github.com/HariSekhon/pylib
repo then I'll approve it and you'll get contribution credit.
If you don't want to then I'll make the change.
Sorry, something went wrong.
No branches or pull requests
Hello,
On recent Python version (worked with 3.9, fails with 3.11), Python script crash because Iterable import namespace has changed.
The following patch fixes it:
The text was updated successfully, but these errors were encountered: