File tree Expand file tree Collapse file tree
packages/gapic-generator/gapic/schema Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1290,19 +1290,13 @@ def _to_regex(self, path_template: str) -> Pattern:
12901290 return re .compile (f"^{ self ._convert_to_regex (path_template )} $" )
12911291
12921292 # Use caching to avoid repeated computation
1293- # TODO(https://github.com/googleapis/gapic-generator-python/issues/2161):
1294- # Use `@functools.cache` instead of `@functools.lru_cache` once python 3.8 is dropped.
1295- # https://docs.python.org/3/library/functools.html#functools.cache
1296- @functools .lru_cache (maxsize = None )
1293+ @functools .cache
12971294 def to_regex (self ) -> Pattern :
12981295 return self ._to_regex (self .path_template )
12991296
13001297 @property
13011298 # Use caching to avoid repeated computation
1302- # TODO(https://github.com/googleapis/gapic-generator-python/issues/2161):
1303- # Use `@functools.cache` instead of `@functools.lru_cache` once python 3.8 is dropped.
1304- # https://docs.python.org/3/library/functools.html#functools.cache
1305- @functools .lru_cache (maxsize = None )
1299+ @functools .cache
13061300 def key (self ) -> Union [str , None ]:
13071301 if self .path_template == "" :
13081302 return self .field
You can’t perform that action at this time.
0 commit comments