summaryrefslogtreecommitdiffstats
path: root/Python
Commit message (Collapse)AuthorAgeFilesLines
* Make better use of GNU Pth -- patch by Andy Dustman.Guido van Rossum2000-09-191-3/+4
| | | | | | | | | | | | | | | I can't test this, so I'm just checking it in with blind faith in Andy. I've tested that it doesn't broeak a non-Pth build on Linux. Changes include: - There's a --with-pth configure option. - Instead of _GNU_PTH, we test for HAVE_PTH. - Better signal handling. - (The config.h.in file is regenerated in a slightly different order.)
* Deferred the attribute name object type checking to the underlyingMarc-André Lemburg2000-09-181-4/+4
| | | | | | PyObject_Set/GetAttr() calls. This patch fixes bug #113829.
* Add PyOS_getsig() and PyOS_setsig() -- wrappers around signal() orGuido van Rossum2000-09-161-0/+34
| | | | sigaction() (if HAVE_SIGACTION is defined).
* Added B format char to Py_BuildValue (same as b,h,i, but makesJack Jansen2000-09-151-1/+1
| | | | bgen-generated code work).
* Cast UCHAR_MAX to int before doing the comparison for overflow of theJack Jansen2000-09-151-0/+1
| | | | B format char.
* com_continue_stmt(): Improve error message when continue is foundFred Drake2000-09-081-1/+22
| | | | | | in a try statement in a loop. This is related to SourceForge bug #110830.
* This patch hopefully fixes the problem with "es#" and "es" inMarc-André Lemburg2000-09-081-0/+2
| | | | PyArg_ParseTupleAndKeywords() and closes bug #113807.
* The GCC version is loooooooooong; put it on a new line.Guido van Rossum2000-09-051-1/+1
|
* All right. More uniformity, and extra blank lines.Guido van Rossum2000-09-041-1/+4
|
* Use periods, not semicolons between Copyright and All Rights Reserved.Guido van Rossum2000-09-041-3/+3
|
* Fix the char* vs. const char* mismatch for the argument of aix_loaderror()Vladimir Marangozov2000-09-041-1/+1
|
* Change the copyright notice according to CNRI's wishes, withGuido van Rossum2000-09-031-2/+5
| | | | | | | BeOpen.com added to the front. (Even if maybe we won't print this long banner at startup, the string must still be defined for sys.copyright.)
* changed \x to consume exactly two hex digits. implements PEP-223Fredrik Lundh2000-09-021-16/+28
| | | | for 8-bit strings.
* PyInterpreterState_New is not thread-safe, and the recent fix to _PyPcloseTim Peters2000-09-021-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | can cause it to get called by multiple threads simultaneously. Ditto for PyInterpreterState_Delete. Of the former, the docs say "The interpreter lock need not be held, but may be held if it is necessary to serialize calls to this function". This kinda implies it both is and isn't thread-safe. Of the latter, the docs merely say "The interpreter lock need not be held.", and the clause about serializing is absent. I expect it was *believed* these are both thread-safe, and the bit about serializing via the global lock was meant as a permission rather than a caution. I also expect we've never seen a problem here because the Python core (prior to the _PyPclose fix) only calls these functions once per run. The Py_NewInterpreter subsystem exposed by the C API (but not used by Python itself) also calls them, but that subsystem appears to be very rarely used. Whatever, they're both thread-safe now.
* REMOVED all CWI, CNRI and BeOpen copyright markings.Guido van Rossum2000-09-0151-475/+0
| | | | This should match the situation in the 1.6b1 tree.
* Cosmetics on Py_Get/SetRecursionLimit (for the style guide)Vladimir Marangozov2000-09-011-2/+4
|
* code part of patch #100895 by Fredrik LundhJeremy Hylton2000-09-011-4/+124
| | | | | PyErr_Format computes size of buffer needed rather than relying on static buffer.
* Revert removal of void from function definition. Guido sez I can take itTim Peters2000-09-011-1/+1
| | | | | out again after we complete switching to C++ <wink>. Thanks to Greg Stein for hitting me.
* refactor __del__ exception handler into PyErr_WriteUnraisableJeremy Hylton2000-09-011-0/+27
| | | | | add sanity check to gc: if an exception occurs during GC, call PyErr_WriteUnraisable and then call Py_FatalEror.
* Set the recursion limit to 1000 -- 2500 was not enough, let's beGuido van Rossum2000-09-011-1/+1
| | | | conservative.
* Supply missing prototypes for new Py_{Get,Set}RecursionLimit; fixes compiler ↵Tim Peters2000-09-011-1/+1
| | | | | | | wngs; un-analize Get's definition ("void" is needed only in declarations, not defns, & is generally considered bad style in the latter).
* add user-modifiable recursion_limitJeremy Hylton2000-08-312-8/+66
| | | | | | | | | | | ceval.c: define recurion_limit (static), default value is 2500 define Py_GetRecursionLimit and Py_SetRecursionLimit raise RuntimeError if limit is exceeded PC/config.h: remove plat-specific definition sysmodule.c: add sys.(get|set)recursionlimit
* _PySys_Init(): When setting up sys.version_info, use #if/#elif.../#endifFred Drake2000-08-311-6/+3
| | | | | instead of four #if/#endif blocks. This shortens the code and improves readability.
* PyOS_CheckStack(): Better ANSI'fy this while we're at it.Fred Drake2000-08-311-1/+1
|
* Add a comment explaining the return value of PyOS_CheckStack().Fred Drake2000-08-311-1/+4
|
* Better error message with UnboundLocalErrorPaul Prescod2000-08-301-11/+39
|
* eval_code2(): Guido provides this patch for his suggested elaborationBarry Warsaw2000-08-291-2/+2
| | | | | of extended print. If the file object being printed to is None, then sys.stdout is used.
* Replace the run-time 'future-bytecode-stream-inspection' hack to find outThomas Wouters2000-08-273-59/+19
| | | | | | | how 'import' was called with a compiletime mechanism: create either a tuple of the import arguments, or None (in the case of a normal import), add it to the code-block constants, and load it onto the stack before calling IMPORT_NAME.
* Hard to believe Guido compiled this! Function lacked a return stmt.Tim Peters2000-08-271-1/+1
|
* Re-allow 'import mod.submod as s', and change its meaning to what it shouldThomas Wouters2000-08-271-2/+5
| | | | mean; the same as 'from mod import submod as s'.
* Add three new APIs: PyRun_AnyFileEx(), PyRun_SimpleFileEx(),Guido van Rossum2000-08-272-11/+34
| | | | | | | | | | | | | | PyRun_FileEx(). These are the same as their non-Ex counterparts but have an extra argument, a flag telling them to close the file when done. Then this is used by Py_Main() and execfile() to close the file after it is parsed but before it is executed. Adding APIs seems strange given the feature freeze but it's the only way I see to close the bug report without incompatible changes. [ Bug #110616 ] source file stays open after parsing is done (PR#209)
* implements PyOS_CheckStack for Windows and MSVC. this fixes aFredrik Lundh2000-08-271-0/+29
| | | | | | couple of potential stack overflows, including bug #110615. closes patch #101238
* Oops, one pop too many.Thomas Wouters2000-08-271-1/+0
|
* Charles Waldman's patch to reinitialize the interpreter lock after aGuido van Rossum2000-08-271-0/+19
| | | | | | | fork. This solves the test_fork1 problem. (ceval.c, signalmodule.c, intrcheck.c) SourceForge: [ Patch #101226 ] make threading fork-safe
* Fix to [ Bug #111165 ] doc-string removal masked by PYTHONOPTIMIZEMarc-André Lemburg2000-08-251-3/+3
|
* Fix allowable node-types for assignment, need to add 'listmaker'.Thomas Wouters2000-08-251-1/+1
| | | | | | | (This fix is a bit broken, just as the test already was: the test for testlist and listmaker are done always, whereas the test for exprlist and the actual abort() are only done if Py_DEBUG is defined. Suggestions welcome, I guess ;)
* Improve the exceptions raised by PyErr_BadInternalCall(); adding theFred Drake2000-08-241-2/+15
| | | | | | filename and line number of the call site to allow esier debugging. This closes SourceForge patch #101214.
* Support for three-token characters (**=, >>=, <<=) which was written byThomas Wouters2000-08-244-791/+1195
| | | | | Michael Hudson, and support in general for the augmented assignment syntax. The graminit.c patch is large!
* Charles G. Waldman <cgw@fnal.gov>:Fred Drake2000-08-242-2/+38
| | | | | | | | | Add the EXTENDED_ARG opcode to the virtual machine, allowing 32-bit arguments to opcodes instead of being forced to stick to the 16-bit limit. This is especially useful for machine-generated code, which can be too long for the SET_LINENO parameter to fit into 16 bits. This closes the implementation portion of SourceForge patch #100893.
* This patch partly (some stuff went in already) ports Python to Monterey.Trent Mick2000-08-231-0/+11
| | | | | | | | | | - Fix bug in thread_pthread.h::PyThread_get_thread_ident() where sizeof(pthread) < sizeof(long). - Add 'configure' for: - SIZEOF_PTHREAD is pthread_t can be included via <pthread.h> - setting Monterey system name - appropriate CC,LINKCC,LDSHARED,OPT, and CCSHARED for Monterey - Add section in README for Monterey build
* Remove the dependency information for version.o; this is not part ofFred Drake2000-08-231-1/+0
| | | | the sources/build process any more.
* require list comprehensions to start with a for clauseSkip Montanaro2000-08-222-9/+9
|
* com_print_stmt(): Guido rightly points out that the stream expressionBarry Warsaw2000-08-211-5/+22
| | | | | in extended prints should only be evaluated once. This patch plays stack games (documented!) to fix this.
* Thomas reminds me to bump the MAGIC number for the extended printBarry Warsaw2000-08-211-1/+1
| | | | opcode additions.
* PEP 214, Extended print Statement, has been accepted by the BDFL.Barry Warsaw2000-08-212-138/+184
| | | | | | | eval_code2(): Implement new bytecodes PRINT_ITEM_TO and PRINT_NEWLINE_TO, as per accepted SF patch #100970. Also update graminit.c based on related Grammar/Grammar changes.
* PEP 214, Extended print Statement, has been accepted by the BDFL.Barry Warsaw2000-08-211-8/+36
| | | | | | com_print_stmt(): Implement recognition of, and byte compilation for, extended print using new byte codes PRINT_ITEM_TO and PRINT_NEWLINE_TO.
* Fix the bug Sjoerd Mullender discovered, where find_from_args() wasn'tThomas Wouters2000-08-201-1/+3
| | | | | | | | | | trying hard enough to find out what the arguments to an import were. There is no test-case for this bug, yet, but this is what it looked like: from encodings import cp1006, cp1026 ImportError: cannot import name cp1026 '__import__' was called with only the first name in the 'arguments' list.
* Disallow "import mod.submod as m", because the result is ambiguous. Does itThomas Wouters2000-08-191-1/+2
| | | | | | | | | | load mod.submod as m, or mod as m ? Both can be achieved differently, and unambiguously. Also attempt to document this restriction (editor appreciated!) Note that this is an artificial check during compile, because incorporating this in the grammar is hard, and then adjusting the compiler to do the right thing with the right nodes is harder.
* com_error(): Quiet gcc -Wall warning.Barry Warsaw2000-08-181-1/+0
|
* Remove a couple of warnings turned up by "gcc -Wall".Fred Drake2000-08-182-3/+4
|