-
Notifications
You must be signed in to change notification settings - Fork 14
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
fixed problems in #143 #144
Conversation
Thanks! Could you also add test cases? |
Could you please add tests for both improvements you introduced? |
i pushed the last commit to be discussed here i think since the type hint is explicit that no string should be passed, having those two lines is a bit weird |
@aiven-sal we discussed with @amirreza8002 in matrix channel the change in c4de8a5. The current typing of the function does not allow passing a string as Is it okay with you? |
@amirreza8002 the linting has failed. Could you fix it please? EDIT: also the tests have failed |
So it seems that at least there were some users of |
the test fail is for the last commit, I'll adjust the test if the change is approved, sorry about the lint, I'm used to my ide doing it :/ |
My impression (which might be not 100% right) is that many valkey-py functions accept ints and numerical strings interchangeably. This may be not always intentional, but disallowing strings now is a breaking change. I tend to be against breaking changes, but if we do it in a major release I won't oppose it. |
So @amirreza8002 would you please revert the last commit instead of fixing the test? We really don't want to break anything right now |
so do you think, for a major version, other parameters should alow strings, or should we remove the string support? |
I'd personally leave the arguments as they are currently. And we can put a mental note for the next major release to remove string support for |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #144 +/- ##
==========================================
+ Coverage 76.21% 76.22% +0.01%
==========================================
Files 130 130
Lines 33923 33940 +17
==========================================
+ Hits 25854 25871 +17
Misses 8069 8069 ☔ View full report in Codecov by Sentry. |
Hey @amirreza8002 ! Do I understand correctly that the changes are ready for review and to be merged? If so, would you rebase your PR on the top of the current |
hi |
hi |
Hi. |
4fea0e4
to
7a39887
Compare
i hope that fixed it? |
I think it should be fixed now, yes. I've approved the github actions.
AFAIK you can choose the way you want to update the branch. |
Signed-off-by: amirreza <[email protected]>
Signed-off-by: amirreza <[email protected]>
i have some follow up for this, but i think it should be done in another pr |
What do you have in mind? |
i have three things in mind
|
I'm not a Valkey expert, but my understanding is that it only supports the string representations of numbers. But I'll have to double-check that. In general, your questions are valid, but I'd hesitate to change any user experience at this moment. |
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.
The changes now look good to me.
Thanks! And sorry it was a bit painful to land :)
I'm not sure how this effects user xp, but i respect the packages development plans I was just thinking ahead, i don't think I'll be working on it any time soon, probably do some type hints for the time being since I'm doing similar work in django-valkey |
closes #143