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
74b8d333
Kaydet (Commit)
74b8d333
authored
Tem 11, 2009
tarafından
Amaury Forgeot d'Arc
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
#2622 Import errors in email.message, from a py2app standalone application.
Patch by Mads Kiilerich, Reviewed by Barry Warsaw.
üst
c91cbb94
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
21 additions
and
18 deletions
+21
-18
base64mime.py
Lib/email/base64mime.py
+2
-2
header.py
Lib/email/header.py
+3
-3
message.py
Lib/email/message.py
+2
-2
quoprimime.py
Lib/email/quoprimime.py
+3
-3
test_email_codecs.py
Lib/email/test/test_email_codecs.py
+3
-3
test_email_torture.py
Lib/email/test/test_email_torture.py
+1
-1
test_old_mailbox.py
Lib/test/test_old_mailbox.py
+2
-2
headers.py
Lib/wsgiref/headers.py
+2
-2
NEWS
Misc/NEWS
+3
-0
No files found.
Lib/email/base64mime.py
Dosyayı görüntüle @
74b8d333
...
...
@@ -20,7 +20,7 @@ in To:, From:, Cc:, etc. fields, as well as Subject: lines.
This module does not do the line wrapping or end-of-line character conversion
necessary for proper internationalized headers; it only does dumb encoding and
decoding. To deal with the various line wrapping issues, use the email.
H
eader
decoding. To deal with the various line wrapping issues, use the email.
h
eader
module.
"""
...
...
@@ -167,7 +167,7 @@ def decode(s, convert_eols=None):
This function does not parse a full MIME header value encoded with
base64 (like =?iso-8895-1?b?bmloISBuaWgh?=) -- please use the high
level email.
H
eader class for that functionality.
level email.
h
eader class for that functionality.
"""
if
not
s
:
return
s
...
...
Lib/email/header.py
Dosyayı görüntüle @
74b8d333
...
...
@@ -62,7 +62,7 @@ def decode_header(header):
header, otherwise a lower-case string containing the name of the character
set specified in the encoded string.
An email.
E
rrors.HeaderParseError may be raised when certain decoding error
An email.
e
rrors.HeaderParseError may be raised when certain decoding error
occurs (e.g. a base64 decoding exception).
"""
# If no encoding, just return the header
...
...
@@ -337,8 +337,8 @@ class Header:
# different charsets and/or encodings, and the resulting header will
# accurately reflect each setting.
#
# Each encoding can be email.
U
tils.QP (quoted-printable, for
# ASCII-like character sets like iso-8859-1), email.
U
tils.BASE64
# Each encoding can be email.
u
tils.QP (quoted-printable, for
# ASCII-like character sets like iso-8859-1), email.
u
tils.BASE64
# (Base64, for non-ASCII like character sets like KOI8-R and
# iso-2022-jp), or None (no encoding).
#
...
...
Lib/email/message.py
Dosyayı görüntüle @
74b8d333
...
...
@@ -129,7 +129,7 @@ class Message:
"From ". For more flexibility, use the flatten() method of a
Generator instance.
"""
from
email.
G
enerator
import
Generator
from
email.
g
enerator
import
Generator
fp
=
StringIO
()
g
=
Generator
(
fp
)
g
.
flatten
(
self
,
unixfrom
=
unixfrom
)
...
...
@@ -787,4 +787,4 @@ class Message:
return
[
part
.
get_content_charset
(
failobj
)
for
part
in
self
.
walk
()]
# I.e. def walk(self): ...
from
email.
I
terators
import
walk
from
email.
i
terators
import
walk
Lib/email/quoprimime.py
Dosyayı görüntüle @
74b8d333
...
...
@@ -11,7 +11,7 @@ character set, but that includes some 8-bit characters that are normally not
allowed in email bodies or headers.
Quoted-printable is very space-inefficient for encoding binary files; use the
email.base64
MIME
module for that instead.
email.base64
mime
module for that instead.
This module provides an interface to encode and decode both headers and bodies
with quoted-printable encoding.
...
...
@@ -23,7 +23,7 @@ in To:/From:/Cc: etc. fields, as well as Subject: lines.
This module does not do the line wrapping or end-of-line character
conversion necessary for proper internationalized headers; it only
does dumb encoding and decoding. To deal with the various line
wrapping issues, use the email.
H
eader module.
wrapping issues, use the email.
h
eader module.
"""
__all__
=
[
...
...
@@ -330,7 +330,7 @@ def header_decode(s):
This function does not parse a full MIME header value encoded with
quoted-printable (like =?iso-8895-1?q?Hello_World?=) -- please use
the high level email.
H
eader class for that functionality.
the high level email.
h
eader class for that functionality.
"""
s
=
s
.
replace
(
'_'
,
' '
)
return
re
.
sub
(
r'=\w{2}'
,
_unquote_match
,
s
)
Lib/email/test/test_email_codecs.py
Dosyayı görüntüle @
74b8d333
...
...
@@ -6,9 +6,9 @@ import unittest
from
test.test_support
import
run_unittest
from
email.test.test_email
import
TestEmailBase
from
email.
C
harset
import
Charset
from
email.
H
eader
import
Header
,
decode_header
from
email.
M
essage
import
Message
from
email.
c
harset
import
Charset
from
email.
h
eader
import
Header
,
decode_header
from
email.
m
essage
import
Message
# We're compatible with Python 2.3, but it doesn't have the built-in Asian
# codecs, so we have to skip all these tests.
...
...
Lib/email/test/test_email_torture.py
Dosyayı görüntüle @
74b8d333
...
...
@@ -17,7 +17,7 @@ from test.test_support import TestSkipped
import
email
from
email
import
__file__
as
testfile
from
email.
I
terators
import
_structure
from
email.
i
terators
import
_structure
def
openfile
(
filename
):
from
os.path
import
join
,
dirname
,
abspath
...
...
Lib/test/test_old_mailbox.py
Dosyayı görüntüle @
74b8d333
...
...
@@ -99,11 +99,11 @@ class MaildirTestCase(unittest.TestCase):
def
test_unix_mbox
(
self
):
### should be better!
import
email.
P
arser
import
email.
p
arser
fname
=
self
.
createMessage
(
"cur"
,
True
)
n
=
0
for
msg
in
mailbox
.
PortableUnixMailbox
(
open
(
fname
),
email
.
P
arser
.
Parser
()
.
parse
):
email
.
p
arser
.
Parser
()
.
parse
):
n
+=
1
self
.
assertEqual
(
msg
[
"subject"
],
"Simple Test"
)
self
.
assertEqual
(
len
(
str
(
msg
)),
len
(
FROM_
)
+
len
(
DUMMY_MESSAGE
))
...
...
Lib/wsgiref/headers.py
Dosyayı görüntüle @
74b8d333
"""Manage HTTP Response Headers
Much of this module is red-handedly pilfered from email.
M
essage in the stdlib,
Much of this module is red-handedly pilfered from email.
m
essage in the stdlib,
so portions are Copyright (C) 2001,2002 Python Software Foundation, and were
written by Barry Warsaw.
"""
...
...
@@ -174,7 +174,7 @@ class Headers:
h.add_header('content-disposition', 'attachment', filename='bud.gif')
Note that unlike the corresponding 'email.
M
essage' method, this does
Note that unlike the corresponding 'email.
m
essage' method, this does
*not* handle '(charset, language, value)' tuples: all values must be
strings or None.
"""
...
...
Misc/NEWS
Dosyayı görüntüle @
74b8d333
...
...
@@ -350,6 +350,9 @@ Core and Builtins
Library
-------
- Issue #2622: Fixed an ImportError when importing email.messsage from a
standalone application built with py2exe or py2app.
- Issue #6459: distutils.command.build_ext.get_export_symbols now uses the
"PyInit" prefix, rather than "init".
...
...
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