1. 27 Oct, 2001 4 commits
    • Tim Peters's avatar
      PyArg_ParseTupleAndKeywords: return false on internal error, not -1 (I · f8cd3e86
      Tim Peters authored
      introduced this bug just a little while ago, when *adding* internal error
      checks).
      
      vgetargskeywords:  Rewrote the section that crawls over the format string.
      + Added block comment so it won't take the next person 15 minutes to
        reverse-engineer what it's doing.
      + Lined up the "else" clauses.
      + Rearranged the ifs in decreasing order of likelihood (for speed).
      f8cd3e86
    • Tim Peters's avatar
      PyArg_ParseTupleAndKeywords: do basic sanity checks on the arguments, · 45772cde
      Tim Peters authored
      and raise an error if they're insane.
      vgetargskeywords:  the same, except that since this is an internal routine,
      just assert that the arguments are sane.
      45772cde
    • Tim Peters's avatar
      tuple(3,4,5,x=2) dumped core on my box. vgetargskeywords() overindexed · a9f4739a
      Tim Peters authored
      the kwlist vector whenever there was a mix of positional and keyword
      arguments, and the number of positional arguments exceeded the length
      of the kwlist vector.  If there was just one more positional arg than
      keyword, the kwlist-terminating NULL got passed to PyMapping_HasKeyString,
      which set an internal error that vgetargskeywords() then squashed (but
      it's impossible to say whether it knew it was masking an error).  If
      more than one more positional argument, it went on to pass random trash
      to PyMapping_HasKeyString, which is why the example at the start
      happened to kill the process.
      
      Pure bugfix candidate.
      a9f4739a
    • Tim Peters's avatar
      vgetargskeywords(): remove test that can't succeed. Not a bugfix, just · f4331c1c
      Tim Peters authored
      removing useless obfuscation.
      f4331c1c
  2. 26 Oct, 2001 32 commits
  3. 25 Oct, 2001 4 commits
    • Barry Warsaw's avatar
      A fix for SF bug #472560, extra newlines returned by get_param() when · 2539cf5a
      Barry Warsaw authored
      the separating semi-colon shows up on a continuation line (legal, but
      weird).
      
      Bug reported and fixed by Matthew Cowles.  Test case and sample email
      included.
      2539cf5a
    • Jack Jansen's avatar
      Added various tidbits. · e674ca73
      Jack Jansen authored
      e674ca73
    • Barry Warsaw's avatar
    • Barry Warsaw's avatar
      Applying proposed patch for bug #474583, optional support for · 107771a2
      Barry Warsaw authored
      non-standard but common types.  Including Martin's suggestion to add
      rejected non-standard types from patch #438790.  Specifically,
      
      guess_type(), guess_extension(): Both the functions and the methods
      grow an optional "strict" flag, defaulting to true, which determines
      whether to recognize non-standard, but commonly found types or not.
      
      Also, I sorted, reformatted, and culled duplicates from the big
      types_map dictionary.  Note that there are a few non-equivalent
      duplicates (e.g. .cdf and .xls) for which the first will just get
      thrown away.  I didn't remove those though.
      
      Finally, use of the module as a script as grown the -l and -e options
      to toggle strictness and to do guess_extension(), respectively.
      
      Doc and unittest updates too.
      107771a2