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
66f8c43b
Kaydet (Commit)
66f8c43b
authored
Haz 09, 2009
tarafından
Amaury Forgeot d'Arc
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
#5924: on Windows, a large PYTHONPATH (more than 255 chars) was completely ignored.
Will backport to 3.0.
üst
5b4a54c5
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
3 deletions
+21
-3
test_cmd_line.py
Lib/test/test_cmd_line.py
+10
-0
NEWS
Misc/NEWS
+3
-0
getpathp.c
PC/getpathp.c
+8
-3
No files found.
Lib/test/test_cmd_line.py
Dosyayı görüntüle @
66f8c43b
...
...
@@ -171,6 +171,16 @@ class CmdLineTest(unittest.TestCase):
self
.
assertEqual
(
rc
,
0
)
self
.
assert_
(
data
.
startswith
(
b
'x'
),
data
)
def
test_large_PYTHONPATH
(
self
):
with
test
.
support
.
EnvironmentVarGuard
()
as
env
:
path1
=
"ABCDE"
*
100
path2
=
"FGHIJ"
*
100
env
[
'PYTHONPATH'
]
=
path1
+
os
.
pathsep
+
path2
p
=
_spawn_python
(
'-S'
,
'-c'
,
'import sys; print(sys.path)'
)
stdout
,
_
=
p
.
communicate
()
self
.
assert_
(
path1
.
encode
(
'ascii'
)
in
stdout
)
self
.
assert_
(
path2
.
encode
(
'ascii'
)
in
stdout
)
def
test_main
():
test
.
support
.
run_unittest
(
CmdLineTest
)
...
...
Misc/NEWS
Dosyayı görüntüle @
66f8c43b
...
...
@@ -12,6 +12,9 @@ What's New in Python 3.1 Release Candidate 2?
Core and Builtins
-----------------
- Issue #5924: On Windows, a large PYTHONPATH environment variable
(more than 255 characters) would be completely ignored.
- Issue #4547: When debugging a very large function, it was not always
possible to update the lineno attribute of the current frame.
...
...
PC/getpathp.c
Dosyayı görüntüle @
66f8c43b
...
...
@@ -424,8 +424,6 @@ calculate_path(void)
wchar_t
*
buf
;
size_t
bufsz
;
wchar_t
*
pythonhome
=
Py_GetPythonHome
();
char
*
_envpath
=
Py_GETENV
(
"PYTHONPATH"
);
wchar_t
wenvpath
[
MAXPATHLEN
+
1
];
wchar_t
*
envpath
=
NULL
;
#ifdef MS_WINDOWS
...
...
@@ -434,13 +432,20 @@ calculate_path(void)
wchar_t
*
userpath
=
NULL
;
wchar_t
zip_path
[
MAXPATHLEN
+
1
];
size_t
len
;
#endif
if
(
!
Py_IgnoreEnvironmentFlag
)
{
envpath
=
_wgetenv
(
L"PYTHONPATH"
);
}
#else
char
*
_envpath
=
Py_GETENV
(
"PYTHONPATH"
);
wchar_t
wenvpath
[
MAXPATHLEN
+
1
];
if
(
_envpath
)
{
size_t
r
=
mbstowcs
(
wenvpath
,
_envpath
,
MAXPATHLEN
+
1
);
envpath
=
wenvpath
;
if
(
r
==
(
size_t
)
-
1
||
r
>=
MAXPATHLEN
)
envpath
=
NULL
;
}
#endif
get_progpath
();
/* progpath guaranteed \0 terminated in MAXPATH+1 bytes. */
...
...
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