1. 10 Sep, 2019 12 commits
    • hliu0's avatar
      Skip zoneinfo tests on VxWorks (#13535) · 8e7ff6ab
      hliu0 authored
      8e7ff6ab
    • Dino Viehland's avatar
      bpo-38074: Make zlib extension module PEP-384 compatible (GH-15792) · a1ffad07
      Dino Viehland authored
      Updated zlibmodule.c to be PEP 384 compliant.
      a1ffad07
    • Dino Viehland's avatar
      bpo-38076: Make struct module PEP-384 compatible (#15805) · 4f384af0
      Dino Viehland authored
      * PEP-384 _struct
      
      * More PEP-384 fixes for _struct
      
      Summary: Add a couple of more fixes for `_struct` that were previously missed such as removing `tp_*` accessors and using `PyBytesWriter` instead of calling `PyBytes_FromStringAndSize` with `NULL`. Also added a test to confirm that `iter_unpack` type is still uninstantiable.
      
      * 📜🤖 Added by blurb_it.
      4f384af0
    • Serhiy Storchaka's avatar
      bpo-38083: Minor improvements in asdl_c.py and Python-ast.c. (GH-15824) · 43c97313
      Serhiy Storchaka authored
      * Use the const qualifier for constant C strings.
      * Intern field and attribute names.
      * Temporary incref a borrowed reference to a list item.
      43c97313
    • dalgarno's avatar
      Fix typo in dict object comment (#15814) · 359143c6
      dalgarno authored
      359143c6
    • Neil Schemenauer's avatar
      bpo-37725: have "make clean" remove PGO task data (#15033) · c6bbcd25
      Neil Schemenauer authored
      Change "clean" makefile target to also clean the program guided
      optimization (PGO) data.  Previously you would have to use "make
      clean" and "make profile-removal", or "make clobber".
      c6bbcd25
    • Greg Price's avatar
      bpo-38043: Move unicodedata.normalize tests into test_unicodedata. (GH-15712) · 1ad0c776
      Greg Price authored
      Having these in a separate file from the one that's named after the
      module in the usual way makes it very easy to miss them when looking
      for tests for these two functions.
      
      (In fact when working recently on is_normalized, I'd been surprised to
      see no tests for it here and concluded the function had evaded being
      tested at all.  I'd gone as far as to write up some tests myself
      before I spotted this other file.)
      
      Mostly this just means moving all the one file's code into the other,
      and moving code from the module toplevel to inside the test class to
      keep it tidily separate from the rest of the file's code.
      
      There's one substantive change, which reduces by a bit the amount of
      code to be moved: we drop the `x > sys.maxunicode` conditional and all
      the `RangeError` logic behind it.  Now if that condition ever occurs
      it will cause an error at `chr(x)`, and a test failure.  That's the
      right result because, since PEP 393 in Python 3.3, there is no longer
      such a thing as an "unsupported character".
      1ad0c776
    • Jeroen Demeyer's avatar
      5b00dd8f
    • Nikhil's avatar
      80428ed4
    • Greg Price's avatar
      Cut tricky `goto` that isn't needed, in _PyBytes_DecodeEscape. (GH-15825) · 0711642e
      Greg Price authored
      This is the sort of `goto` that requires the reader to stare hard at
      the code to unpick what it's doing.
      
      On doing so, the answer is... not very much!
      
      * It jumps from the bottom of the loop to almost the top; the effect
        is to bypass the loop condition `s < end` and also the
        `if`-condition `*s != '\\'`, acting as if both are true.
      
      * We've just decremented `s`, after incrementing it in the `switch`
        condition.  So it has the same value as when `s == end` failed.
        Before that was another increment... and before that we had
        `s < end`.  So `s < end` true, then increment, then `s == end`
        false... that means `s < end` is still true.
      
      * Also this means `s` points to the same character as it did for the
        `switch` condition.  And there was a `case '\\'`, which we didn't
        hit -- so `*s != '\\'` is also true.
      
      * That means this has no effect on the behavior!  The most it might do
        is an optimization -- we get to skip those two checks, because (as
        just proven above) we know they're true.
      
      * But gosh, this is the *invalid escape sequence* path.  This does not
        seem like the kind of code path that calls for extreme optimization
        tricks.
      
      So, take the `goto` and the label out.
      
      Perhaps the compiler will notice the exact same facts we showed above,
      and generate identical code.  Or perhaps it won't!  That'll be OK.
      
      But then, crucially, if some future edit to this loop causes the
      reasoning above to *stop* holding true... the compiler will adjust
      this jump accordingly.  One of us fallible humans might not.
      0711642e
    • Vinay Sharma's avatar
    • Terry Jan Reedy's avatar
      bpo-38077: IDLE no longer adds 'argv' to the user namespace (GH-15818) · c59295a1
      Terry Jan Reedy authored
      This only happened when initializing the subprocess to run a module.
      This recent bug only affected 3.7.4 and 3.8.0b2 to 3.8.0b4.
      c59295a1
  2. 09 Sep, 2019 28 commits