[New-bugs-announce] [issue30365] Backport warnings in ElementTree/cElementTree modules and fix bugs

Serhiy Storchaka report at bugs.python.org
Sun May 14 11:38:54 EDT 2017


New submission from Serhiy Storchaka:

Proposed patch add warnings in ElementTree and cElementTree modules (backports issue29204) when run Python with the -3 option and fixes several bugs in the etree package and its tests:

The deprecation warning about the doctype() method was emitted when use xml.etree.ElementTree.XMLParser. Now it emitted only when use a subclass of XMLParser with defined doctype() method, as intended.

In the test_bug_200708_close test an EchoTarget instance was incorrectly passed to XMLParser() as the html argument and silently ignored. Now it is passed as the target argument.

Tests no longer failed when use the -m option for running only selected test methods. Checking warnings now is more specific, warnings are expected only when use deprecated features.

----------
components: Extension Modules, Library (Lib), XML
messages: 293652
nosy: benjamin.peterson, eli.bendersky, scoder, serhiy.storchaka
priority: normal
severity: normal
stage: patch review
status: open
title: Backport warnings in ElementTree/cElementTree modules and fix bugs
type: behavior
versions: Python 2.7

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue30365>
_______________________________________


More information about the New-bugs-announce mailing list