spack/lib/spack/llnl
Massimiliano Culpo b8e3246e89
llnl.util.lang: add classes to help with deprecations (#47279)
* Add a descriptor to have a class level constant

This descriptor helps intercept places where we set a value on instances.
It does not really behave like "const" in C-like languages, but is the
simplest implementation that might still be useful.

* Add a descriptor to deprecate properties/attributes of an object

This descriptor is used as a base class. Derived classes may implement a
factory to return an adaptor to the attribute being deprecated. The
descriptor can either warn, or raise an error, when usage of the deprecated
attribute is intercepted.

---------

Co-authored-by: Harmen Stoppels <me@harmenstoppels.nl>
2024-10-29 19:06:26 +01:00
..
util llnl.util.lang: add classes to help with deprecations (#47279) 2024-10-29 19:06:26 +01:00
__init__.py Update copyright year to 2024 (#41919) 2024-01-02 09:21:30 +01:00
path.py Buildcache/ensure symlinks proper prefix (#43851) 2024-05-10 13:00:40 -05:00
string.py Bugfix/Installer: properly track task queueing (#46293) 2024-10-07 10:42:09 -07:00
url.py strip url: fix whl suffix, remove exe (#43344) 2024-03-25 13:46:09 +01:00