Skip to content

Commit a34c412

Browse files
cosmetic
1 parent 03d4f21 commit a34c412

3 files changed

Lines changed: 8 additions & 7 deletions

File tree

Doc/whatsnew/3.15.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2309,6 +2309,7 @@ New deprecations
23092309
:func:`issubclass`, but warnings were not previously emitted if it was
23102310
merely imported or accessed from the :mod:`!typing` module.
23112311

2312+
23122313
* :mod:`webbrowser`:
23132314

23142315
* :class:`!webbrowser.MacOSXOSAScript` is deprecated in favour of

Lib/test/test_urlparse.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1262,7 +1262,6 @@ def test_non_string_true_values_rejected(self):
12621262
urllib.parse.urlsplit(1, b'http')
12631263

12641264
def _check_result_type(self, str_type, str_args):
1265-
num_args = len(str_type._fields)
12661265
bytes_type = str_type._encoded_counterpart
12671266
self.assertIs(bytes_type._decoded_counterpart, str_type)
12681267
bytes_args = tuple_encode(str_args)
@@ -2011,10 +2010,10 @@ def test_falsey_deprecation(self):
20112010
(urllib.parse.urlunparse, [[None, b'www.python.org', (), (), (), ()]]),
20122011
(urllib.parse.urlunsplit, [['http', 0, '', '', '']]),
20132012
]
2014-
for callable, args in cases:
2015-
with self.subTest(callable=callable.__name__, args=args):
2013+
for func, args in cases:
2014+
with self.subTest(callable=func.__name__, args=args):
20162015
with self.assertWarnsRegex(DeprecationWarning, "false values"):
2017-
callable(*args)
2016+
func(*args)
20182017

20192018

20202019
def str_encode(s):
Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1-
Providing anything but a string or bytes object to :mod:`urllib.parse`
2-
functions expecting strings or bytes now raises :exc:`DeprecationWarning`
3-
if the value tests false, or :exc:`TypeError` if it tests true.
1+
Providing values other than other than strings, bytes, or ``None`` to
2+
:mod:`urllib.parse` functions expecting strings or bytes now raises
3+
:exc:`TypeError` if true or :exc:`DeprecationWarning` if false (to be
4+
changed to :exc:`TypeError` in future versions of Python).

0 commit comments

Comments
 (0)