Skip to content
Permalink
Branch: master
Commits on Aug 23, 2019
  1. bpo-14465: Add an indent() function to xml.etree.ElementTree to prett…

    scoder committed Aug 23, 2019
    …y-print XML trees (GH-15200)
Commits on Jul 24, 2019
  1. bpo-34160: explain how to deal with attribute order in ElementTree (G…

    scoder committed Jul 24, 2019
    …H-14867)
    
    * Fix the formatting in the documentation of the tostring() functions.
    
    * bpo-34160: Document that the tostring() and tostringlist() functions also preserve the attribute order now.
    
    * bpo-34160: Add an explanation of how users should deal with the attribute order.
  2. bpo-37399: Correctly attach tail text to the last element/comment/pi (G…

    scoder committed Jul 24, 2019
    …H-14856)
    
    * bpo-37399: Correctly attach tail text to the last element/comment/pi, even when comments or pis are discarded.
    Also fixes the insertion of PIs when "insert_pis=True" is configured for a TreeBuilder.
Commits on Jun 1, 2019
Commits on May 10, 2019
  1. bpo-36676: Update what's new document. (#13226)

    scoder committed May 10, 2019
Commits on May 9, 2019
  1. bpo-36831: Do not apply default namespace to unprefixed attributes in…

    scoder committed May 9, 2019
    … ElementPath. (#13201)
    
    Also provide better grouping of the tokenizer tests.
Commits on May 6, 2019
  1. bpo-36811: Fix a C compiler warning in _elementtree.c. (GH-13109)

    scoder committed May 6, 2019
Commits on May 3, 2019
  1. bpo-28238: Implement "{*}tag" and "{ns}*" wildcard tag selection supp…

    scoder committed May 3, 2019
    …ort for ElementPath, and extend the surrounding tests and docs. (GH-12997)
Commits on May 2, 2019
  1. bpo-13611: Include C14N 2.0 test data in installation (GH-13053)

    scoder committed May 2, 2019
    * Include C14N 2.0 test data in installation.
    * Add README file to the C14N test data directory to reference the original source and licensing conditions.
Commits on May 1, 2019
  1. bpo-13611: C14N 2.0 implementation for ElementTree (GH-12966)

    scoder committed May 1, 2019
    * Implement C14N 2.0 as a new canonicalize() function in ElementTree.
    
    Missing features:
    - prefix renaming in XPath expressions (tag and attribute text is supported)
    - preservation of original prefixes given redundant namespace declarations
  2. bpo-36676: Namespace prefix aware parsing support for the ET.XMLParse…

    scoder committed May 1, 2019
    …r target (GH-12885)
    
    * bpo-36676: Implement namespace prefix aware parsing support for the XMLParser target in ElementTree.
  3. bpo-36673: Implement comment/PI parsing support for the TreeBuilder i…

    scoder committed May 1, 2019
    …n ElementTree. (#12883)
    
    * bpo-36673: Implement comment/PI parsing support for the TreeBuilder in ElementTree.
    
    * bpo-36673: Rewrite the comment/PI factory handling for the TreeBuilder in "_elementtree" to make it use the same factories as the ElementTree module, and to make it explicit when the comments/PIs are inserted into the tree and when they are not (which is the default).
Commits on Apr 18, 2019
  1. bpo-30485: Change the prefix for defining the default namespace in El…

    scoder committed Apr 18, 2019
    …ementPath from None to '' since there is existing code that uses that and it's more convenient to have an all-string-keys dict (e.g. when sorting items etc.). (#12860)
Commits on Apr 14, 2019
  1. bpo-30485: Re-allow empty strings in ElementPath namespace mappings s…

    scoder committed Apr 14, 2019
    …ince they might actually be harmless and unused (and thus went undetected previously). (#12830)
  2. bpo-30485: support a default prefix mapping in ElementPath by passing…

    scoder committed Apr 14, 2019
    … None as prefix (#1823)
Commits on Apr 6, 2019
  1. bpo-9883: Update list of unimplemented interfaces in minidom. (GH-12677)

    scoder authored and serhiy-storchaka committed Apr 6, 2019
    Remove names from the "unimplemented interfaces" list
    in the minidom docs that are actually implemented.
Commits on Mar 25, 2019
  1. bpo-35884: Add string-keys-only microbenchmark for dict access to var…

    scoder authored and rhettinger committed Mar 25, 2019
    …_access_benchmark.py (GH-11905)
Commits on Feb 20, 2019
  1. bpo-36012: Avoid linear slot search for non-dunder methods (GH-11907)

    scoder authored and rhettinger committed Feb 20, 2019
Commits on Jan 2, 2019
  1. bpo-35588: Speed up mod, divmod and floordiv operations for Fraction …

    scoder authored and serhiy-storchaka committed Jan 2, 2019
    …type (#11322)
    
    * bpo-35588: Implement mod and divmod operations for Fraction type by spelling out the numerator/denominator calculation, instead of instantiating and normalising Fractions along the way. This speeds up '%' and divmod() by 2-3x.
    
    * bpo-35588: Also reimplement Fraction.__floordiv__() using integer operations to make it ~4x faster.
    
    * Improve code formatting.
    
    Co-Authored-By: scoder <stefan_ml@behnel.de>
    
    * bpo-35588: Fix return type of divmod(): the result of the integer division should be an integer.
    
    * bpo-35588: Further specialise __mod__() and inline the original helper function _flat_divmod() since it's no longer reused.
    
    * bpo-35588: Add some tests with large numerators and/or denominators.
    
    * bpo-35588: Use builtin "divmod()" function for implementing __divmod__() in order to simplify the implementation, even though performance results are mixed.
    
    * Rremove accidentally added empty line.
    
    * bpo-35588: Try to provide more informative output on test failures.
    
    * bpo-35588: Improve wording in News entry.
    
    Co-Authored-By: scoder <stefan_ml@behnel.de>
    
    * Remove stray space.
Commits on Oct 1, 2017
  1. bpo-31336: Speed up type creation. (#3279)

    scoder authored and serhiy-storchaka committed Oct 1, 2017
    Speed up class creation by 10-20% by reducing the overhead in the
    necessary special method lookups.
Commits on Sep 30, 2017
  1. bpo-31648: Improve ElementPath (#3835)

    scoder authored and serhiy-storchaka committed Sep 30, 2017
    * Allow whitespace inside of ElementPath predicates.
    * Add ElementPath predicate support for text comparison of the current node, like "[.='text']".
Commits on Sep 14, 2017
  1. bpo-31455: Fix an assertion failure in ElementTree.XMLParser(). (#3545)

    scoder authored and serhiy-storchaka committed Sep 14, 2017
    * Avoid calling "PyObject_GetAttrString()" (and potentially executing user code) with a live exception set.
    
    * Ignore only AttributeError on attribute lookups in ElementTree.XMLParser() and propagate all other exceptions.
Commits on Jul 31, 2017
  1. bpo-31091: Remove dead code in PyErr_GivenExceptionMatches(). (#2963)

    scoder authored and serhiy-storchaka committed Jul 31, 2017
    According to the comment, there was previously a call to PyObject_IsSubclass() involved which could fail, but since it was replaced with a call to PyType_IsSubtype(), it can no longer fail.
You can’t perform that action at this time.