Fix a regression in cache_memoize with Python 3.7.
Review Request #12427 — Created June 30, 2022 and submitted — Latest diff uploaded
Information | |
---|---|
chipx86 | |
Djblets | |
release-3.x | |
Reviewers | |
djblets | |
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 theyield a, *b
syntax to yield a tuple composed ofa
and the
contents of tupleb
. 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.