Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
301edfa5
Kaydet (Commit)
301edfa5
authored
Eyl 08, 2016
tarafından
R David Murray
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Add policy keyword to email.generator.DecodedGenerator.
üst
4c483ad5
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
5 deletions
+13
-5
email.generator.rst
Doc/library/email.generator.rst
+3
-3
3.6.rst
Doc/whatsnew/3.6.rst
+4
-0
generator.py
Lib/email/generator.py
+4
-2
NEWS
Misc/NEWS
+2
-0
No files found.
Doc/library/email.generator.rst
Dosyayı görüntüle @
301edfa5
...
...
@@ -234,7 +234,8 @@ except that non-\ :mimetype:`text` parts are not serialized, but are instead
represented in the output stream by a string derived from a template filled
in with information about the part.
.. class:: DecodedGenerator(outfp, mangle_from_=None, maxheaderlen=78, fmt=None)
.. class:: DecodedGenerator(outfp, mangle_from_=None, maxheaderlen=None, \
fmt=None, *, policy=None)
Act like :class:`Generator`, except that for any subpart of the message
passed to :meth:`Generator.flatten`, if the subpart is of main type
...
...
@@ -263,8 +264,7 @@ in with information about the part.
"[Non-text (%(type)s) part of message omitted, filename %(filename)s]"
Optional *_mangle_from_* and *maxheaderlen* are as with the
:class:`Generator` base class, except that the default value for
*maxheaderlen* is ``78`` (the RFC standard default header length).
:class:`Generator` base class.
.. rubric:: Footnotes
...
...
Doc/whatsnew/3.6.rst
Dosyayı görüntüle @
301edfa5
...
...
@@ -531,6 +531,9 @@ the legacy API. (Contributed by R. David Murray in :issue:`24277`.)
The :mod:`email.mime` classes now all accept an optional *policy* keyword.
(Contributed by Berker Peksag in :issue:`27331`.)
The :class:`~email.generator.DecodedGenerator` now supports the *policy*
keyword.
encodings
---------
...
...
@@ -538,6 +541,7 @@ encodings
On Windows, added the ``'oem'`` encoding to use ``CP_OEMCP`` and the ``'ansi'``
alias for the existing ``'mbcs'`` encoding, which uses the ``CP_ACP`` code page.
faulthandler
------------
...
...
Lib/email/generator.py
Dosyayı görüntüle @
301edfa5
...
...
@@ -452,7 +452,8 @@ class DecodedGenerator(Generator):
Like the Generator base class, except that non-text parts are substituted
with a format string representing the part.
"""
def
__init__
(
self
,
outfp
,
mangle_from_
=
None
,
maxheaderlen
=
78
,
fmt
=
None
):
def
__init__
(
self
,
outfp
,
mangle_from_
=
None
,
maxheaderlen
=
None
,
fmt
=
None
,
*
,
policy
=
None
):
"""Like Generator.__init__() except that an additional optional
argument is allowed.
...
...
@@ -474,7 +475,8 @@ class DecodedGenerator(Generator):
[Non-text (
%(type)
s) part of message omitted, filename
%(filename)
s]
"""
Generator
.
__init__
(
self
,
outfp
,
mangle_from_
,
maxheaderlen
)
Generator
.
__init__
(
self
,
outfp
,
mangle_from_
,
maxheaderlen
,
policy
=
policy
)
if
fmt
is
None
:
self
.
_fmt
=
_FMT
else
:
...
...
Misc/NEWS
Dosyayı görüntüle @
301edfa5
...
...
@@ -103,6 +103,8 @@ Core and Builtins
Library
-------
-
email
.
generator
.
DecodedGenerator
now
supports
the
policy
keyword
.
-
Issue
#
28027
:
Remove
undocumented
modules
from
``
Lib
/
plat
-*``:
IN
,
CDROM
,
DLFCN
,
TYPES
,
CDIO
,
and
STROPTS
.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment