1. 24 Eyl, 2002 15 kayıt (commit)
    • Fred Drake's avatar
      Clarify that len() of a Unicode string returns the number of storage units, · 6f3c6542
      Fred Drake yazdı
      not abstract characters.
      6f3c6542
    • Michael W. Hudson's avatar
      backport theller's checkin of · 44ed841f
      Michael W. Hudson yazdı
          revision 1.74 of marshal.c
      
      Whitespace normalization.
      44ed841f
    • Michael W. Hudson's avatar
      backport theller's checkin of · e1a31e0a
      Michael W. Hudson yazdı
          revision 1.3 of test_marshal.py
      
      Fix SF 588452: debug build crashes on marshal.dumps([128] * 1000).
      See there for a description.
      
      Added test case.
      
      Bugfix candidate for 2.2.x, not sure about previous versions:
      probably low priority, because virtually no one runs debug builds.
      e1a31e0a
    • Michael W. Hudson's avatar
      backport theller's checkin of · 78e179cd
      Michael W. Hudson yazdı
          revision 1.73 of marshal.c
      
      Fix SF 588452: debug build crashes on marshal.dumps([128] * 1000).
      See there for a description.
      
      Added test case.
      
      Bugfix candidate for 2.2.x, not sure about previous versions:
      probably low priority, because virtually no one runs debug builds.
      78e179cd
    • Michael W. Hudson's avatar
      backport jhylton's checkin of · ed9bb769
      Michael W. Hudson yazdı
          revision 2.87 of cPickle.c
      
      Do more robust test of whether global objects are accessible.
      
      PyImport_ImportModule() is not guaranteed to return a module object.
      When another type of object was returned, the PyModule_GetDict() call
      return NULL and the subsequent GetItem() seg faulted.
      
      Bug fix candidate.
      
      ----------
      
      Once again, whitespace chances scuppered automatic backporting, so
      I did this by hand.  Review probably wise -- but I have run make test!
      
      Also incorporates revision 2.88 which was just removing a now unused
      declaration.
      ed9bb769
    • Michael W. Hudson's avatar
      backport nowonder's checkin of · 070fe168
      Michael W. Hudson yazdı
          revision 2.265 of bltinmodule.c
      
      date: 2002/08/27 16:58:00;  author: nowonder;  state: Exp;  lines: +1 -1
      
      execfile should call PyErr_SetFromErrnoWithFilename instead of
      simply PyErr_SetFromErrno
      
      This closes bug 599163.
      070fe168
    • Michael W. Hudson's avatar
      backport akuchling's checkin of · a748f064
      Michael W. Hudson yazdı
          revision 1.12 of config.py
      
      Include an empty body when checking for a header file
      
      (Bugfix candidate for 2.2, and likely 2.1 as well)
      a748f064
    • Michael W. Hudson's avatar
      backport gvanrossum's checkin of · 81f33178
      Michael W. Hudson yazdı
          revision 1.57 of pdb.py
      
      date: 2002/09/10 21:57:14;  author: gvanrossum;  state: Exp;  lines: +7 -1
      At Jim Fulton's request, increase the maxstring value of _saferepr to
      a more reasonable value.
      
      Backport candidate.
      81f33178
    • Michael W. Hudson's avatar
      backport effbot's checkin of · a3a72159
      Michael W. Hudson yazdı
          revision 1.43 of sre_compile.py
      
      
      
      made the code match the comments (1.5.2 compatibility)
      a3a72159
    • Michael W. Hudson's avatar
      backport theller's checkin of · 378d3619
      Michael W. Hudson yazdı
          revision 2.102 of abstract.c
      
      Better isinstance error message.
      
      Closes SF patch # 560250.
      
      Bugfix candidate IMO.
      378d3619
    • Michael W. Hudson's avatar
      backport bwarsaw's checkin of · eab1a0b9
      Michael W. Hudson yazdı
          revision 2.101 of abstract.c
      
      abstract_get_bases(): Clarify exactly what the return values and
      states can be for this function, and ensure that only AttributeErrors
      are masked.  Any other exception raised via the equivalent of
      getattr(cls, '__bases__') should be propagated up.
      
      abstract_issubclass(): If abstract_get_bases() returns NULL, we must
      call PyErr_Occurred() to see if an exception is being propagated, and
      return -1 or 0 as appropriate.  This is the specific fix for a problem
      whereby if getattr(derived, '__bases__') raised an exception, an
      "undetected error" would occur (under a debug build).  This nasty
      situation was uncovered when writing a security proxy extension type
      for the Zope3 project, where the security proxy raised a Forbidden
      exception on getattr of __bases__.
      
      PyObject_IsInstance(), PyObject_IsSubclass(): After both calls to
      abstract_get_bases(), where we're setting the TypeError if the return
      value is NULL, we must first check to see if an exception occurred,
      and /not/ mask an existing exception.
      
      Neil Schemenauer should double check that these changes don't break
      his ExtensionClass examples (there aren't any test cases for those
      examples and abstract_get_bases() was added by him in response to
      problems with ExtensionClass).  Neil, please add test cases if
      possible!
      
      I belive this is a bug fix candidate for Python 2.2.2.
      
      ----
      
      Whitespace normalization made this a pest to backport...
      
      Did a test case ever get added for this?
      eab1a0b9
    • Michael W. Hudson's avatar
    • Michael W. Hudson's avatar
      Make test_rfc822 pass again. · d722a827
      Michael W. Hudson yazdı
      d722a827
    • Marc-André Lemburg's avatar
      Fix cast from backport. · 1b651fcd
      Marc-André Lemburg yazdı
      1b651fcd
    • Guido van Rossum's avatar
      Backport 2.48 from trunk: · a69f8223
      Guido van Rossum yazdı
      #544265, Remove warnings for passing const to free()
      a69f8223
  2. 23 Eyl, 2002 21 kayıt (commit)
    • Guido van Rossum's avatar
      Backported 1.39 and 1.40 from trunk: · 2992e132
      Guido van Rossum yazdı
      1.39:
      Fix SF bug 610610 (reported by Martijn Pieters, diagnosed by Neal Norwitz).
      
      The switch in Exception__str__ didn't clear the error if
      PySequence_Size() raised an exception.  Added a case -1 which clears
      the error and falls through to the default case.
      
      1.40:
      Two more cases of switch(PySequence_Size()) without checking for case -1.
      (Same problem as last checkin for SF bug 610610)
      Need to clear the error and proceed.
      2992e132
    • Guido van Rossum's avatar
      Backport from trunk: · 67c87194
      Guido van Rossum yazdı
      unicodeobject.c 2.169
      stringobject.c 2.189
      
      Fix warnings on 64-bit platforms about casts from pointers to ints.
      Two of these were real bugs.
      67c87194
    • Guido van Rossum's avatar
      Add the snake-farm crew. · f81d49f6
      Guido van Rossum yazdı
      f81d49f6
    • Guido van Rossum's avatar
      Backport 2.93 from trunk: · 1f4a01f7
      Guido van Rossum yazdı
      Insert an overflow check when the sequence repetition count is outside
      the range of ints.  The old code would pass random truncated bits to
      sq_repeat() on a 64-bit machine.
      1f4a01f7
    • Guido van Rossum's avatar
      Backport 1.51 and 1.54 from trunk. · fb3a921c
      Guido van Rossum yazdı
      1.51:
      Bug #556025: list(xrange(1e9)) --> seg fault
      
      Close the bug report again -- this time for Cygwin due to a newlib bug.
      See the following for the details:
      
      	http://sources.redhat.com/ml/newlib/2002/msg00369.html
      
      Note that this commit is only a documentation (i.e., comment) change.
      
      1.54:
      The list(xrange(sys.maxint / 4)) test blew up on 64-bit platforms.
      Because ob_size is a 32-bit int but sys.maxint is LONG_MAX which is a
      64-bit value, there's no way to make this test succeed on a 64-bit
      platform.  So just skip it when sys.maxint isn't 0x7fffffff.
      fb3a921c
    • Guido van Rossum's avatar
      Backport 2.57 from trunk: · d41f84fc
      Guido van Rossum yazdı
      (Most of) SF patch 601369 (Christos Georgiou): obmalloc,structmodule:
      64bit, big endian (issue 2 only).
      
      This adds a bunch of memcpy calls via a temporary variable to avoid
      alignment errors.  That's needed for some platforms.
      d41f84fc
    • Guido van Rossum's avatar
      Backport 1.56 and 1.68 from trunk: · a9858559
      Guido van Rossum yazdı
      1.56:
      Apply diff3.txt from SF patch http://www.python.org/sf/536241
      
      If a str or unicode method returns the original object,
      make sure that for str and unicode subclasses the original
      will not be returned.
      
      This should prevent SF bug http://www.python.org/sf/460020
      from reappearing.
      
      1.68:
      Fix SF bug 599128, submitted by Inyeol Lee: .replace() would do the
      wrong thing for a unicode subclass when there were zero string
      replacements.  The example given in the SF bug report was only one way
      to trigger this; replacing a string of length >= 2 that's not found is
      another.  The code would actually write outside allocated memory if
      replacement string was longer than the search string.
      a9858559
    • Guido van Rossum's avatar
      Backport 2.166 from trunk: · 1c4a4576
      Guido van Rossum yazdı
      Fix SF bug 599128, submitted by Inyeol Lee: .replace() would do the
      wrong thing for a unicode subclass when there were zero string
      replacements.  The example given in the SF bug report was only one way
      to trigger this; replacing a string of length >= 2 that's not found is
      another.  The code would actually write outside allocated memory if
      replacement string was longer than the search string.
      1c4a4576
    • Guido van Rossum's avatar
      Backport 1.96 from trunk (because I want Xenofarm to test 2.2.2): · 39a8654e
      Guido van Rossum yazdı
      Add a bunch of sys.stdout.flush() calls that will hopefully improve
      the usability of the output of the Xenofarm builds.
      39a8654e
    • Raymond Hettinger's avatar
      Backport: · 07c0e677
      Raymond Hettinger yazdı
      SF bug 594996:  OverflowError in random.randrange
      Loosened the acceptable 'start' and 'stop' arguments so that any
      Python (bounded) ints can be used.  So, e.g., randrange(-sys.maxint-1,
      sys.maxint) no longer blows up.
      07c0e677
    • Raymond Hettinger's avatar
      Whitespace normalization and backport: · 070884c7
      Raymond Hettinger yazdı
      random.gauss() uses a piece of hidden state used by nothing else,
      and the .seed() and .whseed() methods failed to reset it.  In other
      words, setting the seed didn't completely determine the sequence of
      results produced by random.gauss().  It does now.  Programs repeatedly
      mixing calls to a seed method with calls to gauss() may see different
      results now.
      
      Bugfix candidate (random.gauss() has always been broken in this way),
      despite that it may change results.
      070884c7
    • Raymond Hettinger's avatar
      Backport: · e780c12c
      Raymond Hettinger yazdı
      The test for re.engine was misfiring because re.engine is no longer
      defined and the default was "pre" instead of "sre".  Give up on 1.5.2
      compatibility, hardcode the sre solution.  However, this XXX comment
      still applies, AFAIK:
              # XXX This code depends on internals of the regular expression
              # engine!  There's no standard API to do a substitution when you
              # have already found the match.  One should be added.
      e780c12c
    • Raymond Hettinger's avatar
      Backport: · c8b4c9fe
      Raymond Hettinger yazdı
      Convert characters from the locale's encoding on output.
      Reject characters outside the locale's encoding on input.
      c8b4c9fe
    • Raymond Hettinger's avatar
    • Raymond Hettinger's avatar
    • Raymond Hettinger's avatar
      Backport: · 1d429f24
      Raymond Hettinger yazdı
      Properly fix SF bug #507298 (Gregor Lingl): shellpython2.2 -Qnew smart
      indent error
      
      Use // where int division is intended.
      1d429f24
    • Guido van Rossum's avatar
      Warn about binutils 2.13 on Solaris. · 9eda652c
      Guido van Rossum yazdı
      9eda652c
    • Raymond Hettinger's avatar
    • Raymond Hettinger's avatar
      Backport patches 558535. The standard Windows binding for Edit Select All · ebba7d29
      Raymond Hettinger yazdı
      is Control-A rather than Alt-A.
      ebba7d29
    • Michael W. Hudson's avatar
      backport bwarsaw's checkin of · d24d2987
      Michael W. Hudson yazdı
          revision 1.70 of rfc822.py
      
      parseaddr(): Fixed in the same way that Message.getaddrlist() was
      fixed (re: SF bug #555035).  Include a unittest.
      d24d2987
    • Michael W. Hudson's avatar
      backport bwarsaw's checkin of · edf66107
      Michael W. Hudson yazdı
          revision 1.17 of test_rfc822.py
      
      parseaddr(): Fixed in the same way that Message.getaddrlist() was
      fixed (re: SF bug #555035).  Include a unittest.
      edf66107
  3. 22 Eyl, 2002 4 kayıt (commit)