aboutsummaryrefslogtreecommitdiff
path: root/Lib/xml
diff options
context:
space:
mode:
authorMatthias Bussonnier <bussonniermatthias@gmail.com>2018-05-17 01:16:12 -0700
committerSerhiy Storchaka <storchaka@gmail.com>2018-05-17 11:16:12 +0300
commitf90f5d5c1d95721e0ca0b1c302e3d13ed34753a8 (patch)
tree6cfb0f3881f6d5aa7c775be2efe09d01eca1df3d /Lib/xml
parentbpo-33518: Add PEP entry to documentation glossary (GH-6860) (diff)
downloadcpython-f90f5d5c1d95721e0ca0b1c302e3d13ed34753a8.tar.gz
cpython-f90f5d5c1d95721e0ca0b1c302e3d13ed34753a8.tar.bz2
cpython-f90f5d5c1d95721e0ca0b1c302e3d13ed34753a8.zip
bpo-33549: Remove shim and deprecation warning to access DocumentLS.async. (GH-6924)
`obj.async` is now a syntax error, so the warning/shim is quasi-unnecessary.
Diffstat (limited to 'Lib/xml')
-rw-r--r--Lib/xml/dom/xmlbuilder.py22
1 files changed, 0 insertions, 22 deletions
diff --git a/Lib/xml/dom/xmlbuilder.py b/Lib/xml/dom/xmlbuilder.py
index 60a2bc36e3c..213ab14551c 100644
--- a/Lib/xml/dom/xmlbuilder.py
+++ b/Lib/xml/dom/xmlbuilder.py
@@ -332,29 +332,10 @@ class DOMBuilderFilter:
del NodeFilter
-class _AsyncDeprecatedProperty:
- def warn(self, cls):
- clsname = cls.__name__
- warnings.warn(
- "{cls}.async is deprecated; use {cls}.async_".format(cls=clsname),
- DeprecationWarning)
-
- def __get__(self, instance, cls):
- self.warn(cls)
- if instance is not None:
- return instance.async_
- return False
-
- def __set__(self, instance, value):
- self.warn(type(instance))
- setattr(instance, 'async_', value)
-
-
class DocumentLS:
"""Mixin to create documents that conform to the load/save spec."""
async_ = False
- locals()['async'] = _AsyncDeprecatedProperty() # Avoid DeprecationWarning
def _get_async(self):
return False
@@ -384,9 +365,6 @@ class DocumentLS:
return snode.toxml()
-del _AsyncDeprecatedProperty
-
-
class DOMImplementationLS:
MODE_SYNCHRONOUS = 1
MODE_ASYNCHRONOUS = 2