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

chore: update to latest Redis (aioredis is deprecated) #2204

Merged
merged 3 commits into from Mar 2, 2024

Conversation

kentbull
Copy link
Contributor

As of Feb 21, 2023 aioredis-py was archived. See the package repo here:
https://github.com/aio-libs-abandoned/aioredis-py

Summary of Changes

A docs update to correct the ASGI doc to use the latest version of Redis and swap the aioredis package for the redis package since aioredis is now included within redis.

Pull Request Checklist

This is just a reminder about the most common mistakes. Please make sure that you tick all appropriate boxes. But please read our contribution guide at least once; it will save you a few review cycles!

If an item doesn't apply to your pull request, check it anyway to make it apparent that there's nothing to do.

  • Applied changes to both WSGI and ASGI code paths and interfaces (where applicable).
  • [X ] Added tests for changed code.
  • [ X] Prefixed code comments with GitHub nick and an appropriate prefix.
  • [ X] Coding style is consistent with the rest of the framework.
  • [ X] Updated documentation for changed code.
    • [X ] Added docstrings for any new classes, functions, or modules.
    • [ X] Updated docstrings for any modifications to existing code.
    • Updated both WSGI and ASGI docs (where applicable).
    • [ X] Added references to new classes, functions, or modules to the relevant RST file under docs/.
    • Updated all relevant supporting documentation files under docs/.
    • A copyright notice is included at the top of any new modules (using your own name or the name of your organization).
    • Changed/added classes/methods/functions have appropriate versionadded, versionchanged, or deprecated directives.
  • Changes (and possible deprecations) have towncrier news fragments under docs/_newsfragments/, with the file name format {issue_number}.{fragment_type}.rst. (Run towncrier --draft to ensure it renders correctly.)

Copy link

codecov bot commented Jan 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (4910dd7) to head (a4221d3).

Additional details and impacted files
@@            Coverage Diff            @@
##            master     #2204   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           62        62           
  Lines         6880      6880           
  Branches      1099      1099           
=========================================
  Hits          6880      6880           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@vytas7 vytas7 changed the title Update to latest Redis - aioredis deprecated chore: update to latest Redis (aioredis is deprecated) Jan 18, 2024
Copy link
Member

@vytas7 vytas7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @kentbull!
Thanks for this [draft] PR! 💯
It looks good for the most of it, just it seems that the CI gate for the tutorial is failing. And one note might need updating (depending on the path that we choose).

You can test the same gate locally as (I've just verified it still works on CPython 3.10):

tox -e asgilook

@@ -747,9 +747,8 @@ implementations for production and testing.
``self.redis_host``. Such a design might prove helpful for apps that
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This note might need to be updated or even removed altogether if it is no longer needed. How can we hook in fakeredis for testing then though? (Monkey-patching or mocking might work too.)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

with the latest update I made the redis_from_url function is still used. I added a wrapper function to config.py to change as little as possible. Monkey patching still works.

As of Feb 21, 2023 aioredis-py was archived. See the package repo
here:
https://github.com/aio-libs-abandoned/aioredis-py
@kentbull
Copy link
Contributor Author

Tests pass, though coverage is not at 100%.

CaselIT
CaselIT previously approved these changes Jan 19, 2024
@vytas7 vytas7 marked this pull request as ready for review March 2, 2024 12:42
Copy link
Member

@vytas7 vytas7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've tweaked your code slightly @kentbull, and retested it manually. Now everything seems to pass and work for me.

@vytas7 vytas7 merged commit dc8d2d4 into falconry:master Mar 2, 2024
37 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants