summaryrefslogtreecommitdiffstats
path: root/Python
Commit message (Collapse)AuthorAgeFilesLines
* SF "bug" 115973: patches from Norman Vine so that shared libraries andTim Peters2000-10-051-0/+5
| | | | Tkinter work under Cygwin. Accepted on faith & reasonableness.
* Detect conflicting Python DLL on module import under Windows - as per [ ↵Mark Hammond2000-10-051-1/+152
| | | | Patch #101676 ]
* _PyImport_Fini(): Closed small memory leak when an embedded app callsBarry Warsaw2000-10-031-0/+2
| | | | | Py_Initialize()/Py_Finalize() in a loop. _PyImport_Filetab needed to be deallocated. Partial closure of SF #110681, Jitterbug PR#398.
* The 2.0b2 change to write .pyc files in exclusive mode (if possible)Tim Peters2000-09-291-1/+6
| | | | | | | | unintentionally caused them to get written in text mode under Windows. As a result, when .pyc files were later read-- in binary mode --the magic number was always wrong (note that .pyc magic numbers deliberately include \r and \n characters, so this was "good" breakage, 100% across all .pyc files, not random corruption in a subset). Fixed that.
* Rationalize use of limits.h, moving the inclusion to Python.h.Fred Drake2000-09-266-24/+0
| | | | | | | | Add definitions of INT_MAX and LONG_MAX to pyport.h. Remove includes of limits.h and conditional definitions of INT_MAX and LONG_MAX elsewhere. This closes SourceForge patch #101659 and bug #115323.
* Andrew Kuchling <akuchlin@mems-exchange.org>:Fred Drake2000-09-231-0/+27
| | | | | | | Add three new convenience functions to the PyModule_*() family: PyModule_AddObject(), PyModule_AddIntConstant(), PyModule_AddStringConstant(). This closes SourceForge patch #101233.
* Special case the "s#" PyArg_Parse() token for Unicode objects:Marc-André Lemburg2000-09-211-26/+53
| | | | | | | | | | | | "s#" will now return a pointer to the default encoded string data of the Unicode object instead of a pointer to the raw UTF-16 data. The latter is still available via PyObject_AsReadBuffer(). The patch also adds an optimization for string objects which is based on the fact that string objects return the raw character data for getreadbuffer access and are always single-segment.
* On Unix, use O_EXCL when creating the .pyc/.pyo files, to avoid a race conditionGuido van Rossum2000-09-201-1/+31
|
* This patch adds a new Python C API called PyString_AsStringAndSize()Marc-André Lemburg2000-09-192-12/+7
| | | | | | | | | | | | | which implements the automatic conversion from Unicode to a string object using the default encoding. The new API is then put to use to have eval() and exec accept Unicode objects as code parameter. This closes bugs #110924 and #113890. As side-effect, the traditional C APIs PyString_Size() and PyString_AsString() will also accept Unicode objects as parameters.
* Obscure marshal fixes:Tim Peters2000-09-191-4/+4
| | | | | | | | When reading a short, sign-extend on platforms where shorts are bigger than 16 bits. When reading a long, repair the unportable sign extension that was being done for 64-bit machines (it assumed that signed right shift sign-extends).
* 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