Commit Graph

23123 Commits

Author SHA1 Message Date
Miss Islington (bot) 73e02ff0d4
bpo-41561: skip test_min_max_version_mismatch (GH-22308)
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 ce04e7105b)

Co-authored-by: Christian Heimes <christian@python.org>
2020-11-18 04:29:34 -08:00
Victor Stinner a702bd4b92
bpo-41686: Always create the SIGINT event on Windows (GH-23344) (GH-23347) (GH-23349)
bpo-41686, bpo-41713: On Windows, the SIGINT event,
_PyOS_SigintEvent(), is now created even if Python is configured to
not install signal handlers (PyConfig.install_signal_handlers=0 or
Py_InitializeEx(0)).

(cherry picked from commit 05a5d697f4)
2020-11-17 22:23:18 +01:00
Miss Islington (bot) 4f54ca0734
bpo-42120: Remove macro defining copysign to _copysign on Windows (GH-23326)
(cherry picked from commit 9cc9e27725)

Co-authored-by: Steve Dower <steve.dower@python.org>
2020-11-16 15:42:49 -08:00
Miss Islington (bot) 85a8a19134
bpo-42153 Fix link to IMAP documents in imaplib.rst (GH-23297)
The University of Washington stopped hosting the IMAP documents. Link to a rescued copy on GitHub.
(cherry picked from commit aa01011003)

Co-authored-by: Yash Shete <universeyash4@gmail.com>
2020-11-15 21:12:34 -08:00
Miss Islington (bot) 8a4557240b
bpo-40754: Adds _testinternalcapi to Windows installer for test suite (GH-23271)
(cherry picked from commit 9b6934230c)

Co-authored-by: Steve Dower <steve.dower@python.org>
2020-11-13 14:42:10 -08:00
Jakub Stasiak f37628eb71
[3.8] bpo-42237: Fix os.sendfile() on illumos (GH-23154). (GH-23246)
(cherry picked from commit fd4ed57674)

Co-authored-by: Jakub Stasiak <jakub@stasiak.at>
2020-11-12 14:23:48 +02:00
Miss Islington (bot) c745b36ee3
bpo-42014: shutil.rmtree: call onerror with correct function (GH-22585)
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 e59b2deffd)

Co-authored-by: Michal Čihař <michal@cihar.com>
2020-11-10 08:27:02 -08:00
Miss Islington (bot) 109c17315a
bpo-42183: Fix a stack overflow error for asyncio Task or Future repr() (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 42d873c63a)

Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
2020-11-10 06:21:53 -08:00
Miss Islington (bot) db087f6d9e
bpo-41754: Ignore NotADirectoryError in invocation of xdg-settings (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 23831a7a90)

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

Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com>
2020-11-08 13:06:17 +01:00
Jakub Kulík a12f459ec2
[3.8] bpo-35455: Fix thread_time for Solaris OS (GH-11118). (GH-23145)
(cherry picked from commit 9568622c99)

Co-authored-by: Jakub Kulík <Kulikjak@gmail.com>
2020-11-04 14:19:17 +00:00
Miss Skeleton (bot) ac70175fc0
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 07:01:56 -08:00
Serhiy Storchaka 547d2bcc55
[3.8] bpo-42103: Improve validation of Plist files. (GH-22882) (GH-23116)
* 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)
2020-11-03 09:32:15 +02:00
Miss Skeleton (bot) 1341582e16
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:59 -08:00
Miss Skeleton (bot) 39a56e5523
[3.8] bpo-29566: binhex.binhex now consitently writes MacOS 9 line endings. (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 2165cea548)


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

Automerge-Triggered-By: GH:ronaldoussoren
2020-11-01 01:39:16 -08:00
Miss Skeleton (bot) 9ede1b071b
bpo-42143: Ensure PyFunction_NewWithQualName() can't fail after creating the func object (GH-22953)
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 03:24:12 -07:00
Miss Skeleton (bot) a053a7ecfe
bpo-41662: Fix bugs in binding parameters in sqlite3 (GH-21998)
* 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 0b419b7910)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2020-10-26 14:46:10 +09:00
Zackery Spytz f6255a2ccb
bpo-39871: Fix an error in a news entry (GH-21749)
(cherry picked from commit 5463635580)
2020-10-26 14:37:16 +09:00
Miss Skeleton (bot) 8485d3b911
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:41:26 -07:00
Miss Skeleton (bot) 60bef61f71
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:18 -07:00
Miss Skeleton (bot) 8b4842b7a8
[3.8] bpo-40592: shutil.which will not return None anymore if ; is the last 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 da6f098188)


Co-authored-by: Christopher Marchfelder <marchfelder@googlemail.com>
2020-10-23 14:37:58 -07:00
Miss Skeleton (bot) b2b3803081
bpo-41910: specify the default implementations of object.__eq__ and object.__ne__ (GH-22874) (#22877)
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:59 -04:00
Miss Skeleton (bot) 89fac4c374
[3.8] bpo-39416: Document some restrictions on the default string representations of numeric classes (GH-18111) (GH-22861)
[[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:20 -07:00
Miss Skeleton (bot) e866f33a48
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:44 -07:00
Miss Skeleton (bot) d84e411005
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-20 10:17:31 -07:00
Miss Skeleton (bot) 333782a3f4
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:17:17 -07:00
Miss Skeleton (bot) 4cde523aa4
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 04:58:06 -07:00
Miss Skeleton (bot) d1eb75585e
bpo-41491: plistlib: accept hexadecimal integer values in xml plist files (GH-22764) (GH-22807)
(cherry picked from commit 3185267400)

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

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

Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com>
2020-10-20 09:17:58 +02:00
Miss Skeleton (bot) 65894cac08
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:35:23 -07:00
Miss Skeleton (bot) 3faef630a4
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:44:05 -07:00
Miss Skeleton (bot) 371146a3f8
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:07:20 -07:00
Miss Skeleton (bot) 6e998fad1c
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:29:37 -07:00
Anthony Sottile 1c5a65723e
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:14:18 +03:00
Irit Katriel 1a3f7c042a
[3.8] bpo-32498: Improve exception message on passing bytes to urllib.parse.unquote (GH-22746) 2020-10-19 00:06:34 +03:00
Miss Skeleton (bot) 1040299e92
bpo-41966: Fix pickling pure datetime.time subclasses (GH-22731) (GH-22748)
(cherry picked from commit c304c9a7ef)

Co-authored-by: scaramallion <scaramallion@users.noreply.github.com>
2020-10-18 18:33:28 +03:00
Miss Skeleton (bot) 400175ad91
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:16:52 +03:00
Jason R. Coombs 967fddae2f
[3.8] bpo-41855: Fix duplicate results in FastPath.zip_children() (#22404)
* bpo-41855: Backport fixes from importlib_metadata 1.5.2.

* Add blurb.

* Add anchor for finders and loaders
2020-10-15 17:05:12 -04:00
Miss Skeleton (bot) aeb66c1abb
bpo-41984: GC track all user classes (GH-22701/GH-22707)
(cherry picked from commit c13b847a6f)
2020-10-15 08:51:48 -07:00
Miss Skeleton (bot) 47ca679972
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:11:08 -07:00
Dong-hee Na 76b1913daf
[3.8] bpo-32793: Fix a duplicate debug message in smtplib (GH-15341) (GH-22683)
_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 46a7564578)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
2020-10-14 00:18:58 +09:00
Miss Skeleton (bot) 33057c7092
bpo-41739: Fix test_logging.test_race_between_set_target_and_flush() (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 13ff396c01)
(cherry picked from commit f5393dc2a0)

Co-authored-by: Victor Stinner <vstinner@python.org>

Co-authored-by: Victor Stinner <vstinner@python.org>
2020-10-12 10:51:10 +02:00
Miss Skeleton (bot) ff6870f199
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:28:49 -07:00
Miss Skeleton (bot) f8ebb7b62e
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:21:15 -07:00
Miss Skeleton (bot) 30a788990a
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 11:57:33 -07:00
Pablo Galindo 6ceb5232ae
[3.8] bpo-41976: Fix the fallback to gcc of ctypes.util.find_library when using gcc>9 (GH-22598). (GH-22600)
(cherry picked from commit 27ac19cca2)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
2020-10-08 19:50:28 +01:00
Miss Skeleton (bot) 3d103e0695
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:14:33 -07:00
Miss Skeleton (bot) 6c6c256df3
bpo-41944: No longer call eval() on content received via HTTP in the CJK codec tests (GH-22566) (GH-22577)
(cherry picked from commit 2ef5caa58f)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2020-10-06 14:38:54 +02:00
Miss Skeleton (bot) 78bddc7794
bpo-41939: Fix test_site.test_license_exists_at_url() (GH-22559)
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-06 00:03:27 -07:00
Miss Skeleton (bot) a859680a5b
bpo-41557: Update macOS installer to use SQLite 3.33.0 (GH-21959)
https://sqlite.org/releaselog/3_33_0.html
(cherry picked from commit 9a7642667a)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
2020-10-05 01:27:53 -07:00
Serhiy Storchaka 09a7b3b618
[3.8] bpo-41909: Enable previously disabled recursion checks. (GH-22536) (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 9ece9cd65c)
2020-10-05 01:28:00 +03:00
Pablo Galindo fd22823991
[3.8] bpo-41840: Report module-level globals as both local and global in the symtable module (GH-22391). (GH-22529)
(cherry picked from commit fb0a4651f1)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
2020-10-03 22:50:00 +01:00
Miss Skeleton (bot) cfed534333
bpo-41900: C14N 2.0 serialisation failed for unprefixed attributes when a default namespace was defined. (GH-22474) (GH-22508)
(cherry picked from commit 6a412c94b6)
2020-10-03 08:42:38 +02:00
Miss Islington (bot) d50a070026
bpo-41774: Add programming FAQ entry (GH-22402)
In the "Sequences (Tuples/Lists)" section, add
"How do you remove multiple items from a list".
(cherry picked from commit 5b0181d1f6)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2020-09-28 22:11:06 -07:00
Miss Islington (bot) e4008404fb
bpo-40105: ZipFile truncate in append mode with shorter comment (GH-19337)
(cherry picked from commit ff9147d93b)

Co-authored-by: Jan Mazur <16736821+mzr@users.noreply.github.com>
2020-09-28 12:18:39 -07:00
Miss Islington (bot) 18e59f587b
bpo-41775: Make 'IDLE Shell' the shell title (GH-22399)
'Python Shell' may have contributed to some beginners confusing 'IDLE' with ' Python'.
(cherry picked from commit 05cc881cbc)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2020-09-24 13:08:06 -07:00
Thomas Grainger ae462297c0
[3.8] bpo-41602: raise SIGINT exit code on KeyboardInterrupt from pymain_run_module (GH-21956) (#22398)
Closes bpo issue 41602.
(cherry picked from commit a68a2ad19c)

Co-authored-by: Thomas Grainger <tagrain@gmail.com>
2020-09-24 18:44:14 +02:00
Łukasz Langa db455296be
Python 3.8.6 2020-09-23 14:36:32 +02:00
Miss Islington (bot) 5acc1b5f0b
bpo-37062: Enum: add extended AutoNumber example (GH-22349) (GH-22369)
(cherry picked from commit 62e40d8450)

Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
2020-09-22 20:57:48 -07:00
Miss Islington (bot) 2466a7ae6b
bpo-35764: Rewrite the IDLE Calltips doc section (GH-22363)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2020-09-22 14:36:02 -04:00
Miss Islington (bot) 6d372ef194
fix `EventType` bases
`StrEnum` does not exist in 3.8, so use original `(str, enum.Enum)` bases.
2020-09-22 11:30:47 -07:00
Miss Islington (bot) 7bcbb536dd
bpo-40181: Remove '/' reminder in IDLE calltips. (GH-22350)
The marker was added to the language in 3.8 and
3.7 only gets security patches.
(cherry picked from commit 40a0625792)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2020-09-21 23:02:45 -07:00
Miss Islington (bot) ca2d99d091
bpo-41815: SQLite: segfault if backup called on closed database (GH-22322)
GH- [bpo-41815](): SQLite: fix segfault if backup called on closed database

Attempting to backup a closed database will trigger segfault:

```python
import sqlite3
target = sqlite3.connect(':memory:')
source = sqlite3.connect(':memory:')
source.close()
source.backup(target)
```
(cherry picked from commit bfee9fad84)

Co-authored-by: Peter McCormick <peter@pdmccormick.com>
2020-09-21 15:00:34 -07:00
Miss Islington (bot) b7cdea8f08
bpo-35293: Remove RemovedInSphinx40Warning (GH-22198)
* bpo-35293: Remove RemovedInSphinx40Warning

* Update Misc/NEWS.d/next/Documentation/2020-09-12-17-37-13.bpo-35293._cOwPD.rst

Co-authored-by: Victor Stinner <vstinner@python.org>

* bpo-35293: Apply Victor's review

Co-authored-by: Victor Stinner <vstinner@python.org>
(cherry picked from commit 6595cb0af4)

Co-authored-by: Dong-hee Na <donghee.na92@gmail.com>
2020-09-18 02:31:30 -07:00
Serhiy Storchaka 038688a53b
[3.8] Remove duplicated words words (GH-20413). (GH-22297)
(cherry picked from commit 1c5d1d7304)
2020-09-18 09:37:04 +03:00
Ethan Furman 5efb1a77e7
[3.8] bpo-39728: Enum: fix duplicate `ValueError` (GH-22277) (GH-22283)
fix default `_missing_` to return `None` instead of raising a `ValueError`
Co-authored-by: Andrey Darascheka <andrei.daraschenka@leverx.com>.
(cherry picked from commit c95ad7a91f)

Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
2020-09-16 17:38:14 -07:00
Miss Islington (bot) 3f4012117b
bpo-41517: do not allow Enums to be extended (GH-22271)
fix bug that let Enums be extended via multiple inheritance
(cherry picked from commit 3064dbf5df)

Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
2020-09-16 07:30:54 -07:00
Miss Islington (bot) 929112ef81
bpo-41789: honor object overrides in Enum classes (GH-22250)
EnumMeta double-checks that `__repr__`, `__str__`, `__format__`, and `__reduce_ex__` are not the same as `object`'s, and replaces them if they are -- even if that replacement was intentionally done in the Enum being constructed.  This patch fixes that.

Automerge-Triggered-By: @ethanfurman
(cherry picked from commit 22415ad625)

Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
2020-09-15 17:16:36 -07:00
Miss Islington (bot) 8f8ebcca95
bpo-39587: Enum - use correct mixed-in data type (GH-22263)
(cherry picked from commit bff01f3a3a)

Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
2020-09-15 16:23:57 -07:00
Miss Islington (bot) b007a9be6f
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-09-14 12:47:40 -07:00
Ethan Furman 38c8d3930e
[3.8] bpo-37479: Enum - use correct __format__ (GH-14545)
* bpo-37479: on Enum subclasses with mixins, __format__ uses overridden __str__.
(cherry picked from commit 2f19e82fbe)

Co-authored-by: thatneat <thatneat@users.noreply.github.com>
2020-09-13 13:47:43 -07:00
Miss Islington (bot) 530d1105ed
bpo-39651: Fix asyncio proactor _write_to_self() (GH-22197)
Fix a race condition in the call_soon_threadsafe() method of
asyncio.ProactorEventLoop: do nothing if the self-pipe socket has
been closed.
(cherry picked from commit 1b0f0e3d7d)

Co-authored-by: Victor Stinner <vstinner@python.org>
2020-09-12 00:09:54 -07:00
Miss Islington (bot) 77901dc6c3
bpo-41731: Make test_cmd_line_script pass with -vv (GH-22206)
Argument script_exec_args is usually an absolute file name,
but twice has form ['-m', 'module_name'].
(cherry picked from commit 7e711ead26)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2020-09-11 23:43:27 -07:00
Miss Islington (bot) 8a30bdd21d
bpo-37149: Change Shipman tkinter link from archive.org to TkDocs (GH-22188) (#22193)
The new link responds much faster and begins with a short explanation of the status of the doc.
(cherry picked from commit 06d0b8b67e)

Co-authored-by: Mark Roseman <mark@markroseman.com>
2020-09-10 16:21:35 -04:00
Miss Islington (bot) 9171dc2827
bpo-41525: Make the Python program help ASCII-only (GH-21836)
(cherry picked from commit 58de1dd6a8)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2020-09-08 17:46:41 -07:00
Łukasz Langa 7c6dc8517e Python 3.8.6rc1
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEE4/8oOcBIslwITevpsmmV4xAlBWgFAl9WV1gACgkQsmmV4xAl
 BWhaFA/+MhK/h03WVVmcmK53W3aU70AHhLLlRhftYSxN6hUgEYWt8VFupOtD8947
 56RDjlpDKxeRiErjxT2ymLCdkiLCbXSfVD2aKY2H76370On4SKMjAB2VcPa2dsA9
 cw8HPjc3CzXxSYBz1+aKc5OJsw+Bv+T+7wlfbJSlzSnP3E71Ny/Esko5bVqzwj1B
 cUT6y0Pt+Vwb0lJQEDtVaPGRNqBuJjc6yi0EScz0WIXQlBR+eialYMHb8IbNGsrR
 2FT2K8gktXltpfsMSb2eInj6YaZNsshNwoCyCuT2iPC+482i4m3U20oNWhlPxL0G
 +159C9fGTrJ4uFu2CC85CWjB2lZQ6ArB/odsdfixlaQOruGkVMWQBCF2bvYaJqqT
 n80n6tzfhIYVcV8SpjrdkrsurmUTcwdZN2WTdZLBE6S5c8O/XEYgvSOoy6f2E/aH
 IYlQrZrBlnyBctgHFNYnACetIcsyYByqH6XehLHzLIvoY4ncJTLoDPCJrg/opRw7
 zgIYFBK2Bf8GlG6tdmi50+uD+8VIK8YkeH7RgE3X7SW55xzA6xyXPUIf5TNHCHCe
 4hsy7oFj4pxogGx1NvJ6jpThang0EHMsubVICT4Ieej56ye7R8hHQ8rHPxRSveVD
 IqhmZmDjai2xx3DaTV5wfNqEsDPzOgOlgZJVr5R4Tefe0z4PEs8=
 =Fzio
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCAAuFiEE4/8oOcBIslwITevpsmmV4xAlBWgFAl9XUS4QHGx1a2FzekBs
 YW5nYS5wbAAKCRCyaZXjECUFaMx/EACO5v/JZDPrw3yREKhPXvAUZH3+AtAeKT+C
 SLm4cD1UzzI2JwgO62N3ilVAQ43xw2eCV6DvOmPGKI+Bn4KVRlNAjD63WEfYm8WB
 RseLVTih1eumTAVHlMj1zv3TN8XQOPg9vNtwx4GI7WF+b66v912orJBw6zYEiInm
 MtNNfPMzNBgc6WPRrMOTwNd7eXwPo+VvUWtneryLKtdIa6tREubLW6qjFCjTqSzn
 S5y1VuBoEbTpUVwDYChexdErEzHJ84jJ46gow0D/0j2pUcU9Huw08zN/Ztb0eElM
 0v64m/WGJ5Y8se1BDPBE9aFdn20l32ANKE3pLwopiuhjZU3rS/fJvjSxdLNn/49a
 Y7Jvib4SfWTb87qOv2f0hzZTrx1xB1UYplljaXFPeD6DsrkrHm2YgqytGuE0768X
 9tAInVlLWQ0MCxO0OeyVJpV0Mi2NapG+hqRY3UlRcsLQdoK9grMZxTdyCqGJcYCK
 CyiL13etXP6kHsAa6PwgxTCL/HyE25ZgRyc0ZVEolELx3eGZR9UyQg/l8KJpOLQI
 tMnTMIxuoLzPEBvFtHHp7L7/V11OmWl4ojW8Vl3thYbXGScjtHVEXh4GRm0dT1br
 VigswpqDx+Njj/XqNUanZo59rtWiLB6b5b6z0y4JvPxF3BX6GFRRsUOO8ILUENma
 bf0QNqrN1Q==
 =/G5i
 -----END PGP SIGNATURE-----

Merge tag 'v3.8.6rc1' into 3.8

Python 3.8.6rc1
2020-09-08 11:38:51 +02:00
Miss Islington (bot) ebef6c0b50
bpo-41720: Add "return NotImplemented" in turtle.Vec2D.__rmul__(). (GH-22092)
(cherry picked from commit fd4cafd470)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2020-09-07 09:28:04 -07:00
Łukasz Langa 08bd63da6e
Python 3.8.6rc1 2020-09-07 17:52:19 +02:00
Miss Islington (bot) 66e9c2aee4
[3.8] closes bpo-41533: Fix a potential memory leak when allocating a stack (GH-21847) (GH-22015)
Free the stack allocated in va_build_stack if do_mkstack fails
and the stack is not a small_stack
(cherry picked from commit 75c80b0bda)


Co-authored-by: Tony Solomonik <tony.solomonik@gmail.com>
2020-09-04 15:26:05 -07:00
Miss Islington (bot) 1f5f127377
bpo-41696: Fix handling of debug mode in asyncio.run (GH-22069) (#22072)
* bpo-41696: Fix handling of debug mode in asyncio.run

This allows PYTHONASYNCIODEBUG or -X dev to enable asyncio debug mode
when using asyncio.run

* 📜🤖 Added by blurb_it.

Co-authored-by: hauntsaninja <>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
(cherry picked from commit 0770ad948c)

Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>

Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
2020-09-03 13:54:06 -07:00
Miss Islington (bot) a986b061a3
bpo-39010: Fix errors logged on proactor loop restart (GH-22017) (#22035)
Stopping and restarting a proactor event loop on windows can lead to
spurious errors logged (ConnectionResetError while reading from the
self pipe). This fixes the issue by ensuring that we don't attempt
to start multiple copies of the self-pipe reading loop.
(cherry picked from commit ea5a6363c3)

Co-authored-by: Ben Darnell <ben@bendarnell.com>

Co-authored-by: Ben Darnell <ben@bendarnell.com>
2020-09-03 12:38:34 -07:00
Miss Islington (bot) 9fef7c54a0
bpo-39883: Use BSD0 license for code in docs (GH-17635) (GH-22074)
The PSF board approved this use.
(cherry picked from commit e223d06a8b)

Co-authored-by: Todd <toddrjen@gmail.com>
2020-09-03 07:41:09 -07:00
Pablo Galindo 77f4000ae0
[3.8] [3.9] bpo-41654: Fix deallocator of MemoryError to account for subclasses (GH-22020) (GH-22046)
When allocating MemoryError classes, there is some logic to use
pre-allocated instances in a freelist only if the type that is being
allocated is not a subclass of MemoryError. Unfortunately in the
destructor this logic is not present so the freelist is altered even
with subclasses of MemoryError..
(cherry picked from commit 9b648a95cc)

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

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
2020-09-01 21:40:48 +01:00
Miss Islington (bot) 38e32872eb
bpo-41344: Raise ValueError when creating shared memory of size 0 (GH-21556) (GH-22019)
(cherry picked from commit 475a5fbb56)

Co-authored-by: Vinay Sharma <vinay04sharma@icloud.com>

Co-authored-by: Vinay Sharma <vinay04sharma@icloud.com>
2020-08-30 20:42:27 +01:00
Miss Islington (bot) 85ca9c049c
bpo-41524: fix pointer bug in PyOS_mystr{n}icmp (GH-21845) (GH-22016) 2020-08-30 16:20:40 +09:00
Karthikeyan Singaravelan 838316db08
[3.8] bpo-41624: fix documentation of typing.Coroutine (GH-21952). (#21983)
(cherry picked from commit 8c58d2a216)

Co-authored-by: MingZhe Hu <humingzhework@163.com>

Co-authored-by: MingZhe Hu <humingzhework@163.com>
2020-08-28 08:03:40 -07:00
Miss Islington (bot) 641279e6e5
bpo-41609: Fix output of pdb's whatis command for instance methods (GH-21935) (#21976)
(cherry picked from commit 022bc7572f)

Co-authored-by: Irit Katriel <iritkatriel@yahoo.com>
2020-08-27 03:17:05 +02:00
Miss Islington (bot) 7475aa2c59
bpo-33660: Fix PosixPath to resolve a relative path on root (GH-21975)
(cherry picked from commit 94ad6c674f)

Co-authored-by: Dong-hee Na <donghee.na92@gmail.com>
2020-08-27 02:47:10 +02:00
Elvis Pranskevichus 57b698886b
[3.8] bpo-32751: Wait for task cancel in asyncio.wait_for() when timeout <= 0 (GH-21895) (#21967)
When I was fixing bpo-32751 back in GH-7216 I missed the case when
*timeout* is zero or negative.  This takes care of that.

Props to @aaliddell for noticing the inconsistency..
(cherry picked from commit c517fc7121)
2020-08-26 13:59:17 -07:00
Miss Islington (bot) 6e1954cd82
bpo-37658: Fix asyncio.wait_for() to respect waited task status (GH-21894) (#21965)
Currently, if `asyncio.wait_for()` itself is cancelled it will always
raise `CancelledError` regardless if the underlying task is still
running.  This is similar to a race with the timeout, which is handled
already.
(cherry picked from commit a2118a1462)

Co-authored-by: Elvis Pranskevichus <elvis@magic.io>
2020-08-26 11:26:28 -07:00
Victor Stinner 7d0fef56d8
bpo-40204: Allow pre-Sphinx 3 syntax in the doc (GH-21844) (GH-21901) (GH-21928)
* bpo-40204: Allow pre-Sphinx 3 syntax in the doc (GH-21844)

Enable Sphinx 3.2 "c_allow_pre_v3" option and disable the
c_warn_on_allowed_pre_v3 option to make the documentation compatible
with Sphinx 2 and Sphinx 3.

(cherry picked from commit 423e77d6de)

* bpo-40204: Fix Sphinx sytanx in howto/instrumentation.rst (GH-21858)

Use generic '.. object::' to declare markers, rather than abusing
'..  c:function::' which fails on Sphinx 3.

(cherry picked from commit 43577c01a2)

* bpo-40204: Fix duplicates in the documentation (GH-21857)

Fix two Sphinx 3 issues:

Doc/c-api/buffer.rst:304: WARNING: Duplicate C declaration, also defined in 'c-api/buffer'.
Declaration is 'PyBUF_ND'.

Doc/c-api/unicode.rst:1603: WARNING: Duplicate C declaration, also defined in 'c-api/unicode'.
Declaration is 'PyObject* PyUnicode_Translate(PyObject *str, PyObject *table, const char *errors)'.

(cherry picked from commit 46d10b1237)

* bpo-40204: Add :noindex: in the documentation (GH-21859)

Add :noindex: to duplicated documentation to fix "duplicate object
description" errors.

For example, fix this Sphinx 3 issue:

Doc/library/configparser.rst:1146: WARNING: duplicate object
description of configparser.ConfigParser.optionxform, other instance
in library/configparser, use :noindex: for one of them

(cherry picked from commit d3ded08048)

* bpo-40204, doc: Fix syntax of C variables (GH-21846)

For example, fix the following Sphinx 3 errors:

Doc/c-api/buffer.rst:102: WARNING: Error in declarator or parameters
Invalid C declaration: Expected identifier in nested name. [error at 5]
  void \*obj
  -----^

Doc/c-api/arg.rst:130: WARNING: Unparseable C cross-reference: 'PyObject*'
Invalid C declaration: Expected end of definition. [error at 8]
  PyObject*
  --------^

The modified documentation is compatible with Sphinx 2 and Sphinx 3.

(cherry picked from commit 474652fe93)

* bpo-40204: Fix reference to terms in the doc (GH-21865)

Sphinx 3 requires to refer to terms with the exact case.

For example, fix the Sphinx 3 warning:

Doc/library/pkgutil.rst:71: WARNING: term Loader not found in case
sensitive match.made a reference to loader instead.

(cherry picked from commit bb0b08540c)

* bpo-40204: Fix duplicated productionlist names in the doc (GH-21900)

Sphinx 3 disallows having more than one productionlist markup with
the same name. Simply remove names in this case, since names are not
shown anyway. For example, fix the Sphinx 3 warning:

Doc/reference/introduction.rst:96: duplicate token description
of *:name, other instance in reference/expressions

(cherry picked from commit 1abeda80f7)
(cherry picked from commit 8f88190af5)
2020-08-20 13:28:49 +02:00
Miss Islington (bot) 1baa8b14ee
bpo-40782: Change asyncio.AbstractEventLoop.run_in_executor to be a method not a coroutine (GH-21852)
asyncio.AbstractEventLoop.run_in_executor should be a method that returns an asyncio Future, not an async method.
This matches the concrete implementations, and the documentation better.
(cherry picked from commit 29f84294d8)

Co-authored-by: James Weaver <james.barrett@bbc.co.uk>
2020-08-17 07:37:12 -07:00
Miss Islington (bot) 08f0a21092
[3.8] bpo-41503: Fix race between setTarget and flush in logging.handlers.MemoryHandler (GH-21765) (GH-21898)
(cherry picked from commit 2353d77fad)


Co-authored-by: Irit Katriel <iritkatriel@yahoo.com>

Automerge-Triggered-By: @vsajip
2020-08-16 09:27:01 -07:00
Miss Islington (bot) 243458115e
bpo-31122: ssl.wrap_socket() now raises ssl.SSLEOFError rather than OSError when peer closes connection during TLS negotiation (GH-18772)
[bpo-31122](): ssl.wrap_socket() now raises ssl.SSLEOFError rather than OSError when peer closes connection during TLS negotiation

Reproducer: http://tiny.cc/f4ztnz (tiny url because some bot keeps renaming b.p.o.-nnn as bpo links)
(cherry picked from commit 495bd03566)

Co-authored-by: Dima Tisnek <dimaqq@gmail.com>
2020-08-15 10:42:36 -07:00
Miss Islington (bot) a3416c13b5
[3.9] bpo-41520: Fix second codeop regression (GH-21848)
Fix the repression introduced by the initial regression fix.

(cherry picked from commit c818b15fa5)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
(cherry picked from commit f24430f154)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2020-08-13 11:38:55 -07:00
Miss Islington (bot) afff51fc09
bpo-41520: codeop no longer ignores SyntaxWarning (GH-21838)
(cherry picked from commit 369a1cbdee)

Co-authored-by: Victor Stinner <vstinner@python.org>
2020-08-12 06:12:05 -07:00
Miss Islington (bot) 61f23cb62d
bpo-41468: Improve and test IDLE run error exit (GH-21798)
A message box pops up when an unexpected error stops the run process.  Tell users it is likely a random glitch, but report it if not.
(cherry picked from commit f2e161c279)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2020-08-09 13:26:37 -07:00
Miss Islington (bot) 66c8996619
bpo-41497: Fix potential UnicodeDecodeError in dis CLI (GH-21757)
(cherry picked from commit a4084b9d1e)

Co-authored-by: Konge <zkonge@outlook.com>
2020-08-07 20:21:33 -07:00
Steve Dower 135de08128
bpo-41490: Update ensurepip to install pip 20.2.1 and setuptools 49.2.1 (GH-21775) 2020-08-07 23:10:32 +01:00
Miss Islington (bot) 713ba03276
bpo-41492: Fixes the description appearing in UAC prompts on Windows (GH-21754)
(cherry picked from commit 777b611c8c)

Co-authored-by: Steve Dower <steve.dower@python.org>
2020-08-06 09:52:57 -07:00
Batuhan Taskaya b24c9d2b06
[3.8] bpo-40726: handle uninitalized end_lineno on ast.increment_lineno (GH-21745)
…no (GH-20312).

(cherry picked from commit 8f4380d2f5)

Co-authored-by: Batuhan Taskaya <batuhanosmantaskaya@gmail.com>

Automerge-Triggered-By: @pablogsal
2020-08-05 11:37:19 -07:00