Skip to content
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

Remove _ex_keys mapping #128

Merged
merged 1 commit into from
Mar 22, 2018
Merged

Remove _ex_keys mapping #128

merged 1 commit into from
Mar 22, 2018

Conversation

ticosax
Copy link
Contributor

@ticosax ticosax commented Sep 20, 2016

Because they can get out of sync under python3 since
_dict entries are converted into bytes while _ex_keys aren't
and b'foo' != 'foo' under python 3.

Instead of trying to convert back and forth between bytes and str in different places,
this new implementation stores everything in _dict and
makes sure values and timestamp are always stored together.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.02%) to 98.132% when pulling 0811f2e on ticosax:py3-fix into 4bfc7a2 on jamesls:master.

4 similar comments
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.02%) to 98.132% when pulling 0811f2e on ticosax:py3-fix into 4bfc7a2 on jamesls:master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.02%) to 98.132% when pulling 0811f2e on ticosax:py3-fix into 4bfc7a2 on jamesls:master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.02%) to 98.132% when pulling 0811f2e on ticosax:py3-fix into 4bfc7a2 on jamesls:master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.02%) to 98.132% when pulling 0811f2e on ticosax:py3-fix into 4bfc7a2 on jamesls:master.

@jamesls
Copy link
Owner

jamesls commented Sep 22, 2016

Thanks for the pull request.

Per the contributing guidelines, can you add a test that demonstrates the bug? That way we can verify this fixes the issue and prevent regressions in the future. Thanks.

@ticosax
Copy link
Contributor Author

ticosax commented Sep 26, 2016

The fix is deprecating any test I could provide since I'm removing _ex_keys. and the bug exists because _ex_keys exists. To be honest I started by writing a test, try to fix the bug, then realize it was easier to fix by removing _ex_keys and the test I wrote didn't make sense anymore.
What do you suggest ?

@jdufresne
Copy link
Contributor

I think the test, test_set_existing_key_persists(), added in PR #137 would be one that demonstrates the improvement.

@blueyed
Copy link
Contributor

blueyed commented Jun 26, 2017

@ticosax
Needs to get rebased also.

Because they can get out of sync under python3 since
`_dict` entries are converted into bytes while `_ex_keys` aren't
and ```b'foo' != 'foo'``` under python 3.

Instead of trying to convert back and forth between `bytes` and `str`
in different places, this new implementation stores everything
in `_dict` and makes sure values and timestamp are always stored together.
@ticosax
Copy link
Contributor Author

ticosax commented Jun 27, 2017

thank you @blueyed for the reminder.

@bmerry
Copy link
Collaborator

bmerry commented Nov 10, 2017

I've created a fork called fakenewsredis with a PyPI release to incorporate PRs that aren't getting traction here. I've included this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants