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
727ba7c6
Kaydet (Commit)
727ba7c6
authored
Kas 08, 2016
tarafından
Serhiy Storchaka
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #28637: No longer use re in site.py.
This makes Python startup from a virtual environment a little faster.
üst
4778e131
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
9 deletions
+4
-9
site.py
Lib/site.py
+4
-9
No files found.
Lib/site.py
Dosyayı görüntüle @
727ba7c6
...
@@ -422,8 +422,6 @@ def enablerlcompleter():
...
@@ -422,8 +422,6 @@ def enablerlcompleter():
sys
.
__interactivehook__
=
register_readline
sys
.
__interactivehook__
=
register_readline
CONFIG_LINE
=
r'^(?P<key>(\w|[-_])+)\s*=\s*(?P<value>.*)\s*$'
def
venv
(
known_paths
):
def
venv
(
known_paths
):
global
PREFIXES
,
ENABLE_USER_SITE
global
PREFIXES
,
ENABLE_USER_SITE
...
@@ -445,19 +443,16 @@ def venv(known_paths):
...
@@ -445,19 +443,16 @@ def venv(known_paths):
]
]
if
candidate_confs
:
if
candidate_confs
:
import
re
config_line
=
re
.
compile
(
CONFIG_LINE
)
virtual_conf
=
candidate_confs
[
0
]
virtual_conf
=
candidate_confs
[
0
]
system_site
=
"true"
system_site
=
"true"
# Issue 25185: Use UTF-8, as that's what the venv module uses when
# Issue 25185: Use UTF-8, as that's what the venv module uses when
# writing the file.
# writing the file.
with
open
(
virtual_conf
,
encoding
=
'utf-8'
)
as
f
:
with
open
(
virtual_conf
,
encoding
=
'utf-8'
)
as
f
:
for
line
in
f
:
for
line
in
f
:
line
=
line
.
strip
()
if
'='
in
line
:
m
=
config_line
.
match
(
line
)
key
,
_
,
value
=
line
.
partition
(
'='
)
if
m
:
key
=
key
.
strip
()
.
lower
()
d
=
m
.
groupdict
()
value
=
value
.
strip
()
key
,
value
=
d
[
'key'
]
.
lower
(),
d
[
'value'
]
if
key
==
'include-system-site-packages'
:
if
key
==
'include-system-site-packages'
:
system_site
=
value
.
lower
()
system_site
=
value
.
lower
()
elif
key
==
'home'
:
elif
key
==
'home'
:
...
...
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