-
Notifications
You must be signed in to change notification settings - Fork 4
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
Updated yaml code to support 5.1 #35
Conversation
'Programming Language :: Python :: 3.7', | ||
], | ||
keywords='communication messaging rpc broadcast', | ||
install_requires=[ |
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.
While we're at it, do you want to specify python_requires
here? This allows pip
to install the correct version once support for a specific Python version is dropped (but needs to be in a release before it is dropped).
See e.g.: aiidateam/aiida-core#3574
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.
Done
kiwipy/rmq/defaults.py
Outdated
@@ -18,4 +18,4 @@ | |||
TASK_PREFETCH_COUNT = 0 | |||
|
|||
ENCODER = partial(yaml.dump, encoding='utf-8') | |||
DECODER = yaml.load | |||
DECODER = lambda _: yaml.load(_, Loader=yaml.Loader) |
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.
Since the value of _
is actually used, maybe it should be named? Keeping with the naming from pyyaml
, it would be lambda stream: yaml.load(stream, Loader=yaml.Loader)
.
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.
Or better yet, same as above: partial(yaml.load, Loader=yaml.Loader)
. Totally bike-shedding here though, feel free to merge whenever.
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.
Haha, yes, talk about not looking at the line above!
kiwipy/rmq/defaults.py
Outdated
@@ -18,4 +18,4 @@ | |||
TASK_PREFETCH_COUNT = 0 | |||
|
|||
ENCODER = partial(yaml.dump, encoding='utf-8') | |||
DECODER = yaml.load | |||
DECODER = lambda _: yaml.load(_, Loader=yaml.Loader) |
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.
Or better yet, same as above: partial(yaml.load, Loader=yaml.Loader)
. Totally bike-shedding here though, feel free to merge whenever.
21e7344
to
e711a2f
Compare
Had to pin prospector at <1.1.7 which has problems with pylint, see: pylint-dev/pylint-plugin-utils#12 Also took opportunity to up pika to 1.0 and above.
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.
PR'ing all the way up!
Had to pin prospector at <1.1.7 which has problems with pylint, see:
pylint-dev/pylint-plugin-utils#12
Also took opportunity to up pika to 1.0 and above.