Commit Graph

103132 Commits

Author SHA1 Message Date
Miss Islington (bot) 843fd85cf7
Adjust builtins.zip() docstring to better communicate its signature (GH-14833)
(cherry picked from commit af2f5b1723)

Co-authored-by: Sergey Fedoseev <fedoseev.sergey@gmail.com>
2019-07-19 11:27:13 -07:00
Miss Islington (bot) 87b6078fb9
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:28:49 -07:00
Miss Islington (bot) db2957c8eb
bpo-33610: IDLE's code-context always shows current context immediately (GH-14821)
Eliminate delay of up to 100ms and accompanying visual artifact.
Fix bug of never showing context when hide and show.
(cherry picked from commit e0a1f8fb5c)

Co-authored-by: Tal Einat <taleinat@gmail.com>
2019-07-18 13:46:34 -07:00
Miss Islington (bot) 5eb19fddd2 bpo-36390: Gather IDLE Format menu functions into format.py (GH-14827) (GH-14830)
Add two indent spec methods from editor and Rstrip to existing file.
Tests are not added for indent methods because they need change
in lights of 3.x's prohibition on mixing tabs and spaces.
(cherry picked from commit 1b38922434)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2019-07-17 21:22:25 -04:00
Miss Islington (bot) 80f74ce83b
Fix IndexError when parsing unexpectedly ending quoted-string. (GH-14813)
This exception was caused because the input ended unexpectedly with only one
single quote instead of a pair with some value inside it.
(cherry picked from commit 719a062bcb)

Co-authored-by: Abhilash Raj <maxking@users.noreply.github.com>
2019-07-17 10:32:31 -07:00
Miss Islington (bot) 391511ccaa
bpo-37461: Fix infinite loop in parsing of specially crafted email headers (GH-14794)
* bpo-37461: Fix infinite loop in parsing of specially crafted email headers.

Some crafted email header would cause the get_parameter method to run in an
infinite loop causing a DoS attack surface when parsing those headers. This
patch fixes that by making sure the DQUOTE character is handled to prevent
going into an infinite loop.
(cherry picked from commit a4a994bd3e)

Co-authored-by: Abhilash Raj <maxking@users.noreply.github.com>
2019-07-17 10:02:05 -07:00
Miss Islington (bot) 093e9b1268 bpo-36390: IDLE: Combine region formatting methods. (GH-12481) (GH-14812)
Rename paragraph.py to format.py and add region formatting methods
from editor.py.  Add tests for the latter.
(cherry picked from commit 82494aa6d9)

Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
2019-07-17 10:46:14 -04:00
Miss Islington (bot) bb79ab84c2
bpo-37530: simplify, optimize and clean up IDLE code context (GH-14675)
* Only create CodeContext instances for "real" editors windows, but
  not e.g. shell or output windows.
* Remove configuration update Tk event fired every second, by having
  the editor window ask its code context widget to update when
  necessary, i.e. upon font or highlighting updates.
* When code context isn't being shown, avoid having a Tk event fired
  every 100ms to check whether the code context needs to be updated.
* Use the editor window's getlineno() method where applicable.
* Update font of the code context widget before the main text widget
(cherry picked from commit 7036e1de3a)

Co-authored-by: Tal Einat <taleinat@gmail.com>
2019-07-17 01:44:18 -07:00
Miss Islington (bot) ba3c89f42e
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:58 -07:00
Miss Islington (bot) efd23a199b bpo-27452: IDLE: Cleanup config.py code (GH-14577) (GH-14803)
(cherry picked from commit f8d4cc7dbb)

Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
2019-07-16 17:31:47 -04:00
Miss Islington (bot) e7bec26937
Fix infinite loop in email folding logic (GH-12732)
As far as I can tell, this infinite loop would be triggered if:

1. The value being folded contains a single word (no spaces) longer than
   max_line_length
2. The max_line_length is shorter than the encoding's name + 9
   characters.

bpo-36564: https://bugs.python.org/issue36564
(cherry picked from commit f69d5c6198)

Co-authored-by: Paul Ganssle <pganssle@users.noreply.github.com>
2019-07-16 11:15:40 -07:00
Miss Islington (bot) 134f79682d
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:44:26 -07:00
Xtreak c6b3106199 [3.7] bpo-37579: Improve equality behavior for pure Python datetime and time (GH-14726) (GH-14745)
Returns NotImplemented for timedelta and time in __eq__ for different types in Python implementation, which matches the C implementation.

