summaryrefslogtreecommitdiff
path: root/Python
Commit message (Collapse)AuthorAgeFilesLines
...
* bpo-34850: Emit a warning for "is" and "is not" with a literal. (GH-9642)Serhiy Storchaka2019-01-181-0/+47
|
* bpo-35742: Fix test_envar_unimportable in test_builtin. (GH-11561)Serhiy Storchaka2019-01-151-10/+15
| | | | | Handle the case of an empty module name in PYTHONBREAKPOINT. Fixes a regression introduced in bpo-34756.
* bpo-34756: Silence only ImportError and AttributeError in ↵Serhiy Storchaka2019-01-141-0/+6
| | | | sys.breakpointhook(). (GH-9457)
* bpo-16806: Fix `lineno` and `col_offset` for multi-line string tokens (GH-10021)Anthony Sottile2019-01-134-24/+28
|
* bpo-35634: Raise an error when first passed kwargs contains duplicated keys. ↵Serhiy Storchaka2019-01-121-48/+45
| | | | (GH-11438)
* bpo-35494: Improve syntax error messages for unbalanced parentheses in ↵Serhiy Storchaka2019-01-121-4/+27
| | | | f-string. (GH-11161)
* bpo-35582: Inline arguments tuple unpacking in handwritten code. (GH-11524)Serhiy Storchaka2019-01-121-13/+18
| | | | | Inline PyArg_UnpackTuple() and _PyArg_UnpackStack() in performance sensitive code in the builtins and operator modules.
* bpo-35423: Stop using the "pending calls" machinery for signals. (gh-10972)Eric Snow2019-01-111-25/+83
| | | | | This change separates the signal handling trigger in the eval loop from the "pending calls" machinery. There is no semantic change and the difference in performance is insignificant. The change makes both components less confusing. It also eliminates the risk of changes to the pending calls affecting signal handling. This is particularly relevant for some upcoming pending calls changes I have in the works.
* bpo-34569: Fix subinterpreter 32-bit ABI, pystate.c/_new_long_object() ↵Michael Felt2019-01-111-1/+1
| | | | | | (gh-9127) This fixes ShareableTypeTests.test_int() in Lib/test/test__xxsubinterpreters.py.
* bpo-35582: Argument Clinic: Optimize the "all boring objects" case. (GH-11520)Serhiy Storchaka2019-01-114-49/+89
| | | | | Use _PyArg_CheckPositional() and inlined code instead of PyArg_UnpackTuple() and _PyArg_UnpackStack() if all parameters are positional and use the "object" converter.
* bpo-35582: Argument Clinic: inline parsing code for positional parameters. ↵Serhiy Storchaka2019-01-115-33/+124
| | | | (GH-11313)
* bpo-35470: Fix a reference counting bug in ↵Zackery Spytz2019-01-101-1/+0
| | | | _PyImport_FindExtensionObjectEx(). (GH-11128)
* remove doc-string declaration no longer used after AC conversion (GH-11444)Tal Einat2019-01-061-4/+0
|
* Bump copyright years to 2019. (GH-11404)Benjamin Peterson2019-01-021-1/+1
|
* bpo-20182: AC convert Python/sysmodule.c (GH-11328)Tal Einat2018-12-312-409/+1447
|
* bpo-35550: Fix incorrect Solaris define guards (GH-11275)Jakub Kulík2018-12-301-2/+2
| | | | | | | Python source code uses on several places ifdef sun or defined(sun) without the underscores, which is not standard compliant and shouldn't be used. Defines should check for __sun instead. Reference: http://nadeausoftware.com/articles/2012/01/c_c_tip_how_use_compiler_predefined_macros_detect_operating_system#Solaris https://bugs.python.org/issue35550
* bpo-34373: fix test_mktime and test_pthread_getcpuclickid tests on AIX (GH-8726)Michael Felt2018-12-281-0/+14
| | | | | | | | | * Fix test_mktime on AIX by adding code to get mktime to behave the same way as it does on other *nix systems * Fix test_pthread_getcpuclickid in AIX by adjusting the test case expectations when running on AIX in 32-bit mode Patch by Michael Felt.
* bpo-23867: Argument Clinic: inline parsing code for a single positional ↵Serhiy Storchaka2018-12-254-10/+53
| | | | parameter. (GH-9689)
* bpo-34193: Fix pluralization in getargs.c and test cases. (GH-8438)Xtreak2018-12-211-14/+24
|
* bpo-35454: Fix miscellaneous minor issues in error handling. (#11077)Serhiy Storchaka2018-12-115-6/+18
| | | | | | * bpo-35454: Fix miscellaneous minor issues in error handling. * Fix a null pointer dereference.
* bpo-35444: Unify and optimize the helper for getting a builtin object. ↵Serhiy Storchaka2018-12-111-0/+14
| | | | | | | | (GH-11047) This speeds up pickling of some iterators. This fixes also error handling in pickling methods when fail to look up builtin "getattr".
* bpo-35452: Make PySys_HasWarnOptions() never raising an exception. (GH-11075)Serhiy Storchaka2018-12-101-1/+2
|
* bpo-35451: Fix reference counting for sys.warnoptions and sys._xoptions. ↵Serhiy Storchaka2018-12-101-2/+0
| | | | (GH-11063)
* bpo-35441: Remove dead and buggy code related to PyList_SetItem(). (GH-11033)Zackery Spytz2018-12-082-3/+3
| | | | | | | | | | In _localemodule.c and selectmodule.c, remove dead code that would cause double decrefs if run. In addition, replace PyList_SetItem() with PyList_SET_ITEM() in cases where a new list is populated and there is no possibility of an error. In addition, check if the list changed size in the loop in array_array_fromlist().
* bpo-9566: Fix compiler warnings in peephole.c (GH-10652)Victor Stinner2018-12-071-21/+47
|
* bpo-35436: Add missing PyErr_NoMemory() calls and other minor bug fixes. ↵Zackery Spytz2018-12-073-3/+12
| | | | | | (GH-11015) Set MemoryError when appropriate, add missing failure checks, and fix some potential leaks.
* bpo-35414: Add a missing Py_INCREF(Py_None) in PyState_RemoveModule(). ↵Zackery Spytz2018-12-051-0/+1
| | | | (GH-10914)
* bpo-33015: Fix UB in pthread PyThread_start_new_thread (GH-6008)Siddhesh Poyarekar2018-11-301-4/+36
| | | | | | | Fix an undefined behaviour in the pthread implementation of PyThread_start_new_thread(): add a function wrapper to always return NULL. Add pythread_callback struct and pythread_wrapper() to thread_pthread.h.
* bpo-35336: Fix PYTHONCOERCECLOCALE=1 (GH-10806)Victor Stinner2018-11-301-2/+8
| | | | Fix PYTHONCOERCECLOCALE=1 environment variable: only coerce the C locale if the LC_CTYPE locale is "C".
* bpo-30167: Remove __cached__ from __main__ when removing __file__ (GH-7415)INADA Naoki2018-11-291-2/+8
|
* bpo-34100: compile: Re-enable frozenset merging (GH-10760)INADA Naoki2018-11-281-2/+57
| | | This reverts commit 1005c84535191a72ebb7587d8c5636a065b7ed79.
* bpo-33029: Fix signatures of getter and setter functions. (GH-10746)Serhiy Storchaka2018-11-272-3/+4
| | | Fix also return type for few other functions (clear, releasebuffer).
* bpo-34100: Partially revert merge_consts_recursive() (GH-10743)Victor Stinner2018-11-271-50/+0
| | | | | Partically revert commit c2e1607a51d7a17f143b5a34e8cff7c6fc58a091 to fix a reference leak.
* bpo-33012: Fix invalid function cast warnings with gcc 8. (GH-6749)Serhiy Storchaka2018-11-274-14/+14
| | | | | | Fix invalid function cast warnings with gcc 8 for method conventions different from METH_NOARGS, METH_O and METH_VARARGS excluding Argument Clinic generated code.
* bpo-33012: Fix invalid function cast warnings with gcc 8 in Argument Clinic. ↵Serhiy Storchaka2018-11-276-29/+29
| | | | | | | | (GH-6748) Fix invalid function cast warnings with gcc 8 for method conventions different from METH_NOARGS, METH_O and METH_VARARGS in Argument Clinic generated code.
* bpo-31241: Fix AST node position for list and generator comprehensions. ↵Serhiy Storchaka2018-11-272-218/+233
| | | | | | | | (GH-10633) The lineno and col_offset attributes of AST nodes for list comprehensions, generator expressions and tuples are now point to the opening parenthesis or square brace. For tuples without parenthesis they point to the position of the first item.
* bpo-33954: Fix _PyUnicode_InsertThousandsGrouping() (GH-10623)Victor Stinner2018-11-261-18/+22
| | | | | | | | | | | | Fix str.format(), float.__format__() and complex.__format__() methods for non-ASCII decimal point when using the "n" formatter. Changes: * Rewrite _PyUnicode_InsertThousandsGrouping(): it now requires a _PyUnicodeWriter object for the buffer and a Python str object for digits. * Rename FILL() macro to unicode_fill(), convert it to static inline function, add "assert(0 <= start);" and rework its code.
* bpo-34100: Merge constants recursively (GH-8341)INADA Naoki2018-11-264-4594/+4680
| | | | | | | There are some same consts in a module. This commit merges them into single instance. It reduces number of objects in memory after loading modules. https://bugs.python.org/issue34100
* bpo-35081: Add Include/internal/pycore_tupleobject.h (GH-10705)Victor Stinner2018-11-252-0/+2
| | | | Move _PyTuple_ITEMS() to a new header file: Include/internal/pycore_tupleobject.h
* bpo-34523: Fix C locale coercion on FreeBSD CURRENT (GH-10672)Victor Stinner2018-11-232-4/+21
| | | | | | | | bpo-34523, bpo-35290: C locale coercion now resets the Python internal "force ASCII" mode. This change fix the filesystem encoding on FreeBSD CURRENT, which has a new "C.UTF-8" locale, when the UTF-8 mode is disabled. Add _Py_ResetForceASCII(): _Py_SetLocaleFromEnv() now calls it.
* bpo-35177, Python-ast.h: Fix "Yield" compiler warning (GH-10664)Victor Stinner2018-11-225-0/+5
| | | | | | | | Partially revert commit 5f2df88b63e50d23914e97ec778861a52abdeaad: add "#undef Yield" to .c files after including Python-ast.h. Fix the warning: winbase.h(102): warning C4005: 'Yield': macro redefinition
* bpo-18407: ast.c uses Py_ssize_t for asdl_seq_LEN() iterator (GH-10655)Victor Stinner2018-11-221-9/+9
| | | | | | | When iterating using asdl_seq_LEN(), use 'Py_ssize_t' type instead of 'int' for the iterator variable, to avoid downcast on 64-bit platforms. _Py_asdl_int_seq_new() now also ensures that the index is greater than or equal to 0.
* bpo-18407: win32_urandom() uses PY_DWORD_MAX (GH-10656)Victor Stinner2018-11-221-4/+2
| | | | | | CryptGenRandom() maximum size is PY_DWORD_MAX, not INT_MAX. Use DWORD type for the 'chunk' variable Co-Authored-By: Jeremy Kloth <jeremy.kloth@gmail.com>
* bpo-35059: Cast void* to PyObject* (GH-10650)Victor Stinner2018-11-221-3/+4
| | | Don't pass void* to Python macros: use _PyObject_CAST().
* bpo-35081: Add Include/internal/pycore_object.h (GH-10640)Victor Stinner2018-11-213-4/+7
| | | | Move _PyObject_GC_TRACK() and _PyObject_GC_UNTRACK() from Include/objimpl.h to Include/internal/pycore_object.h.
* bpo-35169: Improve error messages for forbidden assignments. (GH-10342)Serhiy Storchaka2018-11-201-60/+46
|
* bpo-28604: Fix localeconv() for different LC_MONETARY (GH-10606)Victor Stinner2018-11-202-34/+39
| | | | | | | | | | | | | | | | | | | | | locale.localeconv() now sets temporarily the LC_CTYPE locale to the LC_MONETARY locale if the two locales are different and monetary strings are non-ASCII. This temporary change affects other threads. Changes: * locale.localeconv() can now set LC_CTYPE to LC_MONETARY to decode monetary fields. * Add LocaleInfo.grouping_buffer: copy localeconv() grouping string since it can be replaced anytime if a different thread calls localeconv(). * _Py_GetLocaleconvNumeric() now requires a "struct lconv *" structure, so locale.localeconv() now longer calls localeconv() twice. Moreover, the function now requires all arguments to be non-NULL. * Rename STATIC_LOCALE_INFO_INIT to LocaleInfo_STATIC_INIT. * Move _Py_GetLocaleconvNumeric() definition from fileutils.h to pycore_fileutils.h. pycore_fileutils.h now includes locale.h. * The _locale module is now built with Py_BUILD_CORE defined.
* bpo-34725: Adds _Py_SetProgramFullPath so embedders may override ↵Steve Dower2018-11-172-24/+57
| | | | sys.executable (GH-9860)
* bpo-28401: prevent Py_DEBUG builds from trying to import limited ABI modules ↵Stefano Rivera2018-11-161-0/+2
| | | | | | | | (GH-1766) [Issue 28401](https://bugs.python.org/issue28401): Don't attempt to import the stable API extensions, they are not supported in PyDEBUG builds (which don't implement that ABI). https://bugs.python.org/issue28401
* Add a missed PyErr_NoMemory() in symtable_new(). (GH-10576)Zackery Spytz2018-11-161-1/+3
| | | | This missed PyErr_NoMemory() could cause a SystemError when calling _symtable.symtable().