Commit Graph

23736 Commits

Author SHA1 Message Date
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
Miss Skeleton (bot) b626d2218c
bpo-42061: Document __format__ for IP addresses (GH-23018)
Automerge-Triggered-By: GH:ericvsmith
(cherry picked from commit 3317466061)

Co-authored-by: Teugea Ioan-Teodor <teodor.teugea@gmail.com>
2020-10-29 15:38:12 -07:00
Miss Skeleton (bot) 60324d26b5
bpo-42143: Ensure PyFunction_NewWithQualName() can't fail after creating the func object (GH-22953) (GH-23021)
func_dealloc() does not handle partially-created objects. Best not to give it any.
(cherry picked from commit 350526105f)

Co-authored-by: Yonatan Goldschmidt <yon.goldschmidt@gmail.com>
2020-10-29 13:02:50 +02:00
kj 577d7c4e62
[3.9] bpo-41805: Documentation for PEP 585 (GH-22615) (GH-23016)
Backport of #22615 to 3.9 since that couldn't be auto-merged due to conflicts.
2020-10-28 08:33:36 -07:00
Lysandros Nikolaou 24a7c298d4
[3.9] bpo-42123: Run the parser two times and only enable invalid rules on the second run (GH-22111) (GH-23011)
* Implement running the parser a second time for the errors messages

The first parser run is only responsible for detecting whether
there is a `SyntaxError` or not. If there isn't the AST gets returned.
Otherwise, the parser is run a second time with all the `invalid_*`
rules enabled so that all the customized error messages get produced.

(cherry picked from commit bca7014032)
2020-10-28 02:14:15 +02: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
Miss Skeleton (bot) 0b290dd217
bpo-42150: Avoid buffer overflow in the new parser (GH-22978)
(cherry picked from commit e68c67805e)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
2020-10-25 16:24:56 -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) 2cccc29eaf
bpo-29981: Add examples and update index for set, dict, and generator comprehensions'(GH-20272)
Co-authored-by: Rémi Lapeyre <remi.lapeyre@henki.fr>
(cherry picked from commit 2d55aa9e37)

Co-authored-by: Florian Dahlitz <f2dahlitz@freenet.de>
2020-10-24 19:53:41 -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
Inada Naoki 07a44d9572
bpo-42057: Fix peephole optimizer (GH-22802) 2020-10-22 11:06:07 +09:00
Miss Skeleton (bot) c3538b8381
bpo-41910: specify the default implementations of object.__eq__ and object.__ne__ (GH-22874) (#22876)
See Objects/typeobject.c:object_richcompare() for the implementation of this in CPython.

Co-authored-by: Brett Cannon <brett@python.org>
2020-10-21 20:07:39 -04:00
Miss Skeleton (bot) ec62b47ebc
[3.9] bpo-39416: Document some restrictions on the default string representations of numeric classes (GH-18111) (GH-22860)
[[bpo-39416]()](): Document string representations of the Numeric classes

This is a change to the specification of the Python language.

The idea here is to put sane minimal limits on the Python language's default
representations of its Numeric classes.  That way "Marty's Robotic Massage Parlor
and Python Interpreter" implementation of Python won't do anything too
crazy.

Some discussion in the email thread:
Subject: Documenting Python's float.__str__()
https://mail.python.org/archives/list/python-dev@python.org/thread/FV22TKT3S2Q3P7PNN6MCXI6IX3HRRNAL/
(cherry picked from commit c60394c7fc)


Co-authored-by: kpinc <kop@karlpinc.com>

Automerge-Triggered-By: GH:merwok
2020-10-21 11:56:16 -07: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) d0bfce992c
bpo-41744: Package python.props with correct name in NuGet package (GH-22154)
NuGet automatically includes .props file from the build directory in the
target using the package, but only if the .props file has the correct
name: it must be $(id).props

Rename python.props correspondingly in all the nuspec variants. Also
keep python.props as it were for backward compatibility.
(cherry picked from commit 7c11a9acca)

Co-authored-by: Václav Slavík <vaclav@slavik.io>
2020-10-21 14:15:18 +09:00
Miss Skeleton (bot) d05514ace6
[3.9] bpo-42010: [docs] Clarify subscription of types (GH-22822) (GH-22840)
(cherry picked from commit 7cdf30fff3)


Co-authored-by: kj <28750310+Fidget-Spinner@users.noreply.github.com>

Automerge-Triggered-By: GH:gvanrossum
2020-10-20 16:58:49 -07:00
Miss Skeleton (bot) d12afba507
bpo-38439: Update the Windows Store package's icons for IDLE. Artwork by Andrew Clover (GH-22817)
(cherry picked from commit 6d883fbe14)

