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
3f0ef202
Kaydet (Commit)
3f0ef202
authored
Nis 05, 2009
tarafından
Georg Brandl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
#5471: fix expanduser() for $HOME set to "/".
üst
a7ec0726
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
1 deletion
+8
-1
posixpath.py
Lib/posixpath.py
+1
-1
test_posixpath.py
Lib/test/test_posixpath.py
+5
-0
NEWS
Misc/NEWS
+2
-0
No files found.
Lib/posixpath.py
Dosyayı görüntüle @
3f0ef202
...
...
@@ -262,7 +262,7 @@ def expanduser(path):
except
KeyError
:
return
path
userhome
=
pwent
.
pw_dir
userhome
=
userhome
.
rstrip
(
'/'
)
userhome
=
userhome
.
rstrip
(
'/'
)
or
userhome
return
userhome
+
path
[
i
:]
...
...
Lib/test/test_posixpath.py
Dosyayı görüntüle @
3f0ef202
...
...
@@ -345,6 +345,11 @@ class PosixPathTest(unittest.TestCase):
self
.
assert_
(
isinstance
(
posixpath
.
expanduser
(
"~root/"
),
basestring
))
self
.
assert_
(
isinstance
(
posixpath
.
expanduser
(
"~foo/"
),
basestring
))
orig_home
=
os
.
environ
[
'HOME'
]
os
.
environ
[
'HOME'
]
=
'/'
self
.
assertEqual
(
posixpath
.
expanduser
(
"~"
),
"/"
)
os
.
environ
[
'HOME'
]
=
orig_home
self
.
assertRaises
(
TypeError
,
posixpath
.
expanduser
)
def
test_expandvars
(
self
):
...
...
Misc/NEWS
Dosyayı görüntüle @
3f0ef202
...
...
@@ -212,6 +212,8 @@ Core and Builtins
Library
-------
- Issue 5471: Fix os.path.expanduser() for $HOME set to '/'.
- Issue 1326077: fix the formatting of SyntaxErrors by the traceback module.
- Issue 1726172: fix IndexError in the case of and empty response in ftplib.
...
...
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