Commit Graph

31641 Commits

Author SHA1 Message Date
Michael W. Hudson
14ef205309 Backport my recent fix (rev. 2.40 of Python/pystate.c):
Fix:

[ 1176893 ] Readline segfault

by unsilly-ing PyGILState_Release().

Backport candidate.
2005-04-24 19:32:34 +00:00
Walter Dörwald
4d3fec604d Backport checkin (and the appropriate fix to the test):
If the data read from the bytestream in readline() ends in a '\r' read one more
byte, even if the user has passed a size parameter. This extra byte shouldn't
cause a buffer overflow in the tokenizer. The original plan was to return a line
ending in '\r', which might be recognizable as a complete line and skip any '\n'
that was read afterwards. Unfortunately this didn't work, as the tokenizer only
recognizes '\n' as line ends, which in turn lead to joined lines and
SyntaxErrors, so this special treatment of a split '\r\n' has been dropped. (It
can only happen with a temporarily exhausted bytestream now anyway.)
Fixes parts of SF bugs #1163244 and #1175396.
2005-04-21 21:53:43 +00:00
Raymond Hettinger
21287ee5bc Correct swapped descriptions of empty string splits. 2005-04-19 04:31:38 +00:00
Jack Jansen
2f44827ef6 Backport:
Updated to work with current Python docs setup, and added a minimal README.
2005-04-17 21:31:58 +00:00
cvs2svn
1304d0615f This commit was manufactured by cvs2svn to create branch
'release24-maint'.
2005-04-17 21:31:58 +00:00
Raymond Hettinger
9e4b2e7817 SF bug #1183742: PyDict_Copy() can return non-NULL value on error 2005-04-15 16:07:09 +00:00
Walter Dörwald
9499857237 Backport relevant part of checkin:
SF patch #1180062 by George Yoshida:
(Doc/lib/libfunctional.tex: "in an new object" should read "in a new object")
Doc/lib/libsubprocess.tex: argument name is wrong; comma is missing
2005-04-14 20:23:39 +00:00
Fred Drake
1dbdec2656 get_method() returns a method name, not take it as an argument
(backported from trunk revision 1.22)
2005-04-13 01:12:21 +00:00
Raymond Hettinger
54ef1f9547 SF bug #1180392: StringIO's docs should mention overwriting of initial value
* Added a note that the initial file position is zero even if the object
  is freshly initialized.
2005-04-11 01:04:32 +00:00
Raymond Hettinger
d23b387dac SF bug #1179957: Missing def'n of equality for set element 2005-04-10 17:36:26 +00:00
Raymond Hettinger
5eff1ecaed SF patch 1179503: fix typos in rpc.py 2005-04-10 16:23:49 +00:00
Michael W. Hudson
52cba65d1a Backport my recent raw_input() vs no threads build vs SIGINT argh:
In a threads-disabled build, typing Ctrl-C into a raw_input() crashed,
because (essentially) I didn't realise that PY_BEGIN/END_ALLOW_THREADS
actually expanded to nothing under a no-threads build, so if you somehow
NULLed out the threadstate (e.g. by calling PyThread_SaveThread) it would
stay NULLed when you return to Python.  Argh!
2005-04-07 10:19:47 +00:00
Raymond Hettinger
b3509dbe6a SF bug #1178269 Clarify when isMappingType/isSequenceType is True. 2005-04-07 05:37:47 +00:00
Raymond Hettinger
6845406ab8 SF bug #1178255: 256 should read 255 in operator module docs 2005-04-07 04:39:35 +00:00
Walter Dörwald
67e4ecd451 Backport checkin:
Fix for SF bug #1175396: readline() will now read one more character, if
the last character read is "\r" (and size is None, i.e. we're allowed to
call read() multiple times), so that we can return the correct line ending
(this additional character might be a "\n").

If the stream is temporarily exhausted, we might return the wrong line ending
(if the last character read is "\r" and the next one (after the byte stream
provides more data) is "\n", but at least the atcr member ensures that we
get the correct number of lines (i.e. this "\n" will not be treated as
another line ending).
2005-04-04 21:56:28 +00:00
Hye-Shik Chang
6ca93ed0c9 Backport from 1.27:
Fix testcase for 64bit BSD systems: long is 8 bytes for those systems
so there's no need to pad after off_t members.  And a small typo fix.
2005-04-04 15:28:18 +00:00
Vinay Sajip
e8880986db Corrected SMTPHandler docs and added info about threadName attribute of LogRecord 2005-03-31 20:23:04 +00:00
Vinay Sajip
6721a3464a Added optional encoding argument to File based handlers and improved error handling for SysLogHandler 2005-03-31 20:12:55 +00:00
Vinay Sajip
2d6fe25689 Minor changes to imports 2005-03-31 20:11:45 +00:00
Vinay Sajip
d7937f0b43 Misc. changes 2005-03-31 20:10:38 +00:00
Bob Ippolito
ddbcf1ade8 (This is only relevant to the MacPython binary release process)
Set the Python version to 2.4 in the postflight script used when building
Mac OS X installer distributions.  Previously it was set to 2.3, so it
wouldn't build a working installer.
2005-03-31 17:38:00 +00:00
Walter Dörwald
9bd2b50cd7 Backport checkin:
Since PyPI only accepts UTF-8 encoded data now, make sure that the data is
properly encoded and include the encoding in the Content-Type header.
2005-03-31 14:16:30 +00:00
Michael W. Hudson
5fb960124b I meant to check this in with the last check in (CVS disturbs me
sometimes)
2005-03-31 10:28:30 +00:00
Michael W. Hudson
21f898741e Backport:
Fix for rather inaccurately titled bug

[ 1165306 ] Property access with decorator makes interpreter crash

Don't allow the creation of unbound methods with NULL im_class, because
attempting to call such crashes.

Backport candidate.
2005-03-31 10:22:43 +00:00
Michael W. Hudson
59f9bea873 Backport:
Fixes for

[ 1166660 ] The readline module can cause python to segfault

It seems to me that the code I'm rewriting here attempted to call any
user-supplied hook functions using the thread state of the thread that
called the hook-setting function, as opposed to that of the thread
that is currently executing.  This doesn't work, in general.

Fix this by using the PyGILState API (It wouldn't be that hard to
define a dummy version of said API when #ifndef WITH_THREAD, would
it?).

Also, check the conversion to integer of the return value of a hook
function for errors (this problem was mentioned in the ipython bug
report linked to in the above bug).
2005-03-31 10:20:34 +00:00