Commit Graph

46111 Commits

Author SHA1 Message Date
Miss Islington (bot) 3997a4e6bc
Disable peg generator tests when building with PGO (GH-23141)
Otherwise, when running the testsuite, test_peg_generator tries to compile C
code using the optimized flags and fails because it cannot find the profile
data.
(cherry picked from commit 100964e031)

Co-authored-by: serge-sans-paille <serge.guelton@telecom-bretagne.eu>
2020-11-04 15:22:13 -08:00
Miss Skeleton (bot) 9bc07874e3
bpo-42249: Fix writing binary Plist files larger than 4 GiB. (GH-23121)
(cherry picked from commit 212d32f45c)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2020-11-03 13:32:59 -08:00
Miss Skeleton (bot) e277cb7698
bpo-42103: Improve validation of Plist files. (GH-22882)
* 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 34637a0ce2)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2020-11-02 13:34:46 -08:00
Lysandros Nikolaou 723e21a8e7
bpo-42224: Fix test_format when locale does not expect number grouping (GH-23067)
(cherry picked from commit 301822859b)
2020-11-02 17:51:56 +02:00
Miss Skeleton (bot) ff852aabf2
bpo-42230: Improve asyncio documentation regarding accepting sets vs iterables (GH-23073)
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] 620989bac5/stdlib/3/asyncio/tasks.pyiGH-L161
[3] 620989bac5/stdlib/3/asyncio/tasks.pyiGH-L40
(cherry picked from commit 3d86d090dc)

Co-authored-by: Jakub Stasiak <jakub@stasiak.at>
2020-11-02 03:19:45 -08:00
Miss Skeleton (bot) 79e9f06149
bpo-40511: Stop unwanted flashing of IDLE calltips (GH-20910)
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 da7bb7b4d7)

Co-authored-by: Tal Einat <taleinat+github@gmail.com>
2020-11-01 20:49:39 -08:00
Miss Skeleton (bot) 3defcbac2c
[3.9] bpo-29566: binhex.binhex now consitently writes MacOS 9 line endings. (GH-23059) (GH-23071)
[[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 2165cea548)


Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com>

Automerge-Triggered-By: GH:ronaldoussoren
2020-11-01 01:39:26 -08:00
Lysandros Nikolaou cfcb952e30
[3.9] bpo-42218: Correctly handle errors in left-recursive rules (GH-23065) (GH-23066)
Left-recursive rules need to check for errors explicitly, since
even if the rule returns NULL, the parsing might continue and lead
to long-distance failures.

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
(cherry picked from commit 02cdfc93f8)

Automerge-Triggered-By: GH:lysnikolaou
2020-10-31 12:06:03 -07:00
Pablo Galindo ddcd57e3ea
[3.9] bpo-42214: Fix check for NOTEQUAL token in the PEG parser for the barry_as_flufl rule (GH-23048) (GH-23051)
(cherry picked from commit 06f8c3328d)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
2020-10-31 00:40:42 +00:00
Lysandros Nikolaou c4b58cea47
[3.9] bpo-41659: Disallow curly brace directly after primary (GH-22996) (#23006)
(cherry picked from commit 15acc4eaba)
2020-10-28 00:38:42 +02:00
Miss Skeleton (bot) c12afa92b0
[3.9] bpo-42146: Fix memory leak in subprocess.Popen() in case of uid/gid overflow (GH-22966) (GH-22980)
Fix memory leak in subprocess.Popen() in case of uid/gid overflow

Also add a test that would catch this leak with `--huntrleaks`.

Alas, the test for `extra_groups` also exposes an inconsistency
in our error reporting: we use a custom ValueError for `extra_groups`,
but propagate OverflowError for `user` and `group`.
(cherry picked from commit c0590c0033)


Co-authored-by: Alexey Izbyshev <izbyshev@ispras.ru>

Automerge-Triggered-By: GH:gpshead
2020-10-25 17:34:29 -07:00
Serhiy Storchaka 0aaecb3048
[3.9] bpo-41052: Fix pickling heap types implemented in C with protocols 0 and 1 (GH-22870). (GH-22963)
(cherry picked from commit 8cd1dbae32)
2020-10-25 17:56:17 +02:00
Miss Skeleton (bot) 9cf26b00e4
bpo-33987: Add master ttk Frame to IDLE search dialogs (GH-22942)
(cherry picked from commit 5df6c99cb4)

Co-authored-by: Mark Roseman <mark@markroseman.com>
2020-10-24 20:36:55 -07:00
Miss Skeleton (bot) 2d493893c7
bpo-33987: Use master ttk Frame for IDLE config dialog (GH-22943)
(cherry picked from commit c579ad14d3)

Co-authored-by: Mark Roseman <mark@markroseman.com>
2020-10-24 18:08:17 -07:00
Miss Skeleton (bot) 4efd2defb8
bpo-33987: Use ttk Label on IDLE statusbar (GH-22941)
(cherry picked from commit e53e54425d)

Co-authored-by: Mark Roseman <mark@markroseman.com>
2020-10-24 16:53:34 -07:00
Miss Skeleton (bot) c437fe39cf
[3.9] bpo-40592: shutil.which will not return None anymore if ; is the last char in PATHEXT (GH-20088) (GH-22912)
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 da6f098188)


Co-authored-by: Christopher Marchfelder <marchfelder@googlemail.com>
2020-10-23 14:38:05 -07:00
Miss Skeleton (bot) 25687bbe0d
bpo-33987: IDLE: Use ttk Frame on doc window and statusbar (GH-11433) (GH-22899)
(cherry picked from commit facb522d44)

Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
2020-10-22 15:58:04 -04:00
Inada Naoki 8f6787d93d
bpo-42057: Add a test case (GH-22878) 2020-10-22 11:28:36 +09:00
Miss Skeleton (bot) 871c6ccf4a
bpo-38439: Add 256px IDLE icon to the .ico, drop gifs from it (GH-19648)
(cherry picked from commit faddc7449d)

Co-authored-by: Miro Hrončok <miro@hroncok.cz>
2020-10-21 09:07:13 -07:00
Miss Skeleton (bot) 7917170c5b
bpo-41316: Make tarfile follow specs for FNAME (GH-21511)
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 22748a83d9)

