diff options
| author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2018-05-17 02:01:02 -0700 |
|---|---|---|
| committer | Serhiy Storchaka <storchaka@gmail.com> | 2018-05-17 12:01:02 +0300 |
| commit | 216a27766fab59f4dfecfae0c453f7f3fd478989 (patch) | |
| tree | 7c2044a1b8b2a68ee7d9f103c82ce871693c2ff6 /Lib/xml/dom/xmlbuilder.py | |
| parent | d504108a88bd14a560dec875df682f4e581490e5 (diff) | |
| download | cpython-git-216a27766fab59f4dfecfae0c453f7f3fd478989.tar.gz | |
bpo-33549: Remove shim and deprecation warning to access DocumentLS.async. (GH-6924) (GH-6929)
`obj.async` is now a syntax error, so the warning/shim is
quasi-unnecessary.
(cherry picked from commit f90f5d5c1d95721e0ca0b1c302e3d13ed34753a8)
Co-authored-by: Matthias Bussonnier <bussonniermatthias@gmail.com>
Diffstat (limited to 'Lib/xml/dom/xmlbuilder.py')
| -rw-r--r-- | Lib/xml/dom/xmlbuilder.py | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/Lib/xml/dom/xmlbuilder.py b/Lib/xml/dom/xmlbuilder.py index 60a2bc36e3..213ab14551 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 |
