Skip to content

Commit 43e3efa

Browse files
authored
Merge branch '3.13' into backport-4572903-3.13
2 parents 66e8e92 + 31fac5d commit 43e3efa

10 files changed

Lines changed: 1061 additions & 68 deletions

File tree

Doc/library/urllib.parse.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -593,8 +593,9 @@ task isn't already covered by the URL parsing functions above.
593593

594594
The optional *encoding* and *errors* parameters specify how to deal with
595595
non-ASCII characters, as accepted by the :meth:`str.encode` method.
596-
*encoding* defaults to ``'utf-8'``.
597-
*errors* defaults to ``'strict'``, meaning unsupported characters raise a
596+
Although these parameters default to ``None`` in the function signature,
597+
when processing :class:`str` inputs, *encoding* effectively defaults to ``'utf-8'``
598+
and *errors* to ``'strict'``, meaning unsupported characters raise a
598599
:class:`UnicodeEncodeError`.
599600
*encoding* and *errors* must not be supplied if *string* is a
600601
:class:`bytes`, or a :class:`TypeError` is raised.

Lib/imaplib.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -797,7 +797,7 @@ def select(self, mailbox='INBOX', readonly=False):
797797
if __debug__:
798798
if self.debug >= 1:
799799
self._dump_ur(self.untagged_responses)
800-
raise self.readonly('%s is not writable' % mailbox)
800+
raise self.readonly('%r is not writable' % (mailbox,))
801801
return typ, self.untagged_responses.get('EXISTS', [None])
802802

803803

@@ -921,7 +921,7 @@ def uid(self, command, *args):
921921
"""
922922
command = command.upper()
923923
if not command in Commands:
924-
raise self.error("Unknown IMAP4 UID command: %s" % command)
924+
raise self.error("Unknown IMAP4 UID command: %r" % (command,))
925925
if self.state not in Commands[command]:
926926
raise self.error("command %s illegal in state %s, "
927927
"only allowed in states %s" %

0 commit comments

Comments
 (0)