Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix classic RPyC over classic RPyC bug #460

Merged
merged 1 commit into from
Nov 8, 2021

Conversation

tegitsthub1
Copy link
Contributor

@tegitsthub1 tegitsthub1 commented Oct 21, 2021

The implementation of ModuleNamespace's __getattr__ may throw a ModuleNotFoundError when accessing an attribute. This is unexpected behaviour and should be changed to throwing an AttributeError when an attribute is not found (as defined in PEP 562).
This may cause a variety of problems, for example, when trying to connect classic RPyC over RPyc and use any module, you get a ModuleNotFoundError.

In order to reproduce this error, start a slave service on localhost and execute the following code:

rpyc.classic.connect('localhost').modules.rpyc.classic.connect('localhost').modules

The implementation of ModuleNamespace's `__getattr__` may throw a `ModuleNotFoundError` when accessing an attribute. This is unexpected behaviour and should be changed to throwing an AttributeError (per convention).
This may cause a variety of problems, for example, when trying to connect classic RPyC over RPyc and use any module, you get a `ModuleNotFoundError`.
In order to reproduce this error, start a slave service on localhost and execute the following code:
```rpyc.classic.connect('localhost').modules.rpyc.classic.connect('localhost').modules```
@comrumino comrumino merged commit 3a3be78 into tomerfiliba-org:master Nov 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants