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
dd2245f2
Kaydet (Commit)
dd2245f2
authored
Mar 31, 2006
tarafından
Georg Brandl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Bug #1250170, Patch #1462230: handle socket.gethostname()
failures gracefully
üst
296aef8e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
5 deletions
+17
-5
mimetools.py
Lib/mimetools.py
+4
-1
test_urllib2.py
Lib/test/test_urllib2.py
+10
-4
NEWS
Misc/NEWS
+3
-0
No files found.
Lib/mimetools.py
Dosyayı görüntüle @
dd2245f2
...
@@ -127,7 +127,10 @@ def choose_boundary():
...
@@ -127,7 +127,10 @@ def choose_boundary():
import
time
import
time
if
_prefix
is
None
:
if
_prefix
is
None
:
import
socket
import
socket
hostid
=
socket
.
gethostbyname
(
socket
.
gethostname
())
try
:
hostid
=
socket
.
gethostbyname
(
socket
.
gethostname
())
except
socket
.
gaierror
:
hostid
=
'127.0.0.1'
try
:
try
:
uid
=
repr
(
os
.
getuid
())
uid
=
repr
(
os
.
getuid
())
except
AttributeError
:
except
AttributeError
:
...
...
Lib/test/test_urllib2.py
Dosyayı görüntüle @
dd2245f2
...
@@ -349,13 +349,19 @@ class HandlerTests(unittest.TestCase):
...
@@ -349,13 +349,19 @@ class HandlerTests(unittest.TestCase):
TESTFN
=
test_support
.
TESTFN
TESTFN
=
test_support
.
TESTFN
urlpath
=
sanepathname2url
(
os
.
path
.
abspath
(
TESTFN
))
urlpath
=
sanepathname2url
(
os
.
path
.
abspath
(
TESTFN
))
towrite
=
"hello, world
\n
"
towrite
=
"hello, world
\n
"
for
url
in
[
urls
=
[
"file://localhost
%
s"
%
urlpath
,
"file://localhost
%
s"
%
urlpath
,
"file://
%
s"
%
urlpath
,
"file://
%
s"
%
urlpath
,
"file://
%
s
%
s"
%
(
socket
.
gethostbyname
(
'localhost'
),
urlpath
),
"file://
%
s
%
s"
%
(
socket
.
gethostbyname
(
'localhost'
),
urlpath
),
"file://
%
s
%
s"
%
(
socket
.
gethostbyname
(
socket
.
gethostname
()),
]
urlpath
),
try
:
]:
localaddr
=
socket
.
gethostbyname
(
socket
.
gethostname
())
except
socket
.
gaierror
:
localaddr
=
''
if
localaddr
:
urls
.
append
(
"file://
%
s
%
s"
%
(
localaddr
,
urlpath
))
for
url
in
urls
:
f
=
open
(
TESTFN
,
"wb"
)
f
=
open
(
TESTFN
,
"wb"
)
try
:
try
:
try
:
try
:
...
...
Misc/NEWS
Dosyayı görüntüle @
dd2245f2
...
@@ -485,6 +485,9 @@ Extension Modules
...
@@ -485,6 +485,9 @@ Extension Modules
Library
Library
-------
-------
- Bug #1250170: mimetools now gracefully handles socket.gethostname()
failures gracefully.
- patch #1457316: "setup.py upload" now supports --identity to select the
- patch #1457316: "setup.py upload" now supports --identity to select the
key to be used for signing the uploaded code.
key to be used for signing the uploaded code.
...
...
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