summaryrefslogtreecommitdiffstats
path: root/Python
Commit message (Collapse)AuthorAgeFilesLines
* Issue #19466: Fix typo. Patch written by Vajrasky Kok.Victor Stinner2013-11-121-1/+1
|
* Close #19466: Clear the frames of daemon threads earlier during the PythonVictor Stinner2013-11-121-5/+15
| | | | | shutdown to call objects destructors. So "unclosed file" resource warnings are now corretly emitted for daemon threads.
* Issue #19512, #19515: remove shared identifiers, move identifiers where theyVictor Stinner2013-11-077-62/+68
| | | | | | | are used. Move also _Py_IDENTIFIER() defintions to the top in modified files to remove identifiers duplicated in the same file.
* print_error_text() doesn't encode the filename anymoreVictor Stinner2013-11-071-27/+35
| | | | | | Use aslo PyUnicode_FromFormat() to format the line so only one call to PyFile_WriteObject() is needed. tb_displayline() of Python/traceback.c has similar implementation.
* remove an outdated commentVictor Stinner2013-11-061-1/+0
| | | | The comment is meaningless since changeset 4e985a96a612.
* Issue #19512: Use the new _PyId_builtins identifierVictor Stinner2013-11-061-1/+1
|
* Issue #19512: add _PyUnicode_CompareWithId() functionVictor Stinner2013-11-062-2/+3
| | | | | | | _PyUnicode_CompareWithId() is faster than PyUnicode_CompareWithASCIIString() when both strings are equal and interned. Add also _PyId_builtins identifier for "builtins" common string.
* print_exception(): don't encode the module name to UTF-8Victor Stinner2013-11-061-3/+2
| | | | Replace _PyUnicode_AsString()+strcmp() with PyUnicode_CompareWithASCIIString().
* Issue #19512: builtin print() function uses an identifier instead of literalVictor Stinner2013-11-061-1/+2
| | | | string "flush" to call the flush method
* Issue #19512: __build_class() builtin now uses an identifier for the ↵Victor Stinner2013-11-061-2/+3
| | | | "metaclass" string
* Issue #19512: add some common identifiers to only create common strings once,Victor Stinner2013-11-066-41/+56
| | | | | | | instead of creating temporary Unicode string objects Add also more identifiers in pythonrun.c to avoid temporary Unicode string objets for the interactive interpreter.
* Issue #19512: PRINT_EXPR bytecode now uses an identifier to get sys.displayhookVictor Stinner2013-11-061-1/+2
| | | | to only create the "displayhook" string once
* Issue #19512: Add _PySys_GetObjectId() and _PySys_SetObjectId() functionsVictor Stinner2013-11-061-0/+25
|
* Issue #19512: eval() and exec() now use an identifier for "__builtins__" stringVictor Stinner2013-11-061-6/+7
|
* Issue #19512: Add PyRun_InteractiveOneObject() functionVictor Stinner2013-11-061-29/+82
| | | | | Only decode the filename once. PyRun_InteractiveOneObject() uses an identifier for "<string>" string, so the byte string is only decoded once.
* Issue #19512: _print_total_refs() now uses an identifier to get "showrefcount"Victor Stinner2013-11-061-6/+4
| | | | key from sys._xoptions
* Issue #19512: sys_displayhook() now uses an identifier for "builtins"Victor Stinner2013-11-061-2/+10
| | | | | | dictionary key and only decodes "\n" string once to write a newline. So "builtins" and "\n" are only decoded once from UTF-8, at the first call.
* Issue #19437: Fix compiler_class(), handle compiler_lookup_arg() failureVictor Stinner2013-11-051-0/+4
|
* Abstract out stat calls in importlib for easier experimentation.Brett Cannon2013-11-011-2733/+2747
|
* Issue #19410: Put back in special-casing of '' forBrett Cannon2013-11-011-793/+793
| | | | | | | | | importlib.machinery.FileFinder. While originally moved to stop special-casing '' as PathFinder farther up the typical call chain now uses the cwd in the instance of '', it was deemed an unnecessary risk to breaking subclasses of FileFinder to take the special-casing out.
* Issue #19413: Restore pre-3.3 reload() semantics of re-finding modules.Eric Snow2013-11-011-503/+508
|
* Close #19442: warn_explicit() does nothing when called late during Python ↵Victor Stinner2013-10-311-9/+9
| | | | | | shutdown After more tests, I now think that it is the safest option.
* Issue #19437: Cleanup r_ref() of the marshal moduleVictor Stinner2013-10-311-5/+6
|
* Issue #19437: Fix r_object() of marshal module, handle PyDict_SetItem() failureVictor Stinner2013-10-311-3/+12
| | | | for TYPE_DICT and stop immedialty on first r_object() failure
* Issue #19437: Fix r_object() of marshal module, handle r_byte() failure forVictor Stinner2013-10-311-0/+2
| | | | TYPE_SMALL_TUPLE
* Issue #19437: Fix r_PyLong() of marshal module, stop immediatly at firstVictor Stinner2013-10-311-4/+11
| | | | failure, don't read any more data
* Issue #19437: Fix show_warning() of _warnings, stop at the first error to notVictor Stinner2013-10-311-10/+16
| | | | call a Python function with an exception set
* Issue #19437: Fix get_filter() from _warnings, don't call PyObject_IsSubclass()Victor Stinner2013-10-311-2/+10
| | | | with an exception set
* merge 3.3Benjamin Peterson2013-10-311-1/+1
|\
| * make string literal constBenjamin Peterson2013-10-311-1/+1
| |
* | merge 3.3Benjamin Peterson2013-10-301-3/+3
|\ \ | |/
| * update commentBenjamin Peterson2013-10-301-3/+3
| |
* | Issue #19442: Fix warnings emitted during Python shutdownVictor Stinner2013-10-291-5/+12
| | | | | | | | | | Warnings may be emitted during Python shutdown, like "unclosed file XXX". During shutdown, globals()['__main__'] may be None.
* | Issue #19424: Fix the warnings module to accept filename containing surrogateVictor Stinner2013-10-291-47/+55
| | | | | | | | characters.
* | Issue #18408: Add a new PyFrame_FastToLocalsWithError() function to handleVictor Stinner2013-10-293-15/+28
| | | | | | | | | | exceptions when merging fast locals into f_locals of a frame. PyEval_GetLocals() now raises an exception and return NULL on failure.
* | Issue #19421: fix a check in warnings.warn() to be able to use it during PythonVictor Stinner2013-10-281-1/+3
| | | | | | | | | | | | | | finalization. sys.argv is set to None during Python finalization: add PyList_Check() to avoid a crash in PyList_Size().
* | Issue #18520: fix reference leak in _PySys_Init()Victor Stinner2013-10-271-7/+18
| |
* | Issue #18603: Ensure that PyOS_mystricmp and PyOS_mystrnicmp are in theChristian Heimes2013-10-221-0/+4
|\ \ | |/ | | | | Python executable and not removed by the linker's optimizer.
| * Issue #18603: Ensure that PyOS_mystricmp and PyOS_mystrnicmp are in theChristian Heimes2013-10-221-0/+4
| | | | | | | | Python executable and not removed by the linker's optimizer.
* | Issue 19306: Add extra hints to faulthandler stack dumps that they are ↵Guido van Rossum2013-10-211-8/+8
| | | | | | | | upside down.
* | cleanup the construction of __qualname__ (closes #19301 again)Benjamin Peterson2013-10-202-205/+217
| |
* | Close #19313: remove no longer needed Py_XINCREFNick Coghlan2013-10-201-1/+0
| | | | | | | | Eliminates a refleak introduced in commit b4a325275fb0
* | removal u_qualname, since compiler_scope_qualname is only ever called onceBenjamin Peterson2013-10-191-8/+0
| |
* | strengthen condition and add assertionBenjamin Peterson2013-10-191-1/+2
| |
* | give explicitly global functions and classes a global __qualname__ (closes ↵Benjamin Peterson2013-10-192-3450/+3247
| | | | | | | | #19301)
* | Issue #1772673: The type of `char*` arguments now changed to `const char*`.Serhiy Storchaka2013-10-196-34/+33
| |
* | Issue #18810: Be optimistic with stat calls when seeing if a directoryBrett Cannon2013-10-181-769/+768
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | exists when checking for a package. Before there was an isdir check and then various isfile checks for possible __init__ files when looking for a package. This change drops the isdir check by leaning on the assumption that a directory will not contain something named after the module being imported which is not a directory. If the module is a package then it saves a stat call. If there is nothing in the directory with the potential package name it also saves a stat call. Only if there is something in the directory named the same thing as the potential package will the number of stat calls increase (due to more wasteful __init__ checks). Semantically there is no change as the isdir check moved down so that namespace packages continue to have no chance of accidentally collecting non-existent directories.
* | Issue #18416: Fix various os calls in importlib.machinery.FileFinderBrett Cannon2013-10-181-776/+778
| | | | | | | | now that self.path is no longer forced to '.'.
* | Issue #18416: Have importlib.machinery.PathFinder treat '' as the cwdBrett Cannon2013-10-181-3219/+3442
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | and stop importlib.machinery.FileFinder treating '' as '.'. Previous PathFinder transformed '' into '.' which led to __file__ for modules imported from the cwd to always be relative paths. This meant the values of the attribute were wrong as soon as the cwd changed. This change now means that as long as the site module is run (which makes all entries in sys.path absolute) then all values for __file__ will also be absolute unless it's for __main__ when specified by file path in a relative way (modules imported by runpy will have an absolute path). Now that PathFinder is no longer treating '' as '.' it only makes sense for FileFinder to stop doing so as well. Now no transformation is performed for the directory given to the __init__ method. Thanks to Madison May for the initial patch.
* | Issue #16129: Py_SetStandardStreamEncoding cleanupsNick Coghlan2013-10-181-4/+9
| | | | | | | | | | | | | | | | | | - don't call PyErr_NoMemory with interpreter is not initialised - note that it's OK to call _PyMem_RawStrDup here - don't include this in the limited API - capitalise "IO" - be explicit that a non-zero return indicates an error - include versionadded marker in docs