Skip to content

Commit dcba662

Browse files
committed
The remote procedure call module rpc.py can now access data attributes of
remote registered objects. Changes to these attributes are local, however. M EditorWindow.py M NEWS.txt M PyShell.py M idlever.py M rpc.py M run.py
1 parent f654c1c commit dcba662

6 files changed

Lines changed: 23 additions & 11 deletions

File tree

Lib/idlelib/EditorWindow.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def _find_module(fullname, path=None):
3737
raise ImportError, 'No source for module ' + module.__name__
3838
return file, filename, descr
3939

40-
class EditorWindow:
40+
class EditorWindow(object):
4141
from Percolator import Percolator
4242
from ColorDelegator import ColorDelegator
4343
from UndoDelegator import UndoDelegator
@@ -1297,7 +1297,7 @@ def classifyws(s, tabwidth):
12971297
_tokenize = tokenize
12981298
del tokenize
12991299

1300-
class IndentSearcher:
1300+
class IndentSearcher(object):
13011301

13021302
# .run() chews over the Text widget, looking for a block opener
13031303
# and the stmt following it. Returns a pair,

Lib/idlelib/NEWS.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
What's New in IDLE 1.2a0?
2+
=======================
3+
4+
*Release date: XX-XXX-2005*
5+
6+
- The remote procedure call module rpc.py can now access data attributes of
7+
remote registered objects. Changes to these attributes are local, however.
8+
19
What's New in IDLE 1.1?
210
=======================
311

Lib/idlelib/PyShell.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1186,7 +1186,7 @@ def write(self, s, tags=()):
11861186
if not use_subprocess:
11871187
raise KeyboardInterrupt
11881188

1189-
class PseudoFile:
1189+
class PseudoFile(object):
11901190

11911191
def __init__(self, shell, tags, encoding=None):
11921192
self.shell = shell

Lib/idlelib/idlever.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
IDLE_VERSION = "1.1"
1+
IDLE_VERSION = "1.2a0"

Lib/idlelib/rpc.py

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ def handle_error(self, request, client_address):
121121
response_queue = Queue.Queue(0)
122122

123123

124-
class SocketIO:
124+
class SocketIO(object):
125125

126126
nextseq = 0
127127

@@ -475,7 +475,7 @@ def EOFhook(self):
475475

476476
#----------------- end class SocketIO --------------------
477477

478-
class RemoteObject:
478+
class RemoteObject(object):
479479
# Token mix-in class
480480
pass
481481

@@ -484,7 +484,7 @@ def remoteref(obj):
484484
objecttable[oid] = obj
485485
return RemoteProxy(oid)
486486

487-
class RemoteProxy:
487+
class RemoteProxy(object):
488488

489489
def __init__(self, oid):
490490
self.oid = oid
@@ -533,7 +533,7 @@ def accept(self):
533533
def get_remote_proxy(self, oid):
534534
return RPCProxy(self, oid)
535535

536-
class RPCProxy:
536+
class RPCProxy(object):
537537

538538
__methods = None
539539
__attributes = None
@@ -549,7 +549,11 @@ def __getattr__(self, name):
549549
return MethodProxy(self.sockio, self.oid, name)
550550
if self.__attributes is None:
551551
self.__getattributes()
552-
if not self.__attributes.has_key(name):
552+
if self.__attributes.has_key(name):
553+
value = self.sockio.remotecall(self.oid, '__getattribute__',
554+
(name,), {})
555+
return value
556+
else:
553557
raise AttributeError, name
554558

555559
def __getattributes(self):
@@ -579,7 +583,7 @@ def _getattributes(obj, attributes):
579583
if not callable(attr):
580584
attributes[name] = 1
581585

582-
class MethodProxy:
586+
class MethodProxy(object):
583587

584588
def __init__(self, sockio, oid, name):
585589
self.sockio = sockio

Lib/idlelib/run.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ def decode_interrupthook(self):
270270
thread.interrupt_main()
271271

272272

273-
class Executive:
273+
class Executive(object):
274274

275275
def __init__(self, rpchandler):
276276
self.rpchandler = rpchandler

0 commit comments

Comments
 (0)