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

NamespacePath: a message compatible "object reference" type #295

Merged
merged 8 commits into from
Jan 30, 2022
Merged

Conversation

goodboy
Copy link
Owner

@goodboy goodboy commented Jan 27, 2022

Discussion in #294 and looking for scrutiny and feedback on how this might play well with our ActorNursery.start_actor(<name>, enable_modules:list[str]) module capability system.

@goodboy goodboy requested a review from guilledk January 27, 2022 18:48
@goodboy goodboy marked this pull request as ready for review January 29, 2022 16:10
@goodboy goodboy mentioned this pull request Jan 29, 2022
1 task
Python 3.9's new object resolver + a `str` is much simpler then mucking
with tuples (and easier to serialize). Include a `.to_tuple()` formatter
since we still are passing the module namespace and function name
separately inside the runtime's message format but in theory we might be
able to simplify this depending on how we would change the support for
`enable_modules:list[str]` in the spawn API.

Thanks to @Fuyukai for pointing `resolve_name()` which I didn't know
about before!

class NamespacePath(str):
'''
A serializeable description of a (function) Python object location
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm maybe update this?

@goodboy goodboy added api experiment Exploratory design and testing labels Jan 30, 2022
@goodboy goodboy merged commit 26bebc4 into master Jan 30, 2022
@goodboy goodboy deleted the nspaths branch January 30, 2022 17:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api experiment Exploratory design and testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants