From: dirkf Date: Thu, 6 Apr 2023 13:11:18 +0000 (+0100) Subject: [core] Avoid deepcopy of ctx dict (fix f35b757) X-Git-Url: http://git.oshgnacknak.de/?a=commitdiff_plain;h=d6ae3b77cd50083ef245c28f904ee0b70a77d5c6;p=youtube-dl [core] Avoid deepcopy of ctx dict (fix f35b757) * may now contain `LazyList`s * resolves #31999 --- diff --git a/youtube_dl/YoutubeDL.py b/youtube_dl/YoutubeDL.py index bcf781744..2c0d4926c 100755 --- a/youtube_dl/YoutubeDL.py +++ b/youtube_dl/YoutubeDL.py @@ -1399,7 +1399,7 @@ class YoutubeDL(object): filters = [self._build_format_filter(f) for f in selector.filters] def final_selector(ctx): - ctx_copy = copy.deepcopy(ctx) + ctx_copy = dict(ctx) for _filter in filters: ctx_copy['formats'] = list(filter(_filter, ctx_copy['formats'])) return selector_function(ctx_copy)