Falko Schindler hace 1 año
padre
commit
5c4f260f60
Se han modificado 3 ficheros con 1 adiciones y 17 borrados
  1. 0 13
      nicegui/deprecation.py
  2. 1 1
      nicegui/events.py
  3. 0 3
      nicegui/ui.py

+ 0 - 13
nicegui/deprecation.py

@@ -1,13 +0,0 @@
-import warnings
-from functools import wraps
-
-warnings.simplefilter('always', DeprecationWarning)
-
-
-def deprecated(func: type, old_name: str, new_name: str, issue: int) -> type:
-    @wraps(func)
-    def wrapped(*args, **kwargs):
-        url = f'https://github.com/zauberzeug/nicegui/issues/{issue}'
-        warnings.warn(DeprecationWarning(f'{old_name} is deprecated, use {new_name} instead ({url})'))
-        return func(*args, **kwargs)
-    return wrapped

+ 1 - 1
nicegui/events.py

@@ -23,7 +23,7 @@ class GenericEventArguments(EventArguments):
     def __getitem__(self, key: str) -> Any:
         if key == 'args':
             globals.log.warning('msg["args"] is deprecated, use e.args instead '
-                                '(see https://github.com/zauberzeug/nicegui/pull/1095)')
+                                '(see https://github.com/zauberzeug/nicegui/pull/1095)')  # DEPRECATED
             return self.args
         raise KeyError(key)
 

+ 0 - 3
nicegui/ui.py

@@ -1,5 +1,4 @@
 __all__ = [
-    'deprecated',
     'element',
     'aggrid',
     'audio',
@@ -91,8 +90,6 @@ __all__ = [
     'run_with',
 ]
 
-from . import globals
-from .deprecation import deprecated
 from .element import Element as element
 from .elements.aggrid import AgGrid as aggrid
 from .elements.audio import Audio as audio