Skip to content

Commit

Permalink
Use functools.cache 3.8 compatibility shim
Browse files Browse the repository at this point in the history
  • Loading branch information
bswck committed Sep 6, 2024
1 parent 0d8ce86 commit 2a1df8a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pypi.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import jaraco.mongodb.helper
import keyring
import tempora.utc
from jaraco.compat.py38 import cache
from jaraco.context import suppress
from jaraco.functools import apply
from more_itertools import first, one
Expand All @@ -36,7 +37,7 @@
top_8k = 'https://hugovk.github.io/top-pypi-packages/top-pypi-packages-30-days.min.json'


@functools.cache
@cache
def store():
"""
An authenticated, read-write connection to the collection.
Expand All @@ -47,7 +48,7 @@ def store():
return db.distributions


@functools.cache
@cache
def client(username=None):
"""
A client to the database.
Expand Down

0 comments on commit 2a1df8a

Please sign in to comment.