diff options
author | Yury Selivanov <yury@magic.io> | 2016-09-15 16:50:23 (GMT) |
---|---|---|
committer | Yury Selivanov <yury@magic.io> | 2016-09-15 16:50:23 (GMT) |
commit | 8987c9d219f0efb438f5d707a63d0a0a0f72b3ef (patch) | |
tree | 409543083b30dda1c786a619ab9012b0c9e0483f /Lib/xml/dom | |
parent | 67752315979e1501b7088273b5a1aecc90b6fe67 (diff) | |
download | cpython-8987c9d219f0efb438f5d707a63d0a0a0f72b3ef.zip cpython-8987c9d219f0efb438f5d707a63d0a0a0f72b3ef.tar.gz cpython-8987c9d219f0efb438f5d707a63d0a0a0f72b3ef.tar.bz2 |
Issue #26182: Raise DeprecationWarning for improper use of async/await keywords
Diffstat (limited to 'Lib/xml/dom')
-rw-r--r-- | Lib/xml/dom/xmlbuilder.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/xml/dom/xmlbuilder.py b/Lib/xml/dom/xmlbuilder.py index 444f0b2..e9a1536 100644 --- a/Lib/xml/dom/xmlbuilder.py +++ b/Lib/xml/dom/xmlbuilder.py @@ -353,14 +353,14 @@ class _AsyncDeprecatedProperty: class DocumentLS: """Mixin to create documents that conform to the load/save spec.""" - async = _AsyncDeprecatedProperty() async_ = False + locals()['async'] = _AsyncDeprecatedProperty() # Avoid DeprecationWarning def _get_async(self): return False - def _set_async(self, async): - if async: + def _set_async(self, flag): + if flag: raise xml.dom.NotSupportedErr( "asynchronous document loading is not supported") |