Skip to content

Commit bab6954

Browse files
[3.9] gh-77630: Change Charset to charset (GH-92439) (GH-92477)
(cherry picked from commit 8f29318) Co-authored-by: slateny <[email protected]> Automerge-Triggered-By: GH:serhiy-storchaka
1 parent 0cd0d6b commit bab6954

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

Doc/library/email.charset.rst

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -58,17 +58,17 @@ Import this class from the :mod:`email.charset` module.
5858
.. attribute:: header_encoding
5959

6060
If the character set must be encoded before it can be used in an email
61-
header, this attribute will be set to ``Charset.QP`` (for
62-
quoted-printable), ``Charset.BASE64`` (for base64 encoding), or
63-
``Charset.SHORTEST`` for the shortest of QP or BASE64 encoding. Otherwise,
61+
header, this attribute will be set to ``charset.QP`` (for
62+
quoted-printable), ``charset.BASE64`` (for base64 encoding), or
63+
``charset.SHORTEST`` for the shortest of QP or BASE64 encoding. Otherwise,
6464
it will be ``None``.
6565

6666

6767
.. attribute:: body_encoding
6868

6969
Same as *header_encoding*, but describes the encoding for the mail
7070
message's body, which indeed may be different than the header encoding.
71-
``Charset.SHORTEST`` is not allowed for *body_encoding*.
71+
``charset.SHORTEST`` is not allowed for *body_encoding*.
7272

7373

7474
.. attribute:: output_charset
@@ -175,9 +175,9 @@ new entries to the global character set, alias, and codec registries:
175175
*charset* is the input character set, and must be the canonical name of a
176176
character set.
177177

178-
Optional *header_enc* and *body_enc* is either ``Charset.QP`` for
179-
quoted-printable, ``Charset.BASE64`` for base64 encoding,
180-
``Charset.SHORTEST`` for the shortest of quoted-printable or base64 encoding,
178+
Optional *header_enc* and *body_enc* is either ``charset.QP`` for
179+
quoted-printable, ``charset.BASE64`` for base64 encoding,
180+
``charset.SHORTEST`` for the shortest of quoted-printable or base64 encoding,
181181
or ``None`` for no encoding. ``SHORTEST`` is only valid for
182182
*header_enc*. The default is ``None`` for no encoding.
183183

Lib/email/charset.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,8 @@ def add_charset(charset, header_enc=None, body_enc=None, output_charset=None):
112112
charset is the input character set, and must be the canonical name of a
113113
character set.
114114
115-
Optional header_enc and body_enc is either Charset.QP for
116-
quoted-printable, Charset.BASE64 for base64 encoding, Charset.SHORTEST for
115+
Optional header_enc and body_enc is either charset.QP for
116+
quoted-printable, charset.BASE64 for base64 encoding, charset.SHORTEST for
117117
the shortest of qp or base64 encoding, or None for no encoding. SHORTEST
118118
is only valid for header_enc. It describes how message headers and
119119
message bodies in the input charset are to be encoded. Default is no
@@ -185,13 +185,13 @@ class Charset:
185185
186186
header_encoding: If the character set must be encoded before it can be
187187
used in an email header, this attribute will be set to
188-
Charset.QP (for quoted-printable), Charset.BASE64 (for
189-
base64 encoding), or Charset.SHORTEST for the shortest of
188+
charset.QP (for quoted-printable), charset.BASE64 (for
189+
base64 encoding), or charset.SHORTEST for the shortest of
190190
QP or BASE64 encoding. Otherwise, it will be None.
191191
192192
body_encoding: Same as header_encoding, but describes the encoding for the
193193
mail message's body, which indeed may be different than the
194-
header encoding. Charset.SHORTEST is not allowed for
194+
header encoding. charset.SHORTEST is not allowed for
195195
body_encoding.
196196
197197
output_charset: Some character sets must be converted before they can be

0 commit comments

Comments
 (0)