-
Notifications
You must be signed in to change notification settings - Fork 178
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
Return default from hash client when using positional argument #354
Merged
Conversation
This file contains 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
jogo
reviewed
Oct 7, 2021
This should probably be changed to "Unreleased". I just put the version
from `pymemcache/__init__.py` there as it looked like this is going to be
the upcoming version.
Joe Gordon ***@***.***> schrieb am Do., 7. Okt. 2021, 22:02:
… ***@***.**** commented on this pull request.
------------------------------
In ChangeLog.rst
<#354 (comment)>:
> @@ -1,6 +1,11 @@
Changelog
=========
+New in version 4.0.0
curious why you think we should do a major version bump for this?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#354 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AACEWL4H5AZARI6GP7FO7NTUFX4FPANCNFSM5FQWDTQA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
jogo
approved these changes
Oct 8, 2021
jparise
reviewed
Oct 11, 2021
When using `HashClient` with `ignore_exc`, `get` would always return `None` if no server is available and the default is passed as a positional argument. The other clients return the default value in this case. An earlier fix only had the desired effect when passing `default` as a keyword argument. Return the default value so `HashClient` behaves like the other clients even when using Fixes another variation of issue pinterest#350
Pankrat
force-pushed
the
fix-default-hash-client
branch
from
October 14, 2021 20:34
eae77f4
to
c2071a9
Compare
jparise
approved these changes
Oct 15, 2021
Thanks @Pankrat! |
@Pankrat Just curious if it's better to keep the function parameters (declaration) consistent and have something like :
as opposed to
|
jparise
pushed a commit
that referenced
this pull request
Feb 20, 2022
When using HashClient with ignore_exc, get would always return None if no server is available and the default is passed as a positional argument. The other clients return the default value in this case. An earlier fix only had the desired effect when passing default as a keyword argument. For example, Django passes the default as a positional argument. Return the default value so HashClient behaves like the other clients.
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.
When using
HashClient
withignore_exc
,get
would always returnNone
if no server is available and the default is passed as apositional argument. The other clients return the default
value in this case. An earlier fix only had the desired effect when
passing
default
as a keyword argument.For example, Django passes the default as a positional argument.
Return the default value so
HashClient
behaves like the otherclients even when using
Fixes another variation of issue #350