Co-authored-by: Artem Bulgakov <ArtemSBulgakov@ya.ru>
2020-10-20 22:29:00 -07:00
Miss Skeleton (bot) a1296ed60b
Update idlelib/help.html to current Sphinx output (GH-22833)
idle.rst is unchanged
(cherry picked from commit a460d45063)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2020-10-20 18:15:23 -07:00
Miss Skeleton (bot) b249aeae89
bpo-39693: mention KeyError in tarfile extractfile documentation (GH-18639)
Co-authored-by: Andrey Darascheka <andrei.daraschenka@leverx.com>
(cherry picked from commit ec42789e6e)

Closes bpo-39693.
2020-10-20 10:31:03 -04:00
Miss Skeleton (bot) c17ff5cad2
bpo-38324: Fix test__locale.py Windows failures (GH-20529)
Use wide-char _W_* fields of lconv structure on Windows
Remove "ps_AF" from test__locale.known_numerics on Windows
(cherry picked from commit f2312037e3)

Co-authored-by: TIGirardi <tiagoigirardi@gmail.com>
2020-10-20 05:07:14 -07:00
Miss Skeleton (bot) 3fc7080220
bpo-41491: plistlib: accept hexadecimal integer values in xml plist files (GH-22764) (GH-22806)
(cherry picked from commit 3185267400)

Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com>
2020-10-20 10:05:21 +02:00
Miss Skeleton (bot) aa7b03b31b
bpo-41471: Ignore invalid prefix lengths in system proxy settings on macOS (GH-22762) (GH-22773)
(cherry picked from commit 93a1ccabde)

Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com>
2020-10-20 09:17:22 +02:00
Miss Skeleton (bot) 479553c7c1
bpo-42051: Reject XML entity declarations in plist files (GH-22760)
(cherry picked from commit 05ee790f4d)

Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com>
2020-10-19 19:34:37 -07:00
Miss Skeleton (bot) e43bee7e11
bpo-38912: fix close before connect callback in test_asyncio SSL tests (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 de73d432bb)

