You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
expected result versus actual result
When working on a new Remote Library for Robot Framework (https://github.com/rlehfeld/robotframework-rpycremote) which takes the RPyC functionality into use, I run into several issues and also fixed them on my fork of RPyC. These changes I would like to describe but and if I remember right, I found 4 issues and unfortunately only one has a simple example which I will describe below.
for objects which do not provide a class property, RPyC is not usable. E.g. this is the case for some c-extensions or when it is hidden. (for this problem I will provide a simple example)
Here the problem is within rpyc.lib.get_id_pack
When using Pydantic BaseModel objects, under some not completely understood cicumstances, the rpyc.lib.get_methods fails
There is a race in rpyc.core.protocol.Connection._unbox between the lines:
if id_pack in self._proxy_cache:
proxy = self._proxy_cache[id_pack]
as the garbage collector can and will kick in in between these two lines.
4. While fixing 3. and executing the unit tests I run into the following unrelated issue.
PipeStream and Win32PipeStream are taking ownership of stdin and stdout if from_std is used. When e.g. peer is closing the connection, the stdin and stdout of the python process is closed which can lead to exit code 1.
Further, I would like to say thank you for this super solution. Together with my Robot Framework Remote Library, this is a game changer.
Many thanks
René
Environment
rpyc version
pypy3.10-7.3.15-2.3.10.fc40.x86_64
python version
pypy3.10-7.3.15-2.3.10.fc40.x86_64
python3-3.12.2-2.fc40.x86_64
operating system
Fedora 40
Minimal example for problem 1
Server:
Objects from Dummy class below, cannot be used together with RPyC.
class Dummy:
"""dummy class"""
def __init__(self):
self._value = 1
self.value2 = 5
def __getattribute__(self, attr):
if attr in ('__class__'):
raise AttributeError(f'catched {attr}')
return super().__getattribute__(attr)
@property
def value(self):
"""value getter"""
print('called value getter')
return self._value
@value.setter
def value(self, v):
print('called value setter')
self._value = v
def __call__(self, *args, **kwargs):
"""callable object"""
print(f'called __call__({args}, {kwargs})')
return '__call__'
def method(self, *args, **kwargs):
"""and some callable method"""
print(f'called method({args}, {kwargs})')
return 'method'
The text was updated successfully, but these errors were encountered:
Describe the issue briefly here, including:
When working on a new Remote Library for Robot Framework (https://github.com/rlehfeld/robotframework-rpycremote) which takes the RPyC functionality into use, I run into several issues and also fixed them on my fork of RPyC. These changes I would like to describe but and if I remember right, I found 4 issues and unfortunately only one has a simple example which I will describe below.
Here the problem is within rpyc.lib.get_id_pack
as the garbage collector can and will kick in in between these two lines.
4. While fixing 3. and executing the unit tests I run into the following unrelated issue.
PipeStream and Win32PipeStream are taking ownership of stdin and stdout if from_std is used. When e.g. peer is closing the connection, the stdin and stdout of the python process is closed which can lead to exit code 1.
Further, I would like to say thank you for this super solution. Together with my Robot Framework Remote Library, this is a game changer.
Many thanks
René
Environment
pypy3.10-7.3.15-2.3.10.fc40.x86_64
pypy3.10-7.3.15-2.3.10.fc40.x86_64
python3-3.12.2-2.fc40.x86_64
Fedora 40
Minimal example for problem 1
Server:
Objects from Dummy class below, cannot be used together with RPyC.
The text was updated successfully, but these errors were encountered: