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
9ae3f7a1
Kaydet (Commit)
9ae3f7a1
authored
Tem 09, 2012
tarafından
Martin v. Löwis
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #13532: Check that arguments to sys.stdout.write are strings.
üst
44dea9d0
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
3 deletions
+25
-3
NEWS.txt
Lib/idlelib/NEWS.txt
+2
-0
PyShell.py
Lib/idlelib/PyShell.py
+2
-0
run.py
Lib/idlelib/run.py
+21
-3
No files found.
Lib/idlelib/NEWS.txt
Dosyayı görüntüle @
9ae3f7a1
What's New in IDLE 3.2.4?
What's New in IDLE 3.2.4?
=========================
=========================
- Issue #13532: Check that arguments to sys.stdout.write are strings.
- Issue # 12510: Attempt to get certain tool tips no longer crashes IDLE.
- Issue # 12510: Attempt to get certain tool tips no longer crashes IDLE.
Erroneous tool tips have been corrected. Default added for callables.
Erroneous tool tips have been corrected. Default added for callables.
...
...
Lib/idlelib/PyShell.py
Dosyayı görüntüle @
9ae3f7a1
...
@@ -1242,6 +1242,8 @@ class PseudoFile(object):
...
@@ -1242,6 +1242,8 @@ class PseudoFile(object):
self
.
encoding
=
encoding
self
.
encoding
=
encoding
def
write
(
self
,
s
):
def
write
(
self
,
s
):
if
not
isinstance
(
s
,
str
):
raise
TypeError
(
'must be str, not '
+
type
(
s
)
.
__name__
)
self
.
shell
.
write
(
s
,
self
.
tags
)
self
.
shell
.
write
(
s
,
self
.
tags
)
def
writelines
(
self
,
lines
):
def
writelines
(
self
,
lines
):
...
...
Lib/idlelib/run.py
Dosyayı görüntüle @
9ae3f7a1
import
sys
import
sys
import
io
import
linecache
import
linecache
import
time
import
time
import
socket
import
socket
...
@@ -244,6 +245,23 @@ class MyRPCServer(rpc.RPCServer):
...
@@ -244,6 +245,23 @@ class MyRPCServer(rpc.RPCServer):
quitting
=
True
quitting
=
True
thread
.
interrupt_main
()
thread
.
interrupt_main
()
class
_RPCFile
(
io
.
TextIOBase
):
"""Wrapper class for the RPC proxy to typecheck arguments
that may not support pickling."""
def
__init__
(
self
,
rpc
):
super
.
__setattr__
(
self
,
'rpc'
,
rpc
)
def
__getattr__
(
self
,
name
):
return
getattr
(
self
.
rpc
,
name
)
def
__setattr__
(
self
,
name
,
value
):
return
setattr
(
self
.
rpc
,
name
,
value
)
def
write
(
self
,
s
):
if
not
isinstance
(
s
,
str
):
raise
TypeError
(
'must be str, not '
+
type
(
s
)
.
__name__
)
return
self
.
rpc
.
write
(
s
)
class
MyHandler
(
rpc
.
RPCHandler
):
class
MyHandler
(
rpc
.
RPCHandler
):
...
@@ -251,9 +269,9 @@ class MyHandler(rpc.RPCHandler):
...
@@ -251,9 +269,9 @@ class MyHandler(rpc.RPCHandler):
"""Override base method"""
"""Override base method"""
executive
=
Executive
(
self
)
executive
=
Executive
(
self
)
self
.
register
(
"exec"
,
executive
)
self
.
register
(
"exec"
,
executive
)
sys
.
stdin
=
self
.
console
=
self
.
get_remote_proxy
(
"stdin"
)
sys
.
stdin
=
self
.
console
=
_RPCFile
(
self
.
get_remote_proxy
(
"stdin"
)
)
sys
.
stdout
=
self
.
get_remote_proxy
(
"stdout"
)
sys
.
stdout
=
_RPCFile
(
self
.
get_remote_proxy
(
"stdout"
)
)
sys
.
stderr
=
self
.
get_remote_proxy
(
"stderr"
)
sys
.
stderr
=
_RPCFile
(
self
.
get_remote_proxy
(
"stderr"
)
)
# page help() text to shell.
# page help() text to shell.
import
pydoc
# import must be done here to capture i/o binding
import
pydoc
# import must be done here to capture i/o binding
pydoc
.
pager
=
pydoc
.
plainpager
pydoc
.
pager
=
pydoc
.
plainpager
...
...
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