Commit graph

110150 commits

Author SHA1 Message Date
Miss Islington (bot)
3ec3e0f83c
bpo-30256: Add manager_owned keyword arg to AutoProxy (GH-16341) (#26987)
Co-authored-by: Jordan Speicher <jordan@jspeicher.com>
(cherry picked from commit 85b920498b)

Co-authored-by: finefoot <33361833+finefoot@users.noreply.github.com>
2021-07-01 21:15:47 -07:00
Miss Islington (bot)
956f1fc894
bpo-43425: Update setup.py not to use distutils.log (GH-26969)
(cherry picked from commit a7e251b07a)

Co-authored-by: Dong-hee Na <donghee.na@python.org>
2021-07-01 19:05:11 -07:00
Miss Islington (bot)
94a4136c8e
bpo-43425: Update _osx_support not to use distutils.log (GH-26968)
(cherry picked from commit c8979f780e)

Co-authored-by: Dong-hee Na <donghee.na@python.org>
2021-06-30 18:20:24 -07:00
Miss Islington (bot)
6843a3b930
bpo-44535: Enable building with Visual Studio 2022 on Windows (GH-26962)
(cherry picked from commit d3a95c1b6e)

Co-authored-by: Steve Dower <steve.dower@python.org>
2021-06-30 12:24:42 -07:00
Steve Dower
a5764d3d96
bpo-41180: Replace marshal code.__new__ audit event with marshal.load[s] and marshal.dumps (GH-26970) 2021-06-30 18:52:25 +01:00
Miss Islington (bot)
2df13e1211
bpo-44523: Remove the pass-through for hash() in weakref proxy objects (GH-26950)
(cherry picked from commit e2fea101fd)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
2021-06-29 16:19:06 -07:00
Miss Islington (bot)
08aa26e435
bpo-38062: [doc] clarify that atexit uses equality comparisons internally. (GH-26935) (GH-26956)
(cherry picked from commit 12803c59d5)

Co-authored-by: Jack DeVries <58614260+jdevries3133@users.noreply.github.com>
2021-06-29 18:52:27 +01:00
Miss Islington (bot)
d9fc4c3deb
bpo-42588: Update the docs for the TopologicalSorter.static_order() method (GH-26834)
(cherry picked from commit 0d7f7975d5)

Co-authored-by: andrei kulakov <andrei.avk@gmail.com>
2021-06-29 04:14:52 -07:00
Miss Islington (bot)
a6acd1ab08
[doc] Fix typo in what's new in 3.10 (GH-26911) (GH-26940)
The `try` statement was missing a colon and therefore was not exemplifying the correct `SyntaxError`.
(cherry picked from commit dcb1caef5b)

Co-authored-by: Rodrigo Girão Serrão <rodrigogiraoserrao@gmail.com>
2021-06-29 12:12:23 +01:00
Miss Islington (bot)
dc10264eb8
bpo-40939: Remove documentation for PyParser_* & add porting notes (GH-26855) (GH-26898)
I tried to be relatively thorough and give lots of links.
One reason is that this wasn't deprecated very long; also it seems people running into this tend to not be familiar with similar APIs.

(cherry picked from commit 29987f7265)

Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
2021-06-28 11:35:52 +02:00
Miss Islington (bot)
f4b31cdbc0
bpo-44464: Remove special exclusion for flake8 in the deprecation warnings. (GH-26807) (GH-26929)
Sync with importlib_metadata 4.6.
(cherry picked from commit efe7d08d17)

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
2021-06-27 18:19:24 -04:00
Miss Islington (bot)
aeb63392e7
bpo-40620: Clarify tutorial controlflow.rst `range` examples (GH-26919) (GH-26927)
(cherry picked from commit 2f49c9debc)

Co-authored-by: jdevries3133 <58614260+jdevries3133@users.noreply.github.com>
2021-06-27 20:51:16 +01:00
Miss Islington (bot)
c95cdf2dae
Clarify the order of a stacked abstractmethod (GH-26892)
Co-authored-by: Tal Einat <532281+taleinat@users.noreply.github.com>
(cherry picked from commit 74d60eab55)

Co-authored-by: Ram Rachum <ram@rachum.com>
2021-06-27 11:50:38 -07:00
Miss Islington (bot)
e1f3bd2bb5
bpo-44404: tkinter after support callable classes (GH-26812)
(cherry picked from commit e9c8f784fa)

Co-authored-by: E-Paine <63801254+E-Paine@users.noreply.github.com>
2021-06-27 01:02:02 -07:00
Miss Islington (bot)
3df23b5199
[3.10] bpo-44468: Never skip base classes in typing.get_type_hints(), even with invalid .__module__. (GH-26862) (GH-26920)
(cherry picked from commit 7569c0fe91)


Co-authored-by: will-ca <willchencontact@gmail.com>

Automerge-Triggered-By: GH:gvanrossum
2021-06-26 16:52:28 -07:00
Stéphane Bidoul
6cd369c48f
[3.10] Update vendored pip to 21.1.3 (GH-26912) (gh-26917) 2021-06-26 20:58:39 +01:00
Miss Islington (bot)
88970125e7
bpo-43977: Properly update the tp_flags of existing subclasses when their parents are registered (GH-26864)
(cherry picked from commit ca2009d72a)

Co-authored-by: Brandt Bucher <brandt@python.org>
2021-06-25 08:46:23 -07:00
Miss Islington (bot)
8bec9fb92f
bpo-44498: suppress DeprecationWarnings for asynchat, asyncore and smtpd in tests (GH-26905) (GH-26907)
(cherry picked from commit 22e7effad5)

Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
2021-06-25 00:38:01 +01:00
Miss Islington (bot)
a80a38ee9a
[3.10] bpo-44498: Issue a deprecation warning on asynchat, asyncore and smtpd import (GH-26882) (GH-26904)
* Issue a deprecation warning on smtpd import

* Also issue DeprecationWarnings for asynchat and asyncore

* Fix some tests

* test___all__ requires the word 'module' or 'package' in the deprecation
  warning text, so add those to smtpd, asynchat, and asyncore.
* In test_support, use pprint now instead of asyncore as the landmark.

* Add What's New

* Use ..deprecated::

* Use ..deprecated::

* Update Lib/smtpd.py

Co-authored-by: Miro Hrončok <miro@hroncok.cz>

* Update Doc/library/smtpd.rst

Co-authored-by: Miro Hrončok <miro@hroncok.cz>

* Import async{hat,ore} after the DeprecationWarning for this module

Co-authored-by: Miro Hrončok <miro@hroncok.cz>
(cherry picked from commit 8488b85c63)


Co-authored-by: Barry Warsaw <barry@python.org>

Automerge-Triggered-By: GH:warsaw
2021-06-24 12:57:55 -07:00
Miss Islington (bot)
11f1a30cdb
bpo-44456: Improve the syntax error when mixing keyword and positional patterns (GH-26793)
(cherry picked from commit 0acc258fe6)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
2021-06-24 08:34:28 -07:00
Miss Islington (bot)
b3fac2926b
bpo-44229: Ignore spurious EPROTOTYPE on macOS in test_ssl (GH-26893)
(cherry picked from commit b5a52eef67)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
2021-06-24 05:27:35 -07:00
Miss Islington (bot)
733587011d
bpo-43916: Use test.support.check_disallow_instantiation() in test_tcl (GH-26412) (GH-26888)
(cherry picked from commit e90e042218)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
2021-06-24 14:12:11 +02:00
Mark Shannon
0b6b286518
bpo-44297: Add a regression test for line numbers in with statements (GH-26891) 2021-06-24 13:09:14 +01:00
Erlend Egeberg Aasland
0a3452e7cf
[3.10] bpo-43988: Add test.support.check_disallow_instantiation() (GH-25757) (GH-26885)
(cherry picked from commit 4f725261c6, fbff5387c3, and 8cec740820)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>

Automerge-Triggered-By: GH:vstinner
2021-06-23 16:46:25 -07:00
Victor Stinner
ece3841d3d
bpo-44441: _PyImport_Fini2() resets PyImport_Inittab (GH-26874) (GH-26877)
Py_RunMain() now resets PyImport_Inittab to its initial value at
exit. It must be possible to call PyImport_AppendInittab() or
PyImport_ExtendInittab() at each Python initialization.

(cherry picked from commit 489699ca05)
2021-06-23 17:47:38 +02:00
Miss Islington (bot)
88a3342314
bpo-41621: Document defaultdict's default_factory parameter (GH-21945)
It defaults to None and is positional only.
(cherry picked from commit d1ae57027f)

Co-authored-by: Dennis Sweeney <36520290+sweeneyde@users.noreply.github.com>
2021-06-23 10:58:20 -04:00
Miss Islington (bot)
38e021ab90
bpo-44482: Fix very unlikely resource leak in glob in non-CPython implementations (GH-26843) (GH-26872)
(cherry picked from commit 5c7940257e)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2021-06-23 13:28:08 +03:00
Miss Islington (bot)
280425d417
bpo-28395: Remove unnecessary semicolons in tests (GH-26868)
(cherry picked from commit 5a3108044d)

Co-authored-by: Dong-hee Na <donghee.na@python.org>
2021-06-23 03:02:40 -07:00
Miss Islington (bot)
7e6cad7e30
bpo-44483: Fix crash in union object with bad `__module__` (GH-26848) (GH-26852)
(cherry picked from commit adfa1ba398)

Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
2021-06-23 12:38:49 +03:00
Miss Islington (bot)
e6ea428b83
[doc] Improve punctuation atexit doc (GH-25629) (GH-26856)
(cherry picked from commit a6b47de07a)

Co-authored-by: Géry Ogam <gery.ogam@gmail.com>

Co-authored-by: Géry Ogam <gery.ogam@gmail.com>
2021-06-22 18:10:22 +01:00
Miss Islington (bot)
01858fbe31
bpo-44439: BZ2File.write() / LZMAFile.write() handle buffer protocol correctly (GH-26764) (GH-26845)
No longer use len() to get the length of the input data. For some buffer protocol objects,
the length obtained by using len() is wrong.
(cherry picked from commit bc6c12c72a)

Co-authored-by: Ma Lin <animalize@users.noreply.github.com>
2021-06-22 16:59:53 +03:00
Miss Islington (bot)
cf739332bd
bpo-44458: Ensure BUFFER_BLOCK_SIZE symbol is statically allocated. (GH-26808) (GH-26844)
* bpo-44458: Ensure BUFFER_BLOCK_SIZE symbol is statically allocated.
(cherry picked from commit 92c2e91580)

Co-authored-by: Russell Keith-Magee <russell@keith-magee.com>
2021-06-22 00:10:23 -07:00
Miss Islington (bot)
c032a12cbb
bpo-44287: asyncio test_popen() uses longer timeout (GH-26832)
Fix asyncio test_popen() of test_windows_utils by using a longer
timeout. Use military grade battle-tested test.support.SHORT_TIMEOUT
timeout rather than a hardcoded timeout of 10 seconds: it's 30
seconds by default, but it is made longer on slow buildbots.

WaitForMultipleObjects() timeout argument is in milliseconds.
(cherry picked from commit be1cb3214d)

Co-authored-by: Victor Stinner <vstinner@python.org>
2021-06-21 17:22:02 -07:00
Miss Islington (bot)
1e16217204
bpo-13814: Explain why generators are not context managers (GH-26835)
Put entry in Design FAQ after a question about a context manager for assignment.
Original patch by Aidan Lowe.
(cherry picked from commit 51f45d085d)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2021-06-21 18:02:43 -04:00
Miss Islington (bot)
20a1495b8a
bpo-44395: Fix MIMEPart.as_string to pass unixfrom properly (GH-26685)
(cherry picked from commit 30f7a77f35)

Co-authored-by: Dong-hee Na <donghee.na@python.org>
2021-06-21 07:27:26 -07:00
Miss Islington (bot)
6614eac843
bpo-44434: Don't call PyThread_exit_thread() explicitly (GH-26758) (GH-26824)
_thread.start_new_thread() no longer calls PyThread_exit_thread()
explicitly at the thread exit, the call was redundant.

On Linux with the glibc, pthread_cancel() loads dynamically the
libgcc_s.so.1 library. dlopen() can fail if there is no more
available file descriptor to open the file. In this case, the process
aborts with the error message:

"libgcc_s.so.1 must be installed for pthread_cancel to work"

pthread_cancel() unwinds back to the thread's wrapping function that
calls the thread entry point.

The unwind function is dynamically loaded from the libgcc_s library
since it is tightly coupled to the C compiler (GCC). The unwinder
depends on DWARF, the compiler generates DWARF, so the unwinder
belongs to the compiler.

Thanks Florian Weimer and Carlos O'Donell for their help on
investigating this issue.
(cherry picked from commit 45a78f906d)

Co-authored-by: Victor Stinner <vstinner@python.org>
2021-06-21 14:29:17 +02:00
Victor Stinner
9b0bbb9143
bpo-44466: Faulthandler now detects the GC (GH-26823) (GH-26826)
The faulthandler module now detects if a fatal error occurs during a
garbage collector collection (only if all_threads is true).

(cherry picked from commit d19163912b)
2021-06-21 14:23:13 +02:00
Mark Shannon
7674c83d81
bpo-44297: Fix missing line number in generator expressions (GH-26821)
* Make sure that line number is set when entering comprehension scope in compiler.

(cherry picked from commit 82e5c28af7)
2021-06-21 11:47:16 +01:00
Miss Islington (bot)
553e10498a
bpo-44469: Fix tests for "async with" with bad object (GH-26817)
Test for execution of the body was null. It would pass
even if the code which should be skipped was executed.
(cherry picked from commit 5d2b3a0d68)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2021-06-21 00:57:07 -07:00
Erlend Egeberg Aasland
ccc95c7b47
[3.10] bpo-44087: Disallow instantiation of sqlite3.Statement (GH-26567) (GH-26816)
Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
2021-06-20 22:07:31 +01:00
Miss Islington (bot)
28fe0159f5
bpo-44077: Expose IP_RECVTOS in the socket module (GH-25992)
Co-authored-by: Pablo Galindo <pablogsal@gmail.com>
(cherry picked from commit a317778fd5)

Co-authored-by: Georg Sauthoff <mail@georg.so>
2021-06-20 13:36:21 -07:00
Miss Islington (bot)
5fbccb763c
bpo-43298: Improved error message when building without the Windows SDK installed (GH-26800) (GH-26802)
(cherry picked from commit 80190b3e53)

Co-authored-by: Steve Dower <steve.dower@python.org>

Co-authored-by: Steve Dower <steve.dower@python.org>
2021-06-20 21:12:46 +01:00
Miss Islington (bot)
8673b77e25
bpo-41299: Reduce lag in Windows threading timeouts by using a higher precision time source (GH-26568) (GH-26580)
(cherry picked from commit 449e6f0ef3)

Co-authored-by: Ryan Hileman <lunixbochs@gmail.com>

Co-authored-by: Ryan Hileman <lunixbochs@gmail.com>
2021-06-20 21:12:27 +01:00
Miss Islington (bot)
f87d2038fa
bpo-43667: Add news fragment for Solaris changes (GH-26405) (GH-26498)
(cherry picked from commit 164a4f46d1)
2021-06-20 21:12:12 +01:00
Miss Islington (bot)
26c89e7c7a
Fix typos and grammatical changes in the 3.10 what's new document (GH-26319) (GH-26814) 2021-06-20 20:53:14 +01:00
Miss Islington (bot)
344487b956
Add a note about NameError/AttributeError suggestions with custom error functions (GH-26794) (GH-26796)
(cherry picked from commit 83c9dad8da)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
2021-06-20 20:22:40 +01:00
Miss Islington (bot)
139c5778c2
bpo-44426: Fix use of the C keyword 'default' as a variable name (GH-26798) (GH-26804)
(cherry picked from commit 291848195f)
2021-06-19 16:16:13 +01:00
Miss Islington (bot)
c6cd2ecdb6
[3.10] bpo-38820: Test with OpenSSL 3.0.0-beta1 (GH-26769) (GH-26799)
Signed-off-by: Christian Heimes <christian@python.org>
(cherry picked from commit 44fb551499)


Co-authored-by: Christian Heimes <christian@python.org>

Automerge-Triggered-By: GH:tiran
2021-06-19 03:44:37 -07:00
Miss Islington (bot)
3cb70ab2fb
Remove dubious suggestion (GH-26789) (#26797) 2021-06-18 23:27:47 -05:00
Ethan Furman
1b4addf3cb
[3.10] bpo-43945: [Enum] reduce scope of new format() behavior (GH-26752)
* [Enum] reduce scope of new format behavior

Instead of treating all Enums the same for format(), only user mixed-in
enums will be affected.  In other words, IntEnum and IntFlag will not be
changing the format() behavior, due to the requirement that they be
drop-in replacements of existing integer constants.

If a user creates their own integer-based enum, then the new behavior
will apply:

    class Grades(int, Enum):
        A = 5
        B = 4
        C = 3
        D = 2
        F = 0

Now:  format(Grades.B)  -> DeprecationWarning and '4'
3.12:                   -> no warning, and 'B'.

(cherry picked from commit f60b07ab6c)

Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
2021-06-18 14:25:42 -07:00