1. 07 Dec, 2017 2 commits
  2. 06 Dec, 2017 10 commits
  3. 05 Dec, 2017 14 commits
  4. 04 Dec, 2017 7 commits
  5. 03 Dec, 2017 5 commits
    • R. David Murray's avatar
      bpo-27240 Rewrite the email header folding algorithm. (#3488) · 85d5c18c
      R. David Murray authored
      The original algorithm tried to delegate the folding to the tokens so
      that those tokens whose folding rules differed could specify the
      differences.  However, this resulted in a lot of duplicated code because
      most of the rules were the same.
      
      The new algorithm moves all folding logic into a set of functions
      external to the token classes, but puts the information about which
      tokens can be folded in which ways on the tokens...with the exception of
      mime-parameters, which are a special case (which was not even
      implemented in the old folder).
      
      This algorithm can still probably be improved and hopefully simplified
      somewhat.
      
      Note that some of the test expectations are changed.  I believe the
      changes are toward more desirable and consistent behavior: in general
      when (re) folding a line the canonical version of the tokens is
      generated, rather than preserving errors or extra whitespace.
      85d5c18c
    • Serhiy Storchaka's avatar
    • Serhiy Storchaka's avatar
      bpo-32137: The repr of deeply nested dict now raises a RecursionError (#4570) · 1fb72d2a
      Serhiy Storchaka authored
      instead of crashing due to a stack overflow.
      
      This perhaps will fix similar problems in other extension types.
      1fb72d2a
    • Neil Schemenauer's avatar
      Refactor PyImport_ImportModuleLevelObject(). (#4680) · eea3cc1e
      Neil Schemenauer authored
      Add import_find_and_load() helper function.  The addition of
      the importtime option has made PyImport_ImportModuleLevelObject() large
      and so using a helper seems worthwhile.  It also makes it clearer that
      abs_name is the only argument needed by _find_and_load().
      eea3cc1e
    • Nick Coghlan's avatar
      bpo-32176: Set CO_NOFREE in the code object constructor (GH-4675) · 078f1814
      Nick Coghlan authored
      Previously, CO_NOFREE was set in the compiler, which meant
      it could end up being set incorrectly when code objects
      were created directly. Setting it in the constructor based
      on freevars and cellvars ensures it is always accurate,
      regardless of how the code object is defined.
      078f1814
  6. 02 Dec, 2017 2 commits