lxml.etree._Attrib doesn't inherit Mapping
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
lxml |
Fix Released
|
Low
|
scoder |
Bug Description
We have code that operates with various collections and when working with dictionaries it checks is the object a dictionary with `isinstance(obj, Mapping)`. That works fine in general, including with the standard ElementTree, but fails with `lxml.etree.
>>> from collections.abc import Mapping
>>> from xml.etree.
>>> isinstance(
True
>>> from lxml.etree import XML
>>> isinstance(
False
Required version info:
Python : sys.version_
lxml.etree : (4, 9, 1, 0)
libxml used : (2, 9, 14)
libxml compiled : (2, 9, 14)
libxslt used : (1, 1, 35)
libxslt compiled : (1, 1, 35)
description: | updated |
Changed in lxml: | |
status: | Fix Committed → Fix Released |
Right, it should register as MutableMapping.
https:/ /github. com/lxml/ lxml/commit/ ff82753bd09408e cfd6cacf7da6725 7495dc1335