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
4e0f36b1
Kaydet (Commit)
4e0f36b1
authored
Kas 03, 2012
tarafından
Ezio Melotti
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Sade Fark
#16152: merge with 3.3.
üst
76bcff27
fafa8b77
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
1 deletion
+11
-1
test_tokenize.py
Lib/test/test_tokenize.py
+4
-0
tokenize.py
Lib/tokenize.py
+3
-1
ACKS
Misc/ACKS
+1
-0
NEWS
Misc/NEWS
+3
-0
No files found.
Lib/test/test_tokenize.py
Dosyayı görüntüle @
4e0f36b1
...
@@ -1109,6 +1109,10 @@ class TestTokenize(TestCase):
...
@@ -1109,6 +1109,10 @@ class TestTokenize(TestCase):
token
.
NAME
,
token
.
AMPER
,
token
.
NUMBER
,
token
.
NAME
,
token
.
AMPER
,
token
.
NUMBER
,
token
.
RPAR
)
token
.
RPAR
)
def
test_pathological_trailing_whitespace
(
self
):
# See http://bugs.python.org/issue16152
self
.
assertExactTypeEqual
(
'@ '
,
token
.
AT
)
__test__
=
{
"doctests"
:
doctests
,
'decistmt'
:
decistmt
}
__test__
=
{
"doctests"
:
doctests
,
'decistmt'
:
decistmt
}
def
test_main
():
def
test_main
():
...
...
Lib/tokenize.py
Dosyayı görüntüle @
4e0f36b1
...
@@ -162,7 +162,7 @@ ContStr = group(StringPrefix + r"'[^\n'\\]*(?:\\.[^\n'\\]*)*" +
...
@@ -162,7 +162,7 @@ ContStr = group(StringPrefix + r"'[^\n'\\]*(?:\\.[^\n'\\]*)*" +
group
(
"'"
,
r'\\\r?\n'
),
group
(
"'"
,
r'\\\r?\n'
),
StringPrefix
+
r'"[^\n"\\]*(?:\\.[^\n"\\]*)*'
+
StringPrefix
+
r'"[^\n"\\]*(?:\\.[^\n"\\]*)*'
+
group
(
'"'
,
r'\\\r?\n'
))
group
(
'"'
,
r'\\\r?\n'
))
PseudoExtras
=
group
(
r'\\\r?\n'
,
Comment
,
Triple
)
PseudoExtras
=
group
(
r'\\\r?\n
|\Z
'
,
Comment
,
Triple
)
PseudoToken
=
Whitespace
+
group
(
PseudoExtras
,
Number
,
Funny
,
ContStr
,
Name
)
PseudoToken
=
Whitespace
+
group
(
PseudoExtras
,
Number
,
Funny
,
ContStr
,
Name
)
def
_compile
(
expr
):
def
_compile
(
expr
):
...
@@ -555,6 +555,8 @@ def _tokenize(readline, encoding):
...
@@ -555,6 +555,8 @@ def _tokenize(readline, encoding):
if
pseudomatch
:
# scan for tokens
if
pseudomatch
:
# scan for tokens
start
,
end
=
pseudomatch
.
span
(
1
)
start
,
end
=
pseudomatch
.
span
(
1
)
spos
,
epos
,
pos
=
(
lnum
,
start
),
(
lnum
,
end
),
end
spos
,
epos
,
pos
=
(
lnum
,
start
),
(
lnum
,
end
),
end
if
start
==
end
:
continue
token
,
initial
=
line
[
start
:
end
],
line
[
start
]
token
,
initial
=
line
[
start
:
end
],
line
[
start
]
if
(
initial
in
numchars
or
# ordinary number
if
(
initial
in
numchars
or
# ordinary number
...
...
Misc/ACKS
Dosyayı görüntüle @
4e0f36b1
...
@@ -77,6 +77,7 @@ Ulf Bartelt
...
@@ -77,6 +77,7 @@ Ulf Bartelt
Don Bashford
Don Bashford
Pior Bastida
Pior Bastida
Nick Bastin
Nick Bastin
Ned Batchelder
Jeff Bauer
Jeff Bauer
Michael R Bax
Michael R Bax
Anthony Baxter
Anthony Baxter
...
...
Misc/NEWS
Dosyayı görüntüle @
4e0f36b1
...
@@ -91,6 +91,9 @@ Core and Builtins
...
@@ -91,6 +91,9 @@ Core and Builtins
Library
Library
-------
-------
- Issue #16152: fix tokenize to ignore whitespace at the end of the code when
no newline is found. Patch by Ned Batchelder.
- Issue #16284: Prevent keeping unnecessary references to worker functions
- Issue #16284: Prevent keeping unnecessary references to worker functions
in concurrent.futures ThreadPoolExecutor.
in concurrent.futures ThreadPoolExecutor.
...
...
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