diff --git a/src/bin/sage-list-packages b/src/bin/sage-list-packages index 813b1c0d648..16a6a4ab181 100755 --- a/src/bin/sage-list-packages +++ b/src/bin/sage-list-packages @@ -99,8 +99,8 @@ L.sort(key=lambda pkg: pkg.name) # print (while getting rid of None in versions) for pkg in L: - pkg.installed_version = pkg.installed_version or 'not_installed' - pkg.remote_version = pkg.remote_version or '?' + pkg = pkg._replace(installed_version = pkg.installed_version or 'not_installed', + remote_version = pkg.remote_version or '?') print(format_string.format(**pkg._asdict())) if WARN: print(WARN) diff --git a/src/sage/misc/package.py b/src/sage/misc/package.py index 0d2c2f5818f..d5665f34c3f 100644 --- a/src/sage/misc/package.py +++ b/src/sage/misc/package.py @@ -506,7 +506,7 @@ def standard_packages(): """ from sage.misc.superseded import deprecation deprecation(30747, - 'the functions standard_packages, optional_packages, experimental_packages' + 'the functions standard_packages, optional_packages, experimental_packages ' 'are deprecated, use sage.features instead') pkgs = list_packages('standard', local=True).values() return (sorted(pkg.name for pkg in pkgs if pkg.is_installed()), @@ -543,7 +543,7 @@ def optional_packages(): """ from sage.misc.superseded import deprecation deprecation(30747, - 'the functions standard_packages, optional_packages, experimental_packages' + 'the functions standard_packages, optional_packages, experimental_packages ' 'are deprecated, use sage.features instead') pkgs = list_packages('optional', local=True) pkgs = pkgs.values() @@ -576,7 +576,7 @@ def experimental_packages(): """ from sage.misc.superseded import deprecation deprecation(30747, - 'the functions standard_packages, optional_packages, experimental_packages' + 'the functions standard_packages, optional_packages, experimental_packages ' 'are deprecated, use sage.features instead') pkgs = list_packages('experimental', local=True).values() return (sorted(pkg.name for pkg in pkgs if pkg.is_installed()),