Migrate jsonrpclib to maintained fork and sync interfaces to current API - #596
Open
jonasbardino wants to merge 6 commits into
Open
Migrate jsonrpclib to maintained fork and sync interfaces to current API#596jonasbardino wants to merge 6 commits into
jonasbardino wants to merge 6 commits into
Conversation
…s to current API and reuse more from xmlrpcX example scripts.
…also just works now.
jonasbardino
marked this pull request as ready for review
July 16, 2026 10:05
…d enable reuse in the `xmlrpc.client.ServerProxy` calls like we do in #595 now.
Martin-Rehr
reviewed
Jul 29, 2026
| key_pw = self.conf.get('password', None) | ||
| cacert = None | ||
| if conf['cacertfile'] and conf['cacertfile'] != 'AUTO': | ||
| if self.conf['cacertfile'] and self.conf['cacertfile'] != 'AUTO': |
Contributor
There was a problem hiding this comment.
if 'cacertfile' in self.conf and self.conf['cacertfile'] != 'AUTO': ?
Martin-Rehr
reviewed
Jul 29, 2026
| print("cat as text file") | ||
| (inlist, retval) = server.cat({"path": path_list, "flags": "v"}) | ||
| print('cat status: %s' % retval) | ||
| if returnval != 0: |
Contributor
There was a problem hiding this comment.
Missing (returnval, returnmsg) = retval ?
Martin-Rehr
reviewed
Jul 29, 2026
| if 'file_output' == entry['object_type']: | ||
| print(''.join([i for i in entry['lines']])) | ||
| print('cat status: %s' % retval) | ||
| if returnval != 0: |
Contributor
There was a problem hiding this comment.
Missing (returnval, returnmsg) = retval ?
Martin-Rehr
reviewed
Jul 29, 2026
| jsonrpc.SafeTransport.__init__(self) | ||
| self.conf.update(conf) | ||
| jsonrpc.SafeTransport.__init__(self, config=config, context=context) | ||
| if conf: |
Contributor
There was a problem hiding this comment.
With the current setup every instance shares one conf dict, so a second transport inherits (and overwrites) the first.
To ensure a unique conf for each instance set conf = None at class level and init self.conf using:
self.conf = dict(conf or {})
Martin-Rehr
reviewed
Jul 29, 2026
| host = None | ||
| ssl_ctx = None | ||
| _connection = None | ||
| conf = {} |
Contributor
There was a problem hiding this comment.
conf = None
(see suggestion below)
Martin-Rehr
approved these changes
Jul 29, 2026
Martin-Rehr
left a comment
Contributor
There was a problem hiding this comment.
Approved when comments are addressed
jonasbardino
added a commit
to ucphhpc/docker-migrid
that referenced
this pull request
Jul 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Migrate our
jsonrpclibdependency for themig/cgi-bin/jsonrpcinterface.pybackend andmig/user/jsonrpcsslclient.pyexample to the actively maintainedjsonrpclib-pelixfork and sync interfaces to current API.Polish and reuse more from xmlrpcX example scripts in lockstep with #595. Also includes the
mig/shared/rpcfunctions.pyserver-side fixes from there so there's a bit of overlap.NB: a similar jsonrpclib switch to jsonrpclib-pelix is needed in the docker-migrid Dockerfile.