summaryrefslogtreecommitdiffstats
path: root/Doc/library/sys.rst
Commit message (Collapse)AuthorAgeFilesLines
* 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
|\
| * Issue #19795: Mark up None as literal text.Serhiy Storchaka2016-10-191-1/+1
| |
* | Issue #27932: Prevent memory leak in win32_ver().Steve Dower2016-09-181-16/+11
| |
* | remove ceval timestamp supportBenjamin Peterson2016-09-091-12/+0
| |
* | Issue #27781: Change file system encoding on Windows to UTF-8 (PEP 529)Steve Dower2016-09-081-11/+40
| |
* | Issue #26462: Merge code block fixes from 3.5Martin Panter2016-07-291-1/+3
|\ \ | |/
| * Issue #26462: Doc: reduce literal_block warnings, fix syntax highlighting.Martin Panter2016-07-261-1/+3
| | | | | | | | Patch by Julien Palard.
* | Merge Issue #22558.Terry Jan Reedy2016-06-111-0/+1
|\ \ | |/
| * Issue #22558: Add remaining doc links to source code for Python-coded modules.Terry Jan Reedy2016-06-111-0/+1
| | | | | | | | | | Reformat header above separator line (added if missing) to a common format. Patch by Yoni Lavi.
* | Issue #26736: Used HTTPS for external links in the documentation if possible.Serhiy Storchaka2016-05-071-1/+1
|\ \ | |/
| * Issue #26736: Used HTTPS for external links in the documentation if possible.Serhiy Storchaka2016-05-071-1/+1
| |
* | Merge for issue #23936Brett Cannon2015-12-041-13/+26
|\ \ | |/
| * Issue #23936: Clarify what finders are.Brett Cannon2015-12-041-13/+26
| | | | | | | | | | Thanks to Raúl Cumplido for the bug report and Thomas Kluyver for the patch.
* | Issue #5319: New Py_FinalizeEx() API to exit with status 120 on failureMartin Panter2015-11-301-1/+6
|/
* sys.setrecursionlimit() now raises RecursionErrorVictor Stinner2015-10-121-0/+7
| | | | | | | Issue #25274: sys.setrecursionlimit() now raises a RecursionError if the new recursion limit is too low depending at the current recursion depth. Modify also the "lower-water mark" formula to make it monotonic. This mark is used to decide when the overflowed flag of the thread state is reset.
* Issue #25161: Merge full stops from 3.4 into 3.5Martin Panter2015-10-101-1/+1
|\
| * Issue #25161: Add full stops in documentation; patch by Takase ArihiroMartin Panter2015-10-101-1/+1
| |
| * Doc: fix default role usage (except in unittest mock docs)Georg Brandl2014-10-301-1/+1
| |
* | Fix usage of the default role.Zachary Ware2015-07-071-1/+1
| |
* | Issue #24439: Improve PEP 492 related docs.Yury Selivanov2015-06-241-2/+3
| | | | | | | | Patch by Martin Panter.
* | Issue #24400: Introduce a distinct type for 'async def' coroutines.Yury Selivanov2015-06-221-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary of changes: 1. Coroutines now have a distinct, separate from generators type at the C level: PyGen_Type, and a new typedef PyCoroObject. PyCoroObject shares the initial segment of struct layout with PyGenObject, making it possible to reuse existing generators machinery. The new type is exposed as 'types.CoroutineType'. As a consequence of having a new type, CO_GENERATOR flag is no longer applied to coroutines. 2. Having a separate type for coroutines made it possible to add an __await__ method to the type. Although it is not used by the interpreter (see details on that below), it makes coroutines naturally (without using __instancecheck__) conform to collections.abc.Coroutine and collections.abc.Awaitable ABCs. [The __instancecheck__ is still used for generator-based coroutines, as we don't want to add __await__ for generators.] 3. Add new opcode: GET_YIELD_FROM_ITER. The opcode is needed to allow passing native coroutines to the YIELD_FROM opcode. Before this change, 'yield from o' expression was compiled to: (o) GET_ITER LOAD_CONST YIELD_FROM Now, we use GET_YIELD_FROM_ITER instead of GET_ITER. The reason for adding a new opcode is that GET_ITER is used in some contexts (such as 'for .. in' loops) where passing a coroutine object is invalid. 4. Add two new introspection functions to the inspec module: getcoroutinestate(c) and getcoroutinelocals(c). 5. inspect.iscoroutine(o) is updated to test if 'o' is a native coroutine object. Before this commit it used abc.Coroutine, and it was requested to update inspect.isgenerator(o) to use abc.Generator; it was decided, however, that inspect functions should really be tailored for checking for native types. 6. sys.set_coroutine_wrapper(w) API is updated to work with only native coroutines. Since types.coroutine decorator supports any type of callables now, it would be confusing that it does not work for all types of coroutines. 7. Exceptions logic in generators C implementation was updated to raise clearer messages for coroutines: Before: TypeError("generator raised StopIteration") After: TypeError("coroutine raised StopIteration")
* | Docs: Fix typoYury Selivanov2015-06-041-2/+2
| |
* | Issue 24342: Let wrapper set by sys.set_coroutine_wrapper fail gracefullyYury Selivanov2015-06-021-0/+14
| |
* | Issue 24180: Document sys.(set|get)_coroutine_wrapperYury Selivanov2015-05-311-0/+34
| |
* | Issue #23731: Implement PEP 488.Brett Cannon2015-04-131-2/+1
| | | | | | | | | | | | The concept of .pyo files no longer exists. Now .pyc files have an optional `opt-` tag which specifies if any extra optimizations beyond the peepholer were applied.
* | Issue #22696: Add function :func:`sys.is_finalizing` to know about ↵Antoine Pitrou2014-12-071-0/+8
| | | | | | | | interpreter shutdown.
* | Doc: fix default role usage (except in unittest mock docs)Georg Brandl2014-10-301-1/+1
|/