Skip to content

Commit

Permalink
Fix compatibility with old Python
Browse files Browse the repository at this point in the history
functools.cache is new in python 3.9
  • Loading branch information
mvdbeek committed Aug 17, 2023
1 parent b6fec9b commit 4a9999c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/galaxy/util/rst_to_html.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def write(self, str):
self.log_.warning(str)


@functools.cache
@functools.lru_cache(maxsize=None)
def get_publisher(error=False):
docutils_writer = docutils.writers.html4css1.Writer()
docutils_template_path = os.path.join(os.path.dirname(__file__), "docutils_template.txt")
Expand Down Expand Up @@ -57,7 +57,7 @@ def get_publisher(error=False):
return pub


@functools.cache
@functools.lru_cache(maxsize=None)
def rst_to_html(s, error=False):
if docutils is None:
raise Exception("Attempted to use rst_to_html but docutils unavailable.")
Expand Down

0 comments on commit 4a9999c

Please sign in to comment.