summaryrefslogtreecommitdiffstats
path: root/Python
Commit message (Collapse)AuthorAgeFilesLines
* Patch #636005: Filter unicode into unicode.Martin v. Löwis2003-01-251-0/+62
|
* Raise a TypeError if a float is passed when an integer is specified.Neil Schemenauer2003-01-241-6/+24
| | | | | Calling PyInt_AsLong() on a float truncates it which is almost never the desired behavior. This closes SF bug #660144.
* MacPython-OS9 has had an abort() function for quite a while now, so there's ↵Jack Jansen2003-01-241-3/+0
| | | | no reason to stall in an endless loop, just call abort() on a fatal error.
* MacPython-OS9 specific fix: If there are non-string items on sys.path don't ↵Jack Jansen2003-01-241-15/+18
| | | | try to intern them. This has the theoretical problem that resource filenames on sys.path cannot be unicode objects, but in practice that shouldn't matter.
* Patch #671459: Invoke import hooks in Py_NewInterpreter.Martin v. Löwis2003-01-221-0/+1
|
* Don't use Posix semaphores on Solaris 8. Fixes #662787.Martin v. Löwis2003-01-211-1/+1
|
* SF patch #670367: Micro-optimizations for ceval.cRaymond Hettinger2003-01-191-18/+13
| | | | | | | | | | | | | | | | | | | | Make the code slightly shorter, faster, and easier to read. * Eliminate unused DUP_TOPX code for x==1. compile.c always generates DUP_TOP instead. * Since only two cases remain for DUP_TOPX, replace the switch-case with if-elseif. * The in-lined integer compare does a CheckExact on both arguments. Since the second is a little more likely to fail, test it first. * The switch-case for IS/IS_NOT and IN/NOT_IN can separate the regular and inverted cases with no additional work. For all four paths, saves a test and jump.
* It turns out that some calls return AEDesc records that are "borrowed",Jack Jansen2003-01-171-0/+1
| | | | | | | the AEDesc data shouldn't be disposed when the Python object is. Added a C call AEDesc_NewBorrowed() to create these objects and a Python method old=AEDesc.AutoDispose(onoff) to change auto-dispose state.
* A. Lloyd Flanagan pointed out a spelling error on c.l.py.Michael W. Hudson2003-01-161-1/+1
|
* Replaced POP() with STACKADJ(-1) on lines where the result wasn't used.Raymond Hettinger2003-01-141-2/+2
| | | | | | The two are semantically equivalent, but the first triggered a compiler warning about an unused variable. Note, the preceding steps had already accessed and decreffed the variable so the reference counts were fine.
* As discussed on python-dev, removed from DUP_TOPX support for theRaymond Hettinger2003-01-101-35/+0
| | | | | | | | parameter being either four or five. Currently, compile.c does not generate calls with a parameter higher than three. May have to be reverted if the second alpha or beta shakes out some other tool generating this op code with a parameter of four or five.
* As discussed briefly on python-dev, add Pending Deprecation WarningNeal Norwitz2003-01-101-3/+5
| | | | | when a string exception is raised. Note that raising string exceptions is deprecated in an exception message.
* SF patch #664320: Replace push/pop clusters in ceval.cRaymond Hettinger2003-01-091-150/+167
| | | | | | | | | | | Replaced groups of pushes and pops with indexed access to the stack and a single adjustment (if needed) to the stacklevel. Avoids scores of unnecessary increments and decrements to the stackpointer. Removes unnecessary sequential dependencies so that the compiler has more freedom for optimizations. Frees the processor for more parallel and pipelined execution by using mostly read-only access and having few pointer adjustments just prior to a read or write.
* Patch #664376: sys.path[0] should contain absolute pathname.Thomas Heller2003-01-081-0/+12
| | | | | | | | This fixes the problem on Windows - that's the only system where I can test it. It leaves sys.argv alone and only changes sys.path[0] to an absolute pathname.
* SF bug #655271: Slightly modify locals() docRaymond Hettinger2003-01-041-1/+1
| | | | Clarify the operation of locals().
* Another copyright update. (JvR: can you backport this to the 2.3a1Guido van Rossum2003-01-021-1/+1
| | | | release branch?)
* SF patch [ 597919 ] compiler package and SET_LINENOJeremy Hylton2002-12-311-0/+3
| | | | | | | | | | | | | | | | | A variety of changes from Michael Hudson to get the compiler working with 2.3. The primary change is the handling of SET_LINENO: # The set_lineno() function and the explicit emit() calls for # SET_LINENO below are only used to generate the line number table. # As of Python 2.3, the interpreter does not have a SET_LINENO # instruction. pyassem treats SET_LINENO opcodes as a special case. A few other small changes: - Remove unused code from pycodegen and pyassem. - Fix error handling in parsermodule. When PyParser_SimplerParseString() fails, it sets an exception with detailed info. The parsermodule was clobbering that exception and replacing it was a generic "could not parse string" exception. Keep the original exception.
* Since the *_Init() are private, prefix with _, suggested by SkipNeal Norwitz2002-12-311-2/+2
|
* Fix SF #639945, 64-bit bug on AIXNeal Norwitz2002-12-311-3/+2
| | | | | | I can't test this on the snake farm (no aix box is working). This change works for the submitter seems correct. Can anybody test this on 32- and 64- bit AIX?
* SF #561244, Micro optimizationsNeal Norwitz2002-12-301-0/+6
| | | | | | Initialize the small integers and __builtins__ in startup. This removes some if conditions. Change XDECREF to DECREF for values which shouldn't be NULL.
* PEP 302 + zipimport:Just van Rossum2002-12-303-20/+240
| | | | | | | | | | | | | - new import hooks in import.c, exposed in the sys module - new module called 'zipimport' - various changes to allow bootstrapping from zip files I hope I didn't break the Windows build (or anything else for that matter), but then again, it's been sitting on sf long enough... Regarding the latest discussions on python-dev: zipimport sets pkg.__path__ as specified in PEP 273, and likewise, sys.path item such as /path/to/Archive.zip/subdir/ are supported again.
* Make error message more specific for min() and max().Raymond Hettinger2002-12-291-1/+1
| | | | Suggested by MvL.
* SF patch #659536: Use PyArg_UnpackTuple where possible.Raymond Hettinger2002-12-291-18/+18
| | | | | | | Obtain cleaner coding and a system wide performance boost by using the fast, pre-parsed PyArg_Unpack function instead of PyArg_ParseTuple function which is driven by a format string.
* Backing out patch #642578 in anticipation of final acceptance of PEP 302.Just van Rossum2002-12-251-147/+0
|
* Squashed compiler warnings by adding casts, making sure prototypes are inJack Jansen2002-12-232-2/+2
| | | | scope and looking at types.
* Oops. Roll back that last change. It wasn't ready for release. :-(Guido van Rossum2002-12-231-96/+30
|
* Add warning for assignment to None, True and False. This is patchGuido van Rossum2002-12-231-30/+96
| | | | 549213 by Jeremy (checking in for him since he's away and busy).
* SF # 654960, remove unnecessary static variableNeal Norwitz2002-12-181-9/+3
| | | | | The static variable (implicit) was not necessary. The c_globals can be None or True now.
* Fixing bugGustavo Niemeyer2002-12-161-2/+2
| | | | | | | | | | | | | | | | | | [#448679] Left to right * Python/compile.c (com_dictmaker): Reordered evaluation of dictionaries to follow strict LTR evaluation. * Lib/compiler/pycodegen.py (CodeGenerator.visitDict): Reordered evaluation of dictionaries to follow strict LTR evaluation. * Doc/ref/ref5.tex Documented the general LTR evaluation order idea. * Misc/NEWS Documented change in evaluation order of dictionaries.
* Got rid of old (non-carbon-ppc and even cfm68k) file extensions forJack Jansen2002-12-161-8/+0
| | | | extension modules.
* Fixed potential crash: v can be NULL here, so use Py_XDECREF rather than ↵Just van Rossum2002-12-151-1/+1
| | | | Py_DECREF
* Added missing casts.Jack Jansen2002-12-132-4/+4
|
* Enhance issubclass() and PyObject_IsSubclass() so that a tuple isWalter Dörwald2002-12-121-1/+3
| | | | | | | | | | | supported as the second argument. This has the same meaning as for isinstance(), i.e. issubclass(X, (A, B)) is equivalent to issubclass(X, A) or issubclass(X, B). Compared to isinstance(), this patch does not search the tuple recursively for classes, i.e. any entry in the tuple that is not a class, will result in a TypeError. This closes SF patch #649608.
* Constify filenames and scripts. Fixes #651362.Martin v. Löwis2002-12-114-61/+63
|
* Patch #650415: Avoid redefinition of macros.Martin v. Löwis2002-12-111-0/+12
|
* Patch #614055: Support OpenVMS.Martin v. Löwis2002-12-062-2/+18
|
* reformat for PEP-7 style conformanceAndrew MacIntyre2002-12-041-121/+132
|
* typo fix: declaration required for VACPP not EMX+gccAndrew MacIntyre2002-12-041-1/+1
|
* Add compile-time errors for unsupported systems.Martin v. Löwis2002-12-021-0/+5
|
* Slightly improved version of patch #642578: "Expose PyImport_FrozenModulesJust van Rossum2002-11-291-0/+147
| | | | | in imp". This adds two functions to the imp module: get_frozenmodules() and set_frozenmodules().
* Patch #632973: Implement _getdefaultlocale for OS X.Martin v. Löwis2002-11-261-5/+16
|
* 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.