Replace _compat.cached_property with functools.cached_property #6395
Labels
good first issue
This issue can be resolved by someone who is not familiar with the codebase. A good starting issue.
kind/health
For CI/testing/release process/refactoring/technical debt items
no QC knowledge needed
Want to contribute to Cirq, but don't know quantum computing? This issue is for you.
triage/discuss
Needs decision / discussion, bring these up during Cirq Cynque
Description of the issue
cirq uses an internal version of cached_property defined here to support earlier versions of Python.
Cirq/cirq-core/cirq/_compat.py
Lines 64 to 67 in d33b1a7
As of #6167 we require Python 3.9 which is guaranteed to have functools.cached_property.
We can therefore replace all instances of
_compat.cached_property
withfunctools.cached_property
and remove thecached_property
definition from the _compat.py.Cirq version
1.4.0 at d33b1a7
The text was updated successfully, but these errors were encountered: