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

Expose base storage classes #220

Conversation

ewilliamson-patreon
Copy link
Contributor

@ewilliamson-patreon ewilliamson-patreon commented Apr 4, 2024

This Pr exposes the storage base classes on the hishel module. Right now to import these you need to use the private dunder paths i.e. hishel._async._storages.AsyncBaseStorage

After this pr, these will be available at hishel.AsyncBaseStorage

I can see the value in exposing the base class for 2 reasons:

  • Libraries using hishel may want to be able to pass a storage class in a typed way through their library

    • example: we can make githubkit take a storage class instead of hardcoding an in-memory storage
  • Users of hishel may want to make their own custom storage not based on any of the existing classes, so could now extend the base

@ewilliamson-patreon ewilliamson-patreon marked this pull request as ready for review April 4, 2024 15:33
@karpetrosyan
Copy link
Owner

Hi @ewilliamson-patreon!
Thank you for this pr, this change makes perfect sense.

@karpetrosyan
Copy link
Owner

Can we also have a changelog?

@ewilliamson-patreon
Copy link
Contributor Author

Added a changelog entry, modeled it after another expose changelog entry

@karpetrosyan karpetrosyan merged commit b50597b into karpetrosyan:master Apr 4, 2024
6 checks passed
@karpetrosyan karpetrosyan mentioned this pull request Apr 12, 2024
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

2 participants