Commit Graph

46233 Commits

Author SHA1 Message Date
Senthil Kumaran c9f07813ab
[3.9] bpo-42967: only use '&' as a query string separator (GH-24297) (#24528)
(cherry picked from commit fcbe0cb04d)

* [3.9] bpo-42967: only use '&' as a query string separator (GH-24297)

bpo-42967: [security] Address a web cache-poisoning issue reported in urllib.parse.parse_qsl().

urllib.parse will only us "&" as query string separator by default instead of both ";" and "&" as allowed in earlier versions. An optional argument seperator with default value "&" is added to specify the separator.

Co-authored-by: Éric Araujo <merwok@netwok.org>
Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
Co-authored-by: Adam Goldschmidt <adamgold7@gmail.com>
2021-02-15 10:03:31 -08:00
Miss Islington (bot) 29584aa6ac
bpo-43102: Set namedtuple __new__'s internal builtins to a dict. (GH-24439) (GH-24452) 2021-02-04 16:12:34 -08:00
Miss Islington (bot) 2603d77a6b
Fix typo (GH-23019)
Fixed possible typo in comment
(cherry picked from commit bfe544d2f2)

Co-authored-by: Harry <harry.lees@gmail.com>
2021-02-03 13:48:22 -08:00
Miss Islington (bot) 0874491bcc
bpo-41748: Handles unquoted attributes with commas (GH-24072)
* bpo-41748: Adds tests for unquoted attributes with comma

* bpo-41748: Handles unquoted attributes with comma

* bpo-41748: Addresses review comments

* bpo-41748: Addresses review comments

* Adds more test cases
* Simplifies the regex for handling spaces

* bpo-41748: Moves attributes tests under the right class

* bpo-41748: Addresses review about duplicate attributes

* bpo-41748: Adds NEWS.d entry for this patch
(cherry picked from commit 9eb11a139f)

Co-authored-by: Karl Dubost <karl+github@la-grange.net>
2021-02-01 12:54:43 -08:00
Miss Islington (bot) 304f9d2622
bpo-43016: Fix test_curses on platform without cursesw (GH-24405) (GH-24407)
(cherry picked from commit a1e9a1e120)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2021-02-01 09:37:29 +02:00
Miss Islington (bot) d6675fee1a
bpo-42504: Ensure that get_config_var('MACOSX_DEPLOYMENT_TARGET') is a string (GH-24341) (GH-24410)
* bpo-42504: Ensure that get_config_var('MACOSX_DEPLOYMENT_TARGET') is a string
(cherry picked from commit 49926cf2bc)

Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com>
2021-01-31 23:22:48 -05:00
Serhiy Storchaka e9d4960d15
[3.9] bpo-43016: Rewrite tests for curses (GH-24312). (GH-24399)
(cherry picked from commit d64fd4bb5b)
2021-01-31 18:11:13 +02:00
Miss Islington (bot) bf782b2636
bpo-43008: Add 'Patch by Ken Hilton' (GH-24370) (#24374)
(cherry picked from commit 11d75ec807)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2021-01-29 13:51:46 -05:00
Miss Islington (bot) 6d87dec581
bpo-23544: Disable IDLE Stack Viewer when running user code (GH-17163)
Starting stack viewer when user code is running, including when Debugger is active, hangs or crashes IDLE.

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

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
2021-01-28 15:38:19 -08:00
Miss Islington (bot) 68102fb998
bpo-43008: Make IDLE respect sys.excepthook (GH-24302)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
(cherry picked from commit 7a34380ad7)

Co-authored-by: Ken <kenny2minecraft@gmail.com>
2021-01-26 16:24:14 -08:00
Terry Jan Reedy fd668bc62b
[3.9] bpo-41841: Prepare IDLE NEWS for 3.9.2 (#GH-4343) 2021-01-26 13:59:18 -05:00
Andrey Bienkowski f8cfe54e5a
[3.9] bpo-42383: pdb: do not fail to restart the target if the current directory changed (GH-23412) (#24322) 2021-01-26 07:57:58 -08:00
Andrey Bienkowski f2df7958fb
[3.9] bpo-42384: pdb: correctly populate sys.path[0] (GH-23338) (#24321) 2021-01-25 13:08:41 -08:00
Miss Islington (bot) 26af2fae18
bpo-43013: Fix old tkinter module names in idlelib (GH-24326)
Lowercase 'tkColorChooser', 'tkFileDialog', 'tkSimpleDialog', and
'tkMessageBox' and remove 'tk'.  Just lowercase 'tkFont' as 'font'
is already used.  Adjust import.
(cherry picked from commit 879986d8a9)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2021-01-25 08:25:39 -05:00
Serhiy Storchaka 3d5434d5cb
[3.9] bpo-33289: Return RGB triplet of ints instead of floats from tkinter.colorchooser (GH-6578). (GH-24318)
(cherry picked from commit 6713e869c4)

Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
2021-01-25 11:45:30 +02:00
Miss Islington (bot) ff06957710
bpo-43013: Update idlelib code to 3.x (GH-24315)
Remove 9 remaining '(object)' occurrences in class headers in idlelib
and 25 '()' occurrences in idlelib.idle_test class headers.
(cherry picked from commit 8dfe15625e)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2021-01-24 15:36:02 -08:00
Miss Islington (bot) 00e24cdca4
closes bpo-43011: Fix DeprecationWarnings in test_ctypes (GH-24305)
(cherry picked from commit f7fa64f0e8)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
2021-01-23 08:56:08 -08:00
cptpcrd 6893523bed
bpo-42780: Fix set_inheritable() for O_PATH file descriptors on Linux (GH-24172) (GH-24278)
(cherry picked from commit 7dc71c425c)
2021-01-21 11:46:35 +01:00
Miss Islington (bot) 0654c4c4cc
bpo-42005: profile and cProfile catch BrokenPipeError (GH-22643)
(cherry picked from commit 3554fa4abe)

Co-authored-by: Zhiming Wang <i@zhimingwang.org>
2021-01-20 01:19:08 -08:00
Miss Islington (bot) c347cbe694
closes bpo-42938: Replace snprintf with Python unicode formatting in ctypes param reprs. (GH-24247)
(cherry picked from commit 916610ef90)

Co-authored-by: Benjamin Peterson <benjamin@python.org>

Co-authored-by: Benjamin Peterson <benjamin@python.org>
2021-01-18 15:29:31 -06:00
Miss Islington (bot) a90539f572
bpo-42944 Fix Random.sample when counts is not None (GH-24235) (GH-24243) 2021-01-18 10:36:07 -08:00
Jason R. Coombs 799722cb0d
[3.9] bpo-42163, bpo-42189, bpo-42659: Support uname_tuple._replace (for all but processor) (GH-23010) (#24232)
* Add test capturing missed expectation with uname_result._replace.

* bpo-42163: Override uname_result._make to allow uname_result._replace to work (for everything but 'processor'.

* Replace hard-coded length with one derived from the definition.

* Add test capturing missed expectation with copy/deepcopy on namedtuple (bpo-42189).

* bpo-42189: Exclude processor parameter when constructing uname_result.

* In _make, rely on __new__ to strip processor.

* Add blurb.

* iter is not necessary here.

* Rely on num_fields in __new__

* Add test for slices on uname

* Add test for copy and pickle.

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

* import pickle

* Fix equality test after pickling.

* Simply rely on __reduce__ for pickling.

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

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
2021-01-16 14:45:30 -05:00
Miss Islington (bot) 17c1f0c8cb
bpo-42931: randbytes missing from random.__all__ (GH-24219) (GH-24225) 2021-01-15 10:21:52 -08:00
Miss Islington (bot) 799f8489d4
bpo-33065: Fix problem debugging user classes with __repr__ method (GH-24183)
If __repr__ uses instance attributes, as normal, and one steps
through the __init__ method, debugger may try to get repr before
the instance attributes exist.  reprlib.repr handles the error.
(cherry picked from commit 81f87bbf9f)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2021-01-09 23:30:43 -08:00
Ethan Furman 9ab4dd4522
[3.9] bpo-42851: [Enum] remove brittle __init_subclass__ support (GH-24154) (GH-24155)
Solution to support calls to `__init_subclass__` with members defined is too brittle and breaks with certain mixins..
(cherry picked from commit a581a868d9)
2021-01-07 13:55:59 -08:00
Miss Islington (bot) a3ca6747f5
bpo-14014: Clarify StreamWriter.reset() documentation (GH-13716)
(cherry picked from commit 1a9f51ed12)

Co-authored-by: Berker Peksag <berker.peksag@gmail.com>
2021-01-06 04:27:30 +02:00
Serhiy Storchaka 9b3a53a826
[3.9] bpo-42681: Fix test_curses failures related to color pairs (GH-24089) (GH-24113)
On ncurses 6.1 pair numbers are limited by SHORT_MAX-1.

Improve error reporting and tests for color functions.
(cherry picked from commit 59f9b4e450)
2021-01-05 14:23:19 +02:00
Terry Jan Reedy d82392face
[3.9] bpo-32631: IDLE: Enable zzdummy example extension module (GH-14491)
Make menu items work with formatter, add docstrings, add 100% tests.

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

Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
2021-01-05 03:25:57 -05:00
Miss Islington (bot) 80e5732d31
bpo-40810: Fix CheckTraceCallbackContent for SQLite pre 3.7.15 (GH-20530)
Ref. [SQLite 3.7.15 changelog](https://sqlite.org/changes.htmlGH-version_3_7_15):
_"Avoid invoking the sqlite3_trace() callback multiple times when a statement is automatically reprepared due to SQLITE_SCHEMA errors."_
(cherry picked from commit f7f0ed59bc)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
2021-01-04 15:41:03 -08:00
Serhiy Storchaka b0ee2b492d
[3.9] bpo-42681: Fix range checks for color and pair numbers in curses (GH-23874). (GH-24077)
(cherry picked from commit 1470edd613)
2021-01-04 00:55:23 +02:00
Serhiy Storchaka 0303008ebc
[3.9] bpo-42789: Don't skip curses tests on non-tty. (GH-24009) (GH-24076)
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)
2021-01-03 22:54:44 +02:00
Pablo Galindo bfc413ce4f
[3.9] bpo-42806: Fix ast locations of f-strings inside parentheses (GH-24067) (GH-24069)
(cherry picked from commit bd2728b1e8)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
2021-01-03 01:32:43 +00:00
Lysandros Nikolaou 9a608ac17c
[3.9] bpo-40631: Disallow single parenthesized star target (GH-24027) (GH-24068)
(cherry picked from commit 2ea320dddd)

Automerge-Triggered-By: GH:pablogsal
2021-01-02 16:59:39 -08:00
Miss Islington (bot) 39a7578186
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:53:46 -08:00
Ross 69120613c0
[3.9] bpo-42756: Configure LMTP Unix-domain socket to use global default timeout when timeout not provided (GH-23969) (GH-24050) 2021-01-02 12:44:04 +09:00
Miss Islington (bot) 0d6e40744a
bpo-39068: Fix race condition in base64 (GH-17627)
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 12:42:44 -08:00
Miss Islington (bot) b20d5e5ce9
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:42:43 -08:00
Miss Islington (bot) df794406a8
Allow / character in username,password fields in _PROXY envvars. (GH-23973)
(cherry picked from commit 030a713183)

Co-authored-by: Senthil Kumaran <senthil@uthcode.com>
2020-12-29 04:46:05 -08:00
Miss Islington (bot) 578caafabe
bpo-42759: Fix equality comparison of Variable and Font in Tkinter (GH-23968)
Objects which belong to different Tcl interpreters are now always
different, even if they have the same name.
(cherry picked from commit 1df56bc059)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2020-12-29 03:18:26 -08:00
Miss Islington (bot) 7bdb3e0825
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:17:43 -08:00
Miss Islington (bot) 03e571f1d5
bpo-42740: Fix get_args for PEP 585 collections.abc.Callable (GH-23963)
PR 1/2. Needs backport to 3.9.
(cherry picked from commit 4140f10a16)

Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
2020-12-28 12:26:39 -08:00
Miss Islington (bot) dda12ad63e
bpo-42749: Fix testing bignum if Tkinter is compiled with Tk 8.4 and dynamic linked with Tk >= 8.5 (GH-23955)
(cherry picked from commit b02ad2458b)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2020-12-27 00:32:27 -08:00
Miss Islington (bot) 486e70c0a5
Rename Tkinter tests for widget options (GH-23944)
Every test for widget option starts now with "test_configure_"
to distinguish it from tests for widget commands.
(cherry picked from commit c1ae21c965)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2020-12-25 14:30:40 -08:00
Miss Islington (bot) fbffda25b4
bpo-42727: [Enum] use super() and include **kwds (GH-23927)
for multiple inheritance support:

use super().new
pass **kwds to super().new
(cherry picked from commit 786d97a66c)

Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
2020-12-25 08:07:30 -08:00
Miss Islington (bot) 51f5029146
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:22:56 -08:00
Miss Islington (bot) 7acfe41257
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:37 -08:00
Ethan Furman f7dca9b9c8
[3.9] bpo-42727: [Enum] EnumMeta.__prepare__ now accepts **kwds (GH-23917). (GH-23926)
* [3.9] [Enum] EnumMeta.__prepare__ now accepts **kwds (GH-23917).
(cherry picked from commit 6ec0adefad)
2020-12-24 12:02:38 -08:00
Miss Islington (bot) a1251980d2
bpo-42195: Override _CallableGenericAlias's __getitem__ (GH-23915)
Added `__getitem__` for `_CallableGenericAlias` so that it returns a subclass (itself) of `types.GenericAlias` rather than the default behavior of returning a plain `types.GenericAlias`. This fixes `repr` issues occuring after `TypeVar` substitution arising from the previous behavior.
(cherry picked from commit 6dd3da3cf4)

Co-authored-by: kj <28750310+Fidget-Spinner@users.noreply.github.com>
2020-12-23 19:07:51 -08:00
Miss Islington (bot) 8e5c61a075
bpo-34463: Make python tracebacks identical to C tracebacks for SyntaxErrors without a lineno (GH-23427)
(cherry picked from commit 069560b117)

Co-authored-by: Irit Katriel <iritkatriel@yahoo.com>
2020-12-22 14:12:30 -08:00
Miss Islington (bot) b4b323ce1a
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:29:57 -08:00