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

reqs: Update cached_property to functools version #2359

Merged
merged 8 commits into from
May 21, 2024
Merged

Conversation

EdCaunt
Copy link
Contributor

@EdCaunt EdCaunt commented Apr 22, 2024

cached_property has been included in functools since Python 3.8. The original cached_property module hasn't had an update since. Since Python 3.7 is officially end-of-life, support can be dropped and we can move to using functools.cached_property throughout the codebase. This PR updates the requirements and all imports accordingly.

@EdCaunt EdCaunt requested a review from FabioLuporini April 22, 2024 13:54
@EdCaunt EdCaunt added the dependencies Pull requests that update a dependency file label Apr 22, 2024
@EdCaunt EdCaunt self-assigned this Apr 22, 2024
@EdCaunt EdCaunt changed the title misc: Update cached_property to functools version reqs: Update cached_property to functools version Apr 22, 2024
Copy link

codecov bot commented Apr 22, 2024

Codecov Report

Attention: Patch coverage is 98.27586% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 86.80%. Comparing base (64b5ebd) to head (c3d8356).

Files Patch % Lines
devito/types/dense.py 90.90% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2359      +/-   ##
==========================================
+ Coverage   86.76%   86.80%   +0.04%     
==========================================
  Files         233      233              
  Lines       43764    43755       -9     
  Branches     8079     8078       -1     
==========================================
+ Hits        37973    37983      +10     
+ Misses       5080     5063      -17     
+ Partials      711      709       -2     

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

@EdCaunt EdCaunt requested a review from georgebisbas April 22, 2024 15:41
@@ -1,7 +1,7 @@
from collections.abc import Iterable

import numpy as np
from cached_property import cached_property
from functools import cached_property
Copy link
Contributor

Choose a reason for hiding this comment

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

This is now a system import so convention throughout is to group it with system import (first group with collection)

.github/workflows/pytest-core-nompi.yml Show resolved Hide resolved
devito/types/dense.py Outdated Show resolved Hide resolved
@EdCaunt EdCaunt force-pushed the cached_property branch 2 times, most recently from 8dad89c to a8ab0a1 Compare April 30, 2024 11:04
@mloubout mloubout force-pushed the cached_property branch 2 times, most recently from e80ec62 to bf5bf11 Compare May 21, 2024 04:37
@mloubout mloubout merged commit 7fca4a8 into master May 21, 2024
31 checks passed
@mloubout mloubout deleted the cached_property branch May 21, 2024 14:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants