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

Migrate to using propcache for property caching #1169

Merged
merged 17 commits into from
Oct 8, 2024
Merged

Conversation

bdraco
Copy link
Member

@bdraco bdraco commented Oct 2, 2024

What do these changes do?

#1070 (comment)
Replaces cached_property with a shared implementation called propcache that will be maintained in a single place for yarl and aiohttp

The propcache package is derived from the property caching code in yarl and has been broken out to avoid maintaining it for multiple projects.

Are there changes in behavior for the user?

The propcache dep is now required

Related issue number

#1070 (comment)

@bdraco bdraco changed the title Migrate to using propcache for property caching DNM: Migrate to using propcache for property caching Oct 2, 2024
docs/index.rst Outdated Show resolved Hide resolved
Copy link

codecov bot commented Oct 2, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.57%. Comparing base (ba2c6f7) to head (0cdbdb9).
Report is 3 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1169      +/-   ##
==========================================
- Coverage   95.62%   95.57%   -0.05%     
==========================================
  Files          30       25       -5     
  Lines        4981     4864     -117     
  Branches      464      443      -21     
==========================================
- Hits         4763     4649     -114     
+ Misses        192      189       -3     
  Partials       26       26              
Flag Coverage Δ
CI-GHA 95.55% <100.00%> (-0.03%) ⬇️
MyPy 42.29% <100.00%> (-0.42%) ⬇️
OS-Linux 99.40% <100.00%> (+<0.01%) ⬆️
OS-Windows 99.47% <100.00%> (+0.09%) ⬆️
OS-macOS 99.09% <100.00%> (+0.07%) ⬆️
Py-3.10.11 98.99% <100.00%> (+0.07%) ⬆️
Py-3.10.15 99.27% <100.00%> (+0.03%) ⬆️
Py-3.11.10 99.27% <100.00%> (+0.03%) ⬆️
Py-3.11.9 98.99% <100.00%> (+0.07%) ⬆️
Py-3.12.6 99.27% <100.00%> (+0.03%) ⬆️
Py-3.13.0-rc.3 99.27% <100.00%> (+0.03%) ⬆️
Py-3.8.10 98.94% <100.00%> (+0.07%) ⬆️
Py-3.8.18 99.22% <100.00%> (+0.03%) ⬆️
Py-3.9.13 98.94% <100.00%> (+0.07%) ⬆️
Py-3.9.20 99.22% <100.00%> (+0.03%) ⬆️
Py-pypy7.3.11 99.28% <100.00%> (+0.14%) ⬆️
Py-pypy7.3.16 99.28% <100.00%> (+0.14%) ⬆️
Py-pypy7.3.17 99.31% <100.00%> (+0.14%) ⬆️
VM-macos-latest 99.09% <100.00%> (+0.07%) ⬆️
VM-ubuntu-latest 99.40% <100.00%> (+<0.01%) ⬆️
VM-windows-latest 99.47% <100.00%> (+0.09%) ⬆️
pytest 99.40% <100.00%> (+<0.01%) ⬆️

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

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

@psf-chronographer psf-chronographer bot added the bot:chronographer:provided There is a change note present in this PR label Oct 5, 2024
@bdraco bdraco changed the title DNM: Migrate to using propcache for property caching Migrate to using propcache for property caching Oct 5, 2024
@bdraco bdraco marked this pull request as ready for review October 5, 2024 22:52
CHANGES/1169.packaging.rst Outdated Show resolved Hide resolved
CHANGES/1169.packaging.rst Outdated Show resolved Hide resolved
requirements/test.txt Outdated Show resolved Hide resolved
yarl/_url.py Outdated Show resolved Hide resolved
yarl/_url.py Outdated Show resolved Hide resolved
docs/index.rst Outdated Show resolved Hide resolved
requirements/test.txt Outdated Show resolved Hide resolved
CHANGES/1169.packaging.rst Outdated Show resolved Hide resolved
requirements/test.txt Outdated Show resolved Hide resolved
setup.cfg Outdated Show resolved Hide resolved
setup.cfg Outdated Show resolved Hide resolved
@bdraco
Copy link
Member Author

bdraco commented Oct 6, 2024

requirements/test.txt Outdated Show resolved Hide resolved
setup.cfg Outdated Show resolved Hide resolved
Copy link
Member

@webknjaz webknjaz left a comment

Choose a reason for hiding this comment

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

FYI, the pre-commit deps are cached until you change them in the config file. So in the future it might make be a need to use pins even.

@bdraco
Copy link
Member Author

bdraco commented Oct 7, 2024

Thanks

@bdraco
Copy link
Member Author

bdraco commented Oct 7, 2024

I need to retest this on production with all the latest one more time before merging.

Then I can do a release.

Maybe tomorrow depending on how much time my day job takes up and how jet lagged I am

@bdraco
Copy link
Member Author

bdraco commented Oct 8, 2024

testing in production passed

@bdraco bdraco merged commit 4f35eda into master Oct 8, 2024
47 of 49 checks passed
@bdraco bdraco deleted the switch_to_propcache branch October 8, 2024 08:12
mamccorm added a commit to wolfi-dev/os that referenced this pull request Oct 8, 2024
Adds a new python package: py3-propcache. The primary reason for adding
this, was due to a new buildtime dependency introduced by the following
(existing) package: #30252.

Theres more info about the buildtime [dependency introduction
here](aio-libs/yarl#1169).

Signed-off-by: Mark McCormick <mark.mccormick@chainguard.dev>
mamccorm added a commit to wolfi-dev/os that referenced this pull request Oct 8, 2024
Package update. This also required introducing a new buildtime
dependency: py3-propcache. See [upstream
commit](aio-libs/yarl#1169) for info on when
this was introduced.

-----

<p align="center">
<img
src="https://raw.githubusercontent.com/wolfi-dev/.github/b535a42419ce0edb3c144c0edcff55a62b8ec1f8/profile/wolfi-logo-light-mode.svg"
/>
</p>

---------

Signed-off-by: wolfi-bot <121097084+wolfi-bot@users.noreply.github.com>
Signed-off-by: Mark McCormick <mark.mccormick@chainguard.dev>
Co-authored-by: wolfi-bot <121097084+wolfi-bot@users.noreply.github.com>
Co-authored-by: Mark McCormick <mark.mccormick@chainguard.dev>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bot:chronographer:provided There is a change note present in this PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants