Commit Graph

45413 Commits

Author SHA1 Message Date
Serhiy Storchaka 82794cacc6
[3.8] [3.9] bpo-42681: Fix range checks for color and pair numbers in curses (GH-23874). (GH-24077) (GH-24079)
(cherry picked from commit 1470edd613)
(cherry picked from commit b0ee2b492d)
2021-01-04 10:58:09 +02:00
Serhiy Storchaka 645174abe0
[3.8] [3.9] bpo-42789: Don't skip curses tests on non-tty. (GH-24009) (GH-24076) (GH-24078)
If __stdout__ is not attached to terminal, try to use __stderr__
if it is attached to terminal, or open the terminal device, or
use regular file as terminal, but some functions will be untested
in the latter case.
(cherry picked from commit 607501abb4)
(cherry picked from commit 0303008ebc)
2021-01-04 00:54:13 +02:00
Miss Islington (bot) 2e8b1c9e9b
bpo-42809: Improve pickle tests for recursive data. (GH-24060)
(cherry picked from commit a25011be8c)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2021-01-02 09:50:28 -08:00
Serhiy Storchaka 6dffa67b98
[3.8] bpo-26407: Do not mask errors in csv. (GH-20536) (GH-24021)
Unexpected errors in calling the __iter__ method are no longer
masked by TypeError in csv.reader(), csv.writer.writerow() and
csv.writer.writerows().
(cherry picked from commit c88239f864)
2021-01-01 19:42:23 +02:00
Serhiy Storchaka b863607d30
[3.8] bpo-39068: Fix race condition in base64 (GH-17627) (GH-24022)
There was a race condition in base64 in lazy initialization of multiple globals.
(cherry picked from commit 9655434cca)

Co-authored-by: Brandon Stansbury <brandonrstansbury@gmail.com>
2021-01-01 19:41:49 +02:00
Serhiy Storchaka e3a9adba32
[3.8] bpo-42759: Fix equality comparison of Variable and Font in Tkinter (GH-23968) (GH-24026)
Objects which belong to different Tcl interpreters are now always
different, even if they have the same name.
(cherry picked from commit 1df56bc059)
2021-01-01 19:39:36 +02:00
Miss Islington (bot) 381f3e4bfd
bpo-42794: Update test_nntplib to use offical group name for testing (GH-24037)
(cherry picked from commit ec3165320e)

