Commit Graph

22449 Commits

Author SHA1 Message Date
Serhiy Storchaka 4c5b6bac24 [3.8] bpo-32912: Revert SyntaxWarning on invalid escape sequences (GH-15142)
* bpo-32912: Revert warnings for invalid escape sequences.

DeprecationWarning will continue to be emitted for invalid escape sequences in string and bytes literals in 3.8 just as it did in 3.7.

SyntaxWarning may be emitted in the future. But per mailing list discussion, we don't yet know when because we haven't settled on how to do so in a non-disruptive manner.
2019-08-09 15:34:22 -07:00
Miss Islington (bot) 5925b7d555 bpo-35892: Add usage note to mode() (GH-15122) (GH-15176)
(cherry picked from commit e43e7ed364)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
2019-08-08 01:36:55 -07:00
Miss Islington (bot) 1a3a40c1cb bpo-37004: Documented asymmetry of string arguments in difflib.SequenceMatcher for ratio method (GH-13482) (#15157)
https://bugs.python.org/issue37004
(cherry picked from commit e9cbcd0018)

Co-authored-by: sweeneyde <36520290+sweeneyde@users.noreply.github.com>
2019-08-07 11:39:14 -04:00
Miss Islington (bot) 9341dcb4b9 bpo-37646: Document that eval() cannot access nested scopes (GH-15117) (GH-15155)
(cherry picked from commit 610a4823cc)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
2019-08-06 18:07:59 -07:00
Miss Islington (bot) ef0b81927a
Improve signal documentation (GH-14274)
* add a missing ``.. availability::`` reST explicit markup;
* more consistent "see man page" sentences.
(cherry picked from commit cfebfef2de)

Co-authored-by: Géry Ogam <gery.ogam@gmail.com>
2019-08-06 14:53:27 -07:00
Miss Islington (bot) 26f91db5ba bpo-37759: First round of major edits to Whatsnew 3.8 (GH-15127) (GH-15139)
(cherry picked from commit 4f9ffc9d1a)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
2019-08-05 15:22:13 -07:00
Miss Islington (bot) 9c95fc752c
bpo-37748: Re-order the Run menu. (GH-15115)
Put the most common choice, Run Module, at the top.
(cherry picked from commit 14070299cd)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2019-08-04 14:04:49 -07:00
Miss Islington (bot) fc6e3bc1cd Update itertools docs (GH-15114) (GH-15118)
* Remove suggestion that is less relevant now that global lookups are much faster
* Add link for installing the recipes
(cherry picked from commit adf02b36b3)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
2019-08-04 13:52:59 -07:00
Miss Islington (bot) dd5f8abb54
bpo-37730: Fix usage of NotImplemented instead of NotImplementedError in docs. (GH-15062)
(cherry picked from commit ed5e8e06cb)

Co-authored-by: David H <dheiberg@mozilla.com>
2019-08-04 06:43:30 -07:00
Miss Islington (bot) dde944f9df
bpo-37685: Fixed comparisons of datetime.timedelta and datetime.timezone. (GH-14996)
There was a discrepancy between the Python and C implementations.

Add singletons ALWAYS_EQ, LARGEST and SMALLEST in test.support
to test mixed type comparison.
(cherry picked from commit 17e52649c0)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2019-08-04 03:01:55 -07:00
Miss Islington (bot) 375f35be06 bpo-36487: Make C-API docs clear about what the main interpreter is. (gh-15080)
(cherry picked from commit 854d0a4b98) (gh-12666)

Co-authored-by: Joannah Nanjekye <33177550+nanjekyejoannah@users.noreply.github.com>
2019-08-02 11:49:38 -06:00
Miss Islington (bot) dcc53ebbff bpo-37726: Prefer argparse over getopt in stdlib tutorial (GH-15052) (#15070)
(cherry picked from commit 2491134029)

Co-authored-by: mental <m3nta1@yahoo.com>
2019-08-01 07:34:57 -07:00
Miss Islington (bot) 29a3a33d99
bpo-34101: Add doc of PyBuffer_GetPointer (GH-14994)
(cherry picked from commit 1b29af83bc)

Co-authored-by: Hai Shi <shihai1992@gmail.com>
2019-07-31 08:04:31 -07:00
Miss Islington (bot) d8b914a30b
bpo-37085: Expose SocketCAN bcm_msg_head flags (GH-13646)
Expose the CAN_BCM SocketCAN constants used in the bcm_msg_head struct
flags (provided by <linux/can/bcm.h>) under the socket library.

This adds the following constants with a CAN_BCM prefix:

  * SETTIMER
  * STARTTIMER
  * TX_COUNTEVT
  * TX_ANNOUNCE
  * TX_CP_CAN_ID
  * RX_FILTER_ID
  * RX_CHECK_DLC
  * RX_NO_AUTOTIMER
  * RX_ANNOUNCE_RESUME
  * TX_RESET_MULTI_IDX
  * RX_RTR_FRAME
  * CAN_FD_FRAME

The CAN_FD_FRAME flag was introduced in the 4.8 kernel, while the other
ones were present since SocketCAN drivers were mainlined in 2.6.25. As
such, it is probably unnecessary to guard against these constants being
missing.
(cherry picked from commit 31c4fd2a10)

Co-authored-by: karl ding <karlding@users.noreply.github.com>
2019-07-31 02:10:38 -07:00
Miss Islington (bot) 9b9cac4e5d Refined Qt GUI example in the logging cookbook. (GH-15045) (GH-15046)
(cherry picked from commit 472eced677)
2019-07-31 07:58:46 +01:00
Miss Islington (bot) 9e044ddefd
bpo-33821: Update IDLE section of What's New 3.7 (GH-15036)
* bpo-33821: Update IDLE section of What's New 3.7

* Fix roles.
(cherry picked from commit 5982b7201b)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2019-07-30 22:23:05 -07:00
Miss Islington (bot) c7236b498f
bpo-33822: Add IDLE section of What's New 3.8 (GH-15035)
* bpo-33822: Add IDLE section of What's New 3.8

* Fix role.
(cherry picked from commit a72ca90eb9)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2019-07-30 22:16:45 -07:00
Miss Islington (bot) 7026737d77
bpo-36084: Add threading Native ID information to What's New documentation (GH-14845)
(cherry picked from commit 84846b0187)

Co-authored-by: Jake Tesler <jake.tesler@gmail.com>
2019-07-30 14:49:23 -07:00
Miss Islington (bot) 69372eea08
Remove trailing .0 from version changed note (GH-14987)
(cherry picked from commit 17a058ed6f)

Co-authored-by: Nick Coghlan <ncoghlan@gmail.com>
2019-07-28 04:48:26 -07:00
Miss Islington (bot) 76821bab9c bpo-37691: Let math.dist() accept sequences and iterables for coordinates (GH-14975) (GH-14984)
(cherry picked from commit 6b5f1b496f)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
2019-07-27 14:26:58 -07:00
Miss Islington (bot) d38fa58695 Add Qt GUI example to the logging cookbook. (GH-14978) (GH-14979)
(cherry picked from commit 1ed915e8ae)
2019-07-27 14:04:13 +01:00
Miss Islington (bot) 06e8fc95d1
bpo-32910: Remove implementation detail in venv documentation. (GH-14968)
(cherry picked from commit 91e4957509)

Co-authored-by: Derek Keeler <d3r3kk@users.noreply.github.com>
2019-07-26 15:04:28 -07:00
Steve Dower 886e66d111
bpo-35524: Update Windows installer image in docs (GH-14966) 2019-07-26 13:39:51 -07:00
Miss Islington (bot) c594c274e9
Swap 'if' branches so content matches to condition in importlib example (GH-14947)
Prior to this change the guard on an 'elif' used an assignment expression whose value was used in a later 'else' block, causing some confusion for people.

(Discussion on Twitter: https://twitter.com/brettsky/status/1153861041068994566.)

Automerge-Triggered-By: @brettcannon
(cherry picked from commit 544fa15ea1)

Co-authored-by: Tzu-ping Chung <uranusjr@gmail.com>
2019-07-25 10:27:59 -07:00
Miss Islington (bot) 6367391646 [3.8] bpo-34160: explain how to deal with attribute order in ElementTree (GH-14867) (GH-14935)
* Fix the formatting in the documentation of the tostring() functions.

* bpo-34160: Document that the tostring() and tostringlist() functions also preserve the attribute order now.

* bpo-34160: Add an explanation of how users should deal with the attribute order.
(cherry picked from commit a3697db010)

Co-authored-by: Stefan Behnel <stefan_ml@behnel.de>
2019-07-24 20:32:56 +02:00
Miss Islington (bot) eb62274ed6
[3.8] Touch up venv docs (GH-14922) (GH-14923)
(cherry picked from commit 2f224a077a)


Co-authored-by: Brett Cannon <54418+brettcannon@users.noreply.github.com>

Automerge-Triggered-By: @brettcannon
2019-07-24 10:14:53 -07:00
Miss Islington (bot) 1da6a313dd
bpo-17535: IDLE editor line numbers (GH-14030)
(cherry picked from commit 7123ea009b)

Co-authored-by: Tal Einat <taleinat@gmail.com>
2019-07-23 06:04:13 -07:00
Miss Islington (bot) 5b398520a8 Update logging cookbook to show multiple worker processes using the concurrent.futures module. (GH-14905) (GH-14906)
(cherry picked from commit d309352c6f)
2019-07-22 13:25:46 +01:00
Kyle Stanley 24b5b360fa [3.8] Fix typos in docs, comments and test assert messages (GH-14872). (#14900)
(cherry picked from commit 96e12d5f4f)

Co-authored-by: Min ho Kim <minho42@gmail.com>
2019-07-21 22:48:45 -04:00
Miss Islington (bot) 0104841d12 Add examples to elucidate the formulas (GH-14898) (GH-14899)
(cherry picked from commit b530a4460b)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
2019-07-21 16:39:08 -07:00
Miss Islington (bot) 8f501647ca
Bpo-37644: update suspicious.csv for distutils/examples (GH-14885)
(cherry picked from commit 22f0483d44)

Co-authored-by: Ned Deily <nad@python.org>
2019-07-21 11:08:57 -07:00
Miss Islington (bot) a50a6225a0 bpo-37624: Document weight assumptions for random.choices() (GH-14855) (GH-14858)
(cherry picked from commit 8dbe563aa6)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
2019-07-19 02:17:21 -07:00
Miss Islington (bot) 840352455d
bpo-37610: improve Using Python doc wrt Editors & IDE (GH-14850)
Move the Editors and IDE section out of the Unix section, to its own section.

https://bugs.python.org/issue37610
(cherry picked from commit 8f040b7a9f)

Co-authored-by: aldwinaldwin <aldwinaldwin@users.noreply.github.com>
2019-07-18 18:31:41 -07:00
Miss Islington (bot) 35d36dacd4
Docs: Correct formatting of a multiline code block (GH-13806)
(cherry picked from commit bd26a4466b)

Co-authored-by: Joseph Fox-Rabinovitz <madphysicist@users.noreply.github.com>
2019-07-17 01:32:53 -07:00
Miss Islington (bot) 86742d4ce8
Replace backquote with command substitution in subprocess doc example (GH-13941)
Replace backquotes with POSIXy command substitution in example.
(cherry picked from commit 6a61714cde)

Co-authored-by: David Jones <drj@pobox.com>
2019-07-16 08:05:39 -07:00
Miss Islington (bot) 1ff4c42774
bpo-37284: Add note to sys.implementation doc (GH-14328)
Add a brief note to indicate that any new required attributes must go through the PEP process.

https://bugs.python.org/issue37284
(cherry picked from commit 52693c10e8)

Co-authored-by: Giovanni Cappellotto <gcappellotto@fb.com>
2019-07-15 07:45:12 -07:00
Miss Islington (bot) 7a430109b9 bpo-37590: Remove redundant docs of PyEval_EvalFrameEx (GH-14765)
(cherry picked from commit 40d2226a69)

Co-authored-by: Hai Shi <shihai1992@gmail.com>
2019-07-14 10:53:18 +02:00
Miss Islington (bot) 4f733f48b4
bpo-37571: Remove extra space in ctypes docs (GH14764)
(cherry picked from commit 68c74d05c1)

Co-authored-by: Steve Dower <steve.dower@python.org>
2019-07-14 01:22:57 -07:00
Miss Islington (bot) e7c114df38
bpo-37571: Add 'b' to prevent the TypeError exception. (GH-14721)
Co-Authored-By: Kyle Stanley <aeros167@gmail.com>
(cherry picked from commit 6b929580eb)

Co-authored-by: Michele Angrisano <michele.angrisano@gmail.com>
2019-07-14 01:07:06 -07:00
Miss Islington (bot) 262779fb50
bpo-36261: Improve example of the preamble field in email docs (GH-14751)
(cherry picked from commit 8efade91b1)

Co-authored-by: Carl Bordum Hansen <carl@bordum.dk>
2019-07-14 00:53:15 -07:00
Miss Islington (bot) b1e4d1b603 bpo-26967: fix flag grouping with allow_abbrev=False (GH-14316) (GH-14759)
The `allow_abbrev` option for ArgumentParser is documented and intended to disable support for unique prefixes of --options, which may sometimes be ambiguous due to deferred parsing.

However, the initial implementation also broke parsing of grouped short flags, such as `-ab` meaning `-a -b` (or `-a=b`).  Checking the argument for a leading `--` before rejecting it fixes this.

This was prompted by pytest-dev/pytestGH-5469, so a backport to at least 3.8 would be great 😄
And this is my first PR to CPython, so please let me know if I've missed anything!

https://bugs.python.org/issue26967
(cherry picked from commit dffca9e925)

Co-authored-by: Zac Hatfield-Dodds <Zac-HD@users.noreply.github.com>
2019-07-14 07:59:56 +02:00
Miss Islington (bot) b815669c83
bpo-30088: Document that existing dir structure isn't verified by mailbox.Maildir (GH-1163)
Hi,

I've faced an issue w/ `mailbox.Maildir()`. The case is following:
1. I create a folder with `tempfile.TemporaryDirectory()`, so it's empty
2. I pass that folder path as an argument when instantiating `mailbox.Maildir()`
3. Then I receive an exception happening because "there's no such file or directory" (namely `cur`, `tmp` or `new`) during interaction with Maildir

**Expected result:** subdirs are created during `Maildir()` instance creation.

**Actual result:** subdirs are assumed as existing which leads to exceptions during use.

**Workaround:** remove the actual dir before passing the path to `Maildir()`. It will be created automatically with all subdirs needed.

**Fix:** This PR. Basically it adds creation of subdirs regardless of whether the base dir existed before.

https://bugs.python.org/issue30088
(cherry picked from commit e44184749c)

Co-authored-by: Sviatoslav Sydorenko <wk@sydorenko.org.ua>
2019-07-13 07:59:48 -07:00
Miss Islington (bot) 5da83b417e
bpo-37580: Fix typo in http.cookiejar documentation (GH-14731)
[bpo-37580](https://bugs.python.org/issue37580): Markup typo in http.cookiejar doc

https://bugs.python.org/issue37580
(cherry picked from commit b5bbb8a740)

Co-authored-by: Milan Oberkirch <milan.oberkirch@geops.de>
2019-07-13 03:24:48 -07:00
Miss Islington (bot) 25d371ab74
Fix typo in re.escape documentation (GH-14722)
(cherry picked from commit fb6c1f8d3b)

Co-authored-by: Robert DiPietro <rdipietro@gmail.com>
2019-07-13 01:42:25 -07:00
Miss Islington (bot) bfb709b771
[3.8] bpo-37521: No longer treat insertion into sys.modules as optional in importlib examples (GH-14723) (GH-14724)
Fix importlib examples to insert any newly created modules via importlib.util.module_from_spec() immediately into sys.modules instead of after calling loader.exec_module().

Thanks to Benjamin Mintz for finding the bug.


https://bugs.python.org/issue37521
(cherry picked from commit 0827064c95)


Co-authored-by: Brett Cannon <54418+brettcannon@users.noreply.github.com>


https://bugs.python.org/issue37521
2019-07-12 15:51:48 -07:00
Miss Islington (bot) 107171500d
closes bpo-37554: Remove `q:q` in os.rst documentation (GH-14692)
https://bugs.python.org/issue37554
(cherry picked from commit 7cbef72902)

Co-authored-by: Mariatta <Mariatta@users.noreply.github.com>
2019-07-11 10:45:36 -07:00
Miss Islington (bot) dc0b6af42e
bpo-34369: make kqueue.control() docs better reflect that timeout is positional-only (GH-9499)
(cherry picked from commit 79042ac434)

Co-authored-by: Tal Einat <taleinat@gmail.com>
2019-07-11 07:16:03 -07:00
Miss Islington (bot) aca8297763
Document default parameter of .seek() in the signature. (GH-14691)
(cherry picked from commit 2a3d4d9c53)

Co-authored-by: Benjamin Peterson <benjamin@python.org>
2019-07-10 19:49:49 -07:00
Miss Islington (bot) 58f2c7f424 bpo-37526: Add support.catch_threading_exception() (GH-14664) (GH-14666)
Context manager catching threading.Thread exception using
threading.excepthook.
(cherry picked from commit 91b4f7ab7f)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
2019-07-09 13:35:59 +02:00
Miss Islington (bot) 54348f46f8
Doc: Fix example title. (GH-14639)
(cherry picked from commit 66b4150f6f)

Co-authored-by: Julien Palard <julien@palard.fr>
2019-07-08 14:17:32 -07:00