Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removed backport of lru_cache #143

Merged
merged 1 commit into from
Sep 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading