summaryrefslogtreecommitdiff
path: root/Lib/xml/dom
diff options
context:
space:
mode:
authorYury Selivanov <yury@magic.io>2016-09-15 12:50:23 -0400
committerYury Selivanov <yury@magic.io>2016-09-15 12:50:23 -0400
commit75a546e4742311e7ed442e47410c55e57de71fd6 (patch)
treea38e0c81ace687cd1f4b737af4dc2d50131ce750 /Lib/xml/dom
parentd734fb01a2767352005604619186787d4fad1810 (diff)
downloadcpython-75a546e4742311e7ed442e47410c55e57de71fd6.tar.gz
Issue #26182: Raise DeprecationWarning for improper use of async/await keywords
Diffstat (limited to 'Lib/xml/dom')
-rw-r--r--Lib/xml/dom/xmlbuilder.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/xml/dom/xmlbuilder.py b/Lib/xml/dom/xmlbuilder.py
index 444f0b2a57..e9a1536472 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")