-
-
Notifications
You must be signed in to change notification settings - Fork 592
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
DeprecationWarning: defusedxml.lxml is no longer supported #956
Comments
I am hitting this issue too with Zeep 3.4.0: /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/zeep/loader.py:3:
The problem line is:
|
@Julien00859 already made a pass on this at some point but there's a bunch of warnings either dynamic or from not the stdlib left over. Some of them can't really be fixed in-code and have been explicitly ignored instead: * `setuptools` uses the deprecated `imp` module until v41.6.0 * `zeep` uses defusedxml.lxml which was never intended to be a public / production API, not sure what to do there (cf mvantellingen/python-zeep#956) * there are a ton of invalid escapes in non-raw string literals, they're unlikely to ever be relevant so ignore them closes #44164 Related: odoo/enterprise#8130 Signed-off-by: Xavier Morel (xmo) <[email protected]>
There's some more information in this ticket: tiran/defusedxml#38, short summary, the module isn't going away until there's some alternative |
Is this issue or #1014 fixed and released ? |
So Zeep is using defusedxml while deprecated while there is no alternative and it's not likely to not go away anytime soon. So I'd say it's your decision if you want the warning to be gone: (run before importing zeep stuff) import warnings
warnings.filterwarnings("ignore", "defusedxml.lxml is no longer supported and will be removed in a future release.", DeprecationWarning) Or just filter in the log: import logging
logging.getLogger(*you logger here*).addFilter(lambda record: "defusedxml.lxml is no longer supported" not in message)
# may be:
# logging.root.addFilter(lambda record: "defusedxml.lxml is no longer supported" not in message) |
According to |
zeep/loader.py
importsdefusedxml.lxml.fromstring
, this works, but was (recently) deprecated:The best references to why it was deprecated I could find are here:
tiran/defusedxml#31
tiran/defusedxml#25
The text was updated successfully, but these errors were encountered: