Commit Graph

3552 Commits

Author SHA1 Message Date
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
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
Martin v. Löwis
d84b9d30c3 Backport of change to os.access to encode Unicode file names with
the file system encoding.
2005-03-13 22:18:26 +00:00
Raymond Hettinger
512a4dc888 SF bug #1160187: Setup file needs entries for collections, itertools, strop 2005-03-09 23:47:44 +00:00
Greg Ward
777374e8db SF #818006: revert addition of 'closed', 'mode', and 'name' attributes
to oss_audio_device objects.
2005-03-09 00:55:19 +00:00
Martin v. Löwis
ad80c6bb2a Build with --disable-unicode again. Fixes #1158607. 2005-03-08 15:05:18 +00:00
Greg Ward
aa3bb89a50 SF #818006: add useful read-only attributes to oss_audio_device object:
'closed', 'name', and 'mode' (as recommended by
http://python.org/doc/current/lib/bltin-file-objects.html).
2005-03-07 01:32:03 +00:00
Martin v. Löwis
dce2f3605b Patches #925152, #1118602: Avoid reading after the end of the buffer
in pyexpat.GetInputContext.
2005-03-04 14:38:07 +00:00
Martin v. Löwis
ac4c46035c Patch #1093585: raise a ValueError for negative history items in
remove_history and replace_history.
2005-02-27 20:34:01 +00:00
Alex Martelli
4c337993c5 forwardport of 2.3.5 fixes to copy.py 2005-02-07 12:39:55 +00:00
Andrew M. Kuchling
3baa811033 [Bug #1083110] calling .flush() on decompress objects causes a segfault due to an uninitialized pointer: fixes the problem and adds a test case 2004-12-28 20:12:31 +00:00
Raymond Hettinger
66e8aa298e Bug #1087216: datetime module documentation missing critical detail 2004-12-19 20:16:57 +00:00
Andrew MacIntyre
995d9bf127 fix unterminated comment 2004-12-18 09:48:40 +00:00
Raymond Hettinger
fe09fa2ff1 Backport fixes for bugs #1086555 and #1085744. 2004-12-17 14:44:45 +00:00
Gregory P. Smith
19c9a85fea fixes compilation against BerkeleyDB 3.2.9 (sf bug # 1077040) 2004-12-16 09:48:37 +00:00
Andrew MacIntyre
74b443ce1d OS/2 specific fixes related to SF bug # 1003471.
Also revise a related function to minimise file handle/pipe leakage
and improve reliability.

Backported from -HEAD.
2004-12-12 08:34:33 +00:00
Gustavo Niemeyer
e1311180ef Fixing bug #1072259 of SRE into release24-maint. 2004-12-02 16:36:29 +00:00
Hye-Shik Chang
7a8173a477 Rename a static variable "history_length" to "_history_length".
GNU readline exports a global variable that has such a name already
and the collision makes gcc4 doesn't compile the source.
2004-11-25 04:04:20 +00:00
Marc-André Lemburg
a9cadcd41b Correct the handling of 0-termination of PyUnicode_AsWideChar()
and its usage in PyLocale_strcoll().

Clarify the documentation on this.

Thanks to Andreas Degert for pointing this out.
2004-11-22 13:02:31 +00:00
Martin v. Löwis
fba7369824 Patch #1050475: Fix various x86_64 build issues
regrtest.py: skip rgbimg and imageop as they are not built on 64-bit systems.
_tkinter.c: replace %.8x with %p for printing pointers.
setup.py: add lib64 into the library directories.
2004-11-13 11:13:35 +00:00
Raymond Hettinger
2c45c9ae57 SF patch 1062495: Modules/zipimport.c does not compile on solaris
(Contributed by Niki W. Waibel.)

Simple renaming to avoid a conflict that prevented compilation on Solaris.
2004-11-10 13:08:35 +00:00
Raymond Hettinger
952f8808b2 SF patch #1062279: deque pickling problems
(Contributed by Dima Dorfman.)

* Support pickling of dictionaries in instances of deque subclasses.
* Support pickling of recursive deques.
2004-11-09 07:27:35 +00:00
Jeremy Hylton
80961f3ca9 Fix apparently trivial buffer overflow (SF bug 1060396).
memset() wrote one past the end of the buffer, which was likely to be unused padding or a yet-to-be-initialized local variable.  This routine is already tested by test_socket.
2004-11-07 14:24:25 +00:00
Raymond Hettinger
7d112df94f Bump-up block size. 2004-11-02 02:11:35 +00:00
Walter Dörwald
bb9c739806 Add error checks for the bz2, cStringIO and operator modules.
Add function names to various PyArg_ParseTuple calls in bz2module.c.
2004-11-01 17:10:19 +00:00