-
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
Use recommended Redis separator (colon ":") #192
Comments
Thanks for the feedback! This sounds like a valuable change. I'd happily accept a PR making this change. I'll see if I get some free time to do it myself in the future |
Sorry Andrew, I'd be happy to contribute but not an expert on how to do so on github unfortunately :( |
No problem. If want to give it a try, check out https://docs.github.com/en/get-started/quickstart/contributing-to-projects as a guide to get started on forking and PRing on Github. Here is pydantic-aioredis's contributing guide https://github.com/andrewthetechie/pydantic-aioredis/blob/main/CONTRIBUTING.rst which has some documentation that might be helpful too The tl;dr on the process would be:
|
#192 #277 This adds the ability to customize the redis separator and changes the default separator from _%&_ to :. Additionally, it adds a way for a user to add a prefix to the key space we use, to further differentiate their keys. Finally, it fixes a bug with testing where redislite would not shutdown properly and updates the fixtures to work with the newest version of pytest_asyncio. BREAKING CHANGE: This will result in "data loss" for existing models stored in redis due to the change in default separator. To maintain backwards compatbility with 0.7.0 and below, you will need to modify your existing models to set _redis_separator = "_%&_" as a field on them.
#192 #277 This adds the ability to customize the redis separator and changes the default separator from _%&_ to :. Additionally, it adds a way for a user to add a prefix to the key space we use, to further differentiate their keys. Finally, it fixes a bug with testing where redislite would not shutdown properly and updates the fixtures to work with the newest version of pytest_asyncio. BREAKING CHANGE: This will result in "data loss" for existing models stored in redis due to the change in default separator. To maintain backwards compatbility with 0.7.0 and below, you will need to modify your existing models to set _redis_separator = "_%&_" as a field on them.
* feat: redis-separator #192 #277 This adds the ability to customize the redis separator and changes the default separator from _%&_ to :. Additionally, it adds a way for a user to add a prefix to the key space we use, to further differentiate their keys. Finally, it fixes a bug with testing where redislite would not shutdown properly and updates the fixtures to work with the newest version of pytest_asyncio. BREAKING CHANGE: This will result in "data loss" for existing models stored in redis due to the change in default separator. To maintain backwards compatbility with 0.7.0 and below, you will need to modify your existing models to set _redis_separator = "_%&_" as a field on them. * ci: update tests to test new features * ci: update noxfile and requirements for testing * fix: fix for py3.7 and 3.8 * fix: main branch poetry.lock and constraints * fix: fix import order
This feature will be included in the 1.0.0 release once that PR is merged. I'm shooting to have it merged in the next 7 days. |
This feature is included in https://github.com/andrewthetechie/pydantic-aioredis/releases/tag/v1.0.0 which is available in pypi now |
Thank you for maintaining this product!
It would be very convenient to use recommended and generally adopted Redis separator (colon) instead of the current "%&" separator.
This would make most Redis visualization tools automatically group items in the table and thus it would make debugging whole lot easier on large data sets.
This would be a small change in the return parameter of the below function:
return f"{table_name}:{primary_key_value}"
"
The text was updated successfully, but these errors were encountered: