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
9ce69672
Kaydet (Commit)
9ce69672
authored
Eyl 27, 2014
tarafından
R David Murray
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
#10510: make distuitls upload/register use HTML standards compliant CRLF.
Patch by Ian Cordasco, approved by Éric Araujo.
üst
3749404b
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
6 deletions
+10
-6
upload.py
Lib/distutils/command/upload.py
+5
-5
test_upload.py
Lib/distutils/tests/test_upload.py
+1
-1
ACKS
Misc/ACKS
+1
-0
NEWS
Misc/NEWS
+3
-0
No files found.
Lib/distutils/command/upload.py
Dosyayı görüntüle @
9ce69672
...
@@ -143,11 +143,11 @@ class upload(PyPIRCCommand):
...
@@ -143,11 +143,11 @@ class upload(PyPIRCCommand):
# Build up the MIME payload for the POST data
# Build up the MIME payload for the POST data
boundary
=
'--------------GHSKFJDLGDS7543FJKLFHRE75642756743254'
boundary
=
'--------------GHSKFJDLGDS7543FJKLFHRE75642756743254'
sep_boundary
=
b
'
\n
--'
+
boundary
.
encode
(
'ascii'
)
sep_boundary
=
b
'
\
r\
n
--'
+
boundary
.
encode
(
'ascii'
)
end_boundary
=
sep_boundary
+
b
'--'
end_boundary
=
sep_boundary
+
b
'--
\r\n
'
body
=
io
.
BytesIO
()
body
=
io
.
BytesIO
()
for
key
,
value
in
data
.
items
():
for
key
,
value
in
data
.
items
():
title
=
'
\n
Content-Disposition: form-data; name="
%
s"'
%
key
title
=
'
\
r\
n
Content-Disposition: form-data; name="
%
s"'
%
key
# handle multiple entries for the same name
# handle multiple entries for the same name
if
type
(
value
)
!=
type
([]):
if
type
(
value
)
!=
type
([]):
value
=
[
value
]
value
=
[
value
]
...
@@ -159,12 +159,12 @@ class upload(PyPIRCCommand):
...
@@ -159,12 +159,12 @@ class upload(PyPIRCCommand):
value
=
str
(
value
)
.
encode
(
'utf-8'
)
value
=
str
(
value
)
.
encode
(
'utf-8'
)
body
.
write
(
sep_boundary
)
body
.
write
(
sep_boundary
)
body
.
write
(
title
.
encode
(
'utf-8'
))
body
.
write
(
title
.
encode
(
'utf-8'
))
body
.
write
(
b
"
\
n
\n
"
)
body
.
write
(
b
"
\
r\n\r
\n
"
)
body
.
write
(
value
)
body
.
write
(
value
)
if
value
and
value
[
-
1
:]
==
b
'
\r
'
:
if
value
and
value
[
-
1
:]
==
b
'
\r
'
:
body
.
write
(
b
'
\n
'
)
# write an extra newline (lurve Macs)
body
.
write
(
b
'
\n
'
)
# write an extra newline (lurve Macs)
body
.
write
(
end_boundary
)
body
.
write
(
end_boundary
)
body
.
write
(
b
"
\n
"
)
body
.
write
(
b
"
\
r\
n
"
)
body
=
body
.
getvalue
()
body
=
body
.
getvalue
()
self
.
announce
(
"Submitting
%
s to
%
s"
%
(
filename
,
self
.
repository
),
log
.
INFO
)
self
.
announce
(
"Submitting
%
s to
%
s"
%
(
filename
,
self
.
repository
),
log
.
INFO
)
...
...
Lib/distutils/tests/test_upload.py
Dosyayı görüntüle @
9ce69672
...
@@ -127,7 +127,7 @@ class uploadTestCase(PyPIRCCommandTestCase):
...
@@ -127,7 +127,7 @@ class uploadTestCase(PyPIRCCommandTestCase):
# what did we send ?
# what did we send ?
headers
=
dict
(
self
.
last_open
.
req
.
headers
)
headers
=
dict
(
self
.
last_open
.
req
.
headers
)
self
.
assertEqual
(
headers
[
'Content-length'
],
'2
087
'
)
self
.
assertEqual
(
headers
[
'Content-length'
],
'2
163
'
)
content_type
=
headers
[
'Content-type'
]
content_type
=
headers
[
'Content-type'
]
self
.
assertTrue
(
content_type
.
startswith
(
'multipart/form-data'
))
self
.
assertTrue
(
content_type
.
startswith
(
'multipart/form-data'
))
self
.
assertEqual
(
self
.
last_open
.
req
.
get_method
(),
'POST'
)
self
.
assertEqual
(
self
.
last_open
.
req
.
get_method
(),
'POST'
)
...
...
Misc/ACKS
Dosyayı görüntüle @
9ce69672
...
@@ -279,6 +279,7 @@ Jason R. Coombs
...
@@ -279,6 +279,7 @@ Jason R. Coombs
Garrett Cooper
Garrett Cooper
Greg Copeland
Greg Copeland
Aldo Cortesi
Aldo Cortesi
Ian Cordasco
David Costanzo
David Costanzo
Scott Cotton
Scott Cotton
Greg Couch
Greg Couch
...
...
Misc/NEWS
Dosyayı görüntüle @
9ce69672
...
@@ -33,6 +33,9 @@ Core and Builtins
...
@@ -33,6 +33,9 @@ Core and Builtins
Library
Library
-------
-------
- Issue #10510: distutils register and upload methods now use HTML standards
compliant CRLF line endings.
- Issue #9850: Fixed macpath.join() for empty first component. Patch by
- Issue #9850: Fixed macpath.join() for empty first component. Patch by
Oleg Oshmyan.
Oleg Oshmyan.
...
...
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