summaryrefslogtreecommitdiffstats
path: root/Lib
Commit message (Collapse)AuthorAgeFilesLines
* [3.10] bpo-44630: Fix assertion errors in csv module (GH-27127) (GH-27129)Miss Islington (bot)2021-07-131-0/+6
| | | | | | | | | | | | | | | | | | | Fix incorrect handling of exceptions when interpreting dialect objects in the csv module. Not clearing exceptions between calls to PyObject_GetAttrString() causes assertion failures in pydebug mode (or with assertions enabled). Add a minimal test that would've caught this (passing None as dialect, or any object that isn't a csv.Dialect subclass, which the csv module allows and caters to, even though it is not documented.) In pydebug mode, the test triggers the assertion failure in the old code. Contributed-By: T. Wouters [Google] (cherry picked from commit 0093876328afa330224c9d887c18dee0b3117852) Co-authored-by: T. Wouters <thomas@python.org> Automerge-Triggered-By: GH:gpshead
* bpo-44572: On Windows, disconnect STDIN in platform._syscmd_ver() to prevent ↵Miss Islington (bot)2021-07-131-0/+1
| | | | | | | erroneous STDIN consumption (GH-27092) (GH-27124) (cherry picked from commit 0ee0a740e12ec8568aafa033aa6bb08b265afe26) Co-authored-by: Konstantin-Glukhov <glukhov.k@gmail.com>
* bpo-38741: Definition of multiple ']' in header configparser (GH-17129) (#27110)Miss Islington (bot)2021-07-132-1/+8
| | | | | | | Co-authored-by: Jason Killen <jason.killen@windsorcircle.com> Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com> (cherry picked from commit 2924bb1a566977efd45f335d6a94cd84d8047edf) Co-authored-by: jsnklln <jsnklln@gmail.com>
* bpo-26329: update os.path.normpath documentation (GH-20138) (GH-27094)Miss Islington (bot)2021-07-121-0/+1
| | | | | (cherry picked from commit 66c5853406bbcccecf35372795078c0641a5f385) Co-authored-by: Furkan Onder <furkanonder@protonmail.com>
* bpo-29753: revert 0d7ad9f (GH-19850) (GH-27085)Miss Islington (bot)2021-07-111-63/+0
| | | | | | | | This reverts commit 0d7ad9fb38c041c46094087b0cf2c8ce44916b11 as it has a regression. See https://github.com/python/cpython/pull/19850GH-issuecomment-869410686 (cherry picked from commit e14d5ae5447ae28fc4828a9cee8e9007f9c30700) Co-authored-by: Filipe Laíns <lains@archlinux.org>
* bpo-43219: shutil.copyfile, raise a less confusing exception instead of ↵Miss Islington (bot)2021-07-102-21/+38
| | | | | | | | IsADirectoryError (GH-27049) Fixes the misleading IsADirectoryError to be FileNotFoundError. (cherry picked from commit 248173cc0483a9ad9261353302f1234cf9eb2ebe) Co-authored-by: andrei kulakov <andrei.avk@gmail.com>
* Python 3.10.0b4v3.10.0b4Pablo Galindo2021-07-101-1/+1
|
* bpo-44317: Improve tokenizer errors with more informative locations ↵Miss Islington (bot)2021-07-101-2/+2
| | | | | | | (GH-26555) (GH-27079) (cherry picked from commit f24777c2b329974b69d2a3bf5cfc37e0fcace36c) Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
* [3.10] bpo-43897: ast validation for pattern matching nodes (GH-27074)Batuhan Taskaya2021-07-101-1/+142
| | | | | (cherry picked from commit 8dcb7d98086888230db94a1eb07bae1b5db82bc9) Co-authored-by: Batuhan Taskaya <batuhan@python.org>
* bpo-44570: Fix line tracing for forward jumps to duplicated tails (GH-27067)Mark Shannon2021-07-082-2/+37
|
* [3.10] bpo-44446: support lineno being None in traceback.FrameSummary ↵Pablo Galindo2021-07-082-3/+8
| | | | | | | | | | | | | (GH-26781) (GH-27072) As of 088a15c49d99ecb4c3bef93f8f40dd513c6cae3b, lineno is None instead of -1 if there is no line number. Signed-off-by: Filipe Laíns <lains@riseup.net>. (cherry picked from commit 91a8f8c16ca9a7e2466a8241d9b41769ef97d094) Co-authored-by: Filipe Laíns <lains@riseup.net> Co-authored-by: Filipe Laíns <lains@riseup.net>
* bpo-44582: Accelerate mimetypes.init on Windows with a native accelerator ↵Miss Islington (bot)2021-07-082-6/+42
| | | | | | | (GH-27059) (cherry picked from commit bbf2fb6c7ae78f40483606f467739a58cd747270) Co-authored-by: Steve Dower <steve.dower@python.org>
* bpo-44558: Match countOf `is`/`==` treatment to c (GH-27007)Miss Islington (bot)2021-07-072-2/+7
| | | | | (cherry picked from commit 6bd3ecfc272b122b55a6adec50dd7a7c868f262f) Co-authored-by: Rupert Tombs <rupert.tombs@gmail.com>
* bpo-44558: Make the implementation consistency of operator.indexOf (GH-27012)Miss Islington (bot)2021-07-052-1/+4
| | | | | (cherry picked from commit 09302405d22e86884d6058226790c0cdf5b72f14) Co-authored-by: Dong-hee Na <donghee.na@python.org>
* [3.10] bpo-44559: [Enum] revert enum module to 3.9 (GH-27010)Ethan Furman2021-07-0422-2761/+639
| | | * [Enum] revert enum module to 3.9
* [3.10] bpo-34266: [pdb] handle ValueError from shlex.split() (GH-26656) ↵Irit Katriel2021-07-032-1/+20
| | | | | | | (GH-27006) (cherry picked from commit d968a638fcbf9030c999cfacd4c9bf0656e779c4) Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
* bpo-44553 : Implement GC methods for types.Union (GH-26993)Miss Islington (bot)2021-07-031-1/+19
| | | | | (cherry picked from commit 1097384ce964dd63686b1aac706cd0fa764c2dc9) Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
* bpo-30256: Add manager_owned keyword arg to AutoProxy (GH-16341) (#26987)Miss Islington (bot)2021-07-022-2/+12
| | | | | | | Co-authored-by: Jordan Speicher <jordan@jspeicher.com> (cherry picked from commit 85b920498b42c69185540ecc2f5c4907fd38d877) Co-authored-by: finefoot <33361833+finefoot@users.noreply.github.com>
* bpo-43425: Update _osx_support not to use distutils.log (GH-26968)Miss Islington (bot)2021-07-011-4/+3
| | | | | (cherry picked from commit c8979f780e4b7d6db5693cb26a2956cc785abb48) Co-authored-by: Dong-hee Na <donghee.na@python.org>
* bpo-41180: Replace marshal code.__new__ audit event with marshal.load[s] and ↵Steve Dower2021-06-302-0/+32
| | | | marshal.dumps (GH-26970)
* bpo-44523: Remove the pass-through for hash() in weakref proxy objects ↵Miss Islington (bot)2021-06-291-4/+10
| | | | | | | (GH-26950) (cherry picked from commit e2fea101fd5517f33371b04432842b971021c3bf) Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
* bpo-44464: Remove special exclusion for flake8 in the deprecation warnings. ↵Miss Islington (bot)2021-06-271-9/+1
| | | | | | | | | | (GH-26807) (GH-26929) Sync with importlib_metadata 4.6. (cherry picked from commit efe7d08d178a7c09bcca994f2068b019c8633d83) Co-authored-by: Jason R. Coombs <jaraco@jaraco.com> Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
* Clarify the order of a stacked `abstractmethod` (GH-26892)Miss Islington (bot)2021-06-271-3/+24
| | | | | | Co-authored-by: Tal Einat <532281+taleinat@users.noreply.github.com> (cherry picked from commit 74d60eab558bffdf5ca8ea2f5305e19b36bdb9a8) Co-authored-by: Ram Rachum <ram@rachum.com>
* bpo-44404: tkinter `after` support callable classes (GH-26812)Miss Islington (bot)2021-06-272-1/+12
| | | | | (cherry picked from commit e9c8f784fa13ea3a51df3b72a498a3896ec9e768) Co-authored-by: E-Paine <63801254+E-Paine@users.noreply.github.com>
* [3.10] bpo-44468: Never skip base classes in `typing.get_type_hints()`, even ↵Miss Islington (bot)2021-06-262-11/+19
| | | | | | | | | | with invalid `.__module__`. (GH-26862) (GH-26920) (cherry picked from commit 7569c0fe91dfcf562dee8c29798ecda74d738aa8) Co-authored-by: will-ca <willchencontact@gmail.com> Automerge-Triggered-By: GH:gvanrossum
* [3.10] Update vendored pip to 21.1.3 (GH-26912) (gh-26917)Stéphane Bidoul2021-06-262-1/+1
|
* bpo-43977: Properly update the tp_flags of existing subclasses when their ↵Miss Islington (bot)2021-06-251-23/+87
| | | | | | | parents are registered (GH-26864) (cherry picked from commit ca2009d72a52a98bf43aafa9ad270a4fcfabfc89) Co-authored-by: Brandt Bucher <brandt@python.org>
* bpo-44498: suppress DeprecationWarnings for asynchat, asyncore and smtpd in ↵Miss Islington (bot)2021-06-249-16/+51
| | | | | | | | tests (GH-26905) (GH-26907) (cherry picked from commit 22e7effad571f8e524d2f71ff55bbf2a25306753) Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
* [3.10] bpo-44498: Issue a deprecation warning on asynchat, asyncore and ↵Miss Islington (bot)2021-06-244-4/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 8488b85c6397fe58f17fc00e047044c959ac0b04) Co-authored-by: Barry Warsaw <barry@python.org> Automerge-Triggered-By: GH:warsaw
* bpo-44456: Improve the syntax error when mixing keyword and positional ↵Miss Islington (bot)2021-06-241-0/+24
| | | | | | | patterns (GH-26793) (cherry picked from commit 0acc258fe6f0ec200ca2f6f9294adbf52a244802) Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
* bpo-44229: Ignore spurious EPROTOTYPE on macOS in test_ssl (GH-26893)Miss Islington (bot)2021-06-241-3/+8
| | | | | (cherry picked from commit b5a52eef67997246b4235b5407e52a01e822ce56) Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
* bpo-43916: Use test.support.check_disallow_instantiation() in test_tcl ↵Miss Islington (bot)2021-06-241-3/+3
| | | | | | | (GH-26412) (GH-26888) (cherry picked from commit e90e0422182f4ca7faefd19c629f84aebb34e2ee) Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
* bpo-44297: Add a regression test for line numbers in with statements (GH-26891)Mark Shannon2021-06-241-7/+24
|
* [3.10] bpo-43988: Add test.support.check_disallow_instantiation() (GH-25757) ↵Erlend Egeberg Aasland2021-06-2315-53/+50
| | | | | | | | | (GH-26885) (cherry picked from commit 4f725261c6cf23d259e8fdc205e12b76ef4d2d31, fbff5387c3e1f3904420fa5a27738c6c5881305b, and 8cec740820fc875117bfa7b6bdb10202ebeb8fd5) Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no> Automerge-Triggered-By: GH:vstinner
* bpo-44441: _PyImport_Fini2() resets PyImport_Inittab (GH-26874) (GH-26877)Victor Stinner2021-06-231-3/+14
| | | | | | | 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 489699ca05bed5cfd10e847d8580840812b476cd)
* bpo-44482: Fix very unlikely resource leak in glob in non-CPython ↵Miss Islington (bot)2021-06-231-2/+7
| | | | | | | | implementations (GH-26843) (GH-26872) (cherry picked from commit 5c7940257e1f611e7284fd504887bd29a63d0a94) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* bpo-28395: Remove unnecessary semicolons in tests (GH-26868)Miss Islington (bot)2021-06-238-31/+32
| | | | | (cherry picked from commit 5a3108044d2e5b694da2d1f4176c9bbaef15c142) Co-authored-by: Dong-hee Na <donghee.na@python.org>
* bpo-44483: Fix crash in union object with bad ``__module__`` (GH-26848) ↵Miss Islington (bot)2021-06-231-0/+9
| | | | | | | | (GH-26852) (cherry picked from commit adfa1ba398c74720b42f16f06fd3ec0353599fa5) Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
* bpo-44439: BZ2File.write() / LZMAFile.write() handle buffer protocol ↵Miss Islington (bot)2021-06-226-9/+52
| | | | | | | | | | 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 bc6c12c72a9536acc96e7b9355fd69d1083a43c1) Co-authored-by: Ma Lin <animalize@users.noreply.github.com>
* bpo-44287: asyncio test_popen() uses longer timeout (GH-26832)Miss Islington (bot)2021-06-221-1/+2
| | | | | | | | | | | 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 be1cb3214d09d4bf0288bc45f3c1f167f67e4514) Co-authored-by: Victor Stinner <vstinner@python.org>
* bpo-44395: Fix MIMEPart.as_string to pass unixfrom properly (GH-26685)Miss Islington (bot)2021-06-212-2/+9
| | | | | (cherry picked from commit 30f7a77f359a0fc6e37988b0f317a77a15d66b7b) Co-authored-by: Dong-hee Na <donghee.na@python.org>
* bpo-44466: Faulthandler now detects the GC (GH-26823) (GH-26826)Victor Stinner2021-06-211-14/+53
| | | | | | 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 d19163912bfc790283724f05328bd31e4e65003d)
* bpo-44297: Fix missing line number in generator expressions (GH-26821)Mark Shannon2021-06-211-0/+15
| | | | | * Make sure that line number is set when entering comprehension scope in compiler. (cherry picked from commit 82e5c28af7049c4f5343c808f172cbe2e145f49b)
* bpo-44469: Fix tests for "async with" with bad object (GH-26817)Miss Islington (bot)2021-06-211-6/+12
| | | | | | | 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 5d2b3a0d688cf8a33db3d266c9e7049c13766a4c) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.10] bpo-44087: Disallow instantiation of sqlite3.Statement (GH-26567) ↵Erlend Egeberg Aasland2021-06-201-0/+5
| | | | | (GH-26816) Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
* [3.10] bpo-43945: [Enum] reduce scope of new format() behavior (GH-26752) Ethan Furman2021-06-184-25/+196
| | | | | | | | | | | | | | | | | | | | | | | | | * [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 f60b07ab6c943fce084772c3c7731ab3bbd213ff) Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
* [3.10] bpo-44368: Improve syntax errors with invalid as pattern targets ↵Pablo Galindo2021-06-181-0/+14
| | | | | | | (GH-26632) (GH-26792) (cherry picked from commit 05073036dcecefc00b0c3e7397601809da41e2f1) Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
* bpo-44451: Reset DeprecationWarning filters in ↵Miss Islington (bot)2021-06-181-0/+1
| | | | | | | | | | | | | | | | | | | | test_importlib.test_entry_points_by_index (GH-26784) This avoids the following error if DeprecationWarnings are ignored. ====================================================================== ERROR: test_entry_points_by_index (test.test_importlib.test_metadata_api.APITests) Prior versions of Distribution.entry_points would return a ---------------------------------------------------------------------- Traceback (most recent call last): File "/builddir/build/BUILD/Python-3.10.0b3/Lib/test/test_importlib/test_metadata_api.py", line 145, in test_entry_points_by_index expected = next(iter(caught)) StopIteration ---------------------------------------------------------------------- Ran 1402 tests in 2.125s FAILED (errors=1, skipped=18, expected failures=1) (cherry picked from commit df1502e47fc1e0cf1e7d460ae04530c3e2e4a7c6) Co-authored-by: Miro Hrončok <miro@hroncok.cz>
* [3.10] Reorganize the pattern matching suite (GH-26661) (GH-26787)Miss Islington (bot)2021-06-181-548/+497
| | | | | | | | (cherry picked from commit c106cf31f816f719de0a83ff31b9f4d0bea3519b) Co-authored-by: Brandt Bucher <brandt@python.org> Automerge-Triggered-By: GH:brandtbucher
* bpo-43024: improve signature (in help, etc) for functions taking sent… ↵Miss Islington (bot)2021-06-172-1/+20
| | | | | | | | (GH-24331) (GH-26773) …inel defaults (cherry picked from commit f73377d57c5272390de63cccc3c292c44689310a) Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>