summaryrefslogtreecommitdiff
path: root/Python
Commit message (Collapse)AuthorAgeFilesLines
* Bug #1674503: close the file opened by execfile() in an error condition.Georg Brandl2007-03-061-2/+2
|
* Patch #1674228: when assigning a slice (old-style), check for theGeorg Brandl2007-03-051-1/+1
| | | | sq_ass_slice instead of the sq_slice slot.
* Fix embarrassing typo and fix constantification of NoneRaymond Hettinger2007-03-021-6/+10
|
* tabifyJeremy Hylton2007-02-272-2039/+2039
| | | | | Note that ast.c still has a mix of tabs and spaces, because it attempts to use four-space indents for more of the new code.
* Fix long-standing bug in name mangling for package importsJeremy Hylton2007-02-271-2/+12
| | | | Reported by Mike Verdone.
* SF #1669182, 2.5 was already fixed. Just assert in 2.6 since string exceptionsNeal Norwitz2007-02-261-2/+3
| | | | are gone.
* When printing an unraisable error, don't print exceptions. before the name.Neal Norwitz2007-02-261-1/+2
| | | | This duplicates the behavior whening normally printing exceptions.
* Fix a couple of problems in generating the AST code:Neal Norwitz2007-02-261-166/+56
| | | | | | * use %r instead of backticks since backticks are going away in Py3k * PyArena_Malloc() already sets PyErr_NoMemory so we don't need to do it again * the signature for ast2obj_int incorrectly used a bool, rather than a long
* Reformat long lines.Jeremy Hylton2007-02-261-2/+4
|
* Put declarations before code.Jeremy Hylton2007-02-251-1/+1
|
* Fix crash in exec when unicode filename can't be decoded.Jeremy Hylton2007-02-251-0/+2
| | | | | | | I can't think of an easy way to test this behavior. It only occurs when the file system default encoding and the interpreter default encoding are different, such that you can open the file but not decode its name.
* Modify Parser/asdl_c.py so that the __version__ number for Python/Python-ast.cBrett Cannon2007-02-121-1/+10
| | | | | | is specified at the top of the file. Also add a note that Python/Python-ast.c needs to be committed separately after a change to the AST grammar to capture the revision number of the change (which is what __version__ is set to).
* Check in changed Python-ast.c from a cosmetic change to Python.asdl (inBrett Cannon2007-02-111-1/+1
| | | | r53731).
* No more raising of string exceptions!Brett Cannon2007-01-301-13/+34
| | | | | | | The next step of PEP 352 (for 2.6) causes raising a string exception to trigger a TypeError. Trying to catch a string exception raises a DeprecationWarning. References to string exceptions has been removed from the docs since they are now just an error.
* Make PyTraceBack_Here use the current thread, not theMartin v. Löwis2007-01-231-1/+1
| | | | | frame's thread state. Fixes #1579370. Will backport.
* SF patch #1630975: Fix crash when replacing sys.stdout in sitecustomizeThomas Wouters2007-01-232-6/+9
| | | | | | | | | | | 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....)
* update to (c) years to include 2007Anthony Baxter2007-01-061-1/+1
|
* SF# 1409443: Expand comment to cover the interaction between f->f_lasti and ↵Raymond Hettinger2007-01-061-1/+10
| | | | the PREDICT macros.
* Prevent crash on shutdown which can occur if we are finalizingNeal Norwitz2007-01-051-1/+2
| | | | | | | and the module dict has been cleared already and some object raises a warning (like in a __del__). Will backport.
* Forgot a case where the locals can now be a general mappingArmin Rigo2006-11-291-1/+3
| | | | instead of just a dictionary. (backporting...)
* Bug #1588287: fix invalid assertion for `1,2` in debug builds.Neal Norwitz2006-11-041-0/+1
| | | | Will backport
* Update comments, remove commented out code.Neal Norwitz2006-10-291-87/+31
| | | | | Move assembler structure next to assembler code to make it easier to move it to a separate file.
* Clean up a leftover from old listcomp generation code.Georg Brandl2006-10-291-7/+1
|
* Fix bug #1565514, SystemError not raised on too many nested blocks.Neal Norwitz2006-10-281-1/+4
| | | | | | | It seems like this should be a different error than SystemError, but I don't have any great ideas and SystemError was raised in 2.4 and earlier. Will backport.
* Add some asserts. In sysmodule, I think these were to try to silenceNeal Norwitz2006-10-281-0/+4
| | | | | | | some warnings from Klokwork. They verify the assumptions of the format of svn version output. The assert in the thread module helped debug a problem on HP-UX.
* [Bug #1542016] Report PCALL_POP value. This makes the return value of ↵Andrew M. Kuchling2006-10-271-2/+2
| | | | | | | sys.callstats() match its docstring. Backport candidate. Though it's an API change, this is a pretty obscure portion of the API.
* Patch #1549049: Rewrite type conversion in structmember.Martin v. Löwis2006-10-271-53/+91
| | | | Fixes #1545696 and #1566140. Will backport to 2.5.
* Update the peephole optimizer to remove more dead code (jumps after returns)Neal Norwitz2006-10-142-5/+17
| | | | and inline jumps to returns.
* Bug #1283491: follow docstring convention wrt. keyword-able args in sum().Georg Brandl2006-10-121-2/+3
|
* Forward-port of r52136,52138: a review of overflow-detecting code.Armin Rigo2006-10-046-27/+37
| | | | | | | | | | | | | | | | | | | | | | | * unified the way intobject, longobject and mystrtoul handle values around -sys.maxint-1. * in general, trying to entierely avoid overflows in any computation involving signed ints or longs is extremely involved. Fixed a few simple cases where a compiler might be too clever (but that's all guesswork). * more overflow checks against bad data in marshal.c. * 2.5 specific: fixed a number of places that were still confusing int and Py_ssize_t. Some of them could potentially have caused "real-world" breakage. * list.pop(x): fixing overflow issues on x was messy. I just reverted to PyArg_ParseTuple("n"), which does the right thing. (An obscure test was trying to give a Decimal to list.pop()... doesn't make sense any more IMHO) * trying to write a few tests...
* Fix for SF bug 1569998: break permitted inside try.Jeremy Hylton2006-10-041-1/+13
| | | | | | | | The compiler was checking that there was something on the fblock stack, but not that there was a loop on the stack. Fixed that and added a test for the specific syntax error. Bug fix candidate.
* Fix minor typo in a comment.Brett Cannon2006-10-031-1/+1
|
* Very minor grammatical fix in a comment.Brett Cannon2006-09-281-1/+1
|
* Remove extra semi-colons reported by Johnny Lee on python-dev. Backport if ↵Neal Norwitz2006-09-231-1/+1
| | | | anyone cares.
* Bug #1557232: fix seg fault with def f((((x)))) and def f(((x),)).Neal Norwitz2006-09-221-2/+24
| | | | | | | These tests should be improved. Hopefully this fixes variations when flipping back and forth between fpdef and fplist. Backport candidate.
* Fix typo.Walter Dörwald2006-09-211-1/+1
|
* Forward-port of rev. 51857:Georg Brandl2006-09-111-1/+6
| | | | | | | | | | | Building with HP's cc on HP-UX turned up a couple of problems. _PyGILState_NoteThreadState was declared as static inconsistently. Make it static as it's not necessary outside of this module. Some tests failed because errno was reset to 0. (I think the tests that failed were at least: test_fcntl and test_mailbox). Ensure that errno doesn't change after a call to Py_END_ALLOW_THREADS. This only affected debug builds.
* Properly handle a NULL returned from PyArena_New().Neal Norwitz2006-09-111-2/+4
| | | | | | (Also fix some whitespace) Klocwork #364.
* with and as are now keywords. There are some generated files I can't recreate.Neal Norwitz2006-09-063-22/+14
|
* Bug #1550983: emit better error messages for erroneous relativeGeorg Brandl2006-09-061-2/+3
| | | | imports (if not in package and if beyond toplevel package).
* M-x untabifyNeal Norwitz2006-09-051-821/+821
|
* Add a comment about some refactoring. (There's probably more that should be ↵Neal Norwitz2006-09-051-6/+5
| | | | done.) I will reformat this file in the next checkin due to the inconsistent tabs/spaces.
* Bug #1520864 (again): unpacking singleton tuples in list comprehensions andNeal Norwitz2006-09-052-5/+14
| | | | | | | | | | | | | generator expressions (x for x, in ... ) works again. Sigh, I only fixed for loops the first time, not list comps and genexprs too. I couldn't find any more unpacking cases where there is a similar bug lurking. This code should be refactored to eliminate the duplication. I'm sure the listcomp/genexpr code can be refactored. I'm not sure if the for loop can re-use any of the same code though. Will backport to 2.5 (the only place it matters).
* Fix SF #1552093, eval docstring typo (3 ps in mapping)Neal Norwitz2006-09-051-1/+1
|
* Handle a few more error conditions.Neal Norwitz2006-08-211-0/+5
| | | | Klocwork 301 and 302. Will backport.
* Patch #1542451: disallow continue anywhere under a finallyNeal Norwitz2006-08-211-4/+9
| | | | | | I'm undecided if this should be backported to 2.5 or 2.5.1. Armin suggested to wait (I'm of the same opinion). Thomas W thinks it's fine to go in 2.5.
* Add assert to make Klocwork happy (#276)Neal Norwitz2006-08-211-0/+1
|
* Move peephole optimizer to separate file.Jeremy Hylton2006-08-212-608/+616
|
* Handle PyString_FromInternedString() failing (unlikely, but possible).Neal Norwitz2006-08-191-9/+8
| | | | | | Klocwork #325 (I'm not backporting this, but if someone wants to, feel free.)
* cpathname could be NULL if it was longer than MAXPATHLEN. Don't tryNeal Norwitz2006-08-131-1/+6
| | | | | | | | to write the .pyc to NULL. Check results of PyList_GetItem() and PyModule_GetDict() are not NULL. Klocwork 282, 283, 285