summaryrefslogtreecommitdiffstats
path: root/Doc/using
Commit message (Collapse)AuthorAgeFilesLines
* bpo-32699: Improves doc for .pth files in presense of a ._pth file (#5399)Steve Dower2018-01-281-4/+4
|
* bpo-25910: Link redirections in docs (#1933)Sanyam Khurana2018-01-203-7/+7
| | | Fixes some redirection links in docs.
* bpo-31975 (PEP 565): Show DeprecationWarning in __main__ (GH-4458)Nick Coghlan2018-01-081-39/+33
| | | | | | | | | | | | | - primary change is to add a new default filter entry for 'default::DeprecationWarning:__main__' - secondary change is an internal one to cope with plain strings in the warning module's internal filter list (this avoids the need to create a compiled regex object early on during interpreter startup) - assorted documentation updates, including many more examples of configuring the warnings settings - additional tests to ensure that both the pure Python and the C accelerated warnings modules have the expected default configuration
* bpo-29240, bpo-32030: Py_Main() re-reads config if encoding changes (#4899)Victor Stinner2017-12-161-3/+1
| | | | | | | | | | | | | | | | | | bpo-29240, bpo-32030: If the encoding change (C locale coerced or UTF-8 Mode changed), Py_Main() now reads again the configuration with the new encoding. Changes: * Add _Py_UnixMain() called by main(). * Rename pymain_free_pymain() to pymain_clear_pymain(), it can now be called multipled times. * Rename pymain_parse_cmdline_envvars() to pymain_read_conf(). * Py_Main() now clears orig_argc and orig_argv at exit. * Remove argv_copy2, Py_Main() doesn't modify argv anymore. There is no need anymore to get two copies of the wchar_t** argv. * _PyCoreConfig: add coerce_c_locale and coerce_c_locale_warn. * Py_UTF8Mode is now initialized to -1. * Locale coercion (PEP 538) now respects -I and -E options.
* bpo-32329: Add versionchanged to -R option doc (#4884)Victor Stinner2017-12-151-0/+3
|
* bpo-32329: Fix -R option for hash randomization (#4873)Victor Stinner2017-12-141-2/+3
| | | | | | | | | | | | bpo-32329, bpo-32030: * The -R option now turns on hash randomization when the PYTHONHASHSEED environment variable is set to 0 Previously, the option was ignored. * sys.flags.hash_randomization is now properly set to 0 when hash randomization is turned off by PYTHONHASHSEED=0. * _PyCoreConfig_ReadEnv() now reads the PYTHONHASHSEED environment variable. _Py_HashRandomization_Init() now only apply the configuration, it doesn't read PYTHONHASHSEED anymore.
* 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-32230: Set sys.warnoptions with -X dev (#4820)Victor Stinner2017-12-121-5/+1
| | | | | | | | | | | | | | Rather than supporting dev mode directly in the warnings module, this instead adjusts the initialisation code to add an extra 'default' entry to sys.warnoptions when dev mode is enabled. This ensures that dev mode behaves *exactly* as if `-Wdefault` had been passed on the command line, including in the way it interacts with `sys.warnoptions`, and with other command line flags like `-bb`. Fix also bpo-20361: have -b & -bb options take precedence over any other warnings options. Patch written by Nick Coghlan, with minor modifications of Victor Stinner.
* closes bpo-31650: PEP 552 (Deterministic pycs) implementation (#4575)Benjamin Peterson2017-12-091-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | Python now supports checking bytecode cache up-to-dateness with a hash of the source contents rather than volatile source metadata. See the PEP for details. While a fairly straightforward idea, quite a lot of code had to be modified due to the pervasiveness of pyc implementation details in the codebase. Changes in this commit include: - The core changes to importlib to understand how to read, validate, and regenerate hash-based pycs. - Support for generating hash-based pycs in py_compile and compileall. - Modifications to our siphash implementation to support passing a custom key. We then expose it to importlib through _imp. - Updates to all places in the interpreter, standard library, and tests that manually generate or parse pyc files to grok the new format. - Support in the interpreter command line code for long options like --check-hash-based-pycs. - Tests and documentation for all of the above.
* bpo-25910: Fixes redirection from http to https (#4674)Sanyam Khurana2017-12-062-4/+4
|
* bpo-32101: Add PYTHONDEVMODE environment variable (#4624)Victor Stinner2017-11-301-1/+11
| | | | | | * 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.
* bpo-32030: Rework memory allocators (#4625)Victor Stinner2017-11-291-10/+9
| | | | | | | | | | | | | | | | | | | | * Fix _PyMem_SetupAllocators("debug"): always restore allocators to the defaults, rather than only caling _PyMem_SetupDebugHooks(). * Add _PyMem_SetDefaultAllocator() helper to set the "default" allocator. * Add _PyMem_GetAllocatorsName(): get the name of the allocators * main() now uses debug hooks on memory allocators if Py_DEBUG is defined, rather than calling directly malloc() * Document default memory allocators in C API documentation * _Py_InitializeCore() now fails with a fatal user error if PYTHONMALLOC value is an unknown memory allocator, instead of failing with a fatal internal error. * Add new tests on the PYTHONMALLOC environment variable * Add support.with_pymalloc() * Add the _testcapi.WITH_PYMALLOC constant and expose it as support.with_pymalloc(). * sysconfig.get_config_var('WITH_PYMALLOC') doesn't work on Windows, so replace it with support.with_pymalloc(). * pythoninfo: add _testcapi collector for pymem
* bpo-32124: Document C functions safe before init (#4540)Victor Stinner2017-11-241-1/+1
| | | | Explicitly document C functions and C variables that can be set before Py_Initialize().
* bpo-32043: Rephrase -X dev documentation (#4478)Victor Stinner2017-11-211-4/+5
| | | | * should not be more verbose if the code is correct * enabled checks can be "expensive"
* bpo-32089: Fix warnings filters in dev mode (#4482)Victor Stinner2017-11-211-6/+6
| | | | | | | | | | The developer mode (-X dev) now creates all default warnings filters to order filters in the correct order to always show ResourceWarning and make BytesWarning depend on the -b option. Write a functional test to make sure that ResourceWarning is logged twice at the same location in the developer mode. Add a new 'dev_mode' field to _PyCoreConfig.
* bpo-32050: Fix -x option documentation (#4475)Victor Stinner2017-11-201-2/+0
| | | | The line number in correct when using the -x option: Py_Main() uses ungetc() to not skip the first newline character.
* bpo-32047: -X dev enables asyncio debug mode (#4418)Victor Stinner2017-11-201-4/+6
| | | | The new -X dev command line option now also enables asyncio debug mode.
* bpo-32043: New "developer mode": "-X dev" option (#4413)Victor Stinner2017-11-161-1/+13
| | | | | | | | | | | | | Add a new "developer mode": new "-X dev" command line option to enable debug checks at runtime. Changes: * Add unit tests for -X dev * test_cmd_line: replace test.support with support. * Fix _PyRuntimeState_Fini(): Use the same memory allocator than _PyRuntimeState_Init(). * Fix _PyMem_GetDefaultRawAllocator()
* Fix a minor typo and hyphenate "multi-threading" (#4237)Barry Warsaw2017-11-071-5/+5
|
* bpo-31415: Support PYTHONPROFILEIMPORTTIME envvar equivalent to -X ↵Barry Warsaw2017-11-021-2/+12
| | | | | | importtime (#4240) Support PYTHONPROFILEIMPORTTIME envvar equivalent to -X importtime
* bpo-31053: Remove redundant 'venv' argument in venv example (GH-2907)cocoatomo2017-10-271-1/+1
|
* bpo-28647: Update -u documentation after bpo-30404 (GH-3961)Berker Peksag2017-10-131-1/+2
|
* PEP 553 built-in breakpoint() function (bpo-31353) (#3355)Barry Warsaw2017-10-051-0/+12
| | | Implement PEP 553, built-in breakpoint() with support from sys.breakpointhook(), along with documentation and tests. Closes bpo-31353
* bpo-30404: The -u option now makes the stdout and stderr streams totally ↵Serhiy Storchaka2017-10-041-4/+4
| | | | unbuffered. (#1667)
* bpo-31415: Add `-X importtime` option (GH-3490)INADA Naoki2017-10-031-0/+7
| | | | | | It shows show import time of each module. It's useful for optimizing startup time. Typical usage: python -X importtime -c 'import requests'
* bpo-30737: Update DevGuide links to new URL (GH-3228)Lisa Hewus Fresh2017-08-302-3/+3
| | | Update old devguide links from https://docs.python.org/devguide to https://devguide.python.org
* bpo-30565: Add PYTHONCOERCECLOCALE=warn runtime flag (GH-2260)Nick Coghlan2017-06-181-0/+5
| | | | | | | | | | | | - removes PY_WARN_ON_C_LOCALE build time flag - locale coercion and compatibility warnings are now always compiled in, but are off by default - adds PYTHONCOERCECLOCALE=warn runtime option to aid in debugging potentially locale related compatibility problems Due to not-yet-resolved test failures on *BSD systems (including Mac OS X), this also temporarily disables UTF-8 as a locale coercion target, and skips testing the interpreter's behavior in the POSIX locale.
* Fix trivial typo in Readme (GH-2185)csabella2017-06-141-1/+1
| | | Replace platform with platforms.
* bpo-28180: Implementation for PEP 538 (#659)Nick Coghlan2017-06-111-0/+36
| | | | | | | | | | - new PYTHONCOERCECLOCALE config setting - coerces legacy C locale to C.UTF-8, C.utf8 or UTF-8 by default - always uses C.UTF-8 on Android - uses `surrogateescape` on stdin and stdout in the coercion target locales - configure option to disable locale coercion at build time - configure option to disable C locale warning at build time
* bpo-29898: Fix incorrect env variable name (GH-1576)Berker Peksag2017-05-161-2/+2
| | | | It should read PYTHONLEGACYWINDOWSSTDIO as stated in section "Add legacy mode" in PEP 528.
* Improve the grammar in windows.rst (GH-1330)Wieland Hoffmann2017-04-281-3/+3
|
* Correct the README link in Unix install docs (#1245)Sebastian Vetter2017-04-211-1/+1
|
* bpo-29770: remove outdated PYO related info (GH-590)Xiang Zhang2017-03-111-2/+2
|
* massage English for -X descriptions a bitBenjamin Peterson2017-02-101-5/+7
|
* issue26149 - Point to Wiki for Editors and Python IDEs on Unix.Senthil Kumaran2017-01-251-12/+7
| | | | Patch contributed by Mariatta Wijaya.
* Issue #28896: Deprecate WindowsRegistryFinderSteve Dower2016-12-071-0/+8
|
* Issue #28532: Add what's new entry for python -VV optionINADA Naoki2016-11-241-0/+2
|
* Issue #28532: Show sys.version when -V option is supplied twiceINADA Naoki2016-11-211-1/+6
|
* Issue #26638: Merge option warning fixes from 3.5 into 3.6Martin Panter2016-10-301-2/+3
|\
| * Issue #26638: Work around more CLI options that can’t be linkedMartin Panter2016-10-301-0/+1
| | | | | | | | | | | | * Cannot seem to link directly to main options from the “unittest” module, because that module has its own set of options * Mask out linking for options that no longer exist in Python 3
| * Issue #26638: Mask undefined CLI options to defeat new Sphinx warningsMartin Panter2016-10-301-2/+2
| |
* | Close #28479: Fix reST syntax in windows.rstVictor Stinner2016-10-191-4/+4
| | | | | | | | Patch written by Julien Palard.
* | Issue #28218: Fixes versionadded description in using/windows.rstSteve Dower2016-10-031-1/+1
| |
* | Issue #28137: Renames Windows path file to ._pthSteve Dower2016-09-171-11/+21
| | | | | | | | Issue #28138: Windows ._pth file should allow import site
* | Add links from whatsnew to Windows docs.Steve Dower2016-09-091-1/+1
| |
* | Adds documentation for pythonXX.zip as a landmark.Steve Dower2016-09-091-8/+13
| |
* | Switch to using |version| substitition in Windows docs.Steve Dower2016-09-091-9/+9
| |
* | Changes pyvenv.cfg trick into an actual sys.path file.Steve Dower2016-09-091-23/+30
| |
* | Issue #1602: Windows console doesn't input or print Unicode (PEP 528)Steve Dower2016-08-311-0/+17
| | | | | | | | Closes #17602: Adds a readline implementation for the Windows console
* | Issue #27781: Change file system encoding on Windows to UTF-8 (PEP 529)Steve Dower2016-09-081-0/+14
| |