Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Issue #19466: Fix typo. Patch written by Vajrasky Kok. | Victor Stinner | 2013-11-12 | 1 | -1/+1 |
| | |||||
* | Close #19466: Clear the frames of daemon threads earlier during the Python | Victor Stinner | 2013-11-12 | 1 | -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 they | Victor Stinner | 2013-11-07 | 7 | -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 anymore | Victor Stinner | 2013-11-07 | 1 | -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 comment | Victor Stinner | 2013-11-06 | 1 | -1/+0 |
| | | | | The comment is meaningless since changeset 4e985a96a612. | ||||
* | Issue #19512: Use the new _PyId_builtins identifier | Victor Stinner | 2013-11-06 | 1 | -1/+1 |
| | |||||
* | Issue #19512: add _PyUnicode_CompareWithId() function | Victor Stinner | 2013-11-06 | 2 | -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-8 | Victor Stinner | 2013-11-06 | 1 | -3/+2 |
| | | | | Replace _PyUnicode_AsString()+strcmp() with PyUnicode_CompareWithASCIIString(). | ||||
* | Issue #19512: builtin print() function uses an identifier instead of literal | Victor Stinner | 2013-11-06 | 1 | -1/+2 |
| | | | | string "flush" to call the flush method | ||||
* | Issue #19512: __build_class() builtin now uses an identifier for the ↵ | Victor Stinner | 2013-11-06 | 1 | -2/+3 |
| | | | | "metaclass" string | ||||
* | Issue #19512: add some common identifiers to only create common strings once, | Victor Stinner | 2013-11-06 | 6 | -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.displayhook | Victor Stinner | 2013-11-06 | 1 | -1/+2 |
| | | | | to only create the "displayhook" string once | ||||
* | Issue #19512: Add _PySys_GetObjectId() and _PySys_SetObjectId() functions | Victor Stinner | 2013-11-06 | 1 | -0/+25 |
| | |||||
* | Issue #19512: eval() and exec() now use an identifier for "__builtins__" string | Victor Stinner | 2013-11-06 | 1 | -6/+7 |
| | |||||
* | Issue #19512: Add PyRun_InteractiveOneObject() function | Victor Stinner | 2013-11-06 | 1 | -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 Stinner | 2013-11-06 | 1 | -6/+4 |
| | | | | key from sys._xoptions | ||||
* | Issue #19512: sys_displayhook() now uses an identifier for "builtins" | Victor Stinner | 2013-11-06 | 1 | -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() failure | Victor Stinner | 2013-11-05 | 1 | -0/+4 |
| | |||||
* | Abstract out stat calls in importlib for easier experimentation. | Brett Cannon | 2013-11-01 | 1 | -2733/+2747 |
| | |||||
* | Issue #19410: Put back in special-casing of '' for | Brett Cannon | 2013-11-01 | 1 | -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 Snow | 2013-11-01 | 1 | -503/+508 |
| | |||||
* | Close #19442: warn_explicit() does nothing when called late during Python ↵ | Victor Stinner | 2013-10-31 | 1 | -9/+9 |
| | | | | | | shutdown After more tests, I now think that it is the safest option. | ||||
* | Issue #19437: Cleanup r_ref() of the marshal module | Victor Stinner | 2013-10-31 | 1 | -5/+6 |
| | |||||
* | Issue #19437: Fix r_object() of marshal module, handle PyDict_SetItem() failure | Victor Stinner | 2013-10-31 | 1 | -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 for | Victor Stinner | 2013-10-31 | 1 | -0/+2 |
| | | | | TYPE_SMALL_TUPLE | ||||
* | Issue #19437: Fix r_PyLong() of marshal module, stop immediatly at first | Victor Stinner | 2013-10-31 | 1 | -4/+11 |
| | | | | failure, don't read any more data | ||||
* | Issue #19437: Fix show_warning() of _warnings, stop at the first error to not | Victor Stinner | 2013-10-31 | 1 | -10/+16 |
| | | | | call a Python function with an exception set | ||||
* | Issue #19437: Fix get_filter() from _warnings, don't call PyObject_IsSubclass() | Victor Stinner | 2013-10-31 | 1 | -2/+10 |
| | | | | with an exception set | ||||
* | merge 3.3 | Benjamin Peterson | 2013-10-31 | 1 | -1/+1 |
|\ | |||||
| * | make string literal const | Benjamin Peterson | 2013-10-31 | 1 | -1/+1 |
| | | |||||
* | | merge 3.3 | Benjamin Peterson | 2013-10-30 | 1 | -3/+3 |
|\ \ | |/ | |||||
| * | update comment | Benjamin Peterson | 2013-10-30 | 1 | -3/+3 |
| | | |||||
* | | Issue #19442: Fix warnings emitted during Python shutdown | Victor Stinner | 2013-10-29 | 1 | -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 surrogate | Victor Stinner | 2013-10-29 | 1 | -47/+55 |
| | | | | | | | | characters. | ||||
* | | Issue #18408: Add a new PyFrame_FastToLocalsWithError() function to handle | Victor Stinner | 2013-10-29 | 3 | -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 Python | Victor Stinner | 2013-10-28 | 1 | -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 Stinner | 2013-10-27 | 1 | -7/+18 |
| | | |||||
* | | Issue #18603: Ensure that PyOS_mystricmp and PyOS_mystrnicmp are in the | Christian Heimes | 2013-10-22 | 1 | -0/+4 |
|\ \ | |/ | | | | | Python executable and not removed by the linker's optimizer. | ||||
| * | Issue #18603: Ensure that PyOS_mystricmp and PyOS_mystrnicmp are in the | Christian Heimes | 2013-10-22 | 1 | -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 Rossum | 2013-10-21 | 1 | -8/+8 |
| | | | | | | | | upside down. | ||||
* | | cleanup the construction of __qualname__ (closes #19301 again) | Benjamin Peterson | 2013-10-20 | 2 | -205/+217 |
| | | |||||
* | | Close #19313: remove no longer needed Py_XINCREF | Nick Coghlan | 2013-10-20 | 1 | -1/+0 |
| | | | | | | | | Eliminates a refleak introduced in commit b4a325275fb0 | ||||
* | | removal u_qualname, since compiler_scope_qualname is only ever called once | Benjamin Peterson | 2013-10-19 | 1 | -8/+0 |
| | | |||||
* | | strengthen condition and add assertion | Benjamin Peterson | 2013-10-19 | 1 | -1/+2 |
| | | |||||
* | | give explicitly global functions and classes a global __qualname__ (closes ↵ | Benjamin Peterson | 2013-10-19 | 2 | -3450/+3247 |
| | | | | | | | | #19301) | ||||
* | | Issue #1772673: The type of `char*` arguments now changed to `const char*`. | Serhiy Storchaka | 2013-10-19 | 6 | -34/+33 |
| | | |||||
* | | Issue #18810: Be optimistic with stat calls when seeing if a directory | Brett Cannon | 2013-10-18 | 1 | -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.FileFinder | Brett Cannon | 2013-10-18 | 1 | -776/+778 |
| | | | | | | | | now that self.path is no longer forced to '.'. | ||||
* | | Issue #18416: Have importlib.machinery.PathFinder treat '' as the cwd | Brett Cannon | 2013-10-18 | 1 | -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 cleanups | Nick Coghlan | 2013-10-18 | 1 | -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 |