Co-authored-by: Justin Turner Arthur <justinarthur@gmail.com>
2020-10-19 18:40:01 -07:00
Miss Skeleton (bot) 72ce82abcf
bpo-27321 Fix email.generator.py to not replace a non-existent header. (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 bf838227c3)

Co-authored-by: Mark Sapiro <mark@msapiro.net>
2020-10-19 16:11:37 -07:00
Miss Skeleton (bot) 05d52a0ad6
bpo-16396: Allow wintypes to be imported on non-Windows systems. (GH-21394)
Co-authored-by: Christian Heimes <christian@python.org>
(cherry picked from commit 5456e78f45)

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
2020-10-19 15:32:36 -07:00
Steve Dower 6b487e07d0
Remove extra pip package (GH-22778) 2020-10-19 21:05:04 +01:00
Anthony Sottile 7c949020ef
bpo-40492: Fix --outfile with relative path when the program changes it working dir (GH-19910)
(cherry picked from commit 3c0ac18504)
2020-10-19 00:16:22 +03:00
Miss Skeleton (bot) a055ced9d4
bpo-41966: Fix pickling pure datetime.time subclasses (GH-22731) (GH-22747)
(cherry picked from commit c304c9a7ef)

Co-authored-by: scaramallion <scaramallion@users.noreply.github.com>
2020-10-18 18:32:56 +03:00
Miss Skeleton (bot) 6a2aa4994e
bpo-42065: Fix incorrectly formatted _codecs.charmap_decode error message (GH-19940)
(cherry picked from commit 3635388f52)

Co-authored-by: Max Bernstein <tekknolagi@users.noreply.github.com>
2020-10-18 09:00:18 +03:00
Miss Skeleton (bot) dff9161821
bpo-42011: Update documentation of logging.Filter.filter() (GH-22692) (GH-22725)
(cherry picked from commit e9959c7118)
2020-10-16 18:21:49 +01:00
Miss Skeleton (bot) d197b2bb3e
bpo-41984: GC track all user classes (GH-22701/GH-22702)
(cherry picked from commit c13b847a6f)
2020-10-14 20:38:25 -07:00
Miss Skeleton (bot) 881a13cad5
bpo-41939: always enable test_site.test_license_exists_at_url (GH-22688)
(cherry picked from commit 6a48518e8d)

Co-authored-by: Ned Deily <nad@python.org>
2020-10-13 18:59:41 -07:00
Saiyang Gou 1c217652b6
[3.9] bpo-39481: Fix duplicate SimpleQueue type in test_genericalias.py (GH-22619) (#22624)
There are two different `SimpleQueue` types imported (from `multiprocessing.queues` and `queue`) in `Lib/test/test_genericalias.py`, the second one shadowing the first one, making the first one not actually tested. Fix by using different names.

Automerge-Triggered-By: @gvanrossum.
(cherry picked from commit b2c0a43699)

Co-authored-by: Saiyang Gou <gousaiyang@163.com>
2020-10-12 16:52:03 -07:00
Miss Skeleton (bot) 85d59644d9
[doc] Fix typo in the graphlib docs (GH-22661) (GH-22669)
Automerge-Triggered-By: @pablogsal
(cherry picked from commit abe244c458)

Co-authored-by: linchiwei123 <40888469+linchiwei123@users.noreply.github.com>

Co-authored-by: linchiwei123 <40888469+linchiwei123@users.noreply.github.com>
2020-10-12 21:27:05 +01:00
Victor Stinner f5393dc2a0
bpo-41739: Fix test_logging.test_race_between_set_target_and_flush() (GH-22655) (GH-22656)
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 13ff396c01)
2020-10-12 05:30:48 +01:00
Karthikeyan Singaravelan 20bdeedfb4
[3.9] bpo-41371: Handle lzma lib import error in test_zoneinfo.py (GH-21734) (GH-22039)
(cherry picked from commit 5f0769a)

