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
c3636449
Kaydet (Commit)
c3636449
authored
Haz 08, 2016
tarafından
Martin Panter
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #21313: Tolerate truncated buildinfo in sys.version
üst
05837ece
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
3 deletions
+29
-3
platform.py
Lib/platform.py
+10
-3
test_platform.py
Lib/test/test_platform.py
+16
-0
NEWS
Misc/NEWS
+3
-0
No files found.
Lib/platform.py
Dosyayı görüntüle @
c3636449
...
@@ -1314,9 +1314,11 @@ def processor():
...
@@ -1314,9 +1314,11 @@ def processor():
### Various APIs for extracting information from sys.version
### Various APIs for extracting information from sys.version
_sys_version_parser
=
re
.
compile
(
_sys_version_parser
=
re
.
compile
(
r'([\w.+]+)\s*'
r'([\w.+]+)\s*'
# "version<space>"
'
\
(#?([^,]+),
\
s*([
\
w ]+),
\
s*([
\
w :]+)
\
)
\
s*'
r'\(#?([^,]+)'
# "(#buildno"
'
\
[([^
\
]]+)
\
]?'
)
r'(?:,\s*([\w ]*)'
# ", builddate"
r'(?:,\s*([\w :]*))?)?\)\s*'
# ", buildtime)<space>"
r'\[([^\]]+)\]?'
)
# "[compiler]"
_ironpython_sys_version_parser
=
re
.
compile
(
_ironpython_sys_version_parser
=
re
.
compile
(
r'IronPython\s*'
r'IronPython\s*'
...
@@ -1395,6 +1397,8 @@ def _sys_version(sys_version=None):
...
@@ -1395,6 +1397,8 @@ def _sys_version(sys_version=None):
'failed to parse Jython sys.version:
%
s'
%
'failed to parse Jython sys.version:
%
s'
%
repr
(
sys_version
))
repr
(
sys_version
))
version
,
buildno
,
builddate
,
buildtime
,
_
=
match
.
groups
()
version
,
buildno
,
builddate
,
buildtime
,
_
=
match
.
groups
()
if
builddate
is
None
:
builddate
=
''
compiler
=
sys
.
platform
compiler
=
sys
.
platform
elif
"PyPy"
in
sys_version
:
elif
"PyPy"
in
sys_version
:
...
@@ -1417,6 +1421,9 @@ def _sys_version(sys_version=None):
...
@@ -1417,6 +1421,9 @@ def _sys_version(sys_version=None):
version
,
buildno
,
builddate
,
buildtime
,
compiler
=
\
version
,
buildno
,
builddate
,
buildtime
,
compiler
=
\
match
.
groups
()
match
.
groups
()
name
=
'CPython'
name
=
'CPython'
if
builddate
is
None
:
builddate
=
''
elif
buildtime
:
builddate
=
builddate
+
' '
+
buildtime
builddate
=
builddate
+
' '
+
buildtime
if
hasattr
(
sys
,
'subversion'
):
if
hasattr
(
sys
,
'subversion'
):
...
...
Lib/test/test_platform.py
Dosyayı görüntüle @
c3636449
...
@@ -67,6 +67,22 @@ class PlatformTest(unittest.TestCase):
...
@@ -67,6 +67,22 @@ class PlatformTest(unittest.TestCase):
(
'IronPython'
,
'1.0.60816'
,
''
,
''
,
''
,
''
,
'.NET 2.0.50727.42'
)),
(
'IronPython'
,
'1.0.60816'
,
''
,
''
,
''
,
''
,
'.NET 2.0.50727.42'
)),
(
'IronPython 1.0 (1.0.61005.1977) on .NET 2.0.50727.42'
,
(
'IronPython 1.0 (1.0.61005.1977) on .NET 2.0.50727.42'
,
(
'IronPython'
,
'1.0.0'
,
''
,
''
,
''
,
''
,
'.NET 2.0.50727.42'
)),
(
'IronPython'
,
'1.0.0'
,
''
,
''
,
''
,
''
,
'.NET 2.0.50727.42'
)),
(
'2.4.3 (truncation, date, t)
\n
[GCC]'
,
(
'CPython'
,
'2.4.3'
,
''
,
''
,
'truncation'
,
'date t'
,
'GCC'
)),
(
'2.4.3 (truncation, date, )
\n
[GCC]'
,
(
'CPython'
,
'2.4.3'
,
''
,
''
,
'truncation'
,
'date'
,
'GCC'
)),
(
'2.4.3 (truncation, date,)
\n
[GCC]'
,
(
'CPython'
,
'2.4.3'
,
''
,
''
,
'truncation'
,
'date'
,
'GCC'
)),
(
'2.4.3 (truncation, date)
\n
[GCC]'
,
(
'CPython'
,
'2.4.3'
,
''
,
''
,
'truncation'
,
'date'
,
'GCC'
)),
(
'2.4.3 (truncation, d)
\n
[GCC]'
,
(
'CPython'
,
'2.4.3'
,
''
,
''
,
'truncation'
,
'd'
,
'GCC'
)),
(
'2.4.3 (truncation, )
\n
[GCC]'
,
(
'CPython'
,
'2.4.3'
,
''
,
''
,
'truncation'
,
''
,
'GCC'
)),
(
'2.4.3 (truncation,)
\n
[GCC]'
,
(
'CPython'
,
'2.4.3'
,
''
,
''
,
'truncation'
,
''
,
'GCC'
)),
(
'2.4.3 (truncation)
\n
[GCC]'
,
(
'CPython'
,
'2.4.3'
,
''
,
''
,
'truncation'
,
''
,
'GCC'
)),
):
):
# branch and revision are not "parsed", but fetched
# branch and revision are not "parsed", but fetched
# from sys.subversion. Ignore them
# from sys.subversion. Ignore them
...
...
Misc/NEWS
Dosyayı görüntüle @
c3636449
...
@@ -92,6 +92,9 @@ Core and Builtins
...
@@ -92,6 +92,9 @@ Core and Builtins
Library
Library
-------
-------
-
Issue
#
21313
:
Fix
the
"platform"
module
to
tolerate
when
sys
.
version
contains
truncated
build
information
.
-
Issue
#
27211
:
Fix
possible
memory
corruption
in
io
.
IOBase
.
readline
().
-
Issue
#
27211
:
Fix
possible
memory
corruption
in
io
.
IOBase
.
readline
().
-
Issue
#
27114
:
Fix
SSLContext
.
_load_windows_store_certs
fails
with
-
Issue
#
27114
:
Fix
SSLContext
.
_load_windows_store_certs
fails
with
...
...
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