summaryrefslogtreecommitdiffstats
path: root/Python
Commit message (Collapse)AuthorAgeFilesLines
* This is Mark Russell's patch:Michael W. Hudson2004-08-172-37/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [ 1009560 ] Fix @decorator evaluation order From the description: Changes in this patch: - Change Grammar/Grammar to require newlines between adjacent decorators. - Fix order of evaluation of decorators in the C (compile.c) and python (Lib/compiler/pycodegen.py) compilers - Add better order of evaluation check to test_decorators.py (test_eval_order) - Update the decorator documentation in the reference manual (improve description of evaluation order and update syntax description) and the comment: Used Brett's evaluation order (see http://mail.python.org/pipermail/python-dev/2004-August/047835.html) (I'm checking this in for Anthony who was having problems getting SF to talk to him)
* The attached patch fixes FTBFS on GNU/k*BSD. The problem happens on GNU/k*BSDMatthias Klose2004-08-161-0/+10
| | | | | | | | | | because GNU/k*BSD uses gnu pth to provide pthreads, but will also happen on any system that does the same. python fails to build because it doesn't detect gnu pth in pthread emulation. See C comments in patch for details. patch taken from http://bugs.debian.org/264315
* Correct the order of application for decorators. Meant to be bottom-up and notBrett Cannon2004-08-151-1/+4
| | | | top-down. Now matches the PEP.
* Fix incorrect comment for (struct compiling)->c_cellvarsBrett Cannon2004-08-151-1/+1
|
* This is my patch:Michael W. Hudson2004-08-122-2/+34
| | | | | | [ 1005891 ] support --with-tsc on PPC plus a trivial change to settscdump's docstring and a Misc/NEWS entry.
* code_new(): Wouldn't compile on Windows, because of gcc'ism.Tim Peters2004-08-121-1/+1
|
* Fix bugMichael W. Hudson2004-08-121-27/+88
| | | | | | | | | | [ 1005248 ] new.code() not cleanly checking its arguments using the result of new.code() can still destroy the sun, but merely calling the function shouldn't any more. I also rewrote the existing tests of new.code() to use vastly less un-bogus arguments, and added tests for the previous insane behaviours.
* Patch #1005468: Disambiguate "min() or max()" exception string.Martin v. Löwis2004-08-121-3/+4
|
* This was quite a dark bug in my recent in-place string concatenationArmin Rigo2004-08-071-1/+1
| | | | | | hack: it would resize *interned* strings in-place! This occurred because their reference counts do not have their expected value -- stringobject.c hacks them. Mea culpa.
* Subclasses of string can no longer be interned. The semantics ofJeremy Hylton2004-08-071-0/+5
| | | | | | | | | | | interning were not clear here -- a subclass could be mutable, for example -- and had bugs. Explicitly interning a subclass of string via intern() will raise a TypeError. Internal operations that attempt to intern a string subclass will have no effect. Added a few tests to test_builtin that includes the old buggy code and verifies that calls like PyObject_SetAttr() don't fail. Perhaps these tests should have gone in test_string.
* FixMichael W. Hudson2004-08-071-9/+7
| | | | | | | | | [ 991812 ] PyArg_ParseTuple can miss errors with warnings as exceptions as suggested in the report. This is definitely a 2.3 candidate (as are most of the checkins I've made in the last month...)
* SF bug #1004088: big code objects (>64K) may be optimized incorrectlyRaymond Hettinger2004-08-061-0/+5
| | | | Will backport.
* SF patch #980695: efficient string concatenationRaymond Hettinger2004-08-061-2/+91
| | | | (Original patch by Armin Rigo).
* Revert 2.312; turns out interning the file name did do some good (reducingMichael W. Hudson2004-08-041-1/+1
| | | | .pyc size) after all.
* Don't intern the filename of a file being compiled.Michael W. Hudson2004-08-031-1/+1
| | | | | Hard to believe it ever helped anything, and it hurts finding reference leaks.
* Fix for the unfortunate fact that PyDict_GetItem and PyObject_GetItemMichael W. Hudson2004-08-021-2/+4
| | | | | | | have differing refcount semantics. If anyone sees a prettier way to acheive the same ends, then please go for it. I think this is the first time I've ever used Py_XINCREF.
* for some reason, the lack of adherence to Python's C whitespace rulesMichael W. Hudson2004-08-021-2/+2
| | | | must have annoyed me at some point.
* fix for @decorators under a debug build.Anthony Baxter2004-08-021-0/+1
|
* Completed the patch for Bug #215126.Raymond Hettinger2004-08-022-5/+9
| | | | | | | * Fixes an incorrect variable in a PyDict_CheckExact. * Allow general mapping locals arguments for the execfile() function and exec statement. * Add tests.
* PEP-0318, @decorator-style. In Guido's words:Anthony Baxter2004-08-022-1099/+1252
| | | | | "@ seems the syntax that everybody can hate equally" Implementation by Mark Russell, from SF #979728.
* PyImport_ExecCodeModuleEx(): remove module from sys.modules in error cases.Tim Peters2004-08-021-16/+46
| | | | | | | | PyImport_ReloadModule(): restore the module to sys.modules in error cases. load_package(): semantic-neutral refactoring from an earlier stab at this patch; giving it a common error exit made the code easier to follow, so retaining that part. _RemoveModule(): new little utility to delete a key from sys.modules.
* lock_held() docs: Use True/False instead of 1/0. The LaTeX docs wereTim Peters2004-08-011-3/+3
| | | | already correct, so not changed here.
* Trimmed trailing whitespace.Tim Peters2004-08-011-2/+2
|
* Patch #984714: Properly diagnose E_DECODE errors.Martin v. Löwis2004-07-211-0/+3
| | | | Backported to 2.3.
* Check the type of values returned by __int__, __float__, __long__,Neil Schemenauer2004-07-191-2/+20
| | | | | | __oct__, and __hex__. Raise TypeError if an invalid type is returned. Note that PyNumber_Int and PyNumber_Long can still return ints or longs. Fixes SF bug #966618.
* Upgrade None assignment SyntaxWarning to a SyntaxError.Raymond Hettinger2004-07-171-7/+6
|
* optimize_code(): Repaired gross error in new special-casing for None.Tim Peters2004-07-171-1/+2
| | | | | | The preceding case statement was missing a terminating "break" stmt, so fell into the new code by mistake. This caused uncaught out-of-bounds accesses to the "names" tuple, leading to a variety of insane behaviors.
* Treat None as a constant.Raymond Hettinger2004-07-161-4/+20
|
* Fix for 838140: don't call NSUnlinkModule when we fail to find ourJack Jansen2004-07-151-2/+2
| | | | | | expected entrypoint. The unlinking will crash the application if the module contained ObjC code. The price of this is small: a little wasted memory, and only in a case than isn't expected to occur often.
* Moved PyMac_GetScript() to _localemodule, which is the only place whereJack Jansen2004-07-151-24/+0
| | | | it is used, and made it private. Should fix #978662.
* This is Pete Shinners' patch from his bug reportMichael W. Hudson2004-07-141-10/+30
| | | | | | | | [ 984722 ] Py_BuildValue loses reference counts on error I'm ever-so-slightly uneasy at the amount of work this can do with an exception pending, but I don't think that this can result in anything more serious than a strange error message.
* Add PyArg_VaParseTupleAndKeywords(). Document this function andBrett Cannon2004-07-101-0/+36
| | | | | | PyArg_VaParse(). Closes patch #550732. Thanks Greg Chapman.
* Fix a couple of signed/unsigned comparison warningsNeal Norwitz2004-07-081-1/+1
|
* Remove unused macros in .c filesNeal Norwitz2004-07-082-8/+0
|
* This closes patch:Michael W. Hudson2004-07-074-14/+5
| | | | | | | | | | | | | | | | | [ 960406 ] unblock signals in threads although the changes do not correspond exactly to any patch attached to that report. Non-main threads no longer have all signals masked. A different interface to readline is used. The handling of signals inside calls to PyOS_Readline is now rather different. These changes are all a bit scary! Review and cross-platform testing much appreciated.
* * Fix missing return after error message is set.Raymond Hettinger2004-07-061-1/+2
| | | | * Add a test case that would have caught it.
* When importing an extension on Windows, the code reads the PE 'importThomas Heller2004-07-021-0/+12
| | | | | | | | | | | | | | | | | | table' of the dll, to make sure that the dll really was build for the correct Python version. It does this by looking for an entry 'pythonXY.dll' (X.Y is the Python version number). The code now checks the size of the dll's import table before reading entries from it. Before this patch, the code crashed trying to read the import table when the size was zero (as in Win2k's wmi.dll, for example). Look for imports of 'pythonXY_d.dll' in a debug build instead of 'pythonXY.dll'. Fixes SF 951851: Crash when reading "import table" of certain windows dlls. Already backported to the 2.3 branch.
* SF Bug #215126: Over restricted type checking on eval() functionRaymond Hettinger2004-07-022-10/+29
| | | | | | The builtin eval() function now accepts any mapping for the locals argument. Time sensitive steps guarded by PyDict_CheckExact() to keep from slowing down the normal case. My timings so no measurable impact.
* Patch #923098: Share interned strings in marshal.Martin v. Löwis2004-06-272-24/+83
|
* Patch #966493: Cleanup generator/eval_frame exposure.Martin v. Löwis2004-06-271-14/+6
|
* Get ceval.c to compile again by moving declarations before other statments.Raymond Hettinger2004-06-261-1/+2
|
* Massive performance improvement for C extension and builtin tracing codeNicholas Bastin2004-06-251-51/+27
|
* Move NOP to end of code transformation.Raymond Hettinger2004-06-241-3/+7
|
* Less ugly #ifdefs for C profiling fixNicholas Bastin2004-06-221-12/+5
|
* One forgotten C profiling #ifdefNicholas Bastin2004-06-221-1/+2
|
* Making C profiling a configure option (at least temporarily)Nicholas Bastin2004-06-221-0/+12
|
* Install two code generation optimizations that depend on NOP.Raymond Hettinger2004-06-212-3/+33
| | | | Reduces the cost of "not" to almost zero.
* Performance tweak: allow stack_pointer and oparg to be register variables.Armin Rigo2004-06-171-7/+16
| | | | SF patch #943898
* Remove compiler warningNeal Norwitz2004-06-131-1/+1
|
* Make private function staticNeal Norwitz2004-06-131-1/+1
|