-
-
Notifications
You must be signed in to change notification settings - Fork 32
Fixes changes in 3.7 Multiprocessing for Import/Export and dump/restore #106
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
Conversation
lookup the context and pass it into class initalization of the SimpleQueue - for simplification, follow example patterns of importing multiprocessing as mp - multiprocessing.Queue can cause surprising results which are avoided using a queue manager Manager(). See https://docs.python.org/3.7/library/multiprocessing.html - optparse passes in self to the check_existing_file, so set as _ - optparse calls the callback with many more args then originally setup for. - fix env lookup variables which were missed when rebirthdb merged back with rethinkdb
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sawdog Could you please add some tests as well to ensure that this functionality will work on both python2.7.x and python 3.x?
rethinkdb/utils_common.py
Outdated
@@ -207,7 +206,10 @@ def file_contents(opt_str, value): | |||
|
|||
# -- Callbacks | |||
|
|||
def combined_connect_action(value, parser): | |||
def combined_connect_action(obj, opt, value, parser, *args, **kwargs): | |||
"""optparse.takeaction() calls the callback (which this is set as) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 for the comment
@sawdog what’s up with this PR? |
No need for my own review if I contribute as well
@grandquista Although the tests are missing I would like to merge this, due to we will need to refactor the whole code (optparse is buggy and deprecated in favor of argparse). Could you check this please? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall it’s just renaming for newer versions
with open("rethinkdb/version.py", "w") as f: | ||
f.writelines([ | ||
"# Autogenerated version", | ||
"VERSION = {0}".format(VERSION) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs to use repr.
When does this get commited to pypi? |
@Sharpz7 It’s already on PyPi |
It's unclear what's happened with the original pull request, but I was using this to import/export from databases I was running - I see that there's a new bug on that just filed 3 days ago?