summaryrefslogtreecommitdiffstats
path: root/Python
Commit message (Collapse)AuthorAgeFilesLines
* Issue #22747: Workaround for systems without langinfo.h.Stefan Krah2016-04-251-0/+2
|
* Issue #17905: Do not guard locale include with HAVE_LANGINFO_H.Stefan Krah2016-04-251-1/+1
|
* Issue #26802: Optimized calling a function with *args only positional arguments.Serhiy Storchaka2016-04-191-0/+15
| | | | Patch by Joe Jevnik.
* Avoid fcntl() if possible in set_inheritable()Victor Stinner2016-04-171-5/+13
| | | | | | Issue #26770: set_inheritable() avoids calling fcntl() twice if the FD_CLOEXEC is already set/cleared. This change only impacts platforms using the fcntl() implementation of set_inheritable() (not Linux nor Windows).
* Issue #26778: Fixed "a/an/and" typos in code comment, documentation and errorSerhiy Storchaka2016-04-171-1/+1
|\ | | | | | | messages.
| * Issue #26778: Fixed "a/an/and" typos in code comment and documentation.Serhiy Storchaka2016-04-171-1/+1
| |
* | Issue #15984: Merge PyUnicode doc from 3.5Martin Panter2016-04-151-2/+2
|\ \ | |/
| * Correct “an” → “a” with “Unicode”, “user”, “UTF”, etcMartin Panter2016-04-151-2/+2
| | | | | | | | This affects documentation, code comments, and a debugging messages.
* | fs_unicode_converter is no longer used.Serhiy Storchaka2016-04-141-8/+0
| |
* | Issue #26057: Got rid of nonneeded use of PyUnicode_FromObject().Serhiy Storchaka2016-04-132-21/+10
| |
* | Merge 3.5 (os.urandom)Victor Stinner2016-04-121-5/+12
|\ \ | |/
| * Fix os.urandom() on Solaris 11.3Victor Stinner2016-04-121-5/+12
| | | | | | | | | | | | Issue #26735: Fix os.urandom() on Solaris 11.3 and newer when reading more than 1,024 bytes: call getrandom() multiple times with a limit of 1024 bytes per call.
* | Issue #26200: Added Py_SETREF and replaced Py_XSETREF with Py_SETREFSerhiy Storchaka2016-04-103-5/+5
|\ \ | |/ | | | | in places where Py_DECREF was used.
| * Issue #26200: Added Py_SETREF and replaced Py_XSETREF with Py_SETREFSerhiy Storchaka2016-04-103-5/+5
| | | | | | | | in places where Py_DECREF was used.
* | Issue #25339: PYTHONIOENCODING now has priority over locale in setting theSerhiy Storchaka2016-04-101-10/+9
|\ \ | |/ | | | | error handler for stdin and stdout.
| * Issue #25339: PYTHONIOENCODING now has priority over locale in setting theSerhiy Storchaka2016-04-101-10/+9
| | | | | | | | error handler for stdin and stdout.
* | Issue #22570: Renamed Py_SETREF to Py_XSETREF.Serhiy Storchaka2016-04-067-11/+11
|\ \ | |/
| * Issue #22570: Renamed Py_SETREF to Py_XSETREF.Serhiy Storchaka2016-04-064-7/+7
| |
| * Use Py_uintptr_t for atomic pointersVictor Stinner2016-01-222-27/+28
| | | | | | | | | | | | | | | | Issue #26161: Use Py_uintptr_t instead of void* for atomic pointers in pyatomic.h. Use atomic_uintptr_t when <stdatomic.h> is used. Using void* causes compilation warnings depending on which implementation of atomic types is used.
| * Py_FatalError: disable faulthandler earlierVictor Stinner2016-03-161-5/+5
| | | | | | | | | | Issue #26563: Py_FatalError: disable faulthandler before trying to flush sys.stdout and sys.stderr.
| * Fix Py_FatalError() if called without the GILVictor Stinner2016-03-141-34/+50
| | | | | | | | | | | | Issue #26558: If Py_FatalError() is called without the GIL, don't try to print the current exception, nor try to flush stdout and stderr: only dump the traceback of Python threads.
* | Minor code cleanup for PyArg_UnpackTuple.Raymond Hettinger2016-03-261-9/+8
| |
* | makeopcodetargets.py: we need to import Lib/opcode.pyVictor Stinner2016-03-261-1/+21
| | | | | | | | | | | | | | | | | | Issue #20021: use importlib.machinery to import Lib/opcode.py and not an opcode module coming from somewhere else. makeopcodetargets.py is part of the Python build process and it is run by an external Python program, not the built Python program. Patch written by Serhiy Storchaka.
* | Modernize Python/makeopcodetargets.pyVictor Stinner2016-03-251-19/+11
| | | | | | | | | | | | | | | | | | * Simply use "import opcode" to import the opcode module instead of tricks using the imp module * Use context manager for the output file * Move code into a new main() function * Replace assert with a regular if to check the number of arguments * Import modules at top level
* | Fix bug in __import__ during Python shutdownVictor Stinner2016-03-241-439/+445
| | | | | | | | | | | | Issue #26637: The importlib module now emits an ImportError rather than a TypeError if __import__() is tried during the Python shutdown process but sys.path is already cleared (set to None).
* | get_warnings_attr(): Fix coverity warningVictor Stinner2016-03-231-4/+3
| | | | | | | | | | Don't check if the dict key exists before getting the key. Instead get the key and handle error.
* | Rework _Py_DumpASCII() to make Coverity happyVictor Stinner2016-03-231-8/+8
| |
* | compiler.c: fix compiler warnings on WindowsVictor Stinner2016-03-231-7/+9
| |
* | Issue #23848: Expose _Py_DumpHexadecimal()Victor Stinner2016-03-231-8/+9
| | | | | | | | This function will be reused by faulthandler.
* | Cleanup hashtable.hVictor Stinner2016-03-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Issue #26588: * Pass the hash table rather than the key size to hash and compare functions * _Py_HASHTABLE_READ_KEY() and _Py_HASHTABLE_ENTRY_READ_KEY() macros now expect the hash table as the first parameter, rather than the key size * tracemalloc_get_traces_fill(): use _Py_HASHTABLE_ENTRY_READ_DATA() rather than pointer dereference * Remove the _Py_HASHTABLE_ENTRY_WRITE_PKEY() macro * Move "PKEY" and "PDATA" macros inside hashtable.c
* | Issue #26588:Victor Stinner2016-03-231-1/+1
| | | | | | | | | | | | | | | | * _Py_HASHTABLE_ENTRY_DATA: change type from "char *" to "const void *" * Add _Py_HASHTABLE_ENTRY_WRITE_PKEY() macro * Rename _Py_HASHTABLE_ENTRY_WRITE_DATA() macro to _Py_HASHTABLE_ENTRY_WRITE_PDATA() * Add _Py_HASHTABLE_ENTRY_WRITE_DATA() macro
* | _warnings.warn_explicit(): try to import warningsVictor Stinner2016-03-221-14/+36
| | | | | | | | | | | | Issue #26592: _warnings.warn_explicit() now tries to import the warnings module (Python implementation) if the source parameter is set to be able to log the traceback where the source was allocated.
* | Add a source parameter to warnings.warn()Victor Stinner2016-03-221-5/+6
| | | | | | | | | | | | | | | | Issue #26604: * Add a new optional source parameter to _warnings.warn() and warnings.warn() * Modify asyncore, asyncio and _pyio modules to set the source parameter when logging a ResourceWarning warning
* | hashtable.h now supports keys of any sizeVictor Stinner2016-03-211-5/+10
| | | | | | | | | | | | Issue #26588: hashtable.h now supports keys of any size, not only sizeof(void*). It allows to support key larger than sizeof(void*), but also to use less memory for key smaller than sizeof(void*).
* | Ooops, revert changeset ea9efa06c137Victor Stinner2016-03-211-7/+4
| | | | | | | | | | | | | | | | | | | | | | Change pushed by mistake, the patch is still under review :-/ """ _tracemalloc: add domain to trace keys * hashtable.h: key has now a variable size * _tracemalloc uses (pointer: void*, domain: unsigned int) as key for traces """
* | _tracemalloc: add domain to trace keysVictor Stinner2016-03-181-4/+7
| | | | | | | | | | * hashtable.h: key has now a variable size * _tracemalloc uses (pointer: void*, domain: unsigned int) as key for traces
* | On ResourceWarning, log traceback where the object was allocatedVictor Stinner2016-03-191-29/+62
| | | | | | | | | | | | | | | | | | | | Issue #26567: * Add a new function PyErr_ResourceWarning() function to pass the destroyed object * Add a source attribute to warnings.WarningMessage * Add warnings._showwarnmsg() which uses tracemalloc to get the traceback where source object was allocated.
* | Add _showwarnmsg() and _formatwarnmsg() to warningsVictor Stinner2016-03-181-25/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | Issue #26568: add new _showwarnmsg() and _formatwarnmsg() functions to the warnings module. The C function warn_explicit() now calls warnings._showwarnmsg() with a warnings.WarningMessage as parameter, instead of calling warnings.showwarning() with multiple parameters. _showwarnmsg() calls warnings.showwarning() if warnings.showwarning() was replaced. Same for _formatwarnmsg(): call warnings.formatwarning() if it was replaced.
* | Py_FatalError: disable faulthandler earlierVictor Stinner2016-03-161-5/+5
| | | | | | | | | | Issue #26563: Py_FatalError: disable faulthandler before trying to flush sys.stdout and sys.stderr.
* | faulthandler now works in non-Python threadsVictor Stinner2016-03-163-17/+54
| | | | | | | | | | | | | | | | | | | | | | Issue #26563: * Add _PyGILState_GetInterpreterStateUnsafe() function: the single PyInterpreterState used by this process' GILState implementation. * Enhance _Py_DumpTracebackThreads() to retrieve the interpreter state from autoInterpreterState in last resort. The function now accepts NULL for interp and current_tstate parameters. * test_faulthandler: fix a ResourceWarning when test is interrupted by CTRL+c
* | Fix compilation error of traceback.c on WindowsVictor Stinner2016-03-161-3/+3
| | | | | | | | Issue #26564.
* | regrtest: Fix module.__path__Victor Stinner2016-03-151-931/+940
| | | | | | | | | | | | | | Issue #26538: libregrtest: Fix setup_tests() to keep module.__path__ type (_NamespacePath), don't convert to a list. Add _NamespacePath.__setitem__() method to importlib._bootstrap_external.
* | Enhance and rewrite traceback dump C functionsVictor Stinner2016-03-151-53/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | Issue #26564: * Expose _Py_DumpASCII() and _Py_DumpDecimal() in traceback.h * Change the type of the second _Py_DumpASCII() parameter from int to unsigned long * Rewrite _Py_DumpDecimal() and dump_hexadecimal() to write directly characters in the expected order, avoid the need of reversing the string. * dump_hexadecimal() limits width to the size of the buffer * _Py_DumpASCII() does nothing if the object is not a Unicode string * dump_frame() wrtites "???" as the line number if the line number is negative
* | Add more checks on the GILVictor Stinner2016-03-143-5/+40
| | | | | | | | | | | | | | | | | | | | | | | | Issue #10915, #15751, #26558: * PyGILState_Check() now returns 1 (success) before the creation of the GIL and after the destruction of the GIL. It allows to use the function early in Python initialization and late in Python finalization. * Add a flag to disable PyGILState_Check(). Disable PyGILState_Check() when Py_NewInterpreter() is called * Add assert(PyGILState_Check()) to: _Py_dup(), _Py_fstat(), _Py_read() and _Py_write()
* | Fix Py_FatalError() if called without the GILVictor Stinner2016-03-141-34/+50
| | | | | | | | | | | | Issue #26558: If Py_FatalError() is called without the GIL, don't try to print the current exception, nor try to flush stdout and stderr: only dump the traceback of Python threads.
* | Add PYTHONMALLOC env varVictor Stinner2016-03-142-5/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | Issue #26516: * Add PYTHONMALLOC environment variable to set the Python memory allocators and/or install debug hooks. * PyMem_SetupDebugHooks() can now also be used on Python compiled in release mode. * The PYTHONMALLOCSTATS environment variable can now also be used on Python compiled in release mode. It now has no effect if set to an empty string. * In debug mode, debug hooks are now also installed on Python memory allocators when Python is configured without pymalloc.
* | Merge 3.5 (issue #25888)Yury Selivanov2016-03-021-0/+15
|\ \ | |/
| * coroutines: Error when awaiting on coroutine that's being awaitedYury Selivanov2016-03-021-0/+15
| | | | | | | | Issue #25888
* | Update assertion in compiler_addop_i()Victor Stinner2016-03-011-4/+8
| | | | | | | | | | | | | | In practice, bytecode instruction arguments are unsigned. Update the assertion to make it more explicit that argument must be greater or equal than 0. Rewrite also the comment.
* | Issue #22836: Merge exception reporting from 3.5Martin Panter2016-02-282-5/+19
|\ \ | |/