Skip to content

Commit

Permalink
Use lru_cache for backward compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
FlorianWilhelm committed Dec 30, 2021
1 parent 8802b18 commit 4702d2b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/pyscaffold/shell.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import shutil
import subprocess
import sys
from functools import cache
from functools import lru_cache
from pathlib import Path
from typing import Callable, Dict, Iterable, Iterator, List, Optional, Union

Expand Down Expand Up @@ -124,7 +124,8 @@ def func_wrapper(*args, **kwargs):
return func_wrapper


@cache
# ToDo: Change this to just `cache` from Python 3.9 on.
@lru_cache(maxsize=None)
def get_git_cmd(**args):
"""Retrieve the git shell command depending on the current platform
Expand Down

0 comments on commit 4702d2b

Please sign in to comment.