Upgrading lxml 2 to 3
Breaking2.3.6 → 3.8.0Breaking5Security1Platform1New26Changed4Fixed80Other4
SecurityIncomplete blacklist vulnerability in the lxml.html.clean module in lxml before 3.3.5 allows remote attackers to conduct cross-site scripting (XSS) attacks via control characters in the link scheme to the clean_html function.GHSA-57qw-cc2g-pv5p · CVE-2014-3146 ↗
BreakingUpgrade verdict
5 breaking changes and a platform requirement change and a security fix.
In plain terms
- Log entries no longer allow anything but plain string objects as message text and file name.
- The externally useless class lxml.etree._BaseParser was removed from the module dict.
- The build no longer uses Cython by default unless the generated C files are missing.
- The previously undocumented docstring option in ElementTree.write() produces a deprecation warning and will eventually be removed.
Must act Top 5 of 7 that need code or config changes
What you must change
Breaking5
Log entries no longer allow anything but plain string objects as message text and file name.
The externally useless class lxml.etree._BaseParser was removed from the module dict.
lxml.etree._BaseParserThe build no longer uses Cython by default unless the generated C files are missing.
The previously undocumented docstring option in ElementTree.write() produces a deprecation warning and will eventually be removed.
docstringElementTree.write()The internal classes _LogEntry and _Attrib can no longer be subclassed from Python code.
_LogEntry_AttribSecurity1
Incomplete blacklist vulnerability in the lxml.html.clean module in lxml before 3.3.5 allows remote attackers to conduct cross-site scripting (XSS) attacks via control characters in the link scheme to the clean_html function.
Platform1
Requires Python 2.6, 2.7, 3.2 or later.
API changes
Generated by DepDelta from published Python source. Not mixed with prose notes.
- removed:
variable build_ext
- added:
variable XINCLUDE_ITER_TAG
- removed:
function callable(f) - removed:
function partial(func, tag)
- removed:
class ExpressionError(RuntimeError) - removed:
class SelectorSyntaxError(SyntaxError) - changed:
constructor CSSSelector(css, namespaces=…) → constructor CSSSelector(css, namespaces=…, translator=…) - added:
variable ExpressionError - added:
variable SelectorError - added:
variable SelectorSyntaxError
- changed:
function document_fromstring(html, parser=…, **kw) → function document_fromstring(html, parser=…, ensure_head_body=…, **kw)
- added:
field Cleaner.inline_style - added:
field Cleaner.safe_attrs
- added:
variable html5_tags
- removed:
field Schematron.schematron - removed:
field Schematron.validation_report - removed:
field Schematron.validator_xslt - removed:
method Schematron.schematron() - removed:
method Schematron.validation_report() - removed:
method Schematron.validator_xslt() - changed:
constructor Schematron(etree=…, file=…, include=…, expand=…, include_params=…, expand_params=…, compile_params=…, store_schematron=…, store_xslt=…, store_report=…, phase=…) → constructor Schematron(etree=…, file=…, include=…, expand=…, include_params=…, expand_params=…, compile_params=…, store_schematron=…, store_xslt=…, store_report=…, phase=…, error_finder=…) - added:
field Schematron.ASSERTS_AND_REPORTS - added:
field Schematron.ASSERTS_ONLY - added:
property Schematron.schematron - added:
property Schematron.validation_report - added:
property Schematron.validator_xslt