summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* bpo-39380: Change ftplib encoding from latin-1 to utf-8 (GH-18048)Sebastian Pedersen2020-04-145-54/+101
| | | | | Add the encoding in ftplib.FTP and ftplib.FTP_TLS to the constructor as keyword-only and change the default from "latin-1" to "utf-8" to follow RFC 2640.
* bpo-32894: Support unparsing of infinity numbers in ast_unparser.c (GH-17426)Batuhan Taşkaya2020-04-143-5/+68
|
* bpo-40091: Fix a hang at fork in the logging module (GH-19416)Victor Stinner2020-04-142-12/+14
| | | | | | | Fix a hang at fork in the logging module: the new private _at_fork_reinit() method is now used to reinitialize locks at fork in the child process. The createLock() method is no longer used at fork.
* bpo-39481: fix test_genericalias on Android (GH-19469)Chih-Hsuan Yen2020-04-131-1/+7
| | | | | | | Android bionic does not implement shm_open/shm_unlink [1]. As a result _posixshmem extension does not exist and multiprocessing.shared_memory cannot be imported. [1] https://android.googlesource.com/platform/bionic/+/master/docs/status.md
* bpo-40241: Add pycore_interp.h header (GH-19499)Victor Stinner2020-04-135-165/+189
| | | | Move PyInterpreterState and related functions to a new internal pycore_interp.h header file.
* bpo-40268: Add pycore_runtime.h header file (GH-19493)Victor Stinner2020-04-137-125/+152
| | | | | | Move PyRuntimeState from pycore_pystate.h to pycore_runtime.h. Remove _PyGILState_check_enabled macro: access directly _PyRuntime.gilstate.check_enabled.
* bpo-40241: Add pycore_gc.h header file (GH-19494)Victor Stinner2020-04-138-62/+98
| | | | | | | | | | | | | | | | | | | | | | | | | | | Move the PyGC_Head structure and the following private macros to the internal C API: * _PyGCHead_FINALIZED() * _PyGCHead_NEXT() * _PyGCHead_PREV() * _PyGCHead_SET_FINALIZED() * _PyGCHead_SET_NEXT() * _PyGCHead_SET_PREV() * _PyGC_FINALIZED() * _PyGC_PREV_MASK * _PyGC_PREV_MASK_COLLECTING * _PyGC_PREV_MASK_FINALIZED * _PyGC_PREV_SHIFT * _PyGC_SET_FINALIZED() * _PyObject_GC_IS_TRACKED() * _PyObject_GC_MAY_BE_TRACKED() * _Py_AS_GC(o) Keep the private _PyGC_FINALIZED() macro in the public C API for backward compatibility with Python 3.8: make it an alias to the new PyObject_GC_IsFinalized() function. Move the SIZEOF_PYGC_HEAD constant from _testcapi module to _testinternalcapi module.
* Improved documentation for `BUILD_CONST_KEY_MAP` (GH-19454)laike9m2020-04-131-3/+3
|
* Add double quote cases to invalid prefix tests (GH-19489)Pablo Galindo2020-04-131-4/+5
|
* bpo-40268: Add _PyInterpreterState_GetConfig() (GH-19492)Victor Stinner2020-04-1319-64/+90
| | | | | | | | Don't access PyInterpreterState.config member directly anymore, but use new functions: * _PyInterpreterState_GetConfig() * _PyInterpreterState_SetConfig() * _Py_GetConfig()
* bpo-40234: Revert "bpo-37266: Daemon threads are now denied in ↵Victor Stinner2020-04-127-91/+21
| | | | | subinterpreters (GH-14049)" (GH-19456) This reverts commit 066e5b1a917ec2134e8997d2cadd815724314252.
* closes bpo-39953: Generate ifdefs around library code definitions. (GH-19490)Benjamin Peterson2020-04-122-1/+55
|
* bpo-40246: Report a better error message for invalid string prefixes (GH-19476)Lysandros Nikolaou2020-04-125-1/+10
|
* bpo-31758: Prevent crashes when using an uninitialized ↵Oren Milman2020-04-123-0/+41
| | | | _elementtree.XMLParser object (GH-3997)
* bpo-13743: Add some documentation strings to xml.dom.minidom (GH-16355)Alex Itkes2020-04-122-0/+24
|
* bpo-39011: Preserve line endings within ElementTree attributes (GH-18468)mefistotelis2020-04-124-9/+22
| | | | | | | * bpo-39011: Preserve line endings within attributes Line endings within attributes were previously normalized to "\n" in Py3.7/3.8. This patch removes that normalization, as line endings which were replaced by entity numbers should be preserved in original form.
* bpo-39943: Add the const qualifier to pointers on non-mutable PyBytes data. ↵Serhiy Storchaka2020-04-1220-37/+38
| | | | (GH-19472)
* closes bpo-39953: Update OpenSSL error codes table. (GH-19082)Benjamin Peterson2020-04-113-388/+4719
| | | I updated the error codes using the OpenSSL 1.1.1f source tree.
* bpo-40126: Fix reverting multiple patches in unittest.mock. (GH-19351)Serhiy Storchaka2020-04-113-49/+30
| | | | | Patcher's __exit__() is now never called if its __enter__() is failed. Returning true from __exit__() silences now the exception.
* bpo-39943: Add the const qualifier to pointers on non-mutable PyUnicode ↵Serhiy Storchaka2020-04-1127-221/+250
| | | | data. (GH-19345)
* bpo-38501: Add a warning section to multiprocessing.Pool docs about resource ↵Pablo Galindo2020-04-111-1/+12
| | | | managing (GH-19466)
* bpo-40241: Add PyObject_GC_IsTracked and PyObject_GC_IsFinalized to the ↵Pablo Galindo2020-04-116-1/+50
| | | | | public C-API (GH-19461) Add the functions PyObject_GC_IsTracked and PyObject_GC_IsFinalized to the public API to allow to query if Python objects are being currently tracked or have been already finalized by the garbage collector respectively.
* bpo-39481: PEP 585 for a variety of modules (GH-19423)Batuhan Taşkaya2020-04-1015-1/+66
| | | | | | | | | | - concurrent.futures - ctypes - http.cookies - multiprocessing - queue - tempfile - unittest.case - urllib.parse
* bpo-39481: PEP 585 for difflib, filecmp, fileinput (#19422)Ethan Smith2020-04-094-0/+17
|
* bpo-39481: PEP 585 for enumerate, AsyncGeneratorType, mmap (GH-19421)Ethan Smith2020-04-094-4/+11
|
* bpo-39481: PEP 585 for ipaddress.py (GH-19418)Batuhan Taşkaya2020-04-092-0/+10
|
* Generic itertools.chain (GH-19417)Ethan Smith2020-04-092-1/+5
|
* bpo-39943: Keep constness of pointer objects. (19405)Andy Lester2020-04-091-6/+5
| | | | | | | | | * Keep constness of pointer objects. Also moved an auto variable that got consted into its innermost necessary scope. * move def Co-authored-by: Benjamin Peterson <benjamin@python.org>
* bpo-31904: Fix test_c_locale_coercion encodings for VxWorks RTOS (GH-19448)pxinwr2020-04-092-0/+5
|
* bpo-40077: Remove redundant cast in json module (GH-19438)Hai Shi2020-04-101-2/+2
|
* bpo-25780: Expose CAN_RAW_JOIN_FILTERS in the socket module (GH-19190)Zackery Spytz2020-04-098-0/+66
| | | Co-Authored-By: Stefan Tatschner <stefan@rumpelsepp.org>
* bpo-40082: trip_signal() uses the main interpreter (GH-19441)Victor Stinner2020-04-086-85/+94
| | | | | | | | | | | | | | | | | | | | | | Fix the signal handler: it now always uses the main interpreter, rather than trying to get the current Python thread state. The following function now accepts an interpreter, instead of a Python thread state: * _PyEval_SignalReceived() * _Py_ThreadCanHandleSignals() * _PyEval_AddPendingCall() * COMPUTE_EVAL_BREAKER() * SET_GIL_DROP_REQUEST(), RESET_GIL_DROP_REQUEST() * SIGNAL_PENDING_CALLS(), UNSIGNAL_PENDING_CALLS() * SIGNAL_PENDING_SIGNALS(), UNSIGNAL_PENDING_SIGNALS() * SIGNAL_ASYNC_EXC(), UNSIGNAL_ASYNC_EXC() Py_AddPendingCall() now uses the main interpreter if it fails to the current Python thread state. Convert _PyThreadState_GET() and PyInterpreterState_GET_UNSAFE() macros to static inline functions.
* bpo-37127: Remove _pending_calls.finishing (GH-19439)Victor Stinner2020-04-082-17/+0
|
* bpo-40226: PyInterpreterState_Delete() deletes pending calls (GH-19436)Victor Stinner2020-04-084-52/+109
| | | | | | | | | | | | | | | PyInterpreterState_New() is now responsible to create pending calls, PyInterpreterState_Delete() now deletes pending calls. * Rename _PyEval_InitThreads() to _PyEval_InitGIL() and rename _PyEval_InitGIL() to _PyEval_FiniGIL(). * _PyEval_InitState() and PyEval_FiniState() now create and delete pending calls. _PyEval_InitState() now returns -1 on memory allocation failure. * Add init_interp_create_gil() helper function: code shared by Py_NewInterpreter() and Py_InitializeFromConfig(). * init_interp_create_gil() now also calls _PyEval_FiniGIL(), _PyEval_InitGIL() and _PyGILState_Init() in subinterpreters, but these functions now do nothing when called from a subinterpreter.
* Remove extraneous ')' in abstract.h (GH-19146)Jimmy Yang2020-04-081-1/+1
|
* bpo-40187: Refactor typing.TypedDict. (GH-19372)Serhiy Storchaka2020-04-081-34/+33
|
* bpo-40185: Refactor typing.NamedTuple (GH-19371)Serhiy Storchaka2020-04-082-59/+54
|
* bpo-40170: Remove PyIndex_Check() macro (GH-19428)Victor Stinner2020-04-083-8/+3
| | | | | Always declare PyIndex_Check() as an opaque function to hide implementation details: remove PyIndex_Check() macro. The macro accessed directly the PyTypeObject.tp_as_number member.
* bpo-40170: Add _PyIndex_Check() internal function (GH-19426)Victor Stinner2020-04-0817-30/+72
| | | | | | | | | Add _PyIndex_Check() function to the internal C API: fast inlined verson of PyIndex_Check(). Add Include/internal/pycore_abstract.h header file. Replace PyIndex_Check() with _PyIndex_Check() in C files of Objects and Python subdirectories.
* bpo-40170: PyType_HasFeature() now always calls PyType_GetFlags() (GH-19378)Victor Stinner2020-04-085-30/+46
| | | | | | | | PyType_HasFeature() now always calls PyType_GetFlags() to hide implementation details. Previously, it accessed directly the PyTypeObject.tp_flags member when the limited C API was not used. Add fast inlined version _PyType_HasFeature() and _PyType_IS_GC() for object.c and typeobject.c.
* bpo-40170: Convert PyObject_CheckBuffer() macro to a function (GH-19376)Victor Stinner2020-04-083-3/+14
| | | | | Convert PyObject_CheckBuffer() macro to a function to hide implementation details: the macro accessed directly the PyTypeObject.tp_as_buffer member.
* bpo-40170: PyObject_NEW() becomes an alias to PyObject_New() (GH-19379)Victor Stinner2020-04-0811-78/+81
| | | | | | | | | | | | The PyObject_NEW() macro becomes an alias to the PyObject_New() macro, and the PyObject_NEW_VAR() macro becomes an alias to the PyObject_NewVar() macro, to hide implementation details. They no longer access directly the PyTypeObject.tp_basicsize member. Exclude _PyObject_SIZE() and _PyObject_VAR_SIZE() macros from the limited C API. Replace PyObject_NEW() with PyObject_New() and replace PyObject_NEW_VAR() with PyObject_NewVar().
* bpo-39481: Make os.DirEntry generic (GH-19415)Batuhan Taşkaya2020-04-072-1/+4
|
* bpo-40089: Add _at_fork_reinit() method to locks (GH-19195)Victor Stinner2020-04-077-22/+133
| | | | | | | | | | | | | | | Add a private _at_fork_reinit() method to _thread.Lock, _thread.RLock, threading.RLock and threading.Condition classes: reinitialize the lock after fork in the child process; reset the lock to the unlocked state. Rename also the private _reset_internal_locks() method of threading.Event to _at_fork_reinit(). * Add _PyThread_at_fork_reinit() private function. It is excluded from the limited C API. * threading.Thread._reset_internal_locks() now calls _at_fork_reinit() on self._tstate_lock rather than creating a new Python lock object.
* bpo-39481: Implementation for PEP 585 (#18239)Guido van Rossum2020-04-0730-53/+830
| | | | | | | | | | | | This implements things like `list[int]`, which returns an object of type `types.GenericAlias`. This object mostly acts as a proxy for `list`, but has attributes `__origin__` and `__args__` that allow recovering the parts (with values `list` and `(int,)`. There is also an approximate notion of type variables; e.g. `list[T]` has a `__parameters__` attribute equal to `(T,)`. Type variables are objects of type `typing.TypeVar`.
* bpo-40149: Implement traverse in _abc._abc_data (GH-19412)Victor Stinner2020-04-072-4/+23
| | | Implement traverse and clear slots in _abc._abc_data type.
* bpo-37388: Don't check encoding/errors during finalization (GH-19409)Victor Stinner2020-04-072-0/+10
| | | | | | | | | str.encode() and str.decode() no longer check the encoding and errors in development mode or in debug mode during Python finalization. The codecs machinery can no longer work on very late calls to str.encode() and str.decode(). This change should help to call _PyObject_Dump() to debug during late Python finalization.
* Document missing methods of ssl.SSLObject (#19400)Rémi Lapeyre2020-04-071-0/+3
| | | Co-authored-by: Rémi Lapeyre <remi.lapeyre@lenstra.fr>
* bpo-40214: Temporarily disable a ctypes test (GH-19404)Zachary Ware2020-04-071-2/+5
| | | | | Only one particular sub-test of ctypes.test.test_loading.test_load_dll_with_flags is disabled, which caused failures on Azure Pipelines CI.
* closes bpo-40166: Change Unicode Howto so that it does not have a specific ↵amaajemyfren2020-04-061-2/+3
| | | | | number of assigned code points. (GH-19328) Change the number of code points from a specific number to a link to the latest standard that has a description of how many code points there are.