Comments (3)
I started looking into the issue and wanted to clarify a couple of things.
-
Does this issue mean
rez
will drop Python 3.7 compatibility?functools.cached_property
was added in Python 3.8 (docs, StackOverflow). As an alternative, some sort of compatibility layer can be introduced (e.g., use the replacement starting with Python 3.8, and leave the previous implementation for Python 3.7). What is a preferred solution here? -
Do we need to be concerned about
uncache
?functools.cached_property
uncaches a property the same way, by deleting the attribute (docs):The cached value can be cleared by deleting the attribute. This allows the cached_property method to run again.
So my intuition is that whenever
uncache
is called in current solution, it can be reimplemented in the replacement, too.
from rez.
- Does this issue mean rez will drop Python 3.7 compatibility? functools.cached_property was added in Python 3.8 (docs, StackOverflow). As an alternative, some sort of compatibility layer can be introduced (e.g., use the replacement starting with Python 3.8, and leave the previous implementation for Python 3.7). What is a preferred solution here?
We could potentially depend on https://pypi.org/project/backports.cached-property/ for Python 3.7.
- Do we need to be concerned about uncache? functools.cached_property uncaches a property the same way, by deleting the attribute (docs):
From what I see, uncached
is used in two different places (see https://github.com/search?q=repo%3AAcademySoftwareFoundation%2Frez+%2F%5B%5E_+%5Duncache%5C%28%2F&type=code). If we can delete the attribute to uncache, then I guess we could try to use the built-in cached_property.
One thing I'm very concerned about is the speed. cached_property
is used in hot paths. I see a lot more attribute accesses in functools.cached_property than in our version.
from rez.
Thinking about it a little bit more, maybe we don't need to get rid of our implementation. I'd be interested to see if it can provide any speed improvements though.
from rez.
Related Issues (20)
- rez-cp failing due to hardlinks being disabled at destination HOT 4
- 'use_variant_shortlinks' config entry ignore by rez-cp HOT 5
- Error caused by weakly referenced package not specifying version range
- Document plugin settings
- Add "why rez" doc page HOT 2
- REZ_USED_IMPLICIT_PACKAGES tilde expansion on windows HOT 2
- rez-bind os requires arch
- TSC Meeting 2024-04-18 HOT 4
- Alias in powershell error HOT 4
- Add future deprecation notice to rez-bind, particularly the --quickstart option (including documentation warnings)
- "process ID out of range" error when using rez-env from within a Docker container with namespaced PIDs HOT 3
- Rez auto delete rxt temp files make subprocess rez-context faild. HOT 1
- Ephemerals should be available in late binding functions HOT 1
- Add attribute in late bindings to detect when it is run under rez-test
- Feature request: "proxy" packages that support direct editing of files without rebuild HOT 3
- Shell type plugin can resolve incorrectly in rez.system on Linux.
- rez-pkg-cache the case of pachage'name HOT 1
- TSC Meeting 2024-05-16
- Combined packages (multi packages) fail on windows
- Rez use powershell to render houdini will lost $HIP and $F
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rez.