| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
sys.excepthook() and sys.unraisablehook() now explicitly flush the
file (usually sys.stderr).
If file.flush() fails, sys.excepthook() silently ignores the error,
whereas sys.unraisablehook() logs the new exception.
|
| |
|
|
|
|
| |
Fix possible overflow in wrap_lenfunc() when
sizeof(long) < sizeof(Py_ssize_t) (e.g., 64-bit Windows).
|
|
|
|
|
|
| |
(GH-11062)
|
|
|
| |
Co-authored-by: Mark Shannon <mark@hotpy.org>
|
| |
|
| |
|
|
|
| |
Per ae58649, time.monotonic is always available, making the old note outdated.
|
|
|
|
| |
dynload_hpux.c: add #include "pycore_pystate.h" for
_PyInterpreterState_GET_UNSAFE().
|
|
|
|
|
|
| |
Follow-up for #1067
https://bugs.python.org/issue29883
|
| |
|
|
|
|
|
| |
I tried to get rid of the `_ProtocolMeta`, but unfortunately it didn'y work. My idea to return a generic alias from `@runtime_checkable` made runtime protocols unpickleable. I am not sure what is worse (a custom metaclass or having some classes unpickleable), so I decided to stick with the status quo (since there were no complains so far). So essentially this is a copy of the implementation in `typing_extensions` with two modifications:
* Rename `@runtime` to `@runtime_checkable` (plus corresponding updates).
* Allow protocols that extend `collections.abc.Iterable` etc.
|
|
|
|
|
|
|
|
|
|
| |
(GH-13577)
It has been documented as deprecated and to be removed in 3.8;
From a comment on another thread – which I can't find ; leave get_coro_wrapper() for now, but always return `None`.
https://bugs.python.org/issue36933
|
|
|
|
|
|
|
|
|
|
| |
(GH-13562)
Return a coroutine while patching async functions with a decorator.
Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
https://bugs.python.org/issue36996
|
| |
|
|
|
|
|
| |
loop.subprocess_exec (GH-13586)
https://bugs.python.org/issue36686
|
|
|
|
|
| |
Fix destructor _pyio.BytesIO and _pyio.TextIOWrapper: initialize
their _buffer attribute as soon as possible (in the class body),
because it's used by __del__() which calls close().
|
|
|
|
|
| |
Move doc entry to match menu and refactor zoom function.
A followup patch will include a blurb.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a new threading.excepthook() function which handles uncaught
Thread.run() exception. It can be overridden to control how uncaught
exceptions are handled.
threading.ExceptHookArgs is not documented on purpose: it should not
be used directly.
* threading.excepthook() and threading.ExceptHookArgs.
* Add _PyErr_Display(): similar to PyErr_Display(), but accept a
'file' parameter.
* Add _thread._excepthook(): C implementation of the exception hook
calling _PyErr_Display().
* Add _thread._ExceptHookArgs: structseq type.
* Add threading._invoke_excepthook_wrapper() which handles the gory
details to ensure that everything remains alive during Python
shutdown.
* Add unit tests.
|
|
|
| |
https://bugs.python.org/issue36889
|
|
|
|
|
| |
instead (GH-13597)
When using the "=" debug functionality of f-strings, use another Constant node (or a merged constant node) instead of adding expr_text to the FormattedValue node.
|
|
|
| |
https://bugs.python.org/issue32941
|
|
|
| |
There is a duplicated "in" in the Supported Versions text.
|
| |
|
|
|
|
| |
Allow mmap objects to access the madvise() system call.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Add a whole new documentation page:
"Python Initialization Configuration"
* PyWideStringList_Append() return type is now PyStatus,
instead of int
* PyInterpreterState_New() now calls PyConfig_Clear() if
PyConfig_InitPythonConfig() fails.
* Rename files:
* Python/coreconfig.c => Python/initconfig.c
* Include/cpython/coreconfig.h => Include/cpython/initconfig.h
* Include/internal/: pycore_coreconfig.h => pycore_initconfig.h
* Rename structures
* _PyCoreConfig => PyConfig
* _PyPreConfig => PyPreConfig
* _PyInitError => PyStatus
* _PyWstrList => PyWideStringList
* Rename PyConfig fields:
* use_module_search_paths => module_search_paths_set
* module_search_path_env => pythonpath_env
* Rename PyStatus field: _func => func
* PyInterpreterState: rename core_config field to config
* Rename macros and functions:
* _PyCoreConfig_SetArgv() => PyConfig_SetBytesArgv()
* _PyCoreConfig_SetWideArgv() => PyConfig_SetArgv()
* _PyCoreConfig_DecodeLocale() => PyConfig_SetBytesString()
* _PyInitError_Failed() => PyStatus_Exception()
* _Py_INIT_ERROR_TYPE_xxx enums => _PyStatus_TYPE_xxx
* _Py_UnixMain() => Py_BytesMain()
* _Py_ExitInitError() => Py_ExitStatusException()
* _Py_PreInitializeFromArgs() => Py_PreInitializeFromBytesArgs()
* _Py_PreInitializeFromWideArgs() => Py_PreInitializeFromArgs()
* _Py_PreInitialize() => Py_PreInitialize()
* _Py_RunMain() => Py_RunMain()
* _Py_InitializeFromConfig() => Py_InitializeFromConfig()
* _Py_INIT_XXX() => _PyStatus_XXX()
* _Py_INIT_FAILED() => _PyStatus_EXCEPTION()
* Rename 'err' PyStatus variables to 'status'
* Convert RUN_CODE() macro to config_run_code() static inline function
* Remove functions:
* _Py_InitializeFromArgs()
* _Py_InitializeFromWideArgs()
* _PyInterpreterState_GetCoreConfig()
|
|
|
|
|
|
|
|
|
|
| |
(GH-13530)
Return a safe to use proxy socket object from `transport.get_extra_info('socket')`
https://bugs.python.org/issue37027
|
| |
|
|
|
| |
https://bugs.python.org/issue37035
|
|
|
|
| |
Handle late binding and attribute access in unittest.mock.AsyncMock
setup for autospeccing.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This will address the common mistake many asyncio users make:
an "except Exception" clause breaking Tasks cancellation.
In addition to this change, we stop inheriting asyncio.TimeoutError
and asyncio.InvalidStateError from their concurrent.futures.*
counterparts. There's no point for these exceptions to share the
inheritance chain.
In 3.9 we'll focus on implementing supervisors and cancel scopes,
which should allow better handling of all exceptions, including
SystemExit and KeyboardInterrupt
|
|
|
|
|
| |
This makes it easy to play with asyncio APIs with simply
using async/await in the REPL.
|
|
|
|
|
| |
* sys.unraisablehook: add 'err_msg' field to UnraisableHookArgs.
* Use _PyErr_WriteUnraisableMsg() in _ctypes _DictRemover_call()
and gc delete_garbage().
|
| |
|
|
|
|
| |
call (GH-13048)
|
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-13583)
Constant.kind is added in https://bugs.python.org/issue36280.
Current possible values for Constant.kind are "u" or None.
For r'bar' and b'bar', Constant.kind value is None, so there's no need
for special handling.
https://bugs.python.org/issue37053
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
hard. (#13157)
* No type cache for types with specialized mro, invalidation is hard.
* FIX: Don't disable method cache custom types that do not implement mro().
* fixing implem.
* Avoid storing error flags, also decref.
* news entry
* Clear as soon as we're getting an error.
* FIX: Reference leak.
|
|
|
|
| |
The implementation is straightforward and essentially is just copied from `typing_extensions`.
|
|
|
|
| |
The implementation is straightforward and essentially is just copied from `typing_extensions`.
|
|
|
|
| |
The implementation is straightforward, it just mimics `ClassVar` (since the latter is also a name/access qualifier, not really a type). Also it is essentially copied from `typing_extensions`.
|
|
|
|
|
|
|
|
|
| |
Update PyObject_CallMethodObjArgs and _PyObject_CallMethodIdObjArgs
to use _PyObject_GetMethod to avoid creating a bound method object
in many cases.
On a microbenchmark of PyObject_CallMethodObjArgs calling a method on
an interpreted Python class, this optimization resulted in a 1.7x
speedup.
|
| |
|
|
|
|
|
|
| |
* bpo-34632: Also include the test data directory.
* bpo-34632: remove the framework resources artifacts, accidentally added in 1bbf7b661f (ccbccce)
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 📝 Add a GitHub-specific security page
It will show up @
https://github.com/python/cpython/security/policy
allowing to navigate users who get there from "Security" tab in the
GitHub repo to the full article explaining the security vulnerability
reporting practices.
Co-Authored-By: Hugo <hugovk@users.noreply.github.com>
|
| |
|
| |
|
|
|
| |
Add importlib.metadata module as forward port of the standalone importlib_metadata.
|
|
|
|
| |
catch_unraisable_exception() now also removes its 'unraisable'
attribute at the context manager exit.
|