From adf8aaabb84aeb0d6f845f0947682ca75341717a Mon Sep 17 00:00:00 2001 From: Krzysztof Magusiak Date: Thu, 27 Oct 2022 17:26:14 +0200 Subject: [PATCH] Remove deprecated alphaconf.application (#16) --- alphaconf/__init__.py | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/alphaconf/__init__.py b/alphaconf/__init__.py index a82efc1..9ea14c6 100644 --- a/alphaconf/__init__.py +++ b/alphaconf/__init__.py @@ -53,28 +53,6 @@ ####################################### # APPLICATION CONTEXT -# DEPRECATED: reomove application -_application: ContextVar[Application] = ContextVar('application') - - -class DeprecatedWrapper(object): - def __init__(self, obj): - self._wrapped_obj = obj - - def set_internal(self, app): - return self._wrapped_obj.set(app) - - def __getattribute__(self, name): - import warnings - - if name in ('set_internal', '__init__', '_wrapped_obj'): - return object.__getattribute__(self, name) - warnings.warn('alphaconf.application will be removed', DeprecationWarning) - return getattr(self._wrapped_obj, name) - - -application = DeprecatedWrapper(_application) -# END OF DEPRECATION """The current configuration""" configuration: ContextVar[DictConfig] = ContextVar('configuration', default=OmegaConf.create()) """Additional helpers for the application""" @@ -213,7 +191,6 @@ def set_application(app: Application, merge: bool = False): :param app: The application :param merge: Wether to merge the current configuration with the application (default false) """ - application.set_internal(app) config = app.configuration if merge: # merging 2 DictConfig objects