summaryrefslogtreecommitdiff
path: root/Doc/library/sys.rst
Commit message (Collapse)AuthorAgeFilesLines
* bpo-1294959: Add sys.platlibdir attribute (GH-18381)Victor Stinner2020-03-101-0/+21
| | | | | | | | | | | | | Add --with-platlibdir option to the configure script: name of the platform-specific library directory, stored in the new sys.platlitdir attribute. It is used to build the path of platform-specific dynamic libraries and the path of the standard library. It is equal to "lib" on most platforms. On Fedora and SuSE, it is equal to "lib64" on 64-bit systems. Co-Authored-By: Jan Matějek <jmatejek@suse.com> Co-Authored-By: Matěj Cepl <mcepl@cepl.eu> Co-Authored-By: Charalampos Stratakis <cstratak@redhat.com>
* Doc: sys.__unraisablehook__ and bytearray.hex separators are new in 3.8 ↵Saiyang Gou2020-02-071-0/+2
| | | | | | | | (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`)
* bpo-39429: Add a new "Python Development Mode" doc page (GH-18132)Victor Stinner2020-01-241-7/+8
|
* bpo-39310: Add math.ulp(x) (GH-17965)Victor Stinner2020-01-131-8/+14
| | | | Add math.ulp(): return the value of the least significant bit of a float.
* bpo-13601: always use line-buffering for sys.stderr (GH-17646)Jendrik Seipp2020-01-011-3/+9
|
* bpo-38920: Add audit hooks for when sys.excepthook and sys.unraisable hooks ↵Steve Dower2019-11-281-1/+22
| | | | | are invoked (GH-17392) Also fixes some potential segfaults in unraisable hook handling.
* bpo-38892: Improve docs for audit event (GH-17361)Terry Jan Reedy2019-11-261-3/+3
|
* bpo-38738: Fix formatting of True and False. (GH-17083)Serhiy Storchaka2019-11-121-1/+1
| | | | | | | | | * "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>".
* bpo-38434: Fixes some audit event documentation (GH-16932)Steve Dower2019-10-261-8/+11
|
* bpo-37937: Mention frame.f_trace in sys.settrace docs (GH-15439)Ram Rachum2019-09-211-0/+11
| | | | | | 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.
* bpo-36270: Doc: add link to traceback object reference (GH-13119)Björn Meier2019-09-111-1/+1
|
* bpo-38096: Clean up the "struct sequence" / "named tuple" docs (GH-15895)Raymond Hettinger2019-09-111-6/+6
| | | | | | | | * bpo-38096: Clean up the "struct sequence" / "named tuple" docs * Fix remaining occurrences of "struct sequence" * Repair a user visible docstring
* Correct minor gramatical mistake in sys.settrace doc (GH-15637)Andre Delfino2019-09-051-1/+2
|
* bpo-37284: Add note to sys.implementation doc (GH-14328)Giovanni Cappellotto2019-07-151-0/+4
| | | | | | | | | Add a brief note to indicate that any new required attributes must go through the PEP process. https://bugs.python.org/issue37284
* bpo-37363: Add audit events on startup for the run commands (GH-14524)Steve Dower2019-07-011-0/+6
|
* bpo-37390: Add audit event table to documentations (GH-14406)Steve Dower2019-06-271-6/+9
| | | Also updates some (unreleased) event names to be consistent with the others.
* bpo-37392: Remove sys.setcheckinterval() (GH-14355)Victor Stinner2019-06-251-23/+0
| | | | | | | 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-36707: Document "m" removal from sys.abiflags (GH-14090)Victor Stinner2019-06-151-0/+4
|
* bpo-37261: Document sys.unraisablehook corner cases (GH-14059)Victor Stinner2019-06-141-3/+11
| | | | | | | | | | | 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.
* bpo-36933: Remove sys.set_coroutine_wrapper (marked for removal in 3.8) ↵Matthias Bussonnier2019-05-281-59/+0
| | | | | | | | | | (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
* bpo-1230540: Add threading.excepthook() (GH-13515)Victor Stinner2019-05-281-1/+5
| | | | | | | | | | | | | | | | | | | 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.
* bpo-36829: Add _PyErr_WriteUnraisableMsg() (GH-13488)Victor Stinner2019-05-271-0/+5
| | | | | * sys.unraisablehook: add 'err_msg' field to UnraisableHookArgs. * Use _PyErr_WriteUnraisableMsg() in _ctypes _DictRemover_call() and gc delete_garbage().
* bpo-36842: Implement PEP 578 (GH-12613)Steve Dower2019-05-231-0/+63
| | | Adds sys.audit, sys.addaudithook, io.open_code, and associated C APIs.
* bpo-36829: Add sys.unraisablehook() (GH-13187)Victor Stinner2019-05-221-4/+29
| | | | | | | | | | | | | | | | | | | 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
* bpo-36932: use proper deprecation-removed directive (GH-13349)Matthias Bussonnier2019-05-201-1/+1
| | | | | | | | .. And update some deprecation warnings with version numbers. https://bugs.python.org/issue36932
* Doc: Add link threading.settrace to sys.settrace (GH-13345)Stefan Hoelzl2019-05-171-2/+2
|
* bpo-36588: On AIX, remove major version from sys.platform (GH-12787)Michael Felt2019-04-121-1/+10
| | | | | | 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').
* bpo-17110: doc: add note how to get bytes from sys.argv (GH-12602)Inada Naoki2019-03-301-0/+6
|
* bpo-31904: Add encoding support for VxWorks RTOS (GH-12051)pxinwr2019-03-041-2/+6
| | | | | | | | 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.
* bpo-30410: Documentation of sys.stdin/out/err update to reflect change in ↵Lysandros Nikolaou2019-02-141-7/+24
| | | | | | | | | | | 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 (GH-11153)Jules Lasne (jlasne)2018-12-141-1/+1
| | | | | | # Fixed missing colun in library/sys.po [bpo-35492](https://bugs.python.org/issue35492): Fixed missing colun in library/sys.po
* bpo-35054: Add more index entries for symbols. (GH-10064)Serhiy Storchaka2018-10-261-0/+2
|
* bpo-11233: Create availability directive for documentation (GH-9692)Cheryl Sabella2018-10-121-7/+13
| | | | | | Replace "Availability: xxx" with ".. availability:: xxx" in the doc. Original patch by Georg Brandl. Co-Authored-By: Georg Brandl <georg@python.org>
* bpo-34901: add isolated (-I) flag to sys.flags (GH-9708)Danish Prakash2018-10-071-0/+4
| | | https://bugs.python.org/issue34901
* closes bpo-34502: Remove a note about utf8_mode from sys.exit() docs. (GH-8928)Alexey Izbyshev2018-08-251-3/+0
|
* bpo-33499: Add PYTHONPYCACHEPREFIX env var for alt bytecode cache location. ↵Carl Meyer2018-06-161-0/+20
| | | | | | | | | | | | | | | (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.
* bpo-32532: Improve documentation of settrace and setprofile (#5359)Xiang Zhang2018-01-271-1/+5
| | | | | Mention in the documentation of settrace and setprofile that errors in the registered handlers will cause themselves unset.
* bpo-17799: Explain real behaviour of sys.settrace and sys.setprofile (#4056)Pablo Galindo2018-01-241-17/+32
|
* bpo-32591: Add native coroutine origin tracking (#5250)Nathaniel J. Smith2018-01-211-0/+40
| | | | | | * 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
* bpo-29240: PEP 540: Add a new UTF-8 Mode (#855)Victor Stinner2017-12-131-1/+12
| | | | | | | | | | | | | | | | | | | | | | * 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 PYTHONDEVMODE environment variable (#4624)Victor Stinner2017-11-301-0/+4
| | | | | | * 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.
* Fix miscellaneous typos (#4275)luzpaz2017-11-051-1/+1
|
* bpo-28647: Update -u documentation after bpo-30404 (GH-3961)Berker Peksag2017-10-131-3/+3
|
* PEP 553 built-in breakpoint() function (bpo-31353) (#3355)Barry Warsaw2017-10-051-4/+43
| | | Implement PEP 553, built-in breakpoint() with support from sys.breakpointhook(), along with documentation and tests. Closes bpo-31353
* bpo-31344: Per-frame control of trace events (GH-3417)Nick Coghlan2017-09-081-1/+16
| | | | | | | | | 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.
* Spelling fixes (#2902)Ville Skyttä2017-08-031-1/+1
|
* Merge 3.6 (issue #28091)Yury Selivanov2016-12-151-0/+36
|\
| * Issue #28091: Document PEP 525 & PEP 530.Yury Selivanov2016-12-151-0/+36
| | | | | | | | Patch by Eric Appelt.
* | Add sys.getandroidapilevel()Victor Stinner2016-12-021-0/+9
|/ | | | | | | Issue #28740: Add sys.getandroidapilevel(): return the build time API version of Android as an integer. Function only available on Android.
* Issue #19795: Mark up None as literal text.Serhiy Storchaka2016-10-191-1/+1
|\