summaryrefslogtreecommitdiffstats
path: root/Python
Commit message (Collapse)AuthorAgeFilesLines
...
* bpo-37483: fix reference leak in _PyCodec_Lookup (GH-14600)Jeroen Demeyer2019-07-051-13/+14
|
* bpo-37483: add _PyObject_CallOneArg() function (#14558)Jeroen Demeyer2019-07-046-26/+15
|
* bpo-37484: use _PyObject_Vectorcall for __exit__ (GH-14557)Jeroen Demeyer2019-07-031-5/+3
|
* bpo-36763: Add PyConfig_SetWideStringList() (GH-14444)Victor Stinner2019-07-011-1/+18
|
* bpo-37467: Fix PyErr_Display() for bytes filename (GH-14504)Victor Stinner2019-07-011-1/+1
| | | | | | | | | | | | | | Fix sys.excepthook() and PyErr_Display() if a filename is a bytes string. For example, for a SyntaxError exception where the filename attribute is a bytes string. Cleanup also test_sys: * Sort imports. * Rename numruns global var to INTERN_NUMRUNS. * Add DisplayHookTest and ExceptHookTest test case classes. * Don't save/restore sys.stdout and sys.displayhook using setUp()/tearDown(): do it in each test method. * Test error case (call hook with no argument) after the success case.
* bpo-37221: Add PyCode_NewWithPosOnlyArgs to be used internally and set ↵Pablo Galindo2019-07-012-8/+6
| | | | | | PyCode_New as a compatibility wrapper (GH-13959) Add PyCode_NewEx to be used internally and set PyCode_New as a compatibility wrapper
* bpo-37369: Fix initialization of sys members when launched via an app ↵Steve Dower2019-06-293-0/+35
| | | | | | | container (GH-14428) sys._base_executable is now always defined on all platforms, and can be overridden through configuration. Also adds test.support.PythonSymlink to encapsulate platform-specific logic for symlinking sys.executable
* bpo-37337: Add _PyObject_VectorcallMethod() (GH-14228)Jeroen Demeyer2019-06-281-20/+7
|
* bpo-37414: Remove sys.callstats() (GH-14398)Victor Stinner2019-06-262-77/+1
| | | | | Remove the undocumented sys.callstats() function. Since Python 3.7, it was deprecated and always returned None. It required a special build option CALL_PROFILE which was already removed in Python 3.7.
* bpo-20443: _PyConfig_Read() gets the absolute path of run_filename (GH-14053)Victor Stinner2019-06-252-0/+144
| | | | | | | | | | | | Python now gets the absolute path of the script filename specified on the command line (ex: "python3 script.py"): the __file__ attribute of the __main__ module, sys.argv[0] and sys.path[0] become an absolute path, rather than a relative path. * Add _Py_isabs() and _Py_abspath() functions. * _PyConfig_Read() now tries to get the absolute path of run_filename, but keeps the relative path if _Py_abspath() fails. * Reimplement os._getfullpathname() using _Py_abspath(). * Use _Py_isabs() in getpath.c.
* bpo-37392: Remove sys.setcheckinterval() (GH-14355)Victor Stinner2019-06-253-111/+1
| | | | | | | Remove sys.getcheckinterval() and sys.setcheckinterval() functions. They were deprecated since Python 3.2. Use sys.getswitchinterval() and sys.setswitchinterval() instead. Remove also check_interval field of the PyInterpreterState structure.
* bpo-37363: Add audit events for a range of modules (GH-14301)Steve Dower2019-06-241-0/+5
|
* bpo-35224: Bump the pyc magic number by 1 instead of by 10 in last ↵Pablo Galindo2019-06-231-1/+1
| | | | modification (GH-14320)
* bpo-35224: Bump the pyc magic number after the change in MAP_ADD (GH-14313)Pablo Galindo2019-06-221-121/+121
|
* bpo-35224: Reverse evaluation order of key: value in dict comprehensions ↵Jörn Heissler2019-06-222-6/+6
| | | | | | | | | | | (GH-14139) … as proposed in PEP 572; key is now evaluated before value. https://bugs.python.org/issue35224
* bpo-37316: mmap.mmap() passes the wrong variable to PySys_Audit() (GH-14152)Zackery Spytz2019-06-211-0/+1
| | | Also, add a missing call to va_end() in PySys_Audit().
* bpo-37151: remove _PyCFunction_FastCallDict (GH-14269)Jeroen Demeyer2019-06-201-4/+4
|
* bpo-36710: Use tstate in pylifecycle.c (GH-14249)Victor Stinner2019-06-195-100/+111
| | | | In pylifecycle.c: pass tstate argument, rather than interp argument, to functions.
* bpo-36710: Remove PyImport_Cleanup() function (GH-14221)Victor Stinner2019-06-192-4/+3
| | | | | | | * Rename PyImport_Cleanup() to _PyImport_Cleanup() and move it to the internal C API. Add 'tstate' parameters. * Remove documentation of _PyImport_Init(), PyImport_Cleanup(), _PyImport_Fini(). All three were documented as "For internal use only.".
* bpo-36710: Add tstate parameter in import.c (GH-14218)Victor Stinner2019-06-193-180/+237
| | | | | | | | | | | | | * Add 'tstate' parameter to many internal import.c functions. * _PyImportZip_Init() now gets 'tstate' parameter rather than 'interp'. * Add 'interp' parameter to _PyState_ClearModules() and rename it to _PyInterpreterState_ClearModules(). * Move private _PyImport_FindBuiltin() to the internal C API; add 'tstate' parameter to it. * Remove private _PyImport_AddModuleObject() from the C API: use public PyImport_AddModuleObject() instead. * Remove private _PyImport_FindExtensionObjectEx() from the C API: use private _PyImport_FindExtensionObject() instead.
* remove dead code (GH-14104)David Carlier2019-06-181-3/+0
| | | default case ought to handle the "unexpected".
* bpo-37267: Do not check for FILE_TYPE_CHAR in os.dup() on Windows (GH-14051)Zackery Spytz2019-06-171-12/+5
| | | | On Windows, os.dup() no longer creates an inheritable fd when handling a character file.
* bpo-37289: Remove 'if False' handling in the peephole optimizer (GH-14099)Pablo Galindo2019-06-151-9/+3
|
* bpo-37249: add declaration of _PyObject_GetMethod (GH-14015)Jeroen Demeyer2019-06-141-4/+0
|
* bpo-37269: Correctly optimise conditionals with constant booleans (GH-14071)Pablo Galindo2019-06-141-0/+5
| | | | | | | | Fix a regression introduced by af8646c8054d0f4180a2013383039b6a472f9698 that was causing code of the form: if True and False: do_something() to be optimized incorrectly, eliminating the block.
* bpo-37077: Add native thread ID (TID) for AIX (GH-13624)Michael Felt2019-06-131-2/+7
| | | | | | | This is the followup for issue36084 https://bugs.python.org/issue37077
* bpo-36710: Pass explicitly tstate in sysmodule.c (GH-14060)Victor Stinner2019-06-134-176/+256
| | | | | | | | * Replace global var Py_VerboseFlag with interp->config.verbose. * Add _PyErr_NoMemory(tstate) function. * Add tstate parameter to _PyEval_SetCoroutineOriginTrackingDepth() and move the function to the internal API. * Replace _PySys_InitMain(runtime, interp) with _PySys_InitMain(runtime, tstate).
* bpo-37213: Handle negative line deltas correctly in the peephole optimizer ↵Pablo Galindo2019-06-134-4144/+4147
| | | | | (GH-13969) The peephole optimizer was not optimizing correctly bytecode after negative deltas were introduced. This is due to the fact that some special values (255) were being searched for in both instruction pointer delta and line number deltas.
* bpo-37253: Remove PyAST_obj2mod_ex() function (GH-14020)Victor Stinner2019-06-131-5/+0
| | | | PyAST_obj2mod_ex() is similar to PyAST_obj2mod() with an additional 'feature_version' parameter which is unused.
* bpo-37253: Add _PyCompilerFlags_INIT macro (GH-14018)Victor Stinner2019-06-134-24/+9
| | | | | Add a new _PyCompilerFlags_INIT macro to initialize PyCompilerFlags variables, rather than initializing cf_flags and cf_feature_version explicitly in each variable.
* bpo-37160: Thread native ID NetBSD support (GH-13835)David Carlier2019-06-121-0/+5
|
* bpo-35766: compile(): rename feature_version parameter (GH-13994)Victor Stinner2019-06-122-7/+12
| | | | | | Rename compile() feature_version parameter to _feature_version and convert it to a keyword-only parameter. Update also test_type_comments to pass feature_version as a tuple.
* Revert "bpo-36818: Add PyInterpreterState.runtime field. (gh-13129)" (GH-13795)Victor Stinner2019-06-045-82/+82
| | | This reverts commit 396e0a8d9dc65453cb9d53500d0a620602656cfe.
* bpo-37146: disable opcache when Py_DEBUG is defined (GH-13787)Inada Naoki2019-06-031-0/+7
| | | | | --with-pydebug is commonly used to find memory leaks. But opcache makes it harder. So disable opcache when Py_DEBUG is defined.
* Revert "bpo-33608: Factor out a private, per-interpreter ↵Victor Stinner2019-06-034-285/+175
| | | | | _Py_AddPendingCall(). (gh-13714)" (GH-13780) This reverts commit 6a150bcaeb190d1731b38ab9c7a5d1a352847ddc.
* bpo-37087: Adding native ID support for OpenBSD (GH-13654)David Carlier2019-06-031-0/+5
|
* bpo-26219: remove unused code (GH-13775)Inada Naoki2019-06-031-3/+0
| | | | This code was for deoptimization, which is removed from PR-12884.
* bpo-26219: per opcode cache for LOAD_GLOBAL (GH-12884)Inada Naoki2019-06-032-1/+145
| | | | | | This patch implements per opcode cache mechanism, and use it in only LOAD_GLOBAL opcode. Based on Yury's opcache3.patch in bpo-26219.
* bpo-35814: Allow unpacking in r.h.s of annotated assignment expressions ↵Pablo Galindo2019-06-032-2/+2
| | | | (GH-13760)
* bpo-33608: Factor out a private, per-interpreter _Py_AddPendingCall(). ↵Eric Snow2019-06-014-176/+285
| | | | (gh-13714)
* Fix compiler warnings in the pystrehex module (GH-13730)Pablo Galindo2019-06-011-2/+2
|
* bpo-37122: Make co->co_argcount represent the total number of positonal ↵Pablo Galindo2019-06-012-35/+19
| | | | arguments in the code object (GH-13726)
* bpo-36818: Add PyInterpreterState.runtime field. (gh-13129)Eric Snow2019-06-015-82/+82
| | | https://bugs.python.org/issue36818
* bpo-37115: Support annotations in positional-only arguments (GH-13698)Pablo Galindo2019-05-311-0/+2
|
* bpo-37112: Allow compile to work on AST with positional only arguments with ↵Pablo Galindo2019-05-311-1/+1
| | | | defaults (GH-13697)
* bpo-36974: tp_print -> tp_vectorcall_offset and tp_reserved -> tp_as_async ↵Jeroen Demeyer2019-05-314-12/+12
| | | | | | | | | (GH-13464) Automatically replace tp_print -> tp_vectorcall_offset tp_compare -> tp_as_async tp_reserved -> tp_as_async
* bpo-36974: rename _FastCallKeywords -> _Vectorcall (GH-13653)Jeroen Demeyer2019-05-301-4/+4
|
* bpo-20602: Do not clear sys.flags and sys.float_info during shutdown (GH-8096)Zackery Spytz2019-05-301-2/+0
| | | There is no need to clear these immutable objects during shutdown.
* bpo-22385: Support output separators in hex methods. (#13578)Gregory P. Smith2019-05-291-10/+80
| | | | | | | | | | | | | | | | | | * bpo-22385: Support output separators in hex methods. Also in binascii.hexlify aka b2a_hex. The underlying implementation behind all hex generation in CPython uses the same pystrhex.c implementation. This adds support to bytes, bytearray, and memoryview objects. The binascii module functions exist rather than being slated for deprecation because they return bytes rather than requiring an intermediate step through a str object. This change was inspired by MicroPython which supports sep in its binascii implementation (and does not yet support the .hex methods). https://bugs.python.org/issue22385
* bpo-36974: implement PEP 590 (GH-13185)Jeroen Demeyer2019-05-294-59/+41
| | | | | Co-authored-by: Jeroen Demeyer <J.Demeyer@UGent.be> Co-authored-by: Mark Shannon <mark@hotpy.org>