Commit Graph

2821 Commits

Author SHA1 Message Date
Antoine Pitrou
e96d4ea4e2 Issue #1180193: When importing a module from a .pyc (or .pyo) file with
an existing .py counterpart, override the co_filename attributes of all
code objects if the original filename is obsolete (which can happen if the
file has been renamed, moved, or if it is accessed through different paths).
Patch by Ziga Seilnacht and Jean-Paul Calderone.
2009-01-06 18:10:47 +00:00
Martin v. Löwis
0fa10b3cd5 Issue #4817: Remove unused function PyOS_GetLastModificationTime. 2009-01-03 17:19:26 +00:00
Benjamin Peterson
796798b29c fix compilation on non-Windows platforms 2009-01-02 20:47:27 +00:00
Martin v. Löwis
5344c99734 Issue #4075: Use OutputDebugStringW in Py_FatalError. 2009-01-02 20:32:55 +00:00
Benjamin Peterson
d6baa70b96 welcome to 2009, Python! 2009-01-01 17:29:49 +00:00
Benjamin Peterson
8d5934b25d #4748 lambda generators shouldn't return values 2008-12-27 18:24:11 +00:00
Benjamin Peterson
4caef5c7e2 fix #4720: the format to PyArg_ParseTupleAndKeywords can now start with '|' 2008-12-22 20:51:15 +00:00
Antoine Pitrou
d0c3515bc5 Issue #2183: Simplify and optimize bytecode for list comprehensions. 2008-12-17 00:38:28 +00:00
Amaury Forgeot d'Arc
ad9b5992e3 #4559: When a context manager's __exit__() method returns an object whose
conversion to bool raises an exception, 'with' loses that exception.

Reviewed by Jeffrey Yasskin.
Already ported to 2.5, will port to 2.6 and 3.0
2008-12-10 23:22:49 +00:00
Jeffrey Yasskin
2d873bd68b Issue 4597: Fix several cases in EvalFrameEx where an exception could be
"raised" without setting x, err, or why to let the eval loop know.
2008-12-08 18:55:24 +00:00
Mark Dickinson
422ce06b9c Issue #4461: Safety check in parsenumber (ast.c) 2008-12-05 17:59:46 +00:00
Jeffrey Yasskin
fd8a1ec486 Speed up Python (according to pybench and 2to3-on-itself) by 1-2% by caching
whether any thread has tracing turned on, which saves one load instruction in
the fast_next_opcode path in PyEval_EvalFrameEx().  See issue 4477.
2008-12-03 06:46:45 +00:00
Benjamin Peterson
9e6310d936 always check the return value of NEW_IDENTIFIER 2008-11-25 03:43:14 +00:00
Amaury Forgeot d'Arc
dc61901dd2 #3996: On Windows, PyOS_CheckStack is supposed to protect the interpreter from
stack overflow. But doing this, it always crashes when the stack is nearly full.

Reviewed by Martin von Loewis. Will backport to 2.6.
2008-11-22 20:01:18 +00:00
Benjamin Peterson
c078f929cb don't segfault when \N escapes are used and unicodedata fails to load
Fixes #4367
2008-11-21 22:27:24 +00:00
Benjamin Peterson
2c98faada6 check for assignment to __debug__ during AST generation
Also, give assignment to None a better error message
2008-11-08 18:38:54 +00:00
Benjamin Peterson
dcee09d920 make sure the parser flags and passed onto the compiler
This fixes "from __future__ import unicode_literals" in an exec statment
See #4225
2008-10-31 02:16:05 +00:00
Benjamin Peterson
44a90c95ce move unprefixed error into .c file 2008-10-30 23:59:18 +00:00
Benjamin Peterson
399b1fe8df give a py3k warning when 'nonlocal' is used as a variable name 2008-10-25 02:53:28 +00:00
Benjamin Peterson
aff36f1295 fix compiler warning 2008-10-19 13:59:01 +00:00
Armin Ronacher
35e01fbeaa Fixed #4067 by implementing _attributes and _fields for the AST root node. 2008-10-19 08:27:43 +00:00
Christian Heimes
32a66a0410 Fixed a couple more C99 comments and one occurence of inline. 2008-10-02 19:47:50 +00:00
Andrew MacIntyre
f8db82242b any platform without HAVE_LOG1P should have DBL_EPSILON in <float.h>
Part of source_os2emx.patch in issue 3868
Reviewed by Amaury Forgeot d'Arc
2008-09-22 14:11:41 +00:00
Amaury Forgeot d'Arc
05e344954d #3743: PY_FORMAT_SIZE_T is designed for the OS "printf" functions, not for
PyString_FromFormat which has an independent implementation, and uses "%zd".

This makes a difference on win64, where printf needs "%Id" to display
64bit values. For example, queue.__repr__ was incorrect.

Reviewed by Martin von Loewis.
2008-09-10 22:04:45 +00:00
Brett Cannon
1eaf0742d8 Move test.test_support.catch_warning() to the warnings module, rename it
catch_warnings(), and clean up the API.

While expanding the test suite, a bug was found where a warning about the
'line' argument to showwarning() was not letting functions with '*args' go
without a warning.

Closes issue 3602.
Code review by Benjamin Peterson.
2008-09-02 01:25:16 +00:00