summaryrefslogtreecommitdiffstats
path: root/Doc/using
Commit message (Collapse)AuthorAgeFilesLines
* [3.9] gh-95778: CVE-2020-10735: Prevent DoS by very large int() (#96502)Gregory P. Smith2022-09-051-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Correctly pre-check for int-to-str conversion (#96537) Converting a large enough `int` to a decimal string raises `ValueError` as expected. However, the raise comes _after_ the quadratic-time base-conversion algorithm has run to completion. For effective DOS prevention, we need some kind of check before entering the quadratic-time loop. Oops! =) The quick fix: essentially we catch _most_ values that exceed the threshold up front. Those that slip through will still be on the small side (read: sufficiently fast), and will get caught by the existing check so that the limit remains exact. The justification for the current check. The C code check is: ```c max_str_digits / (3 * PyLong_SHIFT) <= (size_a - 11) / 10 ``` In GitHub markdown math-speak, writing $M$ for `max_str_digits`, $L$ for `PyLong_SHIFT` and $s$ for `size_a`, that check is: $$\left\lfloor\frac{M}{3L}\right\rfloor \le \left\lfloor\frac{s - 11}{10}\right\rfloor$$ From this it follows that $$\frac{M}{3L} < \frac{s-1}{10}$$ hence that $$\frac{L(s-1)}{M} > \frac{10}{3} > \log_2(10).$$ So $$2^{L(s-1)} > 10^M.$$ But our input integer $a$ satisfies $|a| \ge 2^{L(s-1)}$, so $|a|$ is larger than $10^M$. This shows that we don't accidentally capture anything _below_ the intended limit in the check. <!-- gh-issue-number: gh-95778 --> * Issue: gh-95778 <!-- /gh-issue-number --> Co-authored-by: Gregory P. Smith [Google LLC] <greg@krypto.org> Co-authored-by: Christian Heimes <christian@python.org> Co-authored-by: Mark Dickinson <dickinsm@gmail.com>
* [3.9] gh-76773: Update docs mentioning no-longer-supported Windows versions ↵Miss Islington (bot)2022-05-101-83/+51
| | | | | | | | | | & features (GH-92529) (GH-92610) (cherry picked from commit f1bbcba74f77eff2a4c0881f3d529f3bf0664d40) Co-authored-by: CAM Gerlach <CAM.Gerlach@Gerlach.CAM> Automerge-Triggered-By: GH:serhiy-storchaka
* Doc: Update py2app link. (GH-91585)Miss Islington (bot)2022-05-091-1/+1
| | | | | | See: https://mail.python.org/archives/list/docs@python.org/thread/KDVFGNGGUGGPVRZT7WZYHHWXCRS2GEN7/ (cherry picked from commit b77a95f44a024d1afab28e380252aa6d9c4efb1c) Co-authored-by: Julien Palard <julien@palard.fr>
* Demonstrate `py --list` in the quickstart section of the Windows doc page ↵Miss Islington (bot)2022-04-041-0/+6
| | | | | | | (GH-29383) (cherry picked from commit 1ecfe3d5ae4ddec4e73a6cfc93fed6df43fe0be5) Co-authored-by: Christian Clauss <cclauss@me.com>
* bpo-36557: Updated wording for using/windows (GH-31457)Miss Islington (bot)2022-02-221-2/+2
| | | | | (cherry picked from commit 9a0d941df4c3e1efb8b3017cd2c2de17e582fd5c) Co-authored-by: slateny <46876382+slateny@users.noreply.github.com>
* Optimize images by IMGbot (GH-21348)Miss Islington (bot)2022-02-041-0/+0
| | | | | | Co-authored-by: ImgBotApp <ImgBotHelp@gmail.com> (cherry picked from commit ba650af7d660084e08859dd1ee1917cccee24e88) Co-authored-by: Manish Kumar ⛄ <manishprivet@protonmail.com>
* [3.9] [docs] Improve the markup of powers (GH-28598) (GH-28608)Łukasz Langa2021-09-281-1/+1
| | | | | (cherry picked from commit 4f05f15d7b25ef8b690cb94fdc4c8cb5521a4e27) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* bpo-41203: Replace Mac OS X and OS X with macOS (GH-28515) (GH-28524)Miss Islington (bot)2021-09-232-14/+14
| | | | | | | | | | Replace old names when they refer to actual versions of macOS. Keep historical names in references to older versions. Co-authored-by: Patrick Reader <_@pxeger.com> (cherry picked from commit 36122e18148c5b6c78ebce1d36d514fd7cf250f5) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* Fix broken links and improve stand-alone tools list in FAQ GH-25609Miss Islington (bot)2021-04-261-1/+1
| | | | | (cherry picked from commit d28b34695301ec99a9334ad8d69b6092f4f703d5) Co-authored-by: Andre Delfino <adelfino@gmail.com>
* Remove all links to mingw.org (GH-24552)Miss Islington (bot)2021-02-181-2/+0
| | | | | | | | | | This lease on this domain has lapsed. This not only makes these dead links, but a potential attack vector for readers of python.org as the domain can be obtained by an untrustworthy party. I considered redirecting these links to http://mingw-w64.org/ which is a maintained fork of mingw, but beyond my unfamiliarity with the exact level of compatibility, at the time of this PR that site had an expired cert and so is not much of a vulnerability fix. Automerge-Triggered-By: GH:Mariatta (cherry picked from commit 743932d50815edbe4ffd530ae091c53ae47dd34b) Co-authored-by: Jeremy Paige <ucodery@gmail.com>
* Add link to Microsoft docs for limitations in Windows Store package (GH-24422)Miss Islington (bot)2021-02-031-0/+5
| | | | | (cherry picked from commit 1ba08a121a25fcf7c947d8d37e72e46dae59168c) Co-authored-by: Steve Dower <steve.dower@python.org>
* [doc] Document VIRTUAL_ENV environment variable (GH-21970)Miss Islington (bot)2021-01-301-0/+4
| | | | | (cherry picked from commit 3584d4b64a5373440f78237eac734831cfd83f79) Co-authored-by: Andre Delfino <adelfino@gmail.com>
* bpo-42523: Fix supported versions in "Using Python on Windows" (GH-23603)Miss Islington (bot)2020-12-031-2/+2
| | | | | (cherry picked from commit db68544122f5a0c7b80f69c0e643049efa6699c6) Co-authored-by: Zackery Spytz <zspytz@gmail.com>
* [3.9] bpo-4bpo-42314: Fix the documentation for venv --upgrade-deps ↵Zackery Spytz2020-11-101-1/+1
| | | | | (GH-22113) (GH-23232) It was added in 3.9, not 3.8.
* bpo-30612: Tweak Windows registry path syntax in the docs (GH-20281)Miss Skeleton (bot)2020-10-201-3/+3
| | | | | (cherry picked from commit ff1ae3dd334faa2006394c2318db385cdc42030a) Co-authored-by: Zackery Spytz <zspytz@gmail.com>
* bpo-41192: Fix some broken anchors for audit event entries (GH-21310) (GH-22767)Miss Skeleton (bot)2020-10-191-1/+1
| | | | | | (cherry picked from commit ebc8c3828779374b9be4fae5c8ffc0059d36ac8c) Co-authored-by: Saiyang Gou <gousaiyang@163.com>
* bpo-40854: Allow overriding sys.platlibdir via PYTHONPLATLIBDIR env-var ↵Victor Stinner2020-06-081-0/+8
| | | | | | | (GH-20605) (GH-20725) (cherry picked from commit 8f023a2f664f902a3d0b7a6f64d63afc0d1c15ae) Co-authored-by: Sandro Mani <manisandro@gmail.com>
* bpo-40831: Remove an incorrect statement in the Windows docs (GH-20570)Miss Islington (bot)2020-06-011-3/+1
| | | | | (cherry picked from commit c8966667bbdb284c3780ef6cec8a3870935a6bb7) Co-authored-by: Zackery Spytz <zspytz@gmail.com>
* bpo-38972: Fix typos in PowerShell Execution Policies links (GH-20383)Miss Islington (bot)2020-05-251-1/+1
| | | | | (cherry picked from commit ef16958d17e83723334a51428f410f726d6492a7) Co-authored-by: Miro Hrončok <miro@hroncok.cz>
* [doc] Remove references to obsolete BuildApplet on macOS. (GH-20023) (GH-20304)Miss Islington (bot)2020-05-211-8/+2
| | | | | | (cherry picked from commit 7864f11cdf12807555d62c7a132c191eb41ecc02) Co-authored-by: Andre Delfino <adelfino@gmail.com>
* bpo-40334: Rename PyConfig.use_peg to _use_peg_parser (GH-19670)Victor Stinner2020-04-231-3/+9
| | | | | | | | | | | * Rename PyConfig.use_peg to _use_peg_parser * Document PyConfig._use_peg_parser and mark it a deprecated * Mark -X oldparser option and PYTHONOLDPARSER env var as deprecated in the documentation. * Add use_old_parser() and skip_if_new_parser() to test.support * Remove sys.flags.use_peg: use_old_parser() uses _testinternalcapi.get_configs() instead. * Enhance test_embed tests * subprocess._args_from_interpreter_flags() copies -X oldparser
* bpo-40334: PEP 617 implementation: New PEG parser for CPython (GH-19503)Pablo Galindo2020-04-221-0/+8
| | | | Co-authored-by: Guido van Rossum <guido@python.org> Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
* bpo-38972: Link to instructions to change PowerShell execution policy (GH-19131)Derek Keeler2020-04-021-0/+11
|
* fix typo: add space (GH-18853)Julin S2020-03-081-2/+2
| | | | Fix typo in cmdline.rst Add space between the `-m` option and the module name (`timeit`).
* bpo-39489: Remove COUNT_ALLOCS special build (GH-18259)Victor Stinner2020-02-031-3/+2
| | | | | | | | | | | Remove: * COUNT_ALLOCS macro * sys.getcounts() function * SHOW_ALLOC_COUNT code in listobject.c * SHOW_TRACK_COUNT code in tupleobject.c * PyConfig.show_alloc_count field * -X showalloccount command line option * @test.support.requires_type_collecting decorator
* bpo-39287: Doc: Add UTF-8 mode section in using/windows. (GH-17935)Inada Naoki2020-01-282-2/+44
| | | Co-Authored-By: Kyle Stanley <aeros167@gmail.com>
* bpo-39429: Add a new "Python Development Mode" doc page (GH-18132)Victor Stinner2020-01-241-20/+6
|
* bpo-38899: virtual environment activation for fish should use `source` ↵Brett Cannon2019-11-231-1/+1
| | | | | | | | | | | | (GH-17359) The previously documented use of `.` is considered deprecated (https://fishshell.com/docs/current/commands.html#source). https://bugs.python.org/issue38899 Automerge-Triggered-By: @brettcannon
* Updated missing periods in cmdline.rst (GH-17173)Jules Lasne (jlasne)2019-11-151-3/+3
|
* bpo-38133: Update docs to reflect fixes to py.exe launcher (GH-16791)Steve Dower2019-10-141-3/+3
|
* bpo-33095: Add reference to isolated mode in -m and script option (GH-7764)Xtreak2019-09-141-0/+13
| | | | | | Attempt to make isolated mode easier to discover via additional inline documentation. Co-Authored-By: Julien Palard <julien@palard.fr>
* bpo-29535: Remove promize about hash randomization of datetime objects. ↵Serhiy Storchaka2019-08-241-2/+2
| | | | (GH-15269)
* Remove 'unstable' warning for Windows Store package in docs (GH-15334)Steve Dower2019-08-191-7/+4
|
* bpo-32910: Remove implementation detail in venv documentation. (GH-14968)Derek Keeler2019-07-261-4/+2
|
* bpo-35524: Update Windows installer image in docs (GH-14966)Steve Dower2019-07-261-0/+0
|
* bpo-37610: improve Using Python doc wrt Editors & IDE (GH-14850)aldwinaldwin2019-07-193-11/+15
| | | | | | Move the Editors and IDE section out of the Unix section, to its own section. https://bugs.python.org/issue37610
* bpo-37363: Add audit events on startup for the run commands (GH-14524)Steve Dower2019-07-011-1/+11
|
* bpo-37403: Touch up venv docs (GH-14458)Brett Cannon2019-06-281-7/+14
| | | Add a versionadded for PS Core and note that `.venv` is a common virtual environment name.
* Improve Windows commands in tutorial (GH-14379)Steve Dower2019-06-261-6/+6
|
* bpo-37388: Development mode check encoding and errors (GH-14341)Victor Stinner2019-06-251-0/+7
| | | | | | | | | In development mode and in debug build, encoding and errors arguments are now checked on string encoding and decoding operations. Examples: open(), str.encode() and bytes.decode(). By default, for best performances, the errors argument is only checked at the first encoding/decoding error, and the encoding argument is sometimes ignored for empty strings.
* bpo-34556: Add --upgrade-deps to venv module (#13100)Cooper Lees2019-06-171-1/+6
| | | | | | | Add --upgrade-deps to venv module - This allows for pip + setuptools to be automatically upgraded to the latest version on PyPI - Update documentation to represent this change bpo-34556: Add --upgrade to venv module
* bpo-37216: update version to 3.9 in mac using document (GH-13966)Makdon2019-06-131-2/+2
|
* Fix typos in docs and docstrings (GH-13745)Xtreak2019-06-021-1/+1
|
* Docs: FIX broken links. (GH-13491)Julien Palard2019-05-252-4/+5
|
* Doc: Replace the deprecated highlightlang directive by highlight. (#13377)Stéphane Wirtel2019-05-173-3/+3
| | | | highlightlang is deprecated since April 2018 in Sphinx. See https://github.com/sphinx-doc/sphinx/pull/4845
* bpo-36008: Doc update for 3.8 migration (GH-12887)Utkarsh Gupta2019-05-132-8/+8
|
* bpo-36465: Make release and debug ABI compatible (GH-12615)Victor Stinner2019-04-241-2/+5
| | | | | | | | | | | | | | Release build and debug build are now ABI compatible: the Py_DEBUG define no longer implies Py_TRACE_REFS define which introduces the only ABI incompatibility. A new "./configure --with-trace-refs" build option is now required to get Py_TRACE_REFS define which adds sys.getobjects() function and PYTHONDUMPREFS environment variable. Changes: * Add ./configure --with-trace-refs * Py_DEBUG no longer implies Py_TRACE_REFS
* bpo-33922: Adding documentation for new "-64" suffix of Python launcher ↵mrh19972019-04-121-13/+23
| | | | | (GH-7849) Since bpo-30291 it is possible to specify the architecture of Python when using the launcher
* bpo-18748: io.IOBase destructor now logs close() errors in dev mode (GH-12786)Victor Stinner2019-04-121-1/+3
| | | | | In development mode (-X dev) and in debug build, the io.IOBase destructor now logs close() exceptions. These exceptions are silent by default in release mode.
* Include the --prompt flag in venv's help output (GH-10711)Holger Frey2019-02-221-1/+3
| | | Document usage of the existing `--prompt` option in the command line help.