Fix a regression in cache_memoize with Python 3.7.

Review Request #12427 — Created June 30, 2022 and submitted

Information

Djblets
release-3.x

Reviewers

The recent work on the cache_memoize() logic introduced some syntax
that's only compatible with Python 3.8. The code in question tried to
use the yield a, *b syntax to yield a tuple composed of a and the
contents of tuple b. This does not work in Python 3.7.

Instead, we're now using yield (a,) + b, which is the equivalent
behavior.

All unit tests pass on Python 3.7 through 3.10.

Summary ID
Fix a regression in cache_memoize with Python 3.7.
The recent work on the `cache_memoize()` logic introduced some syntax that's only compatible with Python 3.8. The code in question tried to use the `yield a, *b` syntax to yield a tuple composed of `a` and the contents of tuple `b`. This does not work in Python 3.7. Instead, we're now using `yield (a,) + b`, which is the equivalent behavior.
a40abe68eb4cedb5319c26b37cc167378c29aab7
david
  1. Ship It!
  2. 
      
chipx86
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-3.x (b23e420)
Loading...