Co-authored-by: Dong-hee Na <donghee.na@python.org>
2021-01-01 06:40:18 -08:00
Miss Islington (bot) 741f22df24
Allow / character in username,password fields in _PROXY envvars. (GH-23973) (#23992)
(cherry picked from commit 030a713183)

Co-authored-by: Senthil Kumaran <senthil@uthcode.com>
2020-12-29 05:15:14 -08:00
Miss Islington (bot) 323cbb5531
bpo-42749: Use dynamic version to test for unsupported bignum in Tk (GH-23966)
Tk can internally support bignum even if Tkinter is built without
support of bignum.
(cherry picked from commit 156b7f7052)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2020-12-29 03:16:43 -08:00
Miss Islington (bot) 9d7c5ab6a4
bpo-42749: Fix testing bignum if Tkinter is compiled with Tk 8.4 and dynamic linked with Tk >= 8.5 (GH-23955) (GH-23962)
(cherry picked from commit b02ad2458b)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2020-12-27 10:56:40 +02:00
Serhiy Storchaka fc6534f205
[3.8] Rename Tkinter tests for widget options (GH-23944) (GH-23946)
Every test for widget option starts now with "test_configure_"
to distinguish it from tests for widget commands.
(cherry picked from commit c1ae21c965)
2020-12-26 12:38:13 +02:00
Miss Islington (bot) 4d840e428a
[3.8] bpo-42318: Fix support of non-BMP characters in Tkinter on macOS (GH-23281). (GH-23784) (GH-23787)
(cherry picked from commit a26215db11)
(cherry picked from commit 28bf6ab61f)
2020-12-26 00:35:46 +02:00
Miss Islington (bot) 0178a6b67c
bpo-42734: Fix crasher bogus_code_obj.py (GH-23939)
It did not work because the signature of code object constructor
was changed. Also, it used old format of bytecode (pre-wordcode).
(cherry picked from commit 954a7427ba)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2020-12-25 07:20:35 -08:00
Miss Islington (bot) d5aadb2854
bpo-42388: Fix subprocess.check_output input=None when text=True (GH-23467)
When the modern text= spelling of the universal_newlines= parameter was added
for Python 3.7, check_output's special case around input=None was overlooked.
So it behaved differently with universal_newlines=True vs text=True.  This
reconciles the behavior to be consistent and adds a test to guarantee it.

Also clarifies the existing check_output documentation.

Co-authored-by: Alexey Izbyshev <izbyshev@ispras.ru>
(cherry picked from commit 64abf37344)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
2020-12-24 21:18:13 -08:00
Łukasz Langa 6503f05dd5
Python 3.8.7 2020-12-21 17:25:24 +01:00
Miss Islington (bot) a3537716a5
Fix typo in docstring (GH-23515)
(cherry picked from commit 711381dfb0)

Co-authored-by: Fernando Toledo <42938011+fernandohtr@users.noreply.github.com>
2020-12-21 06:28:47 -08:00
Serhiy Storchaka 80c445cafb
[3.8] bpo-42630: Improve error reporting in Tkinter for absent default root (GH-23781) (GH-23854)
* Tkinter functions and constructors which need a default root window
  raise now RuntimeError with descriptive message instead of obscure
  AttributeError or NameError if it is not created yet or cannot
  be created automatically.

* Add tests for all functions which use default root window.

* Fix import in the pynche script.

(cherry picked from commit 3d569fd6dc)
2020-12-19 16:38:37 +02:00
Miss Islington (bot) a3dec9d8ec
bpo-41891: ensure asyncio.wait_for waits for task completion (GH-22461)
(cherry picked from commit 17ef4319a3)

Co-authored-by: Richard Kojedzinszky <rkojedzinszky@users.noreply.github.com>
2020-12-18 09:45:24 -08:00
Miss Islington (bot) 718bf1a7a1
bpo-41804: Enhance test_epoll.test_control_and_wait() (GH-23795) (GH-23814)
Use shorter timeout and replace send() with sendall().
(cherry picked from commit 79782fe4f8)

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

Co-authored-by: Victor Stinner <vstinner@python.org>
2020-12-17 12:14:25 +01:00
Miss Islington (bot) dd262ef46d
bpo-38323: Add guard clauses in MultiLoopChildWatcher. (GH-22756)
This is a trivial refactor in preparation for a fix for bpo-38323.
(cherry picked from commit 66d3b589c4)

Co-authored-by: Chris Jerdonek <chris.jerdonek@gmail.com>
2020-12-16 10:11:51 -08:00
Miss Islington (bot) d549d0b557
bpo-39101: Fixes BaseException hang in IsolatedAsyncioTestCase. (GH-22654)
(cherry picked from commit 8374d2ee15)

Co-authored-by: Lisa Roach <lisaroach14@gmail.com>
2020-12-16 09:57:23 -08:00
Miss Islington (bot) 0a24a57888
bpo-42644: Validate values in logging.disable() (GH-23786)
* bpo-42644: Validate values in logging.disable()

Technically make the value of manager a property that checks and convert
values assigned to it properly. This has the side effect of making
`logging.disable` also accept strings representing the various level of
warnings.

We want to validate the type of the disable attribute at assignment
time, as it is later compared to other levels when emitting warnings and
would generate a `TypeError: '>=' not supported between ....` in a
different part of the code base, which can make it difficult to track
down.

When assigned an incorrect value; it will raise a TypeError when the
wrong type, or ValueError if an invalid str.

Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
(cherry picked from commit b32d8b4f9b)

Co-authored-by: Matthias Bussonnier <bussonniermatthias@gmail.com>
2020-12-16 02:10:32 -08:00
Miss Islington (bot) 57a1fc65bf
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-12-15 16:28:30 -08:00
Miss Islington (bot) 13d40c2a41
bpo-40219: Lowered ttk LabeledScale dummy (GH-21467)
(cherry picked from commit b9ced83cf4)

Co-authored-by: E-Paine <63801254+E-Paine@users.noreply.github.com>
2020-12-15 12:02:03 -08:00
Miss Islington (bot) 925f998786
bpo-33610: Edit idlelib.codecontext (GH-23773)
Add sentence to module docstring and import tkinter items.
(cherry picked from commit 6f79e60b66)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2020-12-14 21:45:44 -08:00
Miss Islington (bot) 06bfd033e8
bpo-36541: Add lib2to3 grammar PEP-570 pos-only arg parsing (GH-23759)
Add positional only args support to lib2to3 pgen2.

This adds 3.8's PEP-570 support to lib2to3's pgen2.  lib2to3, while
being deprecated is still used by things to parse all versions of Python
code today.  We need it to support parsing modern 3.8 and 3.9 constructs.

Also add tests for complex *expr and **expr's.
(cherry picked from commit 42c9f0fd0a)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
2020-12-14 09:29:57 -08:00
Miss Islington (bot) f6d1520219
bpo-40084: [Enum] dir() includes member attributes (GH-19219) (GH-22853)
(cherry picked from commit 68526fe258)

Co-authored-by: Angelin BOOZ <9497359+lem2clide@users.noreply.github.com>
2020-12-09 11:25:06 -08:00
Ethan Furman 21ca80eef4
[3.8] [Enum] reformat and add doc strings (GH-23705). (GH-23706)
* [3.8] [Enum] reformat and add doc strings (GH-23705).
2020-12-08 13:28:47 -08:00
Miss Islington (bot) cbfcc67170
bpo-41907: [Enum] fix format() behavior for IntFlag (GH-22497) (GH-23704)
(cherry picked from commit 37440eef7f)
2020-12-08 11:52:58 -08:00
Łukasz Langa f01ec28949 Python 3.8.7rc1
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEE4/8oOcBIslwITevpsmmV4xAlBWgFAl/OOOAACgkQsmmV4xAl
 BWh8nQ//dAtAJguTePQnppw/R4oGRJm40vjqkRAJhsGWYHJhkkZ8kl47ZelxXzFl
 +m3zPsa/6h/0ds4rvc3y8jJ4rXfLMmIFlPsw4bsm5Jr9d2tdWYqedJbEdcYRx/TX
 8mX6KLVgYtGBR1kxau2c58aI6fX3dgltSLJLT7VZSRIMTuRxXYekbfVFDVOi0PeC
 UXbgnHzrpG+Joh2tGMbXWNJQap7KGEI+KX64DZ+IA8PLxpIsyrNFfcRYIuXFg9TX
 DJLFDcCreHkUOJpxidC6l4n8kdf9RjKB6K4g5YbSoN6yEO1mtlbDgHlCOgRoWPJ7
 OmefmtxQ1yqV/NWf38ypheMy5i+ZkoMlfrKl/RIneiKsqNIFUvrPzvVaoaHD5o3r
 lxIY/bAr9CIHFCKyBD4nSINJ5ZaLBk/o0nx6lOl4P84gyJE+PiECIHRSODblHtNg
 bYf8LMQ0xB/VI6v4EjVDygH6wQl6wTUg3WjvoxwkV14bnlMNEZP2zjz6f7EXoEMT
 DGzMnG0apE8l+66edntnJQSM1FsCzvzKA2JvD+91EjwNeUNQGcddvnULuDXTrWFH
 Kr5/i60oOi90ZsFlPvT25eyI2r3uYqcGWPH83oBHuKtEXRJtGZs8biOla/mZTGo7
 fLys+yDA+KqFH5LoGTCkTdhFCY8yEU6LCXQYAXODkNLoELeadig=
 =T+75
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCAAuFiEE4/8oOcBIslwITevpsmmV4xAlBWgFAl/O38IQHGx1a2FzekBs
 YW5nYS5wbAAKCRCyaZXjECUFaF74D/9stvFY2BI9GEZjq+2nOgU8L0pMNEoqKh4m
 hzFtsOReC4eSO/RyvXX0U2qkH/CC7V+6CIZFBXX90eL/yFTWEFCGkB1xdTh9BE0S
 OqXrJ9IFsmfRCyyVPV28iGhbTUBohPMyMmxyx6wo8tFIonFwcST/q9WyZKrUP7Oe
 8NkgtBBCrrbRgAOZ5HtamBIPLtLUlqOvlL6HIQQSMMnAl04Zp3i+OeXqqDE2rxrd
 NPrlghtVwp21kpIE701rrnA3so5ZmVcXAZ7KIRqPam3bHW1saH4OuuGcilxciyrM
 SxiKgzwF826Yku+WAsJsBUdS5mjc1L+VDMdIVXZ2v4N4qCS1QNw7BtwwzvsTnbVU
 fiKv8ARjwDepvub9v9QKZ8r8sR9x4HILlGGJyodw67Mqrysap5opA9BStkRBSkDN
 NxifPMnxLgwJsj2y5Zs/sWI1MqMvvE2/7e/L4hS2bgOnF+DeYNEZWU5vP6N78DDz
 MSql2Ql3f9dusxETGrOUowY/UR5pQ6C+44wiquwysODTWFiDCcr/7bKq6DapkZr3
 h6GgFGxODoP7nx0CIZNF3nNzfUT1xNUAS2+siwNJ/nO8zeh5FbJfeYMN/PJ+QCGX
 y3WN0toocgtdDZfWc+zpcjAdw4xS3o5lpzlQZPiDhVG2X0MPNVVXlD6HdS7Yjakt
 w2XUqPCRBg==
 =G9Dw
 -----END PGP SIGNATURE-----

Merge tag 'v3.8.7rc1' into 3.8

Python 3.8.7rc1
2020-12-08 03:06:56 +01:00
Miss Islington (bot) 699e5e4489
bpo-41889: [Enum] fix multiple-inheritance regression (GH-22487) (GH-23672)
(cherry picked from commit c266736ec1)
2020-12-07 15:50:14 -08:00
Brandt Bucher 7c79798238
bpo-42536: GC track recycled tuples (GH-23623) (GH-23652)
Several built-in and standard library types now ensure that their internal result tuples are always tracked by the garbage collector:

- collections.OrderedDict.items
- dict.items
- enumerate
- functools.reduce
- itertools.combinations
- itertools.combinations_with_replacement
- itertools.permutations
- itertools.product
- itertools.zip_longest
- zip

Previously, they could have become untracked by a prior garbage collection.
(cherry picked from commit 226a012d1c)
2020-12-07 20:08:24 +00:00
Miss Islington (bot) ca52aa3ddd
bpo-39825: Fixes sysconfig.get_config_var('EXT_SUFFIX') on Windows to match distutils (GH-22088)
(cherry picked from commit c0afb7fa0e)

Co-authored-by: Matti Picus <matti.picus@gmail.com>
2020-12-07 09:50:48 -08:00
Łukasz Langa e3201094af
Python 3.8.7rc1 2020-12-07 15:13:36 +01:00
Miss Islington (bot) a4e7d5f750
bpo-17735: inspect.findsource now raises OSError when co_lineno is out of range (GH-23633)
This can happen when a file was edited after it was imported.
(cherry picked from commit 2e0760bb2e)

Co-authored-by: Irit Katriel <iritkatriel@yahoo.com>
2020-12-04 13:44:53 -08:00
Miss Islington (bot) 3b14f18205
bpo-42116: Fix inspect.getsource handling of trailing comments (GH-23630)
(cherry picked from commit 6e1eec71f5)

Co-authored-by: Irit Katriel <iritkatriel@yahoo.com>
2020-12-04 12:20:09 -08:00
Miss Islington (bot) 8e8f82dd94
bpo-41473: Reenable test_gdb on gdb 9.2 and newer (GH-23637)
https://bugzilla.redhat.com/show_bug.cgi?id=1866884 is fixed in gdb
10.1 (failed to reproduce on gdb-10.1-1.fc34.aarch64).
(cherry picked from commit 066394018a)

Co-authored-by: Victor Stinner <vstinner@python.org>
2020-12-04 07:41:02 -08:00
Miss Islington (bot) 930d5377c5
bpo-42553: Fix test_asyncio.test_call_later() (GH-23627)
Fix test_asyncio.test_call_later() race condition: don't measure
asyncio performance in the call_later() unit test. The test failed
randomly on the CI.
(cherry picked from commit 7e5e13d113)

Co-authored-by: Victor Stinner <vstinner@python.org>
2020-12-03 05:15:28 -08:00
Miss Islington (bot) 12d2306a1d
bpo-42328: Skip some tests with themes vista and xpnative on Windows 7 (GH-23612)
(cherry picked from commit f3c3ea91a7)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2020-12-03 01:07:13 -08:00
Miss Islington (bot) 1cc5c943c0
bpo-42482: remove reference to exc_traceback from TracebackException (GH-23531)
(cherry picked from commit 427613f005)

Co-authored-by: Irit Katriel <iritkatriel@yahoo.com>
2020-11-30 17:53:40 -08:00
Miss Islington (bot) f4389bfbb5
bpo-42508: Remove bogus idlelib.pyshell.ModifiedInterpreter attribute (GH-23570)
restart_subprocess is a method of self, the pyshell.InteractiveInterpreter instance. The latter does not have an interp attribute redundantly referring to itself. (The PyShell instance does have an interp attribute, referring to the InteractiveInterpreter instance.)
(cherry picked from commit e41bfd15dd)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2020-11-30 09:30:46 -08:00
Miss Islington (bot) a5b0c17e0d
bpo-42142: Try to fix timeouts in ttk tests (GH-23474)
Instead of using wait_visibility() which waits event <VisibilityNotify> in dead loop
use update() which should proceed all queued events.
(cherry picked from commit 6cc2c419f6)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2020-11-30 00:42:56 -08:00
Irit Katriel d82e08d185
[3.8] bpo-42474: test TracebackException comparison to non-equal instances (GH-23558) 2020-11-29 17:41:19 -08:00
Miss Islington (bot) b1c48e5136
bpo-42406: Fix whichmodule() with multiprocessing (GH-23403)
* bpo-42406: Fix whichmodule() with multiprocessing

Signed-off-by: Renato L. de F. Cunha <renatoc@br.ibm.com>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
(cherry picked from commit 86684319d3)

Co-authored-by: Renato Cunha <renatocunha@acm.org>
2020-11-29 10:43:36 -08:00
Miss Islington (bot) 4498e98a6b
bpo-34215: Clarify IncompleteReadError message when "expected" is None (GH-21925) (#23540)
Co-Authored-By: Tyler Bell <mrbell321@gmail.com>
(cherry picked from commit 8085f742f4)
Co-authored-by: Zackery Spytz <zspytz@gmail.com>
2020-11-28 16:44:34 +02:00
Miss Islington (bot) bda2e68c88
bpo-12800: tarfile: Restore fix from 011525ee9 (GH-21409)
Restore fix from 011525ee92.
(cherry picked from commit 4fedd7123e)

Co-authored-by: Julien Palard <julien@palard.fr>
2020-11-25 02:01:01 -08:00
Miss Islington (bot) 8388a33307
bpo-42370: Check element before making mouse click in ttk tests (GH-23491)
(cherry picked from commit b0b428510c)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2020-11-24 09:54:32 -08:00
Miss Islington (bot) ad49526c80
bpo-42328: Fix tkinter.ttk.Style.map(). (GH-23300)
The function accepts now the representation of the default state as
empty sequence (as returned by Style.map()).
The structure of the result is now the same on all platform
and does not depend on the value of wantobjects.
(cherry picked from commit dd844a2916)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2020-11-23 00:51:22 -08:00
Miss Islington (bot) 28b40d7a34
bpo-42426: IDLE: Fix reporting offset of the RE error in searchengine (GH-23447)
(cherry picked from commit 453bc1da20)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2020-11-21 21:24:11 -08:00
Miss Islington (bot) c076d48805
bpo-42416: Use inspect.getdoc for IDLE calltips (GH-23416)
Inspect.getdoc(ob) sometimes gets docstrings when ob.__doc__ is None.
(cherry picked from commit 7ddbaa7a1b)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2020-11-19 23:22:29 -08:00