Skip to content
This repository was archived by the owner on Feb 1, 2023. It is now read-only.

Commit 8ccc157

Browse files
author
Matthias Koeppe
committed
sage.misc.package: Deprecate standard_packages, optional_packages, experimental_packages
1 parent 2220595 commit 8ccc157

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

src/sage/misc/package.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -426,9 +426,14 @@ def standard_packages():
426426
427427
sage: from sage.misc.package import standard_packages
428428
sage: installed, not_installed = standard_packages() # optional - build
429+
doctest:...: DeprecationWarning: ...
429430
sage: installed[0], installed[-1] # optional - build
430431
('alabaster', 'zope_interface')
431432
"""
433+
from sage.misc.superseded import deprecation
434+
deprecation(30747,
435+
'the functions standard_packages, optional_packages, experimental_packages'
436+
'are deprecated, use sage.features instead')
432437
pkgs = list_packages('standard', local=True).values()
433438
return (sorted(pkg['name'] for pkg in pkgs if pkg['installed']),
434439
sorted(pkg['name'] for pkg in pkgs if not pkg['installed']))
@@ -455,12 +460,17 @@ def optional_packages():
455460
456461
sage: from sage.misc.package import optional_packages
457462
sage: installed, not_installed = optional_packages() # optional - build
463+
doctest:...: DeprecationWarning: ...
458464
sage: 'beautifulsoup4' in installed+not_installed # optional - build
459465
True
460466
461467
sage: 'beautifulsoup4' in installed # optional - build beautifulsoup4
462468
True
463469
"""
470+
from sage.misc.superseded import deprecation
471+
deprecation(30747,
472+
'the functions standard_packages, optional_packages, experimental_packages'
473+
'are deprecated, use sage.features instead')
464474
pkgs = list_packages('optional', local=True)
465475
pkgs = pkgs.values()
466476
return (sorted(pkg['name'] for pkg in pkgs if pkg['installed']),
@@ -488,7 +498,12 @@ def experimental_packages():
488498
489499
sage: from sage.misc.package import experimental_packages
490500
sage: installed, not_installed = experimental_packages() # optional - build
501+
doctest:...: DeprecationWarning: ...
491502
"""
503+
from sage.misc.superseded import deprecation
504+
deprecation(30747,
505+
'the functions standard_packages, optional_packages, experimental_packages'
506+
'are deprecated, use sage.features instead')
492507
pkgs = list_packages('experimental', local=True).values()
493508
return (sorted(pkg['name'] for pkg in pkgs if pkg['installed']),
494509
sorted(pkg['name'] for pkg in pkgs if not pkg['installed']))

0 commit comments

Comments
 (0)