From 6369bd703f976f985ae16421d888806a5f08acd7 Mon Sep 17 00:00:00 2001 From: Ken Odegard Date: Fri, 27 May 2022 10:54:33 -0500 Subject: [PATCH] Fix for conda 4.13.0 Python 2.7 removal (#4482) --- conda_build/utils.py | 9 +++++---- news/4482-bugfix-legacy-python-removal | 19 +++++++++++++++++++ 2 files changed, 24 insertions(+), 4 deletions(-) create mode 100644 news/4482-bugfix-legacy-python-removal diff --git a/conda_build/utils.py b/conda_build/utils.py index d76a82e4bb..d5df8f9c65 100644 --- a/conda_build/utils.py +++ b/conda_build/utils.py @@ -2081,10 +2081,11 @@ def linked_data_no_multichannels(prefix): """ from conda.core.prefix_data import PrefixData from conda.models.dist import Dist - pd = PrefixData(prefix) - from conda.common.compat import itervalues - return {Dist.from_string(prefix_record.fn, channel_override=prefix_record.channel.name): - prefix_record for prefix_record in itervalues(pd._prefix_records)} + + return { + Dist.from_string(prec.fn, channel_override=prec.channel.name): prec + for prec in PrefixData(prefix)._prefix_records.values() + } def shutil_move_more_retrying(src, dest, debug_name): diff --git a/news/4482-bugfix-legacy-python-removal b/news/4482-bugfix-legacy-python-removal new file mode 100644 index 0000000000..a0c65cc7a5 --- /dev/null +++ b/news/4482-bugfix-legacy-python-removal @@ -0,0 +1,19 @@ +### Enhancements + +* + +### Bug fixes + +* + +### Deprecations + +* Remove Python 2.7 imports removed in conda 4.13.0. (#4482) + +### Docs + +* + +### Other + +*