Commit Graph

2438 Commits

Author SHA1 Message Date
Guido van Rossum
4130d6c23a Oops. That wasn't supposed to be backported. :-( 2002-06-06 20:11:15 +00:00
Guido van Rossum
93f2edba15 Backport:
The tp_new implementation should initialize the errorhandler field,
otherwise this code could segfault:

  from socket import socket
  s = socket.__new__(socket)
  s.recv(100)
2002-06-06 20:10:16 +00:00
Neil Schemenauer
87d631630d The logreader object did not always refill the input buffer correctly
and got confused by certain log files.  Remove logreader_refill and the
associated logic and replace with fgetc.
2002-05-29 18:44:30 +00:00
Anthony Baxter
07fb92a86f backport tim_one's patch:
(some tweaking for different _PyObject_GC_Malloc() call in 2.2. checked,
still returns the same thing on failure...)

_PyObject_GC_New:  Could call PyObject_INIT with a NULL 1st argument.
_PyObject_GC_NewVar:  Could call PyObject_INIT_VAR likewise.

Bugfix candidate.

Original patch(es):
python/dist/src/Modules/gcmodule.c:2.40
2002-04-30 03:33:15 +00:00
Martin v. Löwis
b390f5f73b Patch #500311: Work around for buggy https servers. Fixes #494762. 2002-04-20 07:45:25 +00:00
Martin v. Löwis
9b6e538d7f Patch #546194: Check constants individually. Fixes 534143 on OpenBSD. 2002-04-19 21:06:13 +00:00
Jeremy Hylton
5ea334ed7a [backport bug fix from the trunk]
Fix SF #544995 (zlib crash on second flush call)
Bug fix by mhammond.

Bug fix candidate for 2.2, not present in 2.1.
2002-04-19 14:59:08 +00:00
Michael W. Hudson
044038af4b backport loewis' checkin of
revision 2.28 of _localemodule.c

Don't imply XPG4 constants from CODESET presence. Fixes #534153.
2.2.2 candiate.
2002-04-05 15:26:55 +00:00
Guido van Rossum
50bfe35112 The body of_PyObject_GC_UnTrack() should only be compiled #ifdef
WITH_CYCLE_GC.  (Neil pointed this out before the weekend, and I fixed
it right away, but forgot to check it in.)
2002-04-03 14:07:32 +00:00
Guido van Rossum
9ff1cf05fb Backport to 2.2.1:
This is Neil's fix for SF bug 535905 (Evil Trashcan and GC interaction).

The fix makes it possible to call PyObject_GC_UnTrack() more than once
on the same object, and then move the PyObject_GC_UnTrack() call to
*before* the trashcan code is invoked.

BUGFIX CANDIDATE!
2002-03-28 20:36:50 +00:00
Michael W. Hudson
6403be2c00 backport jackjansen's checkin of
revision 1.211 of socketmodule.c

Due to interaction between the MSL C library and the GUSI I/O library I can get reads from sockets to work consistently either for unbuffered binary files or for buffered binary files, but not for both:-(

The workaround is to force socket.makefile() to disable buffering for binary files.

Fixes bug 534625. 2.2.1 candidate.
2002-03-25 17:40:43 +00:00
Michael W. Hudson
39d2b3c330 Remove extraneous #define as per effbot's instructions in:
[ 530285 ] redefining SRE_CODE in Modules/sre.h

Another one for the trunk, later.
2002-03-18 12:59:38 +00:00
Michael W. Hudson
9bf2889930 Backport a checkin of lemburg's:
Remove mentioning of -U option in "python -h" output.
2002-03-17 19:42:18 +00:00
Michael W. Hudson
32b2b2d99d Backport my fix from a whiles back:
Fix for

[ #504284 ] Last build problems on AIX

I'm ignoring the suggestion that this should be an autoconf test in the
interests of having a fix today.  Feel free to quibble.
2002-03-17 19:02:10 +00:00
Michael W. Hudson
023db775f7 backport loewis' checkin of
revision 2.23 of pypcre.c

Include Python.h first. Fixes #530159.
2002-03-16 17:58:21 +00:00
Michael W. Hudson
3df46a8028 backport loewis' checkin of
revision 2.26 of _localemodule.c

Verify arguments for nl_langinfo. Fixes #528879.
2002-03-16 17:54:20 +00:00
Fred Drake
14f675884a Update docstrings to use te attribute names of the new structures returned
by stat and time functions.
This closes SF patch #523271.
2002-03-12 21:38:31 +00:00
Michael W. Hudson
b5c204249f backport tim_one's checkin of
revision 2.28 of cmathmodule.c

SF bug 525705:  [2.2] underflow raise OverflowException.
Another year in the quest to out-guess random C behavior.

Added macros Py_ADJUST_ERANGE1(X) and Py_ADJUST_ERANGE2(X, Y).  The latter
is useful for functions with complex results.  Two corrections to errno-
after-libm-call are attempted:

1. If the platform set errno to ERANGE due to underflow, clear errno.
   Some unknown subset of libm versions and link options do this.  It's
   allowed by C89, but I never figured anyone would do it.

2. If the platform did not set errno but overflow occurred, force
   errno to ERANGE.  C89 required setting errno to ERANGE, but C99
   doesn't.  Some unknown subset of libm versions and link options do
   it the C99 way now.

Bugfix candidate, but hold off until some Linux people actually try it,
with and without -lieee.  I'll send a help plea to Python-Dev.
2002-03-11 10:16:47 +00:00
Michael W. Hudson
8cdebb2e60 backport jhylton's checkin of
revision 2.33 of cStringIO.c

Fix SF bug #526518

The doc string for cStringIO suggested that str() of a StringIO object
was equivalent to getvalue().  This was never true, so repair the doc
string.  (doctest would have helped here.)

Bug fix candidate for any past versions.
2002-03-11 10:02:18 +00:00
Michael W. Hudson
85717c768a backport tim_one's checkin of
revision 2.38 of mmapmodule.c

SF bug 515943:  searching for data with \0 in mmap.
mmap_find_method():  this obtained the string to find via s#, but it
ignored its length, acting as if it were \0-terminated instead.

Someone please run on Linux too (the extended test_mmap works on Windows).

Bugfix candidate.
2002-03-08 13:40:07 +00:00
Michael W. Hudson
45e7de400a backport gvanrossum's checkin of
revision 2.40 of mpzmodule.c

SF patch 517245 by Marc Recht.

Support GMP version >= 2.

Bugfix candidate.
2002-03-05 14:20:32 +00:00
Fred Drake
68726f5384 start() and stop() methods: return None where there is no exception;
returning NULL causes the interpreter to raise a SystemError.
Noted by Anthony Baxter at Python 10.
2002-02-08 21:31:23 +00:00
Michael W. Hudson
31df2c36ee Backport my fixing up of PyObject_New/PyMem_Del mismatches. 2002-02-06 17:11:51 +00:00
Michael W. Hudson
fa338d7fad Fix a bunch of typos found by nnorwitz. 2002-02-06 17:06:03 +00:00
Michael W. Hudson
fbfb20efae It's merge time!
Backport loewis' checkin of revision 1.123:

Encode Unicode arguments to split/splitlist as UTF-8. Fixes #507962.
2.2.1 bugfix candidate.
2002-01-28 15:14:57 +00:00