Co-authored-by: Nathan M <nathanmaynes@gmail.com>
2020-10-10 10:09:09 +05:30
Miss Skeleton (bot) 1f75fc7a9d
bpo-41831: Restore str implementation of __str__ in tkinter.EventType (GH-22355)
(cherry picked from commit eb38c6b7aa)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2020-10-09 13:20:48 -07:00
Miss Skeleton (bot) 43c3eafa1b
bpo-41831: Add tests for tkinter.Event.__repr__ (GH-22354) (GH-22617)
(cherry picked from commit f25323a307)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2020-10-09 22:56:19 +03:00
Batuhan Taskaya 42157b9eaa
[3.9] bpo-41979: Accept star-unpacking on with-item targets (GH-22611) (GH-22612)
Co-authored-by: Batuhan Taskaya <batuhanosmantaskaya@gmail.com>

Automerge-Triggered-By: @pablogsal
2020-10-09 03:31:07 -07:00
Karthikeyan Singaravelan c6f41e62f5
[3.9] bpo-41970: Avoid test failure in test_lib2to3 if the module is already imported (GH-22595) (GH-22609)
(cherry picked from commit 4a9f82f50d)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
2020-10-09 11:08:42 +01:00
Miss Skeleton (bot) a4ac5fadf5
bpo-41976: Fix the fallback to gcc of ctypes.util.find_library when using gcc>9 (GH-22598)
(cherry picked from commit 27ac19cca2)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
2020-10-08 11:55:24 -07:00
Miss Skeleton (bot) 15e091f63f
bpo-41306: Allow scale value to not be rounded (GH-21715)
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](591f68cb38) and means that the arguments listed above are rounded relative to the value of `from`. However, when rounding the `from` argument ([line 623](591f68cb38/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 aecf036738)

Co-authored-by: E-Paine <63801254+E-Paine@users.noreply.github.com>
2020-10-08 09:50:36 -07:00
Miss Skeleton (bot) b664a1df4e
bpo-41944: No longer call eval() on content received via HTTP in the CJK codec tests (GH-22566)
(cherry picked from commit 2ef5caa58f)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2020-10-06 05:37:36 -07:00
Miss Skeleton (bot) 10b4136bfa
bpo-41939: Fix test_site.test_license_exists_at_url() (GH-22559) (#22567)
Call urllib.request.urlcleanup() to reset the global
urllib.request._opener.
(cherry picked from commit 1fce240d6c)

Co-authored-by: Victor Stinner <vstinner@python.org>
2020-10-05 18:49:41 +02:00
Łukasz Langa 79dd0dbc32 Python 3.9.0
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEE4/8oOcBIslwITevpsmmV4xAlBWgFAl97Nt8ACgkQsmmV4xAl
 BWhFGA//cXN7hkXzURCN2z7GCHaAUm/jnJ+7xta8oVlSjpJT0OjJsxojnc+XpQau
 2bCW2o3uxhiM6qr7N2Vtj7ar2+4x8eTN08i+6phpFcLn8WzfsYQYA7Vc5RDsb8nr
 ty8JBu+xdHsP3RIfBViCotCXOhfEJZwqQnvMeGuwmHPd5w2s1GCbnPuILnWZEDtF
 tpOxJZjEUjd2gEyXKB1q5fCfMJvb73vKBcxVeMM6nbsI9egp6CeIAJC0B2xiBGGw
 8nzfvGiqMcHhBfCwKw3mER5FQQPbVyYbHSDPUm8lgdel/hMZ3dIkg686/bOQXzri
 H3xyb46PGCZNG8I5J1gQD0mcyYfXzYBNUvzlN6xRlyxanPEvX3wH+KeliRqfTQZb
 /GU9fPqrdznvMS7UoXM4R17+qHOtc/CNX53vqMX0aKioq9FZDsfRHPtvAC6zDKtP
 0ibkGU510FUf7Yt5Sh4kSB12RNNXjhBgzV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-----END PGP SIGNATURE-----

Merge tag 'v3.9.0' into 3.9

Python 3.9.0
2020-10-05 18:05:58 +02:00
Łukasz Langa 9cf6752276
Python 3.9.0 2020-10-05 17:07:58 +02:00