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

Decorator @cached creates cache with the Cache() factory #568

Conversation

padraic-shafer
Copy link
Contributor

@padraic-shafer padraic-shafer commented Apr 24, 2022

What do these changes do?

Decorator @cached creates cache with the Cache() factory constructor,
instead of the cache-specific constructor.

Are there changes in behavior for the user?

This should be invisible to the end user.

Related issue number

#473: Deprecate using cache specific constructors

Checklist

  • I think the code is well written
  • Unit tests for the changes exist
  • Documentation reflects the changes
  • Add a new news fragment into the CHANGES folder
    • name it <issue_id>.<type> (e.g. 588.bugfix)
    • if you don't have an issue_id change it to the pr id after creating the PR
    • ensure type is one of the following:
      • .feature: Signifying a new feature.
      • .bugfix: Signifying a bug fix.
      • .doc: Signifying a documentation improvement.
      • .removal: Signifying a deprecation or removal of public API.
      • .misc: A ticket has been closed, but it is not of interest to users.
    • Make sure to use full sentences with correct case and punctuation, for example: Fix issue with non-ascii contents in doctest text files.

* See aio-libs#473: Deprecate using cache specific constructors
  * aio-libs#473
  * `Cache` class was introduced as a proxy for instantiating the different
    backends. There should be only one way of doing things and `Cache` is
    the preferred way of doing that so will deprecate the others.
* This is now applied to `cached._get_cache()`
@padraic-shafer
Copy link
Contributor Author

Hi, do you have an feedback for this PR?

@Dreamsorcerer
Copy link
Member

As mentioned in that issue, doesn't look like the deprecation has actually happened yet. But, might as well update this.

@codecov
Copy link

codecov bot commented Dec 30, 2022

Codecov Report

Merging #568 (c17933e) into master (e64ff89) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #568   +/-   ##
=======================================
  Coverage   99.60%   99.60%           
=======================================
  Files          36       36           
  Lines        3560     3560           
  Branches      447      447           
=======================================
  Hits         3546     3546           
  Misses         12       12           
  Partials        2        2           
Flag Coverage Δ
unit 99.57% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
aiocache/decorators.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e64ff89...c17933e. Read the comment docs.

@Dreamsorcerer Dreamsorcerer merged commit 781af66 into aio-libs:master Dec 30, 2022
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.

2 participants