Commit Graph

1590 Commits

Author SHA1 Message Date
Jack Jansen
427ee3bbdd Partial backport of 2.11: better error messages on import failures.
Fixes #652590.
2003-02-25 14:20:44 +00:00
Guido van Rossum
466a3a7150 Backport 2.217 and 2.218:
Provide access to the import lock, fixing SF bug #580952.  This is
mostly from SF patch #683257, but I had to change unlock_import() to
return an error value to avoid fatal error.
2003-02-13 17:06:02 +00:00
Guido van Rossum
32810627a2 Backport SF #660455 fix. 2003-02-12 19:09:45 +00:00
Neal Norwitz
f2dc6a0736 Backport 2.12: Fix for SF #639945, 64-bit bug on AIX when loading
dynamic modules
2003-01-10 23:32:02 +00:00
Neal Norwitz
76f485ff95 Backport Neil Schemenauer's fix for SF #529750,
Circular reference makes Py_Init crash

Modified to keep _Py_ResetReferences() API, but make it a no-op.
It's not called now (for 2.3 it was completely removed).
2002-11-20 02:38:10 +00:00
Guido van Rossum
bb857ac4e6 Initialize tick_counter to 0. Found by Neal Norwitz. 2002-10-08 14:50:55 +00:00
Michael W. Hudson
d1bb75505f Backport:
2002/08/11 12:23:04 lemburg Python/bltinmodule.c 2.262
2002/08/11 12:23:04 lemburg Objects/unicodeobject.c 2.162
2002/08/11 12:23:03 lemburg Misc/NEWS 1.461
2002/08/11 12:23:03 lemburg Lib/test/test_unicode.py 1.65
2002/08/11 12:23:03 lemburg Include/unicodeobject.h 2.39
Add C API PyUnicode_FromOrdinal() which exposes unichr() at C level.

u'%c' will now raise a ValueError in case the argument is an
integer outside the valid range of Unicode code point ordinals.

Closes SF bug #593581.
2002-10-07 12:32:57 +00:00
Michael W. Hudson
51e80dfd02 Backport my checkin of revision 2.264 of Python/compile.c:
Clamp code objects' tp_compare result to [-1, 1].

Bugfix candidate.
2002-10-07 11:30:07 +00:00
Michael W. Hudson
5e40e74bbe This is Armin Rigo's patch:
[ 617309 ] getframe hook (Psyco #1)

Forward port candidate.
2002-10-07 09:47:21 +00:00
Michael W. Hudson
ddd3f0ea7b This is Armin Rigo's patch:
[ 617311 ] Tiny profiling info (Psyco #2)

Forward port candidate.
2002-10-07 09:40:20 +00:00
Michael W. Hudson
b397f21432 This is Armin Rigo's patch:
[ 617312 ] debugger-controlled jumps (Psyco #3)

Forward port candidate, I guess.
2002-10-07 09:37:26 +00:00
Martin v. Löwis
067010f7fa Patch #618347: Work around Solaris pthread.h bug. 2002-10-04 10:16:27 +00:00
Michael W. Hudson
9c5a508eec Fix for the recursion_level bug Armin Rigo reported in sf
patch #617312, both on the trunk and the 22-maint branch.

Also added a test case, and ported the test_trace I wrote for HEAD
to 2.2.2 (with all those horrible extra 'line' events ;-).
2002-10-02 13:13:45 +00:00
Michael W. Hudson
7c2778f423 Backport mhammond's 2.14:
Fix bug [ 549731 ] Unicode encoders appears to leak references.

Python 2.2.1 bugfix candidate.
2002-09-30 10:52:21 +00:00
Martin v. Löwis
7433ef5cee Add encoding in LookupError. Fixes #615013. 2002-09-26 16:04:31 +00:00
Michael W. Hudson
44ed841fec backport theller's checkin of
revision 1.74 of marshal.c

Whitespace normalization.
2002-09-24 11:56:45 +00:00
Michael W. Hudson
78e179cdcf backport theller's checkin of
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.
2002-09-24 11:55:54 +00:00
Michael W. Hudson
070fe1680a backport nowonder's checkin of
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.
2002-09-24 11:23:05 +00:00
Guido van Rossum
2992e13268 Backported 1.39 and 1.40 from trunk:
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.
2002-09-23 21:19:44 +00:00
Neal Norwitz
677ed2cb68 SF bug # 557028, illegal use of malloc/free
This only applies to 2.2.  Use PyMem_Malloc/Free instead of malloc/free.
2002-08-11 15:40:35 +00:00
Neil Schemenauer
3d6247a3e3 Remove calls to 2.1 GC API (they are noops). 2002-08-05 14:46:29 +00:00
Martin v. Löwis
59b5b4720b Patch #554716: Use __va_copy where available. 2002-07-28 10:21:31 +00:00
Fred Drake
ed06e07dc9 Fix the docstring for sys.getrefcount().
Closes SF bug #571759.
2002-06-20 21:35:02 +00:00
Fred Drake
2c5d1ab857 PyModule_AddObject(): Added missing exceptions.
Closes SF bug #523473.
2002-06-17 17:16:34 +00:00
Guido van Rossum
9d21cd7e1a Backport:
SF bug 567538: Generator can crash the interpreter (Finn Bock).

This was a simple typo.  Strange that the compiler didn't catch it!
Instead of WHY_CONTINUE, two tests used CONTINUE_LOOP, which isn't a
why_code at all, but an opcode; but even though 'why' is declared as
an enum, comparing it to an int is apparently not even worth a
warning -- not in gcc, and not in VC++. :-(
2002-06-12 03:48:46 +00:00