summaryrefslogtreecommitdiffstats
path: root/Python
Commit message (Collapse)AuthorAgeFilesLines
* Mark discovered a bug in his patch: he didn't *use* PyExc_WindowsErrorGuido van Rossum2000-03-021-1/+1
| | | | in PyErr_SetFromWindowsErrWithFilename() like he intended to... :-)
* Massive patch by Skip Montanaro to add ":name" to as manyGuido van Rossum2000-02-293-21/+21
| | | | PyArg_ParseTuple() format string arguments as possible.
* Allow using long integers as slice indexesAndrew M. Kuchling2000-02-231-2/+34
|
* Remove comment that Guido agree's doesn't make sense:Fred Drake2000-02-211-2/+0
| | | | | PyEval_EvalCode() is *not* a "backward compatible interface", it's the one to use!
* Mark pointed out a buglet in his patch: i < _sys_nerr isn't strongGuido van Rossum2000-02-211-1/+1
| | | | | enough, it could be negative. Add i > 0 test. (Not i >= 0; zero isn't a valid error number.)
* Patch by Mark Hammond:Guido van Rossum2000-02-171-15/+75
| | | | | | | | | | * Changes to a recent patch by Chris Tismer to errors.c. Chris' patch always used FormatMessage() to get the error message passing the error code from errno - but errno and FormatMessage use a different numbering scheme. The main reason the patch looked OK was that ENOFILE==ERROR_FILE_NOT_FOUND - but that is about the only shared error code :-). The MS CRT docs tell you to use _sys_errlist()/_sys_nerr. My patch does also this, and adds a very similar function specifically for win32 error codes.
* Changes by Mark Hammond related to the new WindowsError exception.Guido van Rossum2000-02-171-0/+6
|
* Patch by Jack Jansen:Guido van Rossum2000-02-141-0/+12
| | | | | | If we attempt to import a dynamic module in a newer (or older) version of Python give an error message tailored to the situation (Python too new/old).
* The rest of the changes by Trent Mick and Dale Nagata for warning-freeGuido van Rossum2000-01-202-1/+5
| | | | compilation on NT Alpha. Mostly added casts etc.
* Fix a bug in exec_statement() noted incidentally by Tim Peters inGuido van Rossum2000-01-121-20/+13
| | | | | | | | | PR#175 -- when exec is passed a code object, it didn't sync the locals from the dictionary back into their fast representation. Also took the time to remove some repetitive code there and to do the syncing even when an exception is raised (since a partial effect should still be synced).
* Adjusted apply() docstring based on comments from Gerrit HollFred Drake1999-12-231-3/+4
| | | | <gerrit.holl@pobox.com>.
* Cleanup patches from Greg Stein:Guido van Rossum1999-12-2211-75/+64
| | | | | | | | | | | | | | | | | | | * in import.c, #ifdef out references to dynamic loading based on HAVE_DYNAMIC_LOADING * clean out the platform-specific crud from importdl.c. [ maybe fold this function into import.c and drop the importdl.c file? Greg.] * change GetDynLoadFunc's "funcname" parameter to "shortname". change "name" to "fqname" for clarification. * each GetDynLoadFunc now creates its own funcname value. WARNING: as I mentioned previously, we may run into an issue with a missing "_" on some platforms. Testing will show this pretty quickly, however. * move pathname munging into dynload_shlib.c
* Vladimir Marangozov:Guido van Rossum1999-12-211-1/+1
| | | | | | Here's a patch that avoids a warning caused by the "const char* pathname" declaration for _PyImport_GetDynLoadFunc (in dynload_aix). The "aix_load" function's 1st arg is prototyped as "char *pathname".
* For Windows, need to add #include <windows.h>.Guido van Rossum1999-12-201-0/+1
|
* Support for selecting the correct dynload_<platform>.c file.Guido van Rossum1999-12-201-0/+12
| | | | This is part of a set of patches by Greg Stein.
* In _PyImport_Init(), dynamically construct the table of legal suffixesGuido van Rossum1999-12-201-5/+33
| | | | | | | from two static tables (one standard, one provided by the platform's dynload_*.c variant). This is part of a set of patches by Greg Stein.
* Some rearrangements for the importdl.c restructuring.Guido van Rossum1999-12-201-2/+27
| | | | This is part of a set of patches by Greg Stein.
* Moved most of the platform-specific code to dynload_<platform>.c files.Guido van Rossum1999-12-201-1029/+26
| | | | | | (A few nite remain, these will probably disappear soon.) This is part of a set of patches by Greg Stein.
* The old platform-specific contents of importdl.c, broken down into oneGuido van Rossum1999-12-2010-0/+1347
| | | | | | | file per platform (really: per style of Dl API; e.g. all platforms using dlopen() are grouped together in dynload_shlib.c.). This is part of a set of patches by Greg Stein.
* The cleanup code in com-init() at label fail_0000 should removeGuido van Rossum1999-12-201-1/+1
| | | | c_varnames, not c_lnotab.
* Patch by Vladimir Marangozov, inspired by a bug report from GaryGuido van Rossum1999-11-161-1/+7
| | | | | | | Duzan, for AIX, to support C++ objects with static initializers, when using the genuine IBM C++ compiler (namely xlC/xlC_r). See accompanying patches to configure.in and acconfig.h.
* Change the last PyErr_Format %s format to %.400s.Guido van Rossum1999-11-151-1/+1
|
* Fix PR117. The error message is "keywords must be strings". PerhapsGuido van Rossum1999-10-261-0/+5
| | | | | | | | not as descriptive as what Barry suggests, but this also catches the (in my opinion important) case where some other C code besides apply() constructs a kwdict that doesn't have the right format. All the other possibilities of getting it wrong (non-dict, wrong keywords etc) are already caught so this makes sense to check here.
* Mainlining the string_methods branch. See branch revision logBarry Warsaw1999-10-121-42/+67
| | | | messages for specific changes.
* In PySys_GetObject(), it's possible that tstate->interp->sysdict isGuido van Rossum1999-10-051-0/+2
| | | | | | NULL. In that case, return NULL rather than dumping core. This fixes PR#91, submitted by Lele Gaifax.
* Tim Peters fixed PR#75: very long lines cause incorrect tracebacks.Guido van Rossum1999-09-181-2/+11
|
* Tim Peters writes:Guido van Rossum1999-09-151-1/+1
| | | | | | | | For a long time I've seen absurd tracebacks under -O (e.g., negative line numbers), but very rarely. Since I was looking at tracebacks anyway, thought I'd track it down. Turns out to be Guido's only predictable blind spot <wink -- "char" is signed on some non-GvR systems>. Patch follows.
* Tim Peters discovered a bug in the Python-supplied getopt():Guido van Rossum1999-09-131-1/+2
| | | | | it doesn't recognize a lone dash as a non-flag argument. Now it does.
* call_trace(): A fix for PR#73, if an exception occurred in theBarry Warsaw1999-09-081-0/+8
| | | | | | tracefunc (or profilefunc -- we're not sure which), zap the global trace and profile funcs so that we can't get into recursive loop when instantiating the resulting class based exception.
* Vladimir Marangozov fixes an AIX-specific problem, writing:Guido van Rossum1999-08-041-4/+7
| | | | | | | | | | | | | """ Following up Robin Dunn's troubles with freeze, here's a patch that fixes an oddity regarding the import logic of shared modules on AIX. Symbol resolution of shared modules is now handled properly for the cases when the python library is linked to a binary with an arbitrary name. This includes the standard python[version] executable, but also applications that are embedding the python core (i.e. linked with libpython[version].a, the latter being static or shared). """
* Fixed order of parameters in slice() docstring. The Library ReferenceFred Drake1999-07-191-1/+1
| | | | had it right! Reported by Tim Hochberg <tim.hochberg@ieee.org>.
* Marc-Andre Lemburg discovered that the switch from .pyc to .pyo files,Guido van Rossum1999-07-081-2/+2
| | | | | done by _PyImport_Init(), comes to late to affect the import of exceptions.py by _PyBuiltin_Init_2(). Move _PyImport_Init() up few lines.
* Patch by Tim Peters:Guido van Rossum1999-06-222-2/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce a new builtin exception, UnboundLocalError, raised when ceval.c tries to retrieve or delete a local name that isn't bound to a value. Currently raises NameError, which makes this behavior a FAQ since the same error is raised for "missing" global names too: when the user has a global of the same name as the unbound local, NameError makes no sense to them. Even in the absence of shadowing, knowing whether a bogus name is local or global is a real aid to quick understanding. Example: D:\src\PCbuild>type local.py x = 42 def f(): print x x = 13 return x f() D:\src\PCbuild>python local.py Traceback (innermost last): File "local.py", line 8, in ? f() File "local.py", line 4, in f print x UnboundLocalError: x D:\src\PCbuild> Note that UnboundLocalError is a subclass of NameError, for compatibility with existing class-exception code that may be trying to catch this as a NameError. Unfortunately, I see no way to make this wholly compatible with -X (see comments in bltinmodule.c): under -X, [UnboundLocalError is an alias for NameError --GvR]. [The ceval.c patch differs slightly from the second version that Tim submitted; I decided not to raise UnboundLocalError for DELETE_NAME, only for DELETE_LOCAL. DELETE_NAME is only generated at the module level, and since at that level a NameError is raised for referencing an undefined name, it should also be raised for deleting one.]
* CRITICAL PATCH!Guido van Rossum1999-06-181-5/+23
| | | | | | | | | | | | | | We occasionally received reports from people getting "invalid tstate" crashes (this is a fatal error in PyThreadState_Delete()). Finally several people were able to reproduce it reliably and Tim Peters discovered that there is a race condition when multiple threads are calling this function without holding the global interpreter lock (the function may be called without holding that). Solved the race condition by adding a lock around the mutating uses of interp->tstate_head. Tim and Jonathan Giddy have run tests that make it likely that this fixes the crashes -- although Tim hasn't heard from the person who reported the original problem.
* # Darn! Local variable l declared but not used in abstract_issubclass().Guido van Rossum1999-06-171-1/+1
|
* Patch by Jim Fulton (code style tweaked a bit) to supportGuido van Rossum1999-06-161-17/+94
| | | | | | | | | | | | | | | | ExtensionClasses in isinstance() and issubclass(). - abstract instance and class protocols are used *only* in those cases that would generate errors before the patch. That is, there's no penalty for the normal case. - instance protocol: an object smells like an instance if it has a __class__ attribute that smells like a class. - class protocol: an object smells like a class if it has a __bases__ attribute that is a tuple with elements that smell like classes (although not all elements may actually get sniffed ;).
* Allow longer strings (up to 80 chars each) for version, build,Guido van Rossum1999-04-221-2/+2
| | | | compiler info.
* Patch by Christian Tismer for Win32, to use FormatMessage() instead ofGuido van Rossum1999-04-211-2/+29
| | | | strerror(). This improves the quality of the error messages.
* While I can't really test this thoroughly, Pat Knight and the SolarisGuido van Rossum1999-04-131-1/+2
| | | | | | man pages suggest that the proper thing to do is to add THR_NEW_LWP to the flags on thr_create(), and that there really isn't a downside, so I'll do that.
* Win/CE thread support by Mark Hammond.Guido van Rossum1999-04-081-0/+201
|
* Alas, get rid of the Win specific hack to ask the user to press ReturnGuido van Rossum1999-04-071-47/+0
| | | | | before exiting when an error happened. This didn't work right when Python is invoked from a daemon.
* Changes by Mark Hammond for Windows CE. Mostly of the formGuido van Rossum1999-04-075-0/+18
| | | | #ifdef DONT_HAVE_header_H ... #endif around #include <header.h>.
* Remove unused variable from complex_from_string() code.Guido van Rossum1999-04-071-1/+1
|
* Patch by Nick and Stephanie Lockwood to implement complex() with a stringGuido van Rossum1999-03-251-4/+133
| | | | argument. This closes TODO item 2.19.
* New builtin buffer() creates a derived read-only buffer from anyGuido van Rossum1999-03-191-0/+24
| | | | object that supports the buffer interface (e.g. strings, arrays).
* Rob Riggs wrote:Guido van Rossum1999-03-151-2/+2
| | | | | | | | | | | | | | | """ Spec says that on success pthread_create returns 0. It does not say that an error code will be < 0. Linux glibc2 pthread_create() returns ENOMEM (12) when one exceed process limits. (It looks like it should return EAGAIN, but that's another story.) For reference, see: http://www.opengroup.org/onlinepubs/7908799/xsh/pthread_create.html """ [I have a feeling that similar bugs were fixed before; perhaps someone could check that all error checks no check for != 0?]
* Always test for an error return (usually NULL or -1) without settingGuido van Rossum1999-03-091-3/+4
| | | | an exception.
* (initerrors): Make sure that the exception tuples ("base-classes" whenBarry Warsaw1999-02-241-8/+18
| | | | | string-based exceptions are used) reflect the real class hierarchy, i.e. that SystemExit derives from Exception not StandardError.
* Patch by Tim Peters to improve the range checks for range() andGuido van Rossum1999-02-231-30/+48
| | | | | | | xrange(), especially for platforms where int and long are different sizes (so sys.maxint isn't actually the theoretical limit for the length of a list, but the largest C int is -- sys.maxint is the largest Python int, which is actually a C long).
* Patch by Tommy Burnette to accept an arbitrary sequence when "(...)"Guido van Rossum1999-02-171-7/+10
| | | | | is used in the format string, instead of requiring a tuple. This is in line with the general trend towards accepting arbitrary sequences.