This also adds tests to enforce that these objects will fall back to the right hand side's __eq__ and/or __ne__ implementation.

[bpo-37579](https://bugs.python.org/issue37579)
(cherry picked from commit e6b46aafad)

Co-authored-by: Xtreak <tir.karthi@gmail.com>





https://bugs.python.org/issue37579
2019-07-14 03:13:59 -07:00
Miss Islington (bot) 5631e381a6
Clarify that plistlib's load and dump functions take a binary file object (GH-9825)
The documentation says that the fp parameter to plistlib.load "should be a
readable and binary file object" but the docstring only mentions that it
should be readable. Similarly, plistlib.dump's docstring only mentions
"writable". This commit clarifies that fp should also be binary.

https://docs.python.org/3/library/plistlib.htmlGH-plistlib.load
https://docs.python.org/3/library/plistlib.htmlGH-plistlib.dump
(cherry picked from commit 0d4f4352ef)

Co-authored-by: Collin Styles <collingstyles@gmail.com>
2019-07-14 02:23:38 -07:00
Miss Islington (bot) 13c89f3c87
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:24:35 -07:00
Miss Islington (bot) d7caf75c73
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:08:48 -07:00
Miss Islington (bot) fb58024688
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:51:49 -07:00
Miss Islington (bot) d1524148cd
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:32 -07:00
Miss Islington (bot) 36494a9491
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:23:10 -07:00
Miss Islington (bot) 184d06b354
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:40:54 -07:00
Miss Islington (bot) 71435f685c
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:48:00 -07:00
Miss Islington (bot) a2cf88efc4 bpo-36390: simplify classifyws(), rename it and add unit tests (GH-14500)
(cherry picked from commit 9b5ce62cac)

Co-authored-by: Tal Einat <taleinat@gmail.com>
2019-07-11 17:57:45 +03:00
Miss Islington (bot) d3747fd8fa 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 17:16:45 +03:00
Miss Islington (bot) 2847a75c21
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:37 -07:00
Miss Islington (bot) f54f062f68 bpo-26806: IDLE should run without docstrings (GH-14657) (GH-14678)
After fcf1d00, IDLE startup failed with python compiled without docstrings.
(cherry picked from commit 6aeb2fe606)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2019-07-09 15:16:44 -04:00
Ned Deily 4016cd533d Post release updates 2019-07-08 17:53:42 -04:00
Ned Deily d9012d6f23 Python 3.7.4
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEDZbfTUEQ5cQ/v7F/LTR+pqplQh0FAl0jhbcACgkQLTR+pqpl
 Qh0L/RAA0VudQZoa1URDmigDGODWg+LZ7Qf9Po5/9y2Zp3dytbxrt40zzo/Wonhi
 jbwbpo6umkpL0TlziN2biKSjbPzzvAlk0+Y+Iw3tXDGByqZ25GD4G3AE4nS/xbou
 oDmH6uLqgbvPRwFJYrFG3avplVpIj38MkScdbUQ+2pLPulcBnw52eFmzav2JuT8W
 WDNeLIRn8kCbjL7T+nLIU0YdE39E3OE3KMVWFZwNmkutNIm3YT0k+eMafbvOGKJQ
 iTZZ3d6miGqSILqQLiJjUzUneJemlvGJmOrtpJlhZiUjb8202MlhKDW2Bk6MWSKV
 DqTXapMw1lGCVd7zELMIK01pjpW0nqzo44tSzlqSMHoBrHDP7QNnhCin+jmHP/er
 h0J/K9+zkDCWc45a/KymDn2PpXeTwY2aIUcvW/2mQX6EeEm6dwq2Vvz8mjflRyYz
 Wd89Yi475bZfZQ4bxce1sFQ6a6b0jOShl21kbehCWtslvqc/5Y94brIinU7OTF1N
 xeHMPoM2mHprT/ftxmbgrrlISP7usYSgmDa/MuBOgH6cPxsZq+J9HkDtONgFe5UE
 OXV6ucQ4c+5uOCBHVdbC6iPFdJvJJ4Ok5LFQ9CjL3y61H+WT1mkqSZeFyqWHurJB
 ip8mScWh24FCQDH0PLMmDoS1BLUqq0ROFynXDb3Rycp1jz/fYqQ=
 =Hhx/
 -----END PGP SIGNATURE-----

Merge release engineering branch
2019-07-08 17:51:58 -04:00
Miss Islington (bot) 8b1135fc60
Doc: Fix example title. (GH-14639)
(cherry picked from commit 66b4150f6f)

Co-authored-by: Julien Palard <julien@palard.fr>
2019-07-08 14:18:15 -07:00
Miss Islington (bot) 6f5574866c
Doc: Fix: Proper UpperCamelCase and lowercase. (GH-14644)
Initial report by Michael Blankenship on docs@
(cherry picked from commit 2da622ff77)

Co-authored-by: Julien Palard <julien@palard.fr>
2019-07-08 14:13:59 -07:00
Ned Deily e09359112e 3.7.4 final 2019-07-08 14:03:50 -04:00
Miss Islington (bot) f2cbf41afc bpo-37149: Replace dead link for online Tkinter reference (GH-14616)
Also fix a name misspelling.
(cherry picked from commit 45bc61b971)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2019-07-08 12:43:43 -04:00
Ned Deily 87a918a003 [3.7] bpo-37500: update Misc/NEWS entries to mention revert 2019-07-08 12:39:12 -04:00
Pablo Galindo 4834c80d79 [3.7] bpo-37500: Revert commit 85ed1712e4 (GH-14605)
https://bugs.python.org/issue37500
2019-07-08 12:08:31 -04:00
Miss Islington (bot) bc0a6ced30
bpo-37513: Change ValueError to TypeError in an example in ctypes doc (GH-14615)
(cherry picked from commit f6cdd3ff68)

Co-authored-by: Hai Shi <shihai1992@gmail.com>
2019-07-07 08:45:59 -07:00
Miss Islington (bot) e841a54206
bpo-37478: Add missing 'and'. (GH-14631)
(cherry picked from commit a9b40e4546)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2019-07-06 19:49:39 -07:00
Miss Islington (bot) 1dd6507595 bpo-37478: Specify possible exceptions for os.chdir() (GH-14611) (GH-14630)
(cherry picked from commit 0717b4d9b3)

Co-authored-by: Kyle Stanley <aeros167@gmail.com>
2019-07-06 22:19:08 -04:00
Miss Islington (bot) 9c930d076a bpo-37487: Fix PyList_GetItem index description. (GH-14623) (GH-14625)
0 is a legal index.
(cherry picked from commit f8709e804d)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2019-07-06 17:55:19 -04:00
Miss Islington (bot) d666217b26
bpo-26806: add 30 to the recursion limit in IDLE's shell (GH-13944)
This is done to compensate for the extra stack frames added by
IDLE itself, which cause problems when setting the recursion limit
to low values.

This wraps sys.setrecursionlimit() and sys.getrecursionlimit()
as invisibly as possible.
(cherry picked from commit fcf1d003bf)

Co-authored-by: Tal Einat <taleinat+github@gmail.com>
2019-07-06 05:56:10 -07:00
Miss Islington (bot) d2c5677a4f
bpo-37149: Replace dead link for online Tkinter reference (GH-14616)
Also fix a name misspelling.
(cherry picked from commit 45bc61b971)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2019-07-05 23:37:38 -07:00
Miss Islington (bot) af5e62e9e2
closes bpo-37508: Fix name of type in memory.rst. (GH-14604)
(cherry picked from commit 39a5d17a7f)

Co-authored-by: Hai Shi <shihai1992@gmail.com>
2019-07-05 21:08:40 -07:00
Pablo Galindo 7d93effeb4 [3.7] bpo-37500: Revert commit 85ed1712e4 (GH-14605)
https://bugs.python.org/issue37500
2019-07-05 12:13:38 -07:00
Miss Islington (bot) d5a72923c2
Use OSError subclasses in os documentation (GH-14262)
(cherry picked from commit a55f75a6e3)

Co-authored-by: Tim Hoffmann <2836374+timhoffm@users.noreply.github.com>
2019-07-05 01:47:42 -07:00
Miss Islington (bot) 2d438fc0b7
bpo-37421: Fix multiprocessing get_temp_dir() finalizer (GH-14572)
Fix multiprocessing.util.get_temp_dir() finalizer: clear also the
'tempdir' configuration of the current process, so next call to
get_temp_dir() will create a new temporary directory, rather than
reusing the removed temporary directory.
(cherry picked from commit 9d40554e0d)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
2019-07-04 03:45:58 -07:00
Miss Islington (bot) d7d9c9f7c2 bpo-37459: importlib docs improperly reference get_resource_loader() (GH-14568) (GH-14581)
* bpo-37459: importlib docs improperly reference get_resource_loader()
(cherry picked from commit b607d992e7)

Co-authored-by: aldwinaldwin <aldwinaldwin@users.noreply.github.com>
2019-07-03 18:27:59 -07:00
Miss Islington (bot) 6323ac1dd4
bpo-37441: Fix wrong PyErr_SetImportErrorSubclass signature in doc (GH-14453)
(cherry picked from commit aeecf38066)

Co-authored-by: Hai Shi <shihai1992@gmail.com>
2019-07-02 19:02:57 -07:00
Ned Deily 2e4411b3c5 Post release updates 2019-07-02 18:31:28 -04:00
Ned Deily a56138f147 Python 3.7.4rc2
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEDZbfTUEQ5cQ/v7F/LTR+pqplQh0FAl0bp8oACgkQLTR+pqpl
 Qh1VRw/8C5fGRJAWG0yiG4Kvi/kZMBefuSfDuQrIoIPze/T58lC3cVIuyUwNW+Re
 /IqvP9A+olcxQwfdpqm0fOIrDF4WlaexPdCzcDhN5heH1nsHrj+gEzL+B+TDyGNu
 TnOrlY851PbjawxRljVKUgGT7S+QQauDThnMIC5/QN16ItwT1pYKvgMvPNIreJlR
 CMGb55HHtHMMMUtFy6SV4T4Md4n5F2waeO5hbB5Ge7ZeNFrHwkKR5Vql4EwHrLR+
 Mspa1plw2FJN1PktN/aiHey0oH552JiH5TXxVG4CcopEO5R1+92XovEzEnYszI2P
 kJ/GejT+790V6qqImg/tOJATJ3uWl4ABLZAHLun9HVb2ICNxa/jk0TO6Zwh0wmE+
 QbbqVpQG2ltAfoeZ0cWpXUlytVFQFZKR/Yym0lS3NlT3p86lrI9ieOrEjunmjQv7
 uu1z6NB/VlfzoZKfd6A2IPqqrmu1bN1Hmc8TwdRTIznuvwi0VS7Ts70tnPgRRzIw
 iM2FejSTYNBLnHoEDoQZ7IULYvD46utMQ3gfCzoZjc1nafcW6e15HstpTxX92hZx
 woq/OV1/KnZF/JiFBebDLMN6A38GJcqpb+WdB7XX1LpcHI3PxL+ktb34UWRdyHhE
 stJBm1XN3/CughzwordIcqWJsTl+8IsEKkeFFcF7QeXgpZKEpkI=
 =JIBM
 -----END PGP SIGNATURE-----

Merge tag 'v3.7.4rc2' into 3.7
2019-07-02 18:23:54 -04:00
Miss Islington (bot) 024ea2170b
bpo-37463: match_hostname requires quad-dotted IPv4 (GH-14499)
ssl.match_hostname() no longer accepts IPv4 addresses with additional text
after the address and only quad-dotted notation without trailing
whitespaces. Some inet_aton() implementations ignore whitespace and all data
after whitespace, e.g. '127.0.0.1 whatever'.

Short notations like '127.1' for '127.0.0.1' were already filtered out.

The bug was initially found by Dominik Czarnota and reported by Paul Kehrer.

Signed-off-by: Christian Heimes <christian@python.org>

https://bugs.python.org/issue37463
(cherry picked from commit 477b1b2576)

Co-authored-by: Christian Heimes <christian@python.org>
2019-07-02 14:22:53 -07:00
Ned Deily 7f193e8969 3.7.4rc2 2019-07-02 14:51:09 -04:00
Christian Heimes 070fae6d0f bpo-37463: match_hostname requires quad-dotted IPv4 (GH-14499)
ssl.match_hostname() no longer accepts IPv4 addresses with additional text
after the address and only quad-dotted notation without trailing
whitespaces. Some inet_aton() implementations ignore whitespace and all data
after whitespace, e.g. '127.0.0.1 whatever'.

Short notations like '127.1' for '127.0.0.1' were already filtered out.

The bug was initially found by Dominik Czarnota and reported by Paul Kehrer.

Signed-off-by: Christian Heimes <christian@python.org>



https://bugs.python.org/issue37463
2019-07-02 14:42:08 -04:00