Co-authored-by: Steve Dower <steve.dower@python.org>
2020-10-20 10:20:05 -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) 38a17d0752
bpo-41726: Update the refcounts info of PyType_FromModuleAndSpec in refcounts.dat (GH-22112) (GH-22808)
Update refcounts info of PyType_FromModuleAndSpec in refcounts.dat
(cherry picked from commit 1e2f051a61)

Co-authored-by: Hai Shi <shihai1992@gmail.com>
2020-10-20 14:30:04 +02: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
Miss Skeleton (bot) 8f0b8b5749
Correct name of bytecode in change note. (GH-22723) (#22765)
(cherry picked from commit b580ed1d9d)

Co-authored-by: Mark Shannon <mark@hotpy.org>
2020-10-19 17:44:25 +02: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) 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) f07448bef4
bpo-41894: Fix UnicodeDecodeError while loading native module (GH-22466)
When running in a non-UTF-8 locale, if an error occurs while importing a
native Python module (say because a dependent share library is missing),
the error message string returned may contain non-ASCII code points
causing a UnicodeDecodeError.

PyUnicode_DecodeFSDefault is used for buffers which may contain
filesystem  paths. For consistency with os.strerror(),
PyUnicode_DecodeLocale is used for buffers which contain system error
messages. While the shortname parameter is always encoded in ASCII
according to PEP 489, it is left decoded using PyUnicode_FromString to
minimize the changes and since it should not affect the decoding (albeit
_potentially_ slower).

In dynload_hpux, since the error buffer contains a message generated
from a static ASCII string and the module filesystem path,
PyUnicode_DecodeFSDefault is used instead of PyUnicode_DecodeLocale as
is used elsewhere.

* bpo-41894: Fix bugs in dynload error msg handling

For both dynload_aix and dynload_hpux, properly handle the possibility
that decoding strings may return NULL and when such an error happens,
properly decrement any previously decoded strings and return early.

In addition, in dynload_aix, ensure that we pass the decoded string
*object* pathname_ob to PyErr_SetImportError instead of the original
pathname buffer.

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
(cherry picked from commit 2d2af320d9)

Co-authored-by: Kevin Adler <kadler@us.ibm.com>
2020-10-14 19:25:45 -07:00
Miss Skeleton (bot) 391a544f2a
bpo-41993: Fix possible issues in remove_module() (GH-22631) (GH-22647)
* PyMapping_HasKey() is not safe because it silences all exceptions and can return incorrect result.
* Informative exceptions from PyMapping_DelItem() are overridden with RuntimeError and
  the original exception raised before calling remove_module() is lost.
* There is a race condition between PyMapping_HasKey() and PyMapping_DelItem().
(cherry picked from commit 8287aadb75)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2020-10-14 12:09:44 +03:00
Miss Skeleton (bot) 8a12503b45
bpo-42015: Reorder dereferencing calls in meth_dealloc, to make sure m_self is kept alive long enough (GH-22670)
(cherry picked from commit 04b8631d84)

Co-authored-by: Yannick Jadoul <yannick.jadoul@belgacom.net>
2020-10-12 14:29:01 -07: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
Miss Skeleton (bot) ebc5a6b59e
bpo-41986: Add Py_FileSystemDefaultEncodeErrors and Py_UTF8Mode back to limited API (GH-22621)
(cherry picked from commit 637a09b0d6)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2020-10-10 07:32:09 -07:00
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
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) 089c38677d
bpo-41557: Update Windows installer to use SQLite 3.33.0 (GH-21960)
(cherry picked from commit bfe6e03cd6)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
2020-10-08 12:02:33 -07: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
 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JuKSdagyuo0bFW
 KKP138DdS6rqVR5o38lOGty5/e6pf10PA+9mfLv1n9IATdsE/T9uTV0WICYojcyb
 GixtJZZRysoCPUBQSJvtrBLHQOsb0XiT+b+3aV9XpfPxDfgqiVRdAYN7IUs1vZXU
 I/4l2gq1dlskj+/SG/O/bakBFzOvXqSl4ZYyg7NZd5vseddDQ9emBbJJMGoJnFmM
 Iq7RFM7tuwLwjuz2tMuDOpD3ZZJ4lCOjRWHL1ruI8kpwd8KLb+lsT1FBu7ZSRI9P
 unIzdPAZVg6yIk+aUYNVKmQccNdKab89BfLQU0aRMh2QCY7WYF38Kh3QrEJ2ttKj
 m5ar2DCVd+2qPefLJsoSpwvv0IAOrBHYerVBRLx+idFQaleHJh5y2QSEtBie6NM1
 lVXBBrSoag==
 =cYzo
 -----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
Miss Skeleton (bot) b6d37e15cf
bpo-41557: Update macOS installer to use SQLite 3.33.0 (GH-21959) (GH-22560)
(cherry picked from commit 9a7642667a)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
2020-10-05 05:01:51 -04:00