summaryrefslogtreecommitdiffstats
path: root/Python
Commit message (Collapse)AuthorAgeFilesLines
* Properly compute array size even for --disable-unicode.Martin v. Löwis2002-11-211-1/+1
|
* Wrap uargs declaration in a #ifdef Py_USING_UNICODE, so thatWalter Dörwald2002-11-211-0/+2
| | | | | the --disable-unicode build doesn't complain about an unused variable.
* Move three variables that are only used inside an if block into the block,Walter Dörwald2002-11-211-3/+3
| | | | so the --disable-unicode build doesn't complain about unused variables.
* Fix PEP 293 related problems with --disable-unicode buildsWalter Dörwald2002-11-212-0/+12
| | | | | reported by Michael Hudson in http://mail.python.org/pipermail/python-dev/2002-November/030299.html
* Remove _Py_ResetReferences. Fixes bug #529750 "Circular reference makesNeil Schemenauer2002-11-171-4/+0
| | | | | | Py_Init crash". refchain cannot be cleared because objects can live across Py_Finalize() and Py_Initialize() if they are kept alive by circular references.
* Make private functions static so we don't pollute the namespaceNeal Norwitz2002-11-101-1/+1
|
* Restore to ANSI C.Michael W. Hudson2002-11-091-2/+2
|
* This is Richie Hindle's patch:Michael W. Hudson2002-11-081-7/+16
| | | | | | | [ 631276 ] Exceptions raised by line trace function It conflicted with the patches from Armin I just checked it, so I had to so some bits by hand.
* Assorted patches from Armin Rigo:Michael W. Hudson2002-11-082-42/+59
| | | | | | | | [ 617309 ] getframe hook (Psyco #1) [ 617311 ] Tiny profiling info (Psyco #2) [ 617312 ] debugger-controlled jumps (Psyco #3) These are forward ports from 2.2.2.
* Got rid of the python.rsrc resource file. The error message strings andJack Jansen2002-11-071-0/+34
| | | | | | | | | | dialogs are now stored in Mac/Lib, and loaded on demand through macresource. Not only does this simplify a MacPython based on Apple's Python, but it also makes Mac error codes come out symbolically when running command line python (if you have Mac/Lib in your path). The resource files are copied from Mac/Resources. The old ones will disappear after the OS9 build procedure has been adjusted.
* Handle really big steps in extended slices.Michael W. Hudson2002-11-061-1/+1
| | | | Fixes a test failure on 64 bit platforms (I hope).
* Fix SF # 551504, python -v sometimes fails to find init (HPUX)Neal Norwitz2002-11-021-1/+1
| | | | | Joseph Winston recommends removing DYNAMIC_PATH, since it can cause some dynamic libraries to not load on HP-UX 11.
* Patch #512981: Update readline input stream on sys.stdin/out change.Martin v. Löwis2002-10-261-3/+5
|
* Made MacOS.Error a class style exception (at last!).Jack Jansen2002-10-191-1/+1
|
* If we have a filename and __main__.__file__ hasn't already been set,Fred Drake2002-10-171-1/+11
| | | | | set it. Closes SF issue #624729.
* Add os.path.supports_unicode_filenames for all platforms,Mark Hammond2002-10-081-0/+37
| | | | | | sys.getwindowsversion() on Windows (new enahanced Tim-proof <wink> version), and fix test_pep277.py in a few minor ways. Including doc and NEWS entries.
* s/_alloca/alloca/g; Windows doesn't need the former, at least not unlessTim Peters2002-10-051-2/+2
| | | | __STDC__ is defined (or something like that ...).
* Patch #618347: Work around Solaris 2.6 pthread.h bug. Will backport to 2.2.Martin v. Löwis2002-10-041-2/+2
|
* Fix [ 616716 ] Bug in PyErr_SetExcFromWindowsMark Hammond2002-10-041-9/+28
| | | | | | Ensure that even if FormatMessage fails we (a) don't crash, and (b) provide something useful. Bugfix candidate.
* Fix errors to pep277 checkin identified by Neal Norwitz.Mark Hammond2002-10-041-3/+3
|
* One last tweak to the tracing machinery: this actually computes what I intendedMichael W. Hudson2002-10-031-1/+3
| | | | | | | all along. Before instr_lb tended to be too high. I don't think this actually makes any difference, given what the compiler produces, but it makes me a bit happier.
* Clamp code objects' tp_compare result to [-1, 1].Michael W. Hudson2002-10-031-3/+3
| | | | Bugfix candidate.
* Patch 594001: PEP 277 - Unicode file name support for Windows NT.Mark Hammond2002-10-031-10/+82
|
* Fix for the recursion_level bug Armin Rigo reported in sfMichael W. Hudson2002-10-021-0/+4
| | | | | | | 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 ;-).
* Add encoding name in LookupError. Fixes #615013. Will backport to 2.2.Martin v. Löwis2002-09-261-2/+2
|
* Two more cases of switch(PySequence_Size()) without checking for case -1.Neal Norwitz2002-09-181-0/+7
| | | | | | | (Same problem as last checkin for SF bug 610610) Need to clear the error and proceed. Backport candidate
* Fix SF bug 610610 (reported by Martijn Pieters, diagnosed by Neal Norwitz).Guido van Rossum2002-09-181-0/+3
| | | | | | | | 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. Definite backport candidate (this dates all the way to Python 2.0).
* A slight change to SET_LINENO-less tracing.Michael W. Hudson2002-09-111-5/+18
| | | | | This makes things a touch more like 2.2. Read the comments in Python/ceval.c for more details.
* missed this one on the previous multi-file checkin - seeSkip Montanaro2002-09-031-2/+0
| | | | http://python.org/sf/602191
* Add a custom __str__ method to KeyError that applies repr() to theGuido van Rossum2002-09-031-2/+40
| | | | | missing key. (Also added a guard to SyntaxError__str__ to prevent calling PyString_Check(NULL).)
* Bump default check interval to 100 instructions. Computers are much fasterSkip Montanaro2002-09-031-2/+2
| | | | | | than when this interval was first established. Checking too frequently just adds needless overhead because most of the time there is nothing to do and no other threads ready to run.
* replace thread state objects' ticker and checkinterval fields with twoSkip Montanaro2002-09-032-4/+9
| | | | | | | | | | globals, _Py_Ticker and _Py_CheckInterval. This also implements Jeremy's shortcut in Py_AddPendingCall that zeroes out _Py_Ticker. This allows the test in the main loop to only test a single value. The gory details are at http://python.org/sf/602191
* expose PYTHON_API_VERSION macro as sys.api_version. Closes patch # 601456.Skip Montanaro2002-09-031-0/+3
|
* Check string for NULL before using it to format the error message.Walter Dörwald2002-09-021-3/+6
| | | | (Spotted by Neal Norwitz)
* Removed bogus PyUnicodeTranslateError_GetEncoding, asWalter Dörwald2002-09-021-5/+0
| | | | | UnicodeTranslateError doesn't have an encoding attribute. (Spotted by Neal Norwitz)
* Limit the length of attribute names in exception messagesWalter Dörwald2002-09-021-3/+3
| | | | to prevent buffer overflows (spotted by Neal Norwitz).
* PEP 293 implemention (from SF patch http://www.python.org/sf/432401)Walter Dörwald2002-09-022-0/+1002
|
* Because MWH changed the bytecode again, moved the magic number *back*Guido van Rossum2002-08-311-1/+6
| | | | | to 62011. This should get the snake-farm to throw away its old .pyc files, amongst others.
* Further SET_LINENO reomval fixes. See comments in patch #587933.Michael W. Hudson2002-08-302-37/+32
| | | | | | | | | | Use a slightly different strategy to determine when not to call the line trace function. This removes the need for the RETURN_NONE opcode, so that's gone again. Update docs and comments to match. Thanks to Neal and Armin! Also add a test suite. This should have come with the original patch...
* execfile should call PyErr_SetFromErrnoWithFilename instead ofPeter Schneider-Kamp2002-08-271-1/+1
| | | | | | simply PyErr_SetFromErrno This closes bug 599163.
* Fix a couple of whitespace consistency nits.Fred Drake2002-08-261-2/+2
|
* Simplify, and avoid PyModule_GetDict() while we're at it.Fred Drake2002-08-261-5/+2
|
* The error messages in err_args() -- which is only called when theGuido van Rossum2002-08-231-2/+2
| | | | | | required number of args is 0 or 1 -- were reversed. Also change "1" into "exactly one", the same words as used elsewhere for this condition.
* Comment typo repair.Michael W. Hudson2002-08-201-1/+1
|
* My patch #597221. Use f_lasti more consistently.Michael W. Hudson2002-08-201-9/+9
|
* Add a warning comment to the LOAD_GLOBAL inline code.Guido van Rossum2002-08-191-1/+3
|
* Another ugly inlining hack, expanding the two PyDict_GetItem() callsGuido van Rossum2002-08-191-1/+25
| | | | | | | | | | | | | | | in LOAD_GLOBAL. Besides saving a C function call, it saves checks whether f_globals and f_builtins are dicts, and extracting and testing the string object's hash code is done only once. We bail out of the inlining if the name is not exactly a string, or when its hash is -1; because of interning, neither should ever happen. I believe interning guarantees that the hash code is set, and I believe that the 'names' tuple of a code object always contains interned strings, but I'm not assuming that -- I'm simply testing hash != -1. On my home machine, this makes a pystone variant with new-style classes and slots run at the same speed as classic pystone! (With new-style classes but without slots, it is still a lot slower.)
* Inline fast_cfunction() in new call_function().Jeremy Hylton2002-08-161-55/+33
| | | | | | | | | Also, don't handle METH_OLDARGS on the fast path. All the interesting builtins have been converted to use METH_NOARGS, METH_O, or METH_VARARGS. Result is another 1-2% speedup. If I can cobble together 10 of these, it might make a difference.
* Move body of CALL_FUNCTION opcode into helper function.Jeremy Hylton2002-08-161-54/+56
| | | | | | | This makes the code much easier to ready, because it is at a sane indentation level. On my box this shows a 1-2% speedup, which means nothing, except that I'm not going to worry about the performance effects of the change.
* Streamline the fast track for CFunction calls a bit more: there wasGuido van Rossum2002-08-161-5/+2
| | | | | | | nothing special done if keyword arguments were present, so test for that earlier and fall through to the normal case if there are any. This ought to slow down CFunction calls with keyword args, but I don't care; it's a tiny (1%) improvement for pystone.