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
4a62e897
Kaydet (Commit)
4a62e897
authored
Ara 23, 2010
tarafından
R. David Murray
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
#1155362: allow hh:mm:ss-uuuu like we allow hh:mm:ss+uuuu in parsedate_tz
Original patch by Thomas Herve.
üst
25b8cca6
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
1 deletion
+16
-1
_parseaddr.py
Lib/email/_parseaddr.py
+3
-1
test_email.py
Lib/email/test/test_email.py
+10
-0
NEWS
Misc/NEWS
+3
-0
No files found.
Lib/email/_parseaddr.py
Dosyayı görüntüle @
4a62e897
...
@@ -64,8 +64,10 @@ def parsedate_tz(data):
...
@@ -64,8 +64,10 @@ def parsedate_tz(data):
if
len
(
data
)
==
4
:
if
len
(
data
)
==
4
:
s
=
data
[
3
]
s
=
data
[
3
]
i
=
s
.
find
(
'+'
)
i
=
s
.
find
(
'+'
)
if
i
==
-
1
:
i
=
s
.
find
(
'-'
)
if
i
>
0
:
if
i
>
0
:
data
[
3
:]
=
[
s
[:
i
],
s
[
i
+
1
:]]
data
[
3
:]
=
[
s
[:
i
],
s
[
i
:]]
else
:
else
:
data
.
append
(
''
)
# Dummy tz
data
.
append
(
''
)
# Dummy tz
if
len
(
data
)
<
5
:
if
len
(
data
)
<
5
:
...
...
Lib/email/test/test_email.py
Dosyayı görüntüle @
4a62e897
...
@@ -2277,6 +2277,16 @@ class TestMiscellaneous(TestEmailBase):
...
@@ -2277,6 +2277,16 @@ class TestMiscellaneous(TestEmailBase):
eq
(
utils
.
parsedate_tz
(
'5 Feb 2003 13:47:26 -0800'
),
eq
(
utils
.
parsedate_tz
(
'5 Feb 2003 13:47:26 -0800'
),
(
2003
,
2
,
5
,
13
,
47
,
26
,
0
,
1
,
-
1
,
-
28800
))
(
2003
,
2
,
5
,
13
,
47
,
26
,
0
,
1
,
-
1
,
-
28800
))
def
test_parsedate_no_space_before_positive_offset
(
self
):
self
.
assertEqual
(
utils
.
parsedate_tz
(
'Wed, 3 Apr 2002 14:58:26+0800'
),
(
2002
,
4
,
3
,
14
,
58
,
26
,
0
,
1
,
-
1
,
28800
))
def
test_parsedate_no_space_before_negative_offset
(
self
):
# Issue 1155362: we already handled '+' for this case.
self
.
assertEqual
(
utils
.
parsedate_tz
(
'Wed, 3 Apr 2002 14:58:26-0800'
),
(
2002
,
4
,
3
,
14
,
58
,
26
,
0
,
1
,
-
1
,
-
28800
))
def
test_parsedate_acceptable_to_time_functions
(
self
):
def
test_parsedate_acceptable_to_time_functions
(
self
):
eq
=
self
.
assertEqual
eq
=
self
.
assertEqual
timetup
=
utils
.
parsedate
(
'5 Feb 2003 13:47:26 -0800'
)
timetup
=
utils
.
parsedate
(
'5 Feb 2003 13:47:26 -0800'
)
...
...
Misc/NEWS
Dosyayı görüntüle @
4a62e897
...
@@ -11,6 +11,9 @@ Core and Builtins
...
@@ -11,6 +11,9 @@ Core and Builtins
Library
Library
-------
-------
- Issue #1155362: email.utils.parsedate_tz now handles a missing space before
the '-' of a timezone field as well as before a '+'.
- Issue #4871: The zipfile module now gives a more useful error message if
- Issue #4871: The zipfile module now gives a more useful error message if
an attempt is made to use a string to specify the archive password.
an attempt is made to use a string to specify the archive password.
...
...
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