| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
(GH-22820)
Co-authored-by: Éric Araujo <merwok@netwok.org>
(cherry picked from commit 0c37269be7065b9b15b7b3a4406084f9535a793a)
Co-authored-by: Andrew Kuchling <amk@amk.ca>
Co-authored-by: Andrew Kuchling <amk@amk.ca>
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-17884)
Minor fix in documentation:
- `sys.__unraisablehook__` is new in version 3.8
- Optional `sep` and `bytes_per_sep` parameters for `bytearray.hex` is also supported in Python 3.8 (just like `bytes.hex`)
(cherry picked from commit 0edc2c7678266c39a7ceb2df885cb050f887e32b)
Co-authored-by: Saiyang Gou <gousaiyang@163.com>
|
|
|
| |
Specify that sys.float_info.min is only the minimum normalized float.
|
|
|
|
|
| |
are invoked (GH-17392)
Also fixes some potential segfaults in unraisable hook handling.
|
|
|
|
|
| |
(cherry picked from commit e563a155be60fc0757914f87c8138f10de00bb16)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
|
|
|
|
|
|
|
|
|
|
| |
* "Return true/false" is replaced with "Return ``True``/``False``"
if the function actually returns a bool.
* Fixed formatting of some True and False literals (now in monospace).
* Replaced "True/False" with "true/false" if it can be not only bool.
* Replaced some 1/0 with True/False if it corresponds the code.
* "Returns <bool>" is replaced with "Return <bool>".
(cherry picked from commit 138ccbb02216ca086047c3139857fb44f3dab1f9)
|
|
|
|
|
| |
(cherry picked from commit 894e30ce0bcc1c509eb01c8ffa9ba6d7701aeaaf)
Co-authored-by: Steve Dower <steve.dower@python.org>
|
|
|
|
|
|
|
|
| |
Mention frame.f_trace in sys.settrace docs, as well as the fact you still
need to call `sys.settrace` to enable the tracing machinery before setting
`frame.f_trace` will have any effect.
(cherry picked from commit 9c2682efc69568e1b42a0c1759489d6f2e3b30ea)
Co-authored-by: Ram Rachum <ram@rachum.com>
|
|
|
|
| |
(GH-15961)
|
|
|
|
|
| |
(cherry picked from commit 9936371af298d465095ae70bc9c2943b4b16eac4)
Co-authored-by: Björn Meier <bjoern@opentrash.org>
|
|
|
|
|
| |
(cherry picked from commit 3038e87ba848023470f571242a8bb5a206c24430)
Co-authored-by: Andre Delfino <adelfino@gmail.com>
|
|
|
|
|
|
|
|
| |
Add a brief note to indicate that any new required attributes must go through the PEP process.
https://bugs.python.org/issue37284
(cherry picked from commit 52693c10e82622d883433b779a45d0bd792f17ed)
Co-authored-by: Giovanni Cappellotto <gcappellotto@fb.com>
|
|
|
|
|
| |
(cherry picked from commit e226e83d36dfc7220d836fb7a249ce18e70cb4a6)
Co-authored-by: Steve Dower <steve.dower@python.org>
|
|
|
|
|
|
| |
Also updates some (unreleased) event names to be consistent with the others.
(cherry picked from commit 44f91c388a6f4da9ed3300df32ca290b8aa104ea)
Co-authored-by: Steve Dower <steve.dower@python.org>
|
|
|
|
|
| |
(cherry picked from commit 7efc526e5cfb929a79c192ac2dcf7eb78d3a4401)
Co-authored-by: Victor Stinner <vstinner@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Document reference cycle and resurrected objects issues in
sys.unraisablehook() and threading.excepthook() documentation.
Fix test.support.catch_unraisable_exception(): __exit__() no longer
ignores unraisable exceptions.
Fix test_io test_writer_close_error_on_close(): use a second
catch_unraisable_exception() to catch the BufferedWriter unraisable
exception.
(cherry picked from commit 212646cae6b7c4ddc8d98c8b9b6d39a5f259e864)
Co-authored-by: Victor Stinner <vstinner@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
(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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
* sys.unraisablehook: add 'err_msg' field to UnraisableHookArgs.
* Use _PyErr_WriteUnraisableMsg() in _ctypes _DictRemover_call()
and gc delete_garbage().
|
|
|
| |
Adds sys.audit, sys.addaudithook, io.open_code, and associated C APIs.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add new sys.unraisablehook() function which can be overridden to
control how "unraisable exceptions" are handled. It is called when an
exception has occurred but there is no way for Python to handle it.
For example, when a destructor raises an exception or during garbage
collection (gc.collect()).
Changes:
* Add an internal UnraisableHookArgs type used to pass arguments to
sys.unraisablehook.
* Add _PyErr_WriteUnraisableDefaultHook().
* The default hook now ignores exception on writing the traceback.
* test_sys now uses unittest.main() to automatically discover tests:
remove test_main().
* Add _PyErr_Init().
* Fix PyErr_WriteUnraisable(): hold a strong reference to sys.stderr
while using it
|
|
|
|
|
|
|
|
| |
.. And update some deprecation warnings with version numbers.
https://bugs.python.org/issue36932
|
| |
|
|
|
|
|
|
| |
On AIX, sys.platform doesn't contain the major version anymore.
Always return 'aix', instead of 'aix3' .. 'aix7'. Since
older Python versions include the version number, it is recommended to
always use sys.platform.startswith('aix').
|
| |
|
|
|
|
|
|
|
|
| |
Use UTF-8 as the system encoding on VxWorks.
The main reason are:
1. The locale is frequently misconfigured.
2. Missing some functions to deal with locale in VxWorks C library.
|
|
|
|
|
|
|
|
|
|
|
| |
3.6 (GH-10264)
Documentation of sys.stdin/out/err update to reflect change in 3.6 on Windows to use UTF-8.
Wording by Eryk Sun and Paul Moore.
https://bugs.python.org/issue30410
|
|
|
|
|
|
| |
# Fixed missing colun in library/sys.po
[bpo-35492](https://bugs.python.org/issue35492): Fixed missing colun in library/sys.po
|
| |
|
|
|
|
|
|
| |
Replace "Availability: xxx" with ".. availability:: xxx" in the doc.
Original patch by Georg Brandl.
Co-Authored-By: Georg Brandl <georg@python.org>
|
|
|
| |
https://bugs.python.org/issue34901
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-6834)
In some development setups it is inconvenient or impossible to write bytecode
caches to the code tree, but the bytecode caches are still useful. The
PYTHONPYCACHEPREFIX environment variable allows specifying an alternate
location for cached bytecode files, within which a directory tree mirroring the code
tree will be created. This cache tree is then used (for both reading and writing)
instead of the local `__pycache__` subdirectory within each source directory.
Exposed at runtime as sys.pycache_prefix (defaulting to None), and can
be set from the CLI as "-X pycache_prefix=path".
Patch by Carl Meyer.
|
|
|
|
|
| |
Mention in the documentation of settrace and setprofile that errors in the
registered handlers will cause themselves unset.
|
| |
|
|
|
|
|
|
| |
* Add coro.cr_origin and sys.set_coroutine_origin_tracking_depth
* Use coroutine origin information in the unawaited coroutine warning
* Stop using set_coroutine_wrapper in asyncio debug mode
* In BaseEventLoop.set_debug, enable debugging in the correct thread
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Add -X utf8 command line option, PYTHONUTF8 environment variable
and a new sys.flags.utf8_mode flag.
* If the LC_CTYPE locale is "C" at startup: enable automatically the
UTF-8 mode.
* Add _winapi.GetACP(). encodings._alias_mbcs() now calls
_winapi.GetACP() to get the ANSI code page
* locale.getpreferredencoding() now returns 'UTF-8' in the UTF-8
mode. As a side effect, open() now uses the UTF-8 encoding by
default in this mode.
* Py_DecodeLocale() and Py_EncodeLocale() now use the UTF-8 encoding
in the UTF-8 Mode.
* Update subprocess._args_from_interpreter_flags() to handle -X utf8
* Skip some tests relying on the current locale if the UTF-8 mode is
enabled.
* Add test_utf8mode.py.
* _Py_DecodeUTF8_surrogateescape() gets a new optional parameter to
return also the length (number of wide characters).
* pymain_get_global_config() and pymain_set_global_config() now
always copy flag values, rather than only copying if the new value
is greater than the old value.
|
|
|
|
|
|
| |
* bpo-32101: Add sys.flags.dev_mode flag
Rename also the "Developer mode" to the "Development mode".
* bpo-32101: Add PYTHONDEVMODE environment variable
Mention it in the development chapiter.
|
| |
|
| |
|
|
|
| |
Implement PEP 553, built-in breakpoint() with support from sys.breakpointhook(), along with documentation and tests. Closes bpo-31353
|
|
|
|
|
|
|
|
|
| |
f_trace_lines: enable/disable line trace events
f_trace_opcodes: enable/disable opcode trace events
These are intended primarily for testing of the interpreter
itself, as they make it much easier to emulate signals
arriving at unfortunate times.
|
| |
|
|\ |
|
| |
| |
| |
| | |
Patch by Eric Appelt.
|
|/
|
|
|
|
|
| |
Issue #28740: Add sys.getandroidapilevel(): return the build time
API version of Android as an integer.
Function only available on Android.
|
|\ |
|
| | |
|
| | |
|
| | |
|