mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-07-30 10:38:07 -07:00
dev-python/docutils: remove old
Signed-off-by: Virgil Dupras <vdupras@gentoo.org> Package-Manager: Portage-2.3.62, Repoman-2.3.11
This commit is contained in:
@@ -1,30 +0,0 @@
|
||||
--- a/docutils/writers/odf_odt/__init__.py
|
||||
+++ b/docutils/writers/odf_odt/__init__.py
|
||||
@@ -88,16 +88,20 @@
|
||||
# that support for the ability to get the parent of an element.
|
||||
#
|
||||
if WhichElementTree == 'elementtree':
|
||||
- class _ElementInterfaceWrapper(etree._ElementInterface):
|
||||
+ import weakref
|
||||
+ _parents = weakref.WeakKeyDictionary()
|
||||
+ if isinstance(etree.Element, type):
|
||||
+ _ElementInterface = etree.Element
|
||||
+ else:
|
||||
+ _ElementInterface = etree._ElementInterface
|
||||
+ class _ElementInterfaceWrapper(_ElementInterface):
|
||||
def __init__(self, tag, attrib=None):
|
||||
- etree._ElementInterface.__init__(self, tag, attrib)
|
||||
- if attrib is None:
|
||||
- attrib = {}
|
||||
- self.parent = None
|
||||
+ _ElementInterface.__init__(self, tag, attrib)
|
||||
+ _parents[self] = None
|
||||
def setparent(self, parent):
|
||||
- self.parent = parent
|
||||
+ _parents[self] = parent
|
||||
def getparent(self):
|
||||
- return self.parent
|
||||
+ return _parents[self]
|
||||
|
||||
|
||||
#
|
||||
Reference in New Issue
Block a user