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

Function teleportation across Python versions #370

Closed
Jongy opened this issue Jan 27, 2020 · 3 comments · Fixed by #371
Closed

Function teleportation across Python versions #370

Jongy opened this issue Jan 27, 2020 · 3 comments · Fixed by #371
Assignees

Comments

@Jongy
Copy link
Contributor

Jongy commented Jan 27, 2020

I've tried to use teleport_function today (which is one of the most magical, amazing features I've encountered); the server runs on Python 3.8 and the client runs on Python 3.7.

Teleportation fails due to the change in a5f146a.

I was wondering if the lack of cross-support is intentional? It's an easy fix to be backward & forward compatible, I'd be happy to create a PR to support client 3.7 -> server 3.8 and vice versa. (Though, of course there might be bytecode differences. You get a nice SystemError in that case and it's sometimes solvable, so I still find it useful)

@comrumino
Copy link
Collaborator

comrumino commented Jan 29, 2020

The reason the changes made in a5f146a are due to a change made in upstream---pardon my terrible commit message. Of course, I welcome PRs. I only have two sticking points:

  • quality of the work matches the existing code base (i.e. flake8 and reasonable design)
  • unit tests prove the change in behavior (makes my life easier)

If you have any questions along the way, feel free to ask and I'll do my best to be helpful. Thanks a ton!

@Jongy
Copy link
Contributor Author

Jongy commented Jan 29, 2020

Yeah I understand the commit, my wording of "due to ..." was wrong because before your change there wasn't even support for teleportation in 3.8, anyway.

Cool then, I'll work on it and submit a PR.

@comrumino comrumino self-assigned this Jan 29, 2020
Jongy added a commit to Jongy/rpyc that referenced this issue Jan 29, 2020
…< 3.7 and > 3.8

Enables teleportation between e.g Python 3.7 and Python 3.8.
Of course the changed opcodes pose a problem too, but in many cases it just works.

Closes: tomerfiliba-org#370.
@comrumino
Copy link
Collaborator

comrumino commented Jan 30, 2020

Thanks again! As a side note, I did did write some unit tests when reviewing your PR and they're committed at d08cdc7. Then I used docker run --name=alpine-py37 -v $HOME/repo/rpyc:/usr/lib/python3.7/site-packages/rpyc -i -t python:3.7.0b2-alpine /bin/sh to test on 3.7

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 a pull request may close this issue.

2 participants