-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Labels
good first issueThis issue can be resolved by someone who is not familiar with the codebase. A good starting issue.This issue can be resolved by someone who is not familiar with the codebase. A good starting issue.kind/healthFor CI/testing/release process/refactoring/technical debt itemsFor CI/testing/release process/refactoring/technical debt itemsno QC knowledge neededWant to contribute to Cirq, but don't know quantum computing? This issue is for you.Want to contribute to Cirq, but don't know quantum computing? This issue is for you.triage/discussNeeds decision / discussion, bring these up during Cirq CynqueNeeds decision / discussion, bring these up during Cirq Cynque
Description
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
try: | |
from functools import cached_property # pylint: disable=unused-import | |
except ImportError: | |
from backports.cached_property import cached_property # type: ignore[no-redef] |
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
with functools.cached_property
and remove the cached_property
definition from the _compat.py.
Cirq version
1.4.0 at d33b1a7
Metadata
Metadata
Assignees
Labels
good first issueThis issue can be resolved by someone who is not familiar with the codebase. A good starting issue.This issue can be resolved by someone who is not familiar with the codebase. A good starting issue.kind/healthFor CI/testing/release process/refactoring/technical debt itemsFor CI/testing/release process/refactoring/technical debt itemsno QC knowledge neededWant to contribute to Cirq, but don't know quantum computing? This issue is for you.Want to contribute to Cirq, but don't know quantum computing? This issue is for you.triage/discussNeeds decision / discussion, bring these up during Cirq CynqueNeeds decision / discussion, bring these up during Cirq Cynque