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

Commit 3290413

Browse files
author
Release Manager
committed
Trac #30747: Deprecate sage.misc.package functions standard_packages, optional_packages, experimental_packages
These functions are superseded by the more general function `list_packages`. This is also a step toward deprecating all of `sage.misc.package`. URL: https://trac.sagemath.org/30747 Reported by: mkoeppe Ticket author(s): Matthias Koeppe Reviewer(s): John Palmieri
2 parents d312143 + 8ccc157 commit 3290413

File tree

3 files changed

+19
-4
lines changed

3 files changed

+19
-4
lines changed

build/pkgs/configure/checksums.ini

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
tarball=configure-VERSION.tar.gz
2-
sha1=24c85de6c9a1b6ceac8b26b1eeef8d66eefc7fd0
3-
md5=e1b3adb6f13d5731be4f13f1dfed11cc
4-
cksum=2688232296
2+
sha1=67f6206cf84dd6ad7dcfc88c85d8a60fc8cfc804
3+
md5=ea0cbc6181c37d24a0113c1affd0d1dc
4+
cksum=4111744968
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
7194a858ab1eb039fdbdddbfaeee15cccd73d237
1+
344dd08c66028e6e9200d1fef4aa7ef20049eb78

src/sage/misc/package.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -425,9 +425,14 @@ def standard_packages():
425425
426426
sage: from sage.misc.package import standard_packages
427427
sage: installed, not_installed = standard_packages() # optional - build
428+
doctest:...: DeprecationWarning: ...
428429
sage: installed[0], installed[-1] # optional - build
429430
('alabaster', 'zope_interface')
430431
"""
432+
from sage.misc.superseded import deprecation
433+
deprecation(30747,
434+
'the functions standard_packages, optional_packages, experimental_packages'
435+
'are deprecated, use sage.features instead')
431436
pkgs = list_packages('standard', local=True).values()
432437
return (sorted(pkg['name'] for pkg in pkgs if pkg['installed']),
433438
sorted(pkg['name'] for pkg in pkgs if not pkg['installed']))
@@ -454,12 +459,17 @@ def optional_packages():
454459
455460
sage: from sage.misc.package import optional_packages
456461
sage: installed, not_installed = optional_packages() # optional - build
462+
doctest:...: DeprecationWarning: ...
457463
sage: 'beautifulsoup4' in installed+not_installed # optional - build
458464
True
459465
460466
sage: 'beautifulsoup4' in installed # optional - build beautifulsoup4
461467
True
462468
"""
469+
from sage.misc.superseded import deprecation
470+
deprecation(30747,
471+
'the functions standard_packages, optional_packages, experimental_packages'
472+
'are deprecated, use sage.features instead')
463473
pkgs = list_packages('optional', local=True)
464474
pkgs = pkgs.values()
465475
return (sorted(pkg['name'] for pkg in pkgs if pkg['installed']),
@@ -487,7 +497,12 @@ def experimental_packages():
487497
488498
sage: from sage.misc.package import experimental_packages
489499
sage: installed, not_installed = experimental_packages() # optional - build
500+
doctest:...: DeprecationWarning: ...
490501
"""
502+
from sage.misc.superseded import deprecation
503+
deprecation(30747,
504+
'the functions standard_packages, optional_packages, experimental_packages'
505+
'are deprecated, use sage.features instead')
491506
pkgs = list_packages('experimental', local=True).values()
492507
return (sorted(pkg['name'] for pkg in pkgs if pkg['installed']),
493508
sorted(pkg['name'] for pkg in pkgs if not pkg['installed']))

0 commit comments

Comments
 (0)