summaryrefslogtreecommitdiffstats
path: root/Modules
Commit message (Collapse)AuthorAgeFilesLines
* bpo-1635741: Port _posixshmem extension module to multiphase initialization ↵Christian Heimes2020-11-191-13/+9
| | | | | (GH-23404) Signed-off-by: Christian Heimes <christian@python.org>
* bpo-1635741: Fix _struct for build bot error (GH-23402)Dong-hee Na2020-11-191-1/+1
| | | Automerge-Triggered-By: GH:tiran
* bpo-1635741: Port gc module to multiphase initialization (GH-23377)Christian Heimes2020-11-191-45/+41
| | | | | Signed-off-by: Christian Heimes <christian@python.org> Automerge-Triggered-By: GH:tiran
* bpo-1635741: Port _struct to multiphase initialization (GH-23398)Christian Heimes2020-11-192-238/+270
| | | Signed-off-by: Christian Heimes <christian@python.org>
* bpo-1635741: Port spwd to multiphase initialization (GH-23390)Christian Heimes2020-11-191-27/+57
| | | Signed-off-by: Christian Heimes <christian@python.org>
* bpo-1635741: Port _queue to multiphase initialization (GH-23376)Christian Heimes2020-11-191-37/+36
| | | | | Signed-off-by: Christian Heimes <christian@python.org> Automerge-Triggered-By: GH:tiran
* bpo-1635741: Port grp and pwd to multiphase initialization (GH-23360)Christian Heimes2020-11-192-66/+70
| | | Signed-off-by: Christian Heimes <christian@python.org>
* bpo-1635741: Port _random to multiphase initialization (GH-23359)Christian Heimes2020-11-191-45/+49
| | | Signed-off-by: Christian Heimes <christian@python.org>
* bpo-42375: subprocess DragonFlyBSD build update. (GH-23320)David CARLIER2020-11-191-4/+4
| | | Same as FreeBSD, file descriptors in /dev/fd id from 0 to 63.
* bpo-1635741: Convert _imp to multi-phase init (GH-23378)Victor Stinner2020-11-181-1/+1
| | | | | | | | | | | | Convert the _imp extension module to the multi-phase initialization API (PEP 489). * Add _PyImport_BootstrapImp() which fix a bootstrap issue: import the _imp module before importlib is initialized. * Add create_builtin() sub-function, used by _imp_create_builtin(). * Initialize PyInterpreterState.import_func earlier, in pycore_init_builtins(). * Remove references to _PyImport_Cleanup(). This function has been renamed to finalize_modules() and moved to pylifecycle.c.
* bpo-39573: Convert Py_TYPE() and Py_SIZE() back to macros (GH-23366)Victor Stinner2020-11-181-0/+25
| | | | | | | | | This change partically reverts commit ad3252bad905d41635bcbb4b76db30d570cf0087 and the commit fe2978b3b940fe2478335e3a2ca5ad22338cdf9c. Many third party C extension modules rely on the ability of using Py_TYPE() to set an object type: "Py_TYPE(obj) = type;" or to set an object type using: "Py_SIZE(obj) = size;".
* bpo-1635741: Port _hashlib to multiphase initialization (GH-23358)Christian Heimes2020-11-181-36/+2
| | | Signed-off-by: Christian Heimes <christian@python.org>
* bpo-1635741: Port symtable module to multiphase initialization (GH-23361)Christian Heimes2020-11-181-45/+49
| | | Signed-off-by: Christian Heimes <christian@python.org>
* bpo-41713: Port _signal module to multi-phase init (GH-23355)Victor Stinner2020-11-171-16/+17
| | | | | | Port the _signal extension module to the multi-phase initialization API (PEP 489). Co-Authored-By: Mohamed Koubaa <koubaa.m@gmail.com>
* bpo-41686: Move _Py_RestoreSignals() to signalmodule.c (GH-23353)Victor Stinner2020-11-171-0/+23
|
* bpo-41625: Add a guard for Linux for splice() constants in the os module ↵Pablo Galindo2020-11-171-1/+1
| | | | (GH-23350)
* bpo-41686: Refactor signal_exec() (GH-23346)Victor Stinner2020-11-171-158/+125
| | | | | | * Add signal_add_constants() function and add ADD_INT_MACRO macro. * The Python SIGINT handler is now installed at the end of signal_exec(). * Use Py_NewRef().
* bpo-41686: Always create the SIGINT event on Windows (GH-23344)Victor Stinner2020-11-171-53/+87
| | | | | | | | | | | | | | bpo-41686, bpo-41713: On Windows, the SIGINT event, _PyOS_SigintEvent(), is now created even if Python is configured to not install signal handlers (PyConfig.install_signal_handlers=0 or Py_InitializeEx(0)). Changes: * Move global variables initialization from signal_exec() to _PySignal_Init() to clarify that they are global variables cleared by _PySignal_Fini(). * _PySignal_Fini() now closes sigint_event. * IntHandler is no longer a global variable.
* bpo-42264: Deprecate sqlite3.OptimizedUnicode (GH-23163)Erlend Egeberg Aasland2020-11-171-9/+0
|
* bpo-41713: Remove PyOS_InitInterrupts() function (GH-23342)Victor Stinner2020-11-171-12/+25
| | | | | | | Remove the undocumented PyOS_InitInterrupts() C function. * Rename PyOS_InitInterrupts() to _PySignal_Init(). It now installs other signal handlers, not only SIGINT. * Rename PyOS_FiniInterrupts() to _PySignal_Fini()
* bpo-41861, _sqlite3 : Add NEWS entry and rename variables (GH-23337)Erlend Egeberg Aasland2020-11-171-8/+8
|
* bpo-41625: Expose the splice() system call in the os module (GH-21947)Pablo Galindo2020-11-172-2/+182
|
* Add GCC pragmas to silence compiler warning about ffi_prep_closure (GH-23327)Pablo Galindo2020-11-161-2/+9
|
* bpo-42087: Remove support for AIX 5.3 and below (GH-22830)Kevin Adler2020-11-162-28/+17
| | | | | | As AIX 5.3 and below do not support thread_cputime, it was decided in https://bugs.python.org/issue40680 to require AIX 6.1 and above. This commit removes workarounds for — and references to — older, unsupported AIX versions.
* bpo-37205: time.time() cannot fail with fatal error (GH-23314)Victor Stinner2020-11-161-22/+65
| | | | | | | | | | | | | | | time.time(), time.perf_counter() and time.monotonic() functions can no longer fail with a Python fatal error, instead raise a regular Python exception on failure. Remove _PyTime_Init(): don't check system, monotonic and perf counter clocks at startup anymore. On error, _PyTime_GetSystemClock(), _PyTime_GetMonotonicClock() and _PyTime_GetPerfCounter() now silently ignore the error and return 0. They cannot fail with a Python fatal error anymore. Add py_mach_timebase_info() and win_perf_counter_frequency() sub-functions.
* bpo-42318: Fix support of non-BMP characters in Tkinter on macOS (GH-23281)Serhiy Storchaka2020-11-151-1/+53
|
* bpo-41001: Add os.eventfd() (#20930)Christian Heimes2020-11-132-1/+232
| | | Co-authored-by: Kyle Stanley <aeros167@gmail.com>
* bpo-38823: Fix compiler warning in _ctypes on Windows (GH-23258)Victor Stinner2020-11-131-1/+1
| | | | | | Explicitly cast PyExc_Exception to PyTypeObject* to fix the warning: modules\_ctypes\_ctypes.c(5748): warning C4133: '=': incompatible types - from 'PyObject *' to '_typeobject *'
* bpo-38823: Always build _ctypes with wchar_t (GH-23248)Victor Stinner2020-11-125-31/+4
| | | | | It is no longer possible to build the _ctypes extension module without wchar_t type: remove CTYPES_UNICODE macro. Anyway, the wchar_t type is required to build Python.
* bpo-38823: Fix refleaks in _ctypes extension init (GH-23247)Victor Stinner2020-11-122-162/+156
| | | | | | | | | | | Fix reference leaks in the error path of the initialization function the _ctypes extension module: call Py_DECREF(mod) on error. Change PyCFuncPtr_Type name from _ctypes.PyCFuncPtr to _ctypes.CFuncPtr to be consistent with the name exposed in the _ctypes namespace (_ctypes.CFuncPtr). Split PyInit__ctypes() function into sub-functions and add macros for readability.
* bpo-42237: Fix os.sendfile() on illumos (GH-23154)Jakub Stasiak2020-11-121-0/+15
|
* Fix memory leak introduced by GH-22780 (GH-23237)Andrew Svetlov2020-11-111-0/+1
|
* bpo-41073: PyType_GetSlot() can now accept static types. (GH-21931)Hai Shi2020-11-101-2/+60
| | | | | | | PyType_GetSlot() can now accept static types. Co-Authored-By: Petr Viktorin <encukou@gmail.com> Automerge-Triggered-By: GH:encukou
* bpo-42085: Introduce dedicated entry in PyAsyncMethods for sending values ↵Vladimir Matveev2020-11-102-12/+47
| | | | (#22780)
* bpo-41100: Support macOS 11 and Apple Silicon (GH-22855)Ronald Oussoren2020-11-087-253/+976
| | | | | | | | | | | Co-authored-by: Lawrence D’Anna <lawrence_danna@apple.com> * Add support for macOS 11 and Apple Silicon (aka arm64) As a side effect of this work use the system copy of libffi on macOS, and remove the vendored copy * Support building on recent versions of macOS while deploying to older versions This allows building installers on macOS 11 while still supporting macOS 10.9.
* bpo-40077: Convert _queuemodule to use heap types (GH-23136)Erlend Egeberg Aasland2020-11-072-105/+137
| | | @vstinner / @corona10, would you mind reviewing this?
* bpo-41832: PyType_FromModuleAndSpec() now accepts NULL tp_doc (GH-23123)Hai Shi2020-11-062-2/+27
|
* bpo-42260: PyConfig_Read() only parses argv once (GH-23168)Victor Stinner2020-11-051-3/+6
| | | | | | | | | | | | The PyConfig_Read() function now only parses PyConfig.argv arguments once: PyConfig.parse_argv is set to 2 after arguments are parsed. Since Python arguments are strippped from PyConfig.argv, parsing arguments twice would parse the application options as Python options. * Rework the PyConfig documentation. * Fix _testinternalcapi.set_config() error handling. * SetConfigTests no longer needs parse_argv=0 when restoring the old configuration.
* bpo-42260: Add _PyConfig_FromDict() (GH-23167)Victor Stinner2020-11-051-2/+37
| | | | | | | * Rename config_as_dict() to _PyConfig_AsDict(). * Add 'module_search_paths_set' to _PyConfig_AsDict(). * Add _PyConfig_FromDict(). * Add get_config() and set_config() to _testinternalcapi. * Add config_check_consistency().
* bpo-1635741: _sqlite3 uses PyModule_AddObjectRef() (GH-23148)Erlend Egeberg Aasland2020-11-042-17/+16
|
* bpo-1635741: Fix PyInit_pyexpat() error handling (GH-22489)Mohamed Koubaa2020-11-041-189/+299
| | | | Split PyInit_pyexpat() into sub-functions and fix reference leaks on error paths.
* bpo-1635741: _contextvars uses PyModule_AddType() (GH-23147)Victor Stinner2020-11-041-18/+3
| | | | | | Replace PyModule_AddObject() with PyModule_AddType() in the _contextvars module (Python-ast.c). Add also the module name to _contextvars types name.
* Add _PyType_GetModuleByDef (GH-22835)Petr Viktorin2020-11-032-3/+12
| | | | | See https://mail.python.org/archives/list/capi-sig@python.org/thread/T3P2QNLNLBRFHWSKYSTPMVEIL2EEKFJU/ for discussion. https://bugs.python.org/issue42100
* bpo-40077: Convert mmap.mmap static type to a heap type (GH-23108)Erlend Egeberg Aasland2020-11-031-68/+90
|
* bpo-35455: Fix thread_time for Solaris OS (GH-11118)Jakub Kulík2020-11-021-0/+17
|
* bpo-42236: Enhance _locale._get_locale_encoding() (GH-23083)Victor Stinner2020-11-012-2/+2
| | | | | | | | | * Rename _Py_GetLocaleEncoding() to _Py_GetLocaleEncodingObject() * Add _Py_GetLocaleEncoding() which returns a wchar_t* string to share code between _Py_GetLocaleEncodingObject() and config_get_locale_encoding(). * _Py_GetLocaleEncodingObject() now decodes nl_langinfo(CODESET) from the current locale encoding with surrogateescape, rather than using UTF-8.
* bpo-42146: Unify cleanup in subprocess_fork_exec() (GH-22970)Alexey Izbyshev2020-11-011-35/+18
| | | | | | | | | | | * bpo-42146: Unify cleanup in subprocess_fork_exec() Also ignore errors from _enable_gc(): * They are always suppressed by the current code due to a bug. * _enable_gc() is only used if `preexec_fn != None`, which is unsafe. * We don't have a good way to handle errors in case we successfully created a child process. Co-authored-by: Gregory P. Smith <greg@krypto.org>
* bpo-40956: Convert _sqlite3 module level functions to Argument Clinic (GH-22484)Erlend Egeberg Aasland2020-10-314-88/+313
|
* bpo-42208: Add _locale._get_locale_encoding() (GH-23052)Victor Stinner2020-10-312-3/+37
| | | | | | * Add a new _locale._get_locale_encoding() function to get the current locale encoding. * Modify locale.getpreferredencoding() to use it. * Remove the _bootlocale module.
* bpo-42208: Add _Py_GetLocaleEncoding() (GH-23050)Victor Stinner2020-10-313-48/+4
| | | | | | | | _io.TextIOWrapper no longer calls getpreferredencoding(False) of _bootlocale to get the locale encoding, but calls _Py_GetLocaleEncoding() instead. Add config_get_fs_encoding() sub-function. Reorganize also config_get_locale_encoding() code.