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 @@ -1284,19 +1284,13 @@ def _to_regex(self, path_template: str) -> Pattern:
12841284 return re .compile (f"^{ self ._convert_to_regex (path_template )} $" )
12851285
12861286 # Use caching to avoid repeated computation
1287- # TODO(https://github.com/googleapis/gapic-generator-python/issues/2161):
1288- # Use `@functools.cache` instead of `@functools.lru_cache` once python 3.8 is dropped.
1289- # https://docs.python.org/3/library/functools.html#functools.cache
1290- @functools .lru_cache (maxsize = None )
1287+ @functools .cache
12911288 def to_regex (self ) -> Pattern :
12921289 return self ._to_regex (self .path_template )
12931290
12941291 @property
12951292 # Use caching to avoid repeated computation
1296- # TODO(https://github.com/googleapis/gapic-generator-python/issues/2161):
1297- # Use `@functools.cache` instead of `@functools.lru_cache` once python 3.8 is dropped.
1298- # https://docs.python.org/3/library/functools.html#functools.cache
1299- @functools .lru_cache (maxsize = None )
1293+ @functools .cache
13001294 def key (self ) -> Union [str , None ]:
13011295 if self .path_template == "" :
13021296 return self .field
You can’t perform that action at this time.
0 commit comments