[Python-checkins] [python/cpython] 09b524: bpo-30365: Backport warnings and fix bugs in Eleme...

GitHub noreply at github.com
Wed May 17 03:08:13 EDT 2017


  Branch: refs/heads/2.7
  Home:   https://github.com/python/cpython
  Commit: 09b52471f39ba280d836b945d47719c697af0b45
      https://github.com/python/cpython/commit/09b52471f39ba280d836b945d47719c697af0b45
  Author: Serhiy Storchaka <storchaka at gmail.com>
  Date:   2017-05-17 (Wed, 17 May 2017)

  Changed paths:
    M Lib/test/test_xml_etree.py
    M Lib/xml/etree/ElementTree.py
    M Misc/NEWS
    M Modules/_elementtree.c

  Log Message:
  -----------
  bpo-30365: Backport warnings and fix bugs in ElementTree. (#1581)

Running Python with the -3 option now emits deprecation warnings for
getchildren() and getiterator() methods of the Element class in the
xml.etree.cElementTree module and when pass the html argument to
xml.etree.ElementTree.XMLParser().

Fixed a deprecation warning about the doctype() method of the
xml.etree.ElementTree.XMLParser class.  Now it is emitted only when
define the doctype() method in the subclass of XMLParser.

Fixed a bug in the test_bug_200708_close test method.  An EchoTarget
instance was incorrectly passed to XMLParser() as the html argument and
silently ignored.

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.




More information about the Python-checkins mailing list