Skip to content

Commit

Permalink
Removed backport of lru_cache
Browse files Browse the repository at this point in the history
  • Loading branch information
crazyscientist committed Sep 4, 2023
1 parent 281119d commit b7e376c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 15 deletions.
2 changes: 1 addition & 1 deletion osctiny/extensions/issues.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
Issues extension
----------------
"""
from functools import lru_cache
import os

from urllib.parse import urljoin

from ..utils.backports import lru_cache
from ..utils.base import ExtensionBase


Expand Down
3 changes: 2 additions & 1 deletion osctiny/extensions/origin.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,13 @@
"""
# pylint: disable=too-many-ancestors,ungrouped-imports
from collections import defaultdict
from functools import lru_cache
import re
from warnings import warn

from yaml import load

from ..utils.backports import lru_cache, cached_property
from ..utils.backports import cached_property
from ..utils.base import ExtensionBase
from ..utils.mapping import LazyOscMappable

Expand Down
16 changes: 3 additions & 13 deletions osctiny/utils/backports.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,11 @@
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. versionadded:: 0.3.0
"""
try:
# pylint: disable=unused-import
from functools import lru_cache
except ImportError:
# Whoever had the grandiose idea to backport this to Python2?
# pylint: disable=unused-argument
def lru_cache(*args, **kwargs):
"""Dummy wrapper"""
def wrapper(fun):
return fun

return wrapper
.. versionchanged:: 0.8.0
Removed function ``lru_cache``
"""
try:
# pylint: disable=unused-import
from functools import cached_property
Expand Down

0 comments on commit b7e376c

Please sign in to comment.