summaryrefslogtreecommitdiffstats
path: root/Lib
Commit message (Collapse)AuthorAgeFilesLines
...
* bpo-12800: tarfile: Restore fix from 011525ee9 (GH-21409)Miss Islington (bot)2020-11-252-3/+6
| | | | | | Restore fix from 011525ee92eb1c13ad1a62d28725a840e28f8160. (cherry picked from commit 4fedd7123eaf147edd55eabbbd72e0bcc8368e47) Co-authored-by: Julien Palard <julien@palard.fr>
* bpo-42370: Check element before making mouse click in ttk tests (GH-23491)Miss Islington (bot)2020-11-241-3/+11
| | | | | (cherry picked from commit b0b428510cfd604a8eef1f245f039331e671ea4a) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* bpo-42328: Fix tkinter.ttk.Style.map(). (GH-23300)Miss Islington (bot)2020-11-233-28/+107
| | | | | | | | | The function accepts now the representation of the default state as empty sequence (as returned by Style.map()). The structure of the result is now the same on all platform and does not depend on the value of wantobjects. (cherry picked from commit dd844a2916fb3a8f481ec7c732802c13c3375691) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* bpo-42426: IDLE: Fix reporting offset of the RE error in searchengine (GH-23447)Miss Islington (bot)2020-11-223-9/+10
| | | | | (cherry picked from commit 453bc1da2023d6cbe362637a2e0b06d0521f013c) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* bpo-42416: Use inspect.getdoc for IDLE calltips (GH-23416)Miss Islington (bot)2020-11-203-6/+12
| | | | | | Inspect.getdoc(ob) sometimes gets docstrings when ob.__doc__ is None. (cherry picked from commit 7ddbaa7a1b3e61847ee99658be6a7268a049e302) Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
* bpo-42398: Fix "make regen-all" race condition (GH-23362) (GH-23367)Miss Islington (bot)2020-11-181-7/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix a race condition in "make regen-all" when make -jN option is used to run jobs in parallel. The clinic.py script now only use atomic write to write files. Moveover, generated files are now left unchanged if the content does not change, to not change the file modification time. The "make regen-all" command runs "make clinic" and "make regen-importlib" targets: * "make regen-importlib" builds object files (ex: Modules/_weakref.o) from source files (ex: Modules/_weakref.c) and clinic files (ex: Modules/clinic/_weakref.c.h) * "make clinic" always rewrites all clinic files (ex: Modules/clinic/_weakref.c.h) Since there is no dependency between "clinic" and "regen-importlib" Makefile targets, these two targets can be run in parallel. Moreover, half of clinic.py file writes are not atomic and so there is a race condition when "make regen-all" runs jobs in parallel using make -jN option (which can be passed in MAKEFLAGS environment variable). Fix clinic.py to make all file writes atomic: * Add write_file() function to ensure that all file writes are atomic: write into a temporary file and then use os.replace(). * Moreover, write_file() doesn't recreate or modify the file if the content does not change to avoid modifying the file modification file. * Update test_clinic to verify these assertions with a functional test. * Remove Clinic.force attribute which was no longer used, whereas Clinic.verify remains useful. (cherry picked from commit 8fba9523cf08029dc2e280d9f48fdd57ab178c9d) (cherry picked from commit c53c3f400050a7edc92ccb7285a6d7eeb4c37fd2) Co-authored-by: Victor Stinner <vstinner@python.org>
* bpo-41561: skip test_min_max_version_mismatch (GH-22308)Miss Islington (bot)2020-11-181-0/+1
| | | | | | | | skip test_min_max_version_mismatch when TLS 1.0 is not available Signed-off-by: Christian Heimes <christian@python.org> (cherry picked from commit ce04e7105bc396c32667a22b928a712ba0778a3f) Co-authored-by: Christian Heimes <christian@python.org>
* bpo-42014: shutil.rmtree: call onerror with correct function (GH-22585)Miss Islington (bot)2020-11-101-1/+1
| | | | | | | | | | The onerror is supposed to be called with failed function, but in this case lstat is wrongly used instead of open. Not sure if this needs bug or not... Automerge-Triggered-By: GH:hynek (cherry picked from commit e59b2deffde61e5641cabd65034fa11b4db898ba) Co-authored-by: Michal Čihař <michal@cihar.com>
* bpo-42183: Fix a stack overflow error for asyncio Task or Future repr() ↵Miss Islington (bot)2020-11-102-3/+40
| | | | | | | | | | | (GH-23020) The overflow occurs under some circumstances when a task or future recursively returns itself. Co-authored-by: Kyle Stanley <aeros167@gmail.com> (cherry picked from commit 42d873c63aa9d160c132be4a34599531574db12c) Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
* bpo-41754: Ignore NotADirectoryError in invocation of xdg-settings ↵Miss Islington (bot)2020-11-081-1/+1
| | | | | | | | | | | (GH-23075) (GH-23198) It is not clear why this can happen, but several users have mentioned getting this exception on macOS. (cherry picked from commit 23831a7a90956e38b7d70304bb6afe30d37936de) Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com> Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com>
* bpo-42249: Fix writing binary Plist files larger than 4 GiB. (GH-23121)Miss Skeleton (bot)2020-11-031-1/+1
| | | | | (cherry picked from commit 212d32f45c91849c17a82750df1ac498d63976be) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.8] bpo-42103: Improve validation of Plist files. (GH-22882) (GH-23116)Serhiy Storchaka2020-11-032-61/+361
| | | | | | | | | | | * Prevent some possible DoS attacks via providing invalid Plist files with extremely large number of objects or collection sizes. * Raise InvalidFileException for too large bytes and string size instead of returning garbage. * Raise InvalidFileException instead of ValueError for specific invalid datetime (NaN). * Raise InvalidFileException instead of TypeError for non-hashable dict keys. * Add more tests for invalid Plist files. (cherry picked from commit 34637a0ce21e7261b952fbd9d006474cc29b681f)
* bpo-42224: Fix test_format when locale does not expect number grouping ↵Miss Skeleton (bot)2020-11-021-2/+5
| | | | | | | (GH-23067) (cherry picked from commit 301822859b3fc34801a06f1090d62f9f2ee5b092) Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
* [3.8] bpo-42230: Improve asyncio documentation regarding accepting sets vs ↵Jakub Stasiak2020-11-021-2/+2
| | | | | | | | | | | | | | | | | iterables (GH-23073) (GH-23105) People call wait() and as_completed() with various non-set iterables, a list should be the most common but there are others as well[1]. Considering typeshed also documents wait()[2] and as_completed()[3] as accepting arbitrary iterables I think it's a good idea to document the status quo better. [1] https://github.com/aio-libs/aiokafka/pull/672 [2] https://github.com/python/typeshed/blob/620989bac572f30349b95590ebe81a73ce0fe862/stdlib/3/asyncio/tasks.pyiGH-L161 [3] https://github.com/python/typeshed/blob/620989bac572f30349b95590ebe81a73ce0fe862/stdlib/3/asyncio/tasks.pyiGH-L40. (cherry picked from commit 3d86d090dcbbdfdd3e5a5951cab30612d6131222) Co-authored-by: Jakub Stasiak <jakub@stasiak.at>
* bpo-40511: Stop unwanted flashing of IDLE calltips (GH-20910)Miss Skeleton (bot)2020-11-023-7/+141
| | | | | | | | | They were occurring with both repeated 'force-calltip' invocations and by typing parentheses in expressions, strings, and comments in the argument code. Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu> (cherry picked from commit da7bb7b4d769350c5fd03e6cfb16b23dc265ed72) Co-authored-by: Tal Einat <taleinat+github@gmail.com>
* [3.8] bpo-29566: binhex.binhex now consitently writes MacOS 9 line endings. ↵Miss Skeleton (bot)2020-11-012-2/+14
| | | | | | | | | | | (GH-23059) (GH-23070) [[bpo-29566]()]() notes that binhex.binhex uses inconsistent line endings (both Unix and MacOS9 line endings are used). This PR changes this to use the MacOS9 line endings everywhere. (cherry picked from commit 2165cea548f961b308050f30d1f042a377651d44) Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com> Automerge-Triggered-By: GH:ronaldoussoren
* bpo-41662: Fix bugs in binding parameters in sqlite3 (GH-21998)Miss Skeleton (bot)2020-10-262-1/+26
| | | | | | | | | * When the parameters argument is a list, correctly handle the case of changing it during iteration. * When the parameters argument is a custom sequence, no longer override an exception raised in ``__len__()``. (cherry picked from commit 0b419b791077414bbc011a412698ebb362b63761) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* bpo-33987: Add master ttk Frame to IDLE search dialogs (GH-22942)Miss Skeleton (bot)2020-10-253-14/+22
| | | | | (cherry picked from commit 5df6c99cb450fe2f30be681dbf68cd1d34d3bbe4) Co-authored-by: Mark Roseman <mark@markroseman.com>
* bpo-33987: Use master ttk Frame for IDLE config dialog (GH-22943)Miss Skeleton (bot)2020-10-251-5/+7
| | | | | (cherry picked from commit c579ad14d3b5bb9a45d7b9cc708eaf0bf4884c50) Co-authored-by: Mark Roseman <mark@markroseman.com>
* bpo-33987: Use ttk Label on IDLE statusbar (GH-22941)Miss Skeleton (bot)2020-10-241-2/+1
| | | | | (cherry picked from commit e53e54425d9b7b9b7b082817da104d60bb25e3a2) Co-authored-by: Mark Roseman <mark@markroseman.com>
* [3.8] bpo-40592: shutil.which will not return None anymore if ; is the last ↵Miss Skeleton (bot)2020-10-232-1/+23
| | | | | | | | | | char in PATHEXT (GH-20088) (GH-22913) shutil.which will not return None anymore for empty str in PATHEXT Empty PATHEXT will now be defaulted to _WIN_DEFAULT_PATHEXT (cherry picked from commit da6f098188c9825f10ae60db8987056b3a54c2e8) Co-authored-by: Christopher Marchfelder <marchfelder@googlemail.com>
* bpo-33987: IDLE: Use ttk Frame on doc window and statusbar (GH-11433) (GH-22900)Miss Skeleton (bot)2020-10-222-5/+9
| | | | | | (cherry picked from commit facb522d44fceaf15de6bc95de1cd680c4621c2a) Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
* [3.8] bpo-39524: Fixed doc-string in ast._pad_whitespace (GH-18340) (GH-22857)Irit Katriel2020-10-211-1/+1
| | | Automerge-Triggered-By: GH:zware
* bpo-41316: Make tarfile follow specs for FNAME (GH-21511)Miss Skeleton (bot)2020-10-212-1/+15
| | | | | | | | | | | | | tarfile writes full path to FNAME field of GZIP format instead of just basename if user specified absolute path. Some archive viewers may process file incorrectly. Also it creates security issue because anyone can know structure of directories on system and know username or other personal information. RFC1952 says about FNAME: This is the original name of the file being compressed, with any directory components removed. So tarfile must remove directory names from FNAME and write only basename of file. Automerge-Triggered-By: @jaraco (cherry picked from commit 22748a83d927d3da1beaed771be30887c42b2500) Co-authored-by: Artem Bulgakov <ArtemSBulgakov@ya.ru>
* bpo-38439: Add 256px IDLE icon to the .ico, drop gifs from it (GH-19648)Miss Skeleton (bot)2020-10-202-0/+4
| | | | | (cherry picked from commit faddc7449d07e883b8ad8bb95dd68ce6dbdc06e8) Co-authored-by: Miro Hrončok <miro@hroncok.cz>
* bpo-38324: Fix test__locale.py Windows failures (GH-20529)Miss Skeleton (bot)2020-10-201-0/+4
| | | | | | | Use wide-char _W_* fields of lconv structure on Windows Remove "ps_AF" from test__locale.known_numerics on Windows (cherry picked from commit f2312037e3a974d26ed3e23884f94c6af111a27a) Co-authored-by: TIGirardi <tiagoigirardi@gmail.com>
* bpo-41491: plistlib: accept hexadecimal integer values in xml plist files ↵Miss Skeleton (bot)2020-10-202-1/+18
| | | | | | | | | (GH-22764) (GH-22807) (cherry picked from commit 3185267400be853404f22a1e06bb9fe1210735c7) Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com> Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com>
* bpo-41471: Ignore invalid prefix lengths in system proxy settings on macOS ↵Miss Skeleton (bot)2020-10-202-0/+17
| | | | | | | (GH-22762) (GH-22774) (cherry picked from commit 93a1ccabdede416425473329b8c718d507c55e29) Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com>
* bpo-42051: Reject XML entity declarations in plist files (GH-22760)Miss Skeleton (bot)2020-10-202-0/+25
| | | | | (cherry picked from commit 05ee790f4d1cd8725a90b54268fc1dfe5b4d1fa2) Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com>
* bpo-38912: fix close before connect callback in test_asyncio SSL tests ↵Miss Skeleton (bot)2020-10-201-0/+2
| | | | | | | | (GH-22691) Reduces the rate at which the ENV CHANGED failure occurs in test_asyncio SSL tests (due to unclosed transport), but does not 100% resolve it. (cherry picked from commit de73d432bb29f6439f2db16cb991e15e09c70c26) Co-authored-by: Justin Turner Arthur <justinarthur@gmail.com>
* bpo-27321 Fix email.generator.py to not replace a non-existent header. ↵Miss Skeleton (bot)2020-10-192-1/+40
| | | | | | | | | | | | | | (GH-18074) This PR replaces GH-1977. The reason for the replacement is two-fold. The fix itself is different is that if the CTE header doesn't exist in the original message, it is inserted. This is important because the new CTE could be quoted-printable whereas the original is implicit 8bit. Also the tests are different. The test_nonascii_as_string_without_cte test in GH-1977 doesn't actually test the issue in that it passes without the fix. The test_nonascii_as_string_without_content_type_and_cte test is improved here, and even though it doesn't fail without the fix, it is included for completeness. Automerge-Triggered-By: @warsaw (cherry picked from commit bf838227c35212709dc43b3c3c57f8e1655c1d24) Co-authored-by: Mark Sapiro <mark@msapiro.net>
* bpo-16396: Allow wintypes to be imported on non-Windows systems. (GH-21394)Miss Skeleton (bot)2020-10-191-3/+5
| | | | | | Co-authored-by: Christian Heimes <christian@python.org> (cherry picked from commit 5456e78f4593edc277ab72fb9a9db1ebae7d4c2d) Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
* Remove extra pip package (GH-22778)Miss Skeleton (bot)2020-10-191-0/+0
| | | | | (cherry picked from commit 6b487e07d0525f7721dcb4dc1aa96eb2eec97a78) Co-authored-by: Steve Dower <steve.dower@python.org>
* bpo-40492: Fix --outfile with relative path when the program changes it ↵Anthony Sottile2020-10-183-1/+25
| | | | | working dir (GH-19910) (cherry picked from commit 3c0ac18504cfeed822439024339d5717f42bdd66)
* [3.8] bpo-32498: Improve exception message on passing bytes to ↵Irit Katriel2020-10-182-0/+8
| | | | urllib.parse.unquote (GH-22746)
* bpo-41966: Fix pickling pure datetime.time subclasses (GH-22731) (GH-22748)Miss Skeleton (bot)2020-10-182-1/+4
| | | | | | (cherry picked from commit c304c9a7efa8751b5bc7526fa95cd5f30aac2b92) Co-authored-by: scaramallion <scaramallion@users.noreply.github.com>
* bpo-42065: Fix incorrectly formatted _codecs.charmap_decode error message ↵Miss Skeleton (bot)2020-10-181-0/+12
| | | | | | | (GH-19940) (cherry picked from commit 3635388f52b42e5280229104747962117104c453) Co-authored-by: Max Bernstein <tekknolagi@users.noreply.github.com>
* bpo-42011: Update documentation of logging.Filter.filter() (GH-22692) (GH-22724)Miss Skeleton (bot)2020-10-161-2/+2
| | | (cherry picked from commit e9959c71185d0850c84e3aba0301fbc238f194a9)
* [3.8] bpo-41855: Fix duplicate results in FastPath.zip_children() (#22404)Jason R. Coombs2020-10-152-4/+12
| | | | | | | * bpo-41855: Backport fixes from importlib_metadata 1.5.2. * Add blurb. * Add anchor for finders and loaders
* bpo-41984: GC track all user classes (GH-22701/GH-22707)Miss Skeleton (bot)2020-10-152-5/+24
| | | (cherry picked from commit c13b847a6f913b72eeb71651ff626390b738d973)
* bpo-41939: always enable test_site.test_license_exists_at_url (GH-22688)Miss Skeleton (bot)2020-10-141-2/+0
| | | | | (cherry picked from commit 6a48518e8dac3521ff387ee67cdf33783114a257) Co-authored-by: Ned Deily <nad@python.org>
* [3.8] bpo-32793: Fix a duplicate debug message in smtplib (GH-15341) (GH-22683)Dong-hee Na2020-10-131-2/+0
| | | | | | | | | | | | _get_socket() already prints a debug message for the host and port. https://bugs.python.org/issue32793 Automerge-Triggered-By: @maxking (cherry picked from commit 46a7564578f208df1e0c54fc0520d3b7ca32c981) Co-authored-by: Zackery Spytz <zspytz@gmail.com> Co-authored-by: Zackery Spytz <zspytz@gmail.com>
* bpo-41739: Fix test_logging.test_race_between_set_target_and_flush() ↵Miss Skeleton (bot)2020-10-121-8/+13
| | | | | | | | | | | | | | | (GH-22655) (GH-22656) (GH-22662) The test now waits until all threads complete to avoid leaking running threads. Also, use regular threads rather than daemon threads. (cherry picked from commit 13ff396c019d548ba181cf22c6f39309a300723c) (cherry picked from commit f5393dc2a0ced7bf670ebc56b5fd10a3eb328d1a) Co-authored-by: Victor Stinner <vstinner@python.org> Co-authored-by: Victor Stinner <vstinner@python.org>
* bpo-41831: Restore str implementation of __str__ in tkinter.EventType (GH-22355)Miss Skeleton (bot)2020-10-091-3/+2
| | | | | (cherry picked from commit eb38c6b7aa35d3003ec0958533421902d19ce408) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* bpo-41831: Add tests for tkinter.Event.__repr__ (GH-22354)Miss Skeleton (bot)2020-10-091-0/+48
| | | | | (cherry picked from commit f25323a307a72c40862c87c2df822f83be6645da) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.8] bpo-41976: Fix the fallback to gcc of ctypes.util.find_library when ↵Pablo Galindo2020-10-082-8/+36
| | | | | | | using gcc>9 (GH-22598). (GH-22600) (cherry picked from commit 27ac19cca2c639caaf6fedf3632fe6beb265f24f) Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
* bpo-41306: Allow scale value to not be rounded (GH-21715)Miss Skeleton (bot)2020-10-081-1/+2
| | | | | | | | | | This fixes the test failure with Tk 6.8.10 which is caused by changes to how Tk rounds the `from`, `to` and `tickinterval` arguments. This PR uses `noconv` if the patchlevel is greater than or equal to 8.6.10 (credit to Serhiy for this idea as it is much simpler than what I previously proposed). Going into more detail for those who want it, the Tk change was made in [commit 591f68c](https://github.com/tcltk/tk/commit/591f68cb382525b72664c6fecaab87742b6cc87a) and means that the arguments listed above are rounded relative to the value of `from`. However, when rounding the `from` argument ([line 623](https://github.com/tcltk/tk/blob/591f68cb382525b72664c6fecaab87742b6cc87a/generic/tkScale.cGH-L623)), it is rounded relative to itself (i.e. rounding `0`) and therefore the assigned value for `from` is always what is given (no matter what values of `from` and `resolution`). Automerge-Triggered-By: @pablogsal (cherry picked from commit aecf036738a404371303e770f4ce4fd9f7d43de7) Co-authored-by: E-Paine <63801254+E-Paine@users.noreply.github.com>
* bpo-41944: No longer call eval() on content received via HTTP in the CJK ↵Miss Skeleton (bot)2020-10-061-14/+8
| | | | | | | | | codec tests (GH-22566) (GH-22577) (cherry picked from commit 2ef5caa58febc8968e670e39e3d37cf8eef3cab8) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com> Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* bpo-41939: Fix test_site.test_license_exists_at_url() (GH-22559)Miss Skeleton (bot)2020-10-061-0/+2
| | | | | | | Call urllib.request.urlcleanup() to reset the global urllib.request._opener. (cherry picked from commit 1fce240d6c4b2b2cc17a86e88c65169e15b9feeb) Co-authored-by: Victor Stinner <vstinner@python.org>
* [3.8] bpo-41909: Enable previously disabled recursion checks. (GH-22536) ↵Serhiy Storchaka2020-10-041-0/+10
| | | | | | | | | | | | | | | (GH-22551) Enable recursion checks which were disabled when get __bases__ of non-type objects in issubclass() and isinstance() and when intern strings. It fixes a stack overflow when getting __bases__ leads to infinite recursion. Originally recursion checks was disabled for PyDict_GetItem() which silences all errors including the one raised in case of detected recursion and can return incorrect result. But now the code uses PyDict_GetItemWithError() and PyDict_SetDefault() instead. (cherry picked from commit 9ece9cd65cdeb0a1f6e60475bbd0219161c348ac)