summaryrefslogtreecommitdiffstats
path: root/Python
Commit message (Collapse)AuthorAgeFilesLines
* User the repr for a module name in more placesBrett Cannon2013-11-221-3282/+3283
|
* Remove a commented-out lineBrett Cannon2013-11-221-125/+125
|
* Don't assume trying to find a builtin will succeed (e.g. posix isn't on Windows)Brett Cannon2013-11-221-194/+198
|
* Implement PEP 451 (ModuleSpec).Eric Snow2013-11-222-3327/+4094
|
* Issue #19619: Blacklist non-text codecs in method APINick Coghlan2013-11-221-16/+122
| | | | | | | | | | str.encode, bytes.decode and bytearray.decode now use an internal API to throw LookupError for known non-text encodings, rather than attempting the encoding or decoding operation and then throwing a TypeError for an unexpected output type. The latter mechanism remains in place for third party non-text encodings.
* Better behavior when stepping over yield[from]. Fixes issue 16596. By Xavier ↵Guido van Rossum2013-11-211-0/+5
| | | | de Gaye.
* Issue #19183: too many tests depend on the sort order of repr().Christian Heimes2013-11-201-3/+0
| | | | The bitshift and xor op for 32bit builds has changed the order of hash values.
* ssue #19183: Implement PEP 456 'secure and interchangeable hash algorithm'.Christian Heimes2013-11-204-8/+458
| | | | Python now uses SipHash24 on all major platforms.
* Issue #9566, #19617: Fix more compiler warnings in compile.c on Windows 64-bitVictor Stinner2013-11-191-10/+13
|
* Issue #9566, #19617: New try to fix compilation on WindowsVictor Stinner2013-11-191-1/+1
| | | | | Some compilers (ex: Visual Studio) decode -2147483648 as a unsigned integer instead of an signed integer.
* Issue #9566, #19617: Fix compilation on WindowsVictor Stinner2013-11-191-2/+2
| | | | INT32_MIN and INT32_MAX constants are unknown on Windows.
* Issue #9566: compile.c uses Py_ssize_t instead of int to store sizes to fixVictor Stinner2013-11-191-48/+68
| | | | | | | compiler warnings on Windows 64-bit. Use Py_SAFE_DOWNCAST() where the final downcast is needed. The bytecode doesn't support integer parameters larger than 32-bit yet.
* Add _PyUnicodeWriter_WriteASCIIString() functionVictor Stinner2013-11-191-9/+9
|
* Issue #12892: The utf-16* and utf-32* codecs now reject (lone) surrogates.Serhiy Storchaka2013-11-191-17/+146
| | | | | | | | | | The utf-16* and utf-32* encoders no longer allow surrogate code points (U+D800-U+DFFF) to be encoded. The utf-32* decoders no longer decode byte sequences that correspond to surrogate code points. The surrogatepass error handler now works with the utf-16* and utf-32* codecs. Based on patches by Victor Stinner and Kang-Hao (Kenny) Lu.
* PY_FORMAT_SIZE_T should not be used with PyErr_Format(), PyErr_Format("%zd") isVictor Stinner2013-11-181-2/+1
| | | | portable
* Use Py_ssize_t type for sizes in getargs.cVictor Stinner2013-11-181-7/+18
| | | | Fix compiler warnings on Windows 64-bit
* Fix compiler warning (on Windows 64-bit): explicit cast Py_ssize_t to unsignedVictor Stinner2013-11-151-2/+2
| | | | char, n is in range [0; 255] (a tuple cannot have a negative length)
* Fix compiler warning in win32_urandom(): explicit cast to DWORD inVictor Stinner2013-11-151-1/+1
| | | | CryptGenRandom()
* (Merge 3.3) fileutils.c: use MAXPATHLEN instead of PATH_MAXVictor Stinner2013-11-151-6/+6
|\ | | | | | | PATH_MAX is not declared on IRIX nor Windows.
| * fileutils.c: use MAXPATHLEN instead of PATH_MAXVictor Stinner2013-11-151-6/+6
| | | | | | | | PATH_MAX is not declared on IRIX nor Windows.
* | (Merge 3.3) sysmodule.c: fix sys_update_path(), use Py_ARRAY_LENGTH() to getVictor Stinner2013-11-151-1/+1
|\ \ | |/ | | | | | | | | the size of the fullpath buffer, not PATH_MAX. fullpath is declared using MAXPATHLEN or MAX_PATH depending on the OS, and PATH_MAX is not declared on IRIX.
| * sysmodule.c: fix sys_update_path(), use Py_ARRAY_LENGTH() to get the size ofVictor Stinner2013-11-151-1/+1
| | | | | | | | | | the fullpath buffer, not PATH_MAX. fullpath is declared using MAXPATHLEN or MAX_PATH depending on the OS, and PATH_MAX is not declared on IRIX.
* | (Merge 3.3) pythonrun.c: fix Py_GetPythonHome(), use Py_ARRAY_LENGTH() to getVictor Stinner2013-11-151-2/+3
|\ \ | |/ | | | | | | the size of the env_home buffer, not PATH_MAX+1. env_home is declared using MAXPATHLEN+1, and PATH_MAX is not declared on IRIX.
| * pythonrun.c: fix Py_GetPythonHome(), use Py_ARRAY_LENGTH() to get the size ofVictor Stinner2013-11-151-2/+3
| | | | | | | | | | the env_home buffer, not PATH_MAX+1. env_home is declared using MAXPATHLEN+1, and PATH_MAX is not declared on IRIX.
* | Close 19609: narrow scope of codec exc chainingNick Coghlan2013-11-151-4/+6
| |
* | Issue #19437: Fix init_builtin(), handle _PyImport_FindExtensionObject()Victor Stinner2013-11-141-1/+5
| | | | | | | | failure
* | Add unused third arg for the benefit of Valgrind.Stefan Krah2013-11-141-1/+1
| |
* | Issue #19437: Fix fold_unaryops_on_constants() of the peephole optimizer, clearVictor Stinner2013-11-141-0/+1
| | | | | | | | the exception when PyList_Append() fails
* | Close #17828: better handling of codec errorsNick Coghlan2013-11-131-0/+18
| | | | | | | | | | | | | | | | - output type errors now redirect users to the type-neutral convenience functions in the codecs module - stateless errors that occur during encoding and decoding will now be automatically wrapped in exceptions that give the name of the codec involved
* | Issue #19437: Fix PyImport_ImportModuleLevelObject(), handleVictor Stinner2013-11-131-0/+4
| | | | | | | | PyUnicode_Substring() failure (ex: MemoryError)
* | Issue #19515: Remove identifiers duplicated in the same file.Victor Stinner2013-11-121-4/+2
| | | | | | | | Patch written by Andrei Dorian Duma.
* | 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
| |