summaryrefslogtreecommitdiff
path: root/Doc/using
Commit message (Collapse)AuthorAgeFilesLines
* [3.7] bpo-37216: Fix version and filename in Mac using document (GH-13963)Makdon2019-06-111-2/+2
|
* Docs: FIX broken links. (GH-13491)Miss Islington (bot)2019-05-282-4/+5
| | | | | (cherry picked from commit 7114c6504a60365b8b0cd718da0ec8a737599fb9) Co-authored-by: Julien Palard <julien@palard.fr>
* bpo-33922: Adding documentation for new "-64" suffix of Python launcher ↵Miss Islington (bot)2019-04-121-13/+23
| | | | | | | | (GH-7849) Since bpo-30291 it is possible to specify the architecture of Python when using the launcher (cherry picked from commit 1e2ad6c275d2b09e76b7cbba7281d5a125a593c1) Co-authored-by: mrh1997 <mrh1997@users.noreply.github.com>
* Include the --prompt flag in venv's help output (GH-10711)Miss Islington (bot)2019-02-221-1/+3
| | | | | | Document usage of the existing `--prompt` option in the command line help. (cherry picked from commit 3208880f1c72800bacf94a2045fcb0436702c7a1) Co-authored-by: Holger Frey <socials@holgerfrey.de>
* bpo-35854: Fix EnvBuilder and --symlinks in venv on Windows (GH-11700)Miss Islington (bot)2019-01-301-0/+5
| | | | | (cherry picked from commit a1f9a3332bd4767e47013ea787022f06b6dbcbbd) Co-authored-by: Steve Dower <steve.dower@microsoft.com>
* bpo-35450: reflect in docs that venv module is not always creating a copy of ↵Miss Islington (bot)2018-12-141-3/+4
| | | | | | | | the Python binary (GH-11144) (GH-11167) https://bugs.python.org/issue35450 (cherry picked from commit f5107dfd42121ef40b13eb678705802f0ff02cf9) Co-authored-by: mkkot <marcin2006@gmail.com>
* bpo-34977: Add Windows App Store package (GH-11027)Steve Dower2018-12-101-121/+226
| | | Also adds the PC/layout script for generating layouts on Windows.
* Correct a couple of unbalanced parenthesis. (GH-10779)Miss Islington (bot)2018-12-051-2/+2
| | | | | (cherry picked from commit 55f41e45b4318cbe19209f5144641344d0049fb8) Co-authored-by: Andre Delfino <adelfino@gmail.com>
* bpo-35221: Additional hint that the placeholder is to be replaced. ↵Miss Islington (bot)2018-11-211-1/+2
| | | | | | | (GH-10604) (GH-10629) (cherry picked from commit d936a8f8e0964de1147656f1435532f0170f8b6c) Co-authored-by: Julien Palard <julien@palard.fr>
* Linkify PEP 8 in unix.rst (GH-10482)Miss Islington (bot)2018-11-121-1/+1
| | | | | (cherry picked from commit 9404e7737bd09bc1df154e1216d721e5168e4c68) Co-authored-by: Andrés Delfino <adelfino@gmail.com>
* [3.7] bpo-11233: Create availability directive for documentation (GH-9692) ↵Cheryl Sabella2018-10-151-4/+4
| | | | | | | | | | | (GH-9830) Replace "Availability: xxx" with ".. availability:: xxx" in the doc. Original patch by Georg Brandl. Co-Authored-By: Georg Brandl <georg@python.org> (cherry picked from commit 2d6097d027e0dd3debbabc702aa9c98d94ba32a3) Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
* [3.7]Documentation minor update related to 3.6 - 3.7 migration (GH-9501)Christophe Nanteuil2018-09-242-8/+8
| | | | | Change version from 3.6 to 3.7 in the documentation when it addresses newcomers. original request from python/python-docs-fr#273
* Revert "[3.7] bpo-34589: Add -X coerce_c_locale option; C locale coercion ↵Victor Stinner2018-09-191-15/+1
| | | | | off by default (GH-9379)" (GH-9416) This reverts commit 144f1e2c6f4a24bd288c045986842c65cc289684.
* [3.7] bpo-34589: Add -X coerce_c_locale option; C locale coercion off by ↵Victor Stinner2018-09-171-1/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | default (GH-9379) * bpo-34589: Make _PyCoreConfig.coerce_c_locale private (GH-9371) _PyCoreConfig: * Rename coerce_c_locale to _coerce_c_locale * Rename coerce_c_locale_warn to _coerce_c_locale_warn These fields are now private (name prefixed by "_"). (cherry picked from commit 188ebfa475a6f6aa2d0ea14ca8e1fbe7865b6d27) * bpo-34589: C locale coercion off by default (GH-9073) Py_Initialize() and Py_Main() cannot enable the C locale coercion (PEP 538) anymore: it is always disabled. It can now only be enabled by the Python program ("python3). test_embed: get_filesystem_encoding() doesn't have to set PYTHONUTF8 nor PYTHONCOERCECLOCALE, these variables are already set in the parent. (cherry picked from commit 7a0791b6992d420dc52536257f2f093851ed7215) * bpo-34589: Add -X coerce_c_locale command line option (GH-9378) Add a new -X coerce_c_locale command line option to control C locale coercion (PEP 538). (cherry picked from commit dbdee0073cf0b88fe541980ace1f650900f455cc)
* bpo-34317: Fix a dead url to Windows documentation (GH-8622)Miss Islington (bot)2018-08-021-1/+1
| | | | | (cherry picked from commit 46ebe61c7f3511b97268b44d5373a9e9cf0b5cc7) Co-authored-by: HiyashiChuka <41299525+hiyashichuka@users.noreply.github.com>
* Fix typos & formatting in Using Python on Windows doc (GH-8559)Miss Islington (bot)2018-07-301-4/+4
| | | | | (cherry picked from commit 8e7e8bd8984068e3245d64b9a21e6840880747af) Co-authored-by: Segev Finer <segev208@gmail.com>
* bpo-24356: Specify which Python binary will be used with venv (GH-6589)Steve Dower2018-07-281-5/+0
|
* bpo-33859: Fix spelling mistakes in docs. (GH-7691)Miss Islington (bot)2018-06-151-1/+1
| | | | | (cherry picked from commit c151f7846d6d900c22edaaa77f5f7771b529099e) Co-authored-by: Xtreak <tirkarthi@users.noreply.github.com>
* bpo-33409: Clarify PEP 538/540 relationship (GH-7534)Miss Islington (bot)2018-06-091-18/+79
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While locale coercion and UTF-8 mode turned out to be complementary ideas rather than competing ones, it isn't immediately obvious why it's useful to have both, or how they interact at runtime. This updates both the Python 3.7 What's New doc and the PYTHONCOERCECLOCALE and PYTHONUTF8 documentation in an attempt to clarify that relationship: - in the respective What's New sections, add a closing paragraph explaining which problem each one solves, and pointing to the other PEP's section for the specific aspects it relies on the other PEP to solve - use "locale-aware mode" as a more descriptive term for the default non-UTF-8 mode - improve wording conistenccy between the PYTHONCOERCECLOCALE and PYTHONUTF8 docs when they cover the same thing (mostly related to legacy locale detection and setting the standard stream error handler) - improve the description of the locale coercion trigger conditions (including pointing out that setting LC_ALL turns off locale coercion) - port the full description of the UTF-8 mode behaviour changes from PEP 540 into the PYTHONUTF8 documentation - be explicit that PYTHONIOENCODING still overrides the settings for the standard streams - mention concrete examples of things that do and don't get their text encoding assumptions adjusted by the two text encoding assumption override techniques (cherry picked from commit 1bcb8a636857e3383d65aaf196f93edb949f2e79) Co-authored-by: Nick Coghlan <ncoghlan@gmail.com>
* bpo-33503: Fix the broken pypi link in the source and the documentation ↵Miss Islington (bot)2018-05-161-1/+1
| | | | | | | (GH-6814) (GH-6872) (cherry picked from commit 19177fbd5d6d9b29ccc302d65f9d9417ece082ce) Co-authored-by: Stéphane Wirtel <stephane@wirtel.be>
* Improve highlighting of some code blocks. (GH-6401)Miss Islington (bot)2018-04-093-12/+24
| | | | | (cherry picked from commit 46936d5a71d1683dbd8ddb6d7f39aab50ecfec50) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* bpo-17232: Clarify docs for -O and -OO command line options (GH-5839)Miss Islington (bot)2018-02-241-2/+13
| | | | | | The 'optimization' is for space in the executable file, not for run time. (cherry picked from commit 186b606d8a2ea4fd51b7286813302c8e8c7006cc) Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
* bpo-32540: Update venv documentation (GH-5736)Miss Islington (bot)2018-02-201-4/+3
| | | | | | | If the directory already exists, it will be re-used. (cherry picked from commit e8eb972514cad6086b752754c1d34d703c04dd82) Co-authored-by: TROUVERIE Joachim <joachim.trouverie@linoame.fr>
* Fix installation instructions for *nix (GH-5605)Miss Islington (bot)2018-02-131-2/+4
| | | | | | | Remove pkg_add -r python from FreeBSD installation section. Moved to OpenBSD. (cherry picked from commit 3384d38d51a2c3450e742175db5d6d638fa5d2eb) Co-authored-by: Eitan Adler <grimreaper@users.noreply.github.com>
* bpo-32699: Improves doc for .pth files in presense of a ._pth file (#5399)Steve Dower2018-01-291-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-151-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-201-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-201-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-061-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