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
7a573706
Kaydet (Commit)
7a573706
authored
Agu 10, 2016
tarafından
Zachary Ware
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Sade Fark
Closes #27209: Merge with 3.5
üst
ef28f6ad
640b1ca5
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
30 deletions
+29
-30
email.iterators.rst
Doc/library/email.iterators.rst
+5
-5
email.message.rst
Doc/library/email.message.rst
+10
-10
email.policy.rst
Doc/library/email.policy.rst
+14
-15
No files found.
Doc/library/email.iterators.rst
Dosyayı görüntüle @
7a573706
...
...
@@ -50,9 +50,9 @@ The following function has been added as a useful debugging tool. It should
.. testsetup::
>>>
import email
>>>
from email.iterators import _structure
>>> somefile = open('
Lib/test/test_email/data/msg_02.txt')
import email
from email.iterators import _structure
somefile = open('../
Lib/test/test_email/data/msg_02.txt')
.. doctest::
...
...
@@ -74,9 +74,9 @@ The following function has been added as a useful debugging tool. It should
text/plain
text/plain
.. test
set
up::
.. test
clean
up::
>>>
somefile.close()
somefile.close()
Optional *fp* is a file-like object to print the output to. It must be
suitable for Python's :func:`print` function. *level* is used internally.
...
...
Doc/library/email.message.rst
Dosyayı görüntüle @
7a573706
...
...
@@ -602,10 +602,10 @@ Here are the methods of the :class:`Message` class:
.. testsetup::
>>>
from email import message_from_binary_file
>>> with open('
Lib/test/test_email/data/msg_16.txt', 'rb') as f:
...
msg = message_from_binary_file(f)
>>>
from email.iterators import _structure
from email import message_from_binary_file
with open('../
Lib/test/test_email/data/msg_16.txt', 'rb') as f:
msg = message_from_binary_file(f)
from email.iterators import _structure
.. doctest::
...
...
@@ -628,7 +628,7 @@ Here are the methods of the :class:`Message` class:
.. doctest::
>>> for part in msg.walk():
... print(part.get_content_maintype() == 'multipart'
)
,
... print(part.get_content_maintype() == 'multipart',
... part.is_multipart())
True True
False False
...
...
@@ -640,11 +640,11 @@ Here are the methods of the :class:`Message` class:
>>> _structure(msg)
multipart/report
text/plain
message/delivery-status
text/plain
text/plain
message/rfc822
text/plain
message/delivery-status
text/plain
text/plain
message/rfc822
text/plain
Here the ``message`` parts are not ``multiparts``, but they do contain
subparts. ``is_multipart()`` returns ``True`` and ``walk`` descends
...
...
Doc/library/email.policy.rst
Dosyayı görüntüle @
7a573706
...
...
@@ -63,16 +63,15 @@ file on disk and pass it to the system ``sendmail`` program on a Unix system:
.. testsetup::
>>> from unittest import mock
>>> mocker = mock.patch('subprocess.Popen')
>>> m = mocker.start()
>>> proc = mock.MagicMock()
>>> m.return_value = proc
>>> proc.stdin.close.return_value = None
>>> mymsg = open('mymsg.txt', 'w')
>>> mymsg.write('To: abc@xyz.com\n\n')
17
>>> mymsg.flush()
from unittest import mock
mocker = mock.patch('subprocess.Popen')
m = mocker.start()
proc = mock.MagicMock()
m.return_value = proc
proc.stdin.close.return_value = None
mymsg = open('mymsg.txt', 'w')
mymsg.write('To: abc@xyz.com\n\n')
mymsg.flush()
.. doctest::
...
...
@@ -88,12 +87,12 @@ file on disk and pass it to the system ``sendmail`` program on a Unix system:
>>> p.stdin.close()
>>> rc = p.wait()
.. test
set
up::
.. test
clean
up::
>>>
mymsg.close()
>>>
mocker.stop()
>>>
import os
>>>
os.remove('mymsg.txt')
mymsg.close()
mocker.stop()
import os
os.remove('mymsg.txt')
Here we are telling :class:`~email.generator.BytesGenerator` to use the RFC
correct line separator characters when creating the binary string to feed into
...
...
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