Martin v. Löwis
ce5d0e22fc
Set subversion version identification to empty strings if this is not a subversion
...
checkout (but a mercurial one). Closes #11579 . Closes #11421 .
Patch by Senthil Kumaran.
2011-03-21 10:30:07 +01:00
Martin v. Löwis
8a64048a22
Backport of r64212
...
Issue #1683 : prevent forking from interfering in threading storage.
2008-12-13 14:59:04 +00:00
Jeffrey Yasskin
6f5d3f326f
Backport issue 4597 to python 2.5.3: Fixed several opcodes that weren't always
...
propagating exceptions.
2008-12-10 17:23:20 +00:00
Jeffrey Yasskin
478a1aa537
Backported issue #4589 to Python 2.5.3: Propagated an exception thrown by a
...
context manager's __exit__ method's result while it's being converted to bool.
2008-12-10 07:28:12 +00:00
Benjamin Peterson
1bd74dea9b
backport r67373: checking for errors from NEW_IDENTIFIER
2008-11-25 22:49:28 +00:00
Gregory P. Smith
5e8dc97a09
Backport of r65032 from trunk
...
Fixes Issue #874900 : after an os.fork() call the threading module state is cleaned
up in the child process to prevent deadlock and report proper thread counts
if the new process uses the threading module.
2008-08-17 23:01:11 +00:00
Georg Brandl
032215451b
Backport r60148 and r65481: sanity checks to avoid infinite loops.
2008-08-12 08:46:02 +00:00
Mark Dickinson
ab396e07cc
Issue #3360 : Fix incorrect parsing of '020000000000.0'.
...
This is a backport of r65005.
2008-07-16 11:04:17 +00:00
Amaury Forgeot d'Arc
ceda6a67ce
#3242 : fix a crash in "print", if sys.stdout is set to a custom object,
...
whose write() method installs another sys.stdout.
Backport of r64633
2008-07-01 20:52:56 +00:00
Raymond Hettinger
75ee9eb9c6
Issue #3116 and #1792 : Fix quadratic behavior in marshal.dumps().
2008-06-16 01:49:18 +00:00
Georg Brandl
d297f1ad78
#3117 : backport r55087, fixes segfault with lambda (None,): None.
2008-06-15 19:53:12 +00:00
Gregory P. Smith
9aa040d4ab
- Issue #2588 , #2589 : Fix potential integer underflow and overflow
...
conditions in the PyOS_vsnprintf C API function.
This is a backport of r63728 and r63734 from trunk.
2008-06-02 00:07:25 +00:00
Amaury Forgeot d'Arc
8432d86b9f
Fix a reference leak found by Georg, when compiling a class nested in another class.
...
Test is run with "regrtest.py -R:: test_compile"
Backport of r62015
2008-03-28 20:45:42 +00:00
Sean Reifscheider
4af861cb4e
Back-port of rev 61240 for issue #2238 , fixing: Some syntax errors in *args
...
and **kwargs expressions could give bogus error messages.
2008-03-20 17:39:31 +00:00
Martin v. Löwis
10eac2c613
Update copyright years to 2008. Update README to 2.5.2.
2008-02-21 11:53:40 +00:00
Martin v. Löwis
73c01d4101
Added checks for integer overflows, contributed by Google. Some are
...
only available if asserts are left in the code, in cases where they
can't be triggered from Python code.
2008-02-14 11:26:18 +00:00
Amaury Forgeot d'Arc
bc212104e4
No need to emit co_lnotab item when both offsets are zeros.
...
r60579 broke a test test_compile, which seems to test an "implementation detail" IMO.
Also test that this correction does not impact the debugger.
2008-02-04 23:51:55 +00:00
Amaury Forgeot d'Arc
316f8a8d3c
backport of r60575 (issue #1750076 ): Debugger did not step on every iteration of a while statement.
...
The mapping between bytecode offsets and source lines (lnotab) did not contain
an entry for the beginning of the loop.
Now it does, and the lnotab can be a bit larger:
in particular, several statements on the same line generate several entries.
However, this does not bother the settrace function, which will trigger only
one 'line' event.
The lnotab seems to be exactly the same as with python2.4.
2008-02-04 22:34:57 +00:00
Amaury Forgeot d'Arc
f1a7178cd5
#1920 : when considering a block starting by "while 0", the compiler optimized the
...
whole construct away, even when an 'else' clause is present::
while 0:
print("no")
else:
print("yes")
did not generate any code at all.
Now the compiler emits the 'else' block, like it already does for 'if' statements.
Backport of r60265.
2008-01-24 23:42:08 +00:00
Guido van Rossum
e105f98046
Fix two crashers (borrowed_ref_[34].py from the trunk).
2008-01-23 20:09:39 +00:00
Mark Dickinson
2bebadfe51
Issue 1678380: fix a bug identifying -0.0 and 0.0
2008-01-21 21:54:47 +00:00
Amaury Forgeot d'Arc
8334a4fc31
Backport of r59241: str.decode fails on very long strings on 64bit platforms.
...
PyArgs_ParseTuple t# and w# formats truncated the lengths to 32bit.
2007-11-30 21:53:17 +00:00
Amaury Forgeot d'Arc
c572dc3752
Backport for issue1265 (pdb bug with "with" statement).
...
When an unfinished generator-iterator is garbage collected, PyEval_EvalFrameEx
is called with a GeneratorExit exception set. This leads to funny results
if the sys.settrace function itself makes use of generators.
A visible effect is that the settrace function is reset to None.
Another is that the eventual "finally" block of the generator is not called.
It is necessary to save/restore the exception around the call to the trace
function.
This happens a lot with py3k: isinstance() of an ABCMeta instance runs
def __instancecheck__(cls, instance):
"""Override for isinstance(instance, cls)."""
return any(cls.__subclasscheck__(c)
for c in {instance.__class__, type(instance)})
which lets an opened generator expression each time it returns True.
And the problem can be reproduced in 2.5 with pure python code.
2007-11-13 22:43:05 +00:00
Neal Norwitz
163048ed12
Backport 58424:
...
Fix Coverity 185-186: If the passed in FILE is NULL, uninitialized memory
would be accessed.
2007-10-12 03:59:09 +00:00
Neal Norwitz
14f848bb22
Backport 58330:
...
Fix Coverity #158 : Check the correct variable.
2007-10-05 03:45:42 +00:00
Georg Brandl
dfecfdb23e
Fix #1169 : remove docstrings in functions for -OO.
...
(backport from rev. 58204)
2007-09-19 06:37:26 +00:00
Georg Brandl
eec47f3556
Backport fix of #1752175 .
2007-08-23 18:08:33 +00:00
Martin v. Löwis
2276885acd
Patch #1733960 : Allow T_LONGLONG to accept ints.
2007-06-09 08:01:33 +00:00
Georg Brandl
73c958aced
Disallow function calls like foo(None=1).
...
Backport from py3k rev. 55708 by Guido.
(backport from rev. 55802)
2007-06-07 13:23:28 +00:00
Georg Brandl
ba871a06fb
Bug #1722484 : remove docstrings again when running with -OO.
...
(backport from rev. 55732)
2007-06-01 11:33:45 +00:00
Neal Norwitz
ce15dce421
Drop the max stack depth to something that works in 2.6
2007-05-18 05:12:22 +00:00
Neal Norwitz
dc78cc6f7c
Fix bug in marshal where bad data would cause a segfault due to
...
lack of an infinite recursion check.
Contributed by Damien Miller at Google.
2007-05-16 20:09:36 +00:00
Kristján Valur Jónsson
b4c285a25b
Fix NonRecursiveMutex on x64. The signature of the faux-InterlockedCompareExchange function was wrong: It works with LONG and not PVOID objects, and it needs to have the target marked as volatile. Further, it is not needed at all for x64 targets, since that platform always has the real McCoy.
2007-05-07 18:28:12 +00:00
Kristján Valur Jónsson
00b0a9e5b2
Undefine the Yield macro after including Python_ast.h where it may cause conflicts with winbase.h on Windows.
2007-05-02 16:02:48 +00:00
Kristján Valur Jónsson
5e4e31f76a
Fix various minor issues discovered with static analysis using Visual Studio 2005 Team System.
...
Removed obsolete comment, since .dll modules are no longer supported on windows, only .pyd.
2007-04-21 12:46:49 +00:00
Neal Norwitz
03c566a268
Revert 54813 for 2.5.1 release. Can be applied after 2.5 branch is unfrozen.
2007-04-16 06:19:52 +00:00
Neal Norwitz
16b7b53ad0
SF #1701207 : svnversion_init assertion failed
...
Revert bogus asserts (added to the wrong place) from rev 52501.
Approved by Anthony.
2007-04-16 06:12:02 +00:00
Kristján Valur Jónsson
9d9fbb4359
Fix a bug when using the __lltrace__ opcode tracer, and a problem sith signed chars in frameobject.c which can occur with opcodes > 127
2007-04-13 22:09:59 +00:00
Georg Brandl
8a10ea4613
Patch #1682205 : a TypeError while unpacking an iterable is no longer
...
masked by a generic one with the message "unpack non-sequence".
(backport from rev. 54480)
2007-03-21 09:00:55 +00:00
Collin Winter
7d9ac78384
Patch #1642547 : Fix an error/crash when encountering syntax errors in complex if statements.
...
Backported from r54404.
2007-03-16 04:12:48 +00:00
Collin Winter
2a98ff8eed
Inline PyImport_GetModulesReloading(). Backport from r54368.
2007-03-13 23:04:29 +00:00
Collin Winter
e19d7a3c0a
Bug #742342 : make Python stop segfaulting on infinitely-recursive reload()s. Fixed by patch #922167 .
...
Backported from r54291.
2007-03-12 16:49:23 +00:00
Georg Brandl
15e138a0dc
Bug #1674503 : close the file opened by execfile() in an error condition.
...
(backport)
2007-03-06 12:16:52 +00:00
Georg Brandl
0ea891603d
Patch #1674228 : when assigning a slice (old-style), check for the
...
sq_ass_slice instead of the sq_slice slot.
(backport from rev. 54139)
2007-03-05 22:28:13 +00:00
Raymond Hettinger
d882e36f45
Fix constantification of None.
2007-03-02 19:19:05 +00:00
Neal Norwitz
036b3beca8
Fix SF bug #1669182 . Handle string exceptions even if unraisable (ie in __del__).
2007-02-26 23:46:51 +00:00
Neal Norwitz
a5f5f14783
Backport 53901 and 53902 to prevent crash when there is an error decoding unicode filenames
2007-02-25 16:19:21 +00:00
Martin v. Löwis
601d03a5be
Make PyTraceBack_Here use the current thread, not the
...
frame's thread state. Fixes #1579370 .
2007-01-23 21:11:58 +00:00
Thomas Wouters
e471317a08
Backport trunk revision 53527:
...
SF patch #1630975 : Fix crash when replacing sys.stdout in sitecustomize
When running the interpreter in an environment that would cause it to set
stdout/stderr/stdin's encoding, having a sitecustomize that would replace
them with something other than PyFile objects would crash the interpreter.
Fix it by simply ignoring the encoding-setting for non-files.
This could do with a test, but I can think of no maintainable and portable
way to test this bug, short of adding a sitecustomize.py to the buildsystem
and have it always run with it (hmmm....)
2007-01-23 13:54:30 +00:00
Anthony Baxter
a7118d3a4a
update to (c) years to include 2007
2007-01-06 04:50:44 +00:00