1. 23 Oct, 2018 10 commits
  2. 22 Oct, 2018 3 commits
    • Paul Ganssle's avatar
      bpo-34454: Clean up datetime.fromisoformat surrogate handling (GH-8959) · 3df85404
      Paul Ganssle authored
      * Use _PyUnicode_Copy in sanitize_isoformat_str
      
      * Use repr in fromisoformat error message
      
      This reverses commit 67b74a98b2 per Serhiy Storchaka's suggestion:
      
           I suggested to use %R in the error message because including the raw
           string can be confusing in the case of empty string, or string
           containing trailing whitespaces, invisible or unprintable characters.
      
      We agree that it is better to change both the C and pure Python versions
      to use repr.
      
      * Retain non-sanitized dtstr for error printing
      
      This does not create an extra string, it just holds on to a reference to
      the original input string for purposes of creating the error message.
      
      * PEP 7 fixes to from_isoformat
      
      * Separate handling of Unicode and other errors
      
      In the initial implementation, errors other than encoding errors would
      both raise an error indicating an invalid format, which would not be
      true for errors like MemoryError.
      
      * Drop needs_decref from _sanitize_isoformat_str
      
      Instead _sanitize_isoformat_str returns a new reference, even to the
      original string.
      3df85404
    • Eric Lippert's avatar
      Fix issue 34551 - remove redundant store (#9009) · 5a95ba29
      Eric Lippert authored
      The assignment of i/2 to nk is redundant because on this code path, nk is already the size of the dictionary, and i is already twice the size of the dictionary. I've replaced the store with an assertion that i/2 is nk.
      5a95ba29
    • Tal Einat's avatar
      bpo-29843: raise AttributeError if given negative _length_ (GH-10029) · 24477735
      Tal Einat authored
      Raise ValueError OverflowError in case of a negative
      _length_ in a ctypes.Array subclass.  Also raise TypeError
      instead of AttributeError for non-integer _length_.
      Co-authored-by: default avatarOren Milman <orenmn@gmail.com>
      24477735
  3. 21 Oct, 2018 8 commits
  4. 20 Oct, 2018 15 commits
  5. 19 Oct, 2018 4 commits