From 73bc82a1886d82574aa8b46a90fb8bc87e67d03f Mon Sep 17 00:00:00 2001 From: Martha Cryan Date: Fri, 7 Feb 2025 15:40:09 -0600 Subject: [PATCH] Remove _plotly_future_ and all references to it --- _plotly_future_/__init__.py | 78 ------------------------- _plotly_future_/extract_chart_studio.py | 0 _plotly_future_/orca_defaults.py | 0 _plotly_future_/remove_deprecations.py | 0 _plotly_future_/renderer_defaults.py | 0 _plotly_future_/template_defaults.py | 0 _plotly_future_/timezones.py | 0 _plotly_future_/trace_uids.py | 0 _plotly_future_/v4.py | 0 _plotly_future_/v4_subplots.py | 0 plotly/api/utils.py | 3 - plotly/api/v1.py | 3 - plotly/api/v2.py | 3 - plotly/config.py | 3 - plotly/dashboard_objs.py | 3 - plotly/grid_objs.py | 3 - plotly/plotly/__init__.py | 3 - plotly/plotly/chunked_requests.py | 3 - plotly/presentation_objs.py | 3 - plotly/session.py | 3 - plotly/widgets.py | 3 - 21 files changed, 111 deletions(-) delete mode 100644 _plotly_future_/__init__.py delete mode 100644 _plotly_future_/extract_chart_studio.py delete mode 100644 _plotly_future_/orca_defaults.py delete mode 100644 _plotly_future_/remove_deprecations.py delete mode 100644 _plotly_future_/renderer_defaults.py delete mode 100644 _plotly_future_/template_defaults.py delete mode 100644 _plotly_future_/timezones.py delete mode 100644 _plotly_future_/trace_uids.py delete mode 100644 _plotly_future_/v4.py delete mode 100644 _plotly_future_/v4_subplots.py delete mode 100644 plotly/api/utils.py delete mode 100644 plotly/api/v1.py delete mode 100644 plotly/api/v2.py delete mode 100644 plotly/config.py delete mode 100644 plotly/dashboard_objs.py delete mode 100644 plotly/grid_objs.py delete mode 100644 plotly/plotly/__init__.py delete mode 100644 plotly/plotly/chunked_requests.py delete mode 100644 plotly/presentation_objs.py delete mode 100644 plotly/session.py delete mode 100644 plotly/widgets.py diff --git a/_plotly_future_/__init__.py b/_plotly_future_/__init__.py deleted file mode 100644 index 3fb7f72b1ca..00000000000 --- a/_plotly_future_/__init__.py +++ /dev/null @@ -1,78 +0,0 @@ -import warnings -import functools - -# Initialize _future_flags with all future flags that are now always in -# effect. -_future_flags = { - "renderer_defaults", - "template_defaults", - "extract_chart_studio", - "remove_deprecations", - "v4_subplots", - "orca_defaults", - "timezones", - "trace_uids", -} - - -def _assert_plotly_not_imported(): - import sys - - if "plotly" in sys.modules: - raise ImportError( - """\ -The _plotly_future_ module must be imported before the plotly module""" - ) - - -warnings.filterwarnings( - "default", ".*?is deprecated, please use chart_studio*", DeprecationWarning -) - - -def _chart_studio_warning(submodule): - warnings.warn( - "The plotly.{submodule} module is deprecated, " - "please use chart_studio.{submodule} instead".format(submodule=submodule), - DeprecationWarning, - stacklevel=2, - ) - - -def _chart_studio_error(submodule): - raise ImportError( - """ -The plotly.{submodule} module is deprecated, -please install the chart-studio package and use the -chart_studio.{submodule} module instead. -""".format( - submodule=submodule - ) - ) - - -def _chart_studio_deprecation(fn): - - fn_name = fn.__name__ - fn_module = fn.__module__ - plotly_name = ".".join(["plotly"] + fn_module.split(".")[1:] + [fn_name]) - chart_studio_name = ".".join( - ["chart_studio"] + fn_module.split(".")[1:] + [fn_name] - ) - - msg = """\ -{plotly_name} is deprecated, please use {chart_studio_name}\ -""".format( - plotly_name=plotly_name, chart_studio_name=chart_studio_name - ) - - @functools.wraps(fn) - def wrapper(*args, **kwargs): - warnings.warn(msg, DeprecationWarning, stacklevel=2) - - return fn(*args, **kwargs) - - return wrapper - - -__all__ = ["_future_flags", "_chart_studio_error"] diff --git a/_plotly_future_/extract_chart_studio.py b/_plotly_future_/extract_chart_studio.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/_plotly_future_/orca_defaults.py b/_plotly_future_/orca_defaults.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/_plotly_future_/remove_deprecations.py b/_plotly_future_/remove_deprecations.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/_plotly_future_/renderer_defaults.py b/_plotly_future_/renderer_defaults.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/_plotly_future_/template_defaults.py b/_plotly_future_/template_defaults.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/_plotly_future_/timezones.py b/_plotly_future_/timezones.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/_plotly_future_/trace_uids.py b/_plotly_future_/trace_uids.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/_plotly_future_/v4.py b/_plotly_future_/v4.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/_plotly_future_/v4_subplots.py b/_plotly_future_/v4_subplots.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/plotly/api/utils.py b/plotly/api/utils.py deleted file mode 100644 index 7a19c52c6f9..00000000000 --- a/plotly/api/utils.py +++ /dev/null @@ -1,3 +0,0 @@ -from _plotly_future_ import _chart_studio_error - -_chart_studio_error("api.utils") diff --git a/plotly/api/v1.py b/plotly/api/v1.py deleted file mode 100644 index 45256933e95..00000000000 --- a/plotly/api/v1.py +++ /dev/null @@ -1,3 +0,0 @@ -from _plotly_future_ import _chart_studio_error - -_chart_studio_error("api.v1") diff --git a/plotly/api/v2.py b/plotly/api/v2.py deleted file mode 100644 index 1bde2ce0946..00000000000 --- a/plotly/api/v2.py +++ /dev/null @@ -1,3 +0,0 @@ -from _plotly_future_ import _chart_studio_error - -_chart_studio_error("api.v2") diff --git a/plotly/config.py b/plotly/config.py deleted file mode 100644 index f611aa70c23..00000000000 --- a/plotly/config.py +++ /dev/null @@ -1,3 +0,0 @@ -from _plotly_future_ import _chart_studio_error - -_chart_studio_error("config") diff --git a/plotly/dashboard_objs.py b/plotly/dashboard_objs.py deleted file mode 100644 index 50aa0e47628..00000000000 --- a/plotly/dashboard_objs.py +++ /dev/null @@ -1,3 +0,0 @@ -from _plotly_future_ import _chart_studio_error - -_chart_studio_error("dashboard_objs") diff --git a/plotly/grid_objs.py b/plotly/grid_objs.py deleted file mode 100644 index c82c8957883..00000000000 --- a/plotly/grid_objs.py +++ /dev/null @@ -1,3 +0,0 @@ -from _plotly_future_ import _chart_studio_error - -_chart_studio_error("grid_objs") diff --git a/plotly/plotly/__init__.py b/plotly/plotly/__init__.py deleted file mode 100644 index 82e48bddb4f..00000000000 --- a/plotly/plotly/__init__.py +++ /dev/null @@ -1,3 +0,0 @@ -from _plotly_future_ import _chart_studio_error - -_chart_studio_error("plotly") diff --git a/plotly/plotly/chunked_requests.py b/plotly/plotly/chunked_requests.py deleted file mode 100644 index 5cab6418a2f..00000000000 --- a/plotly/plotly/chunked_requests.py +++ /dev/null @@ -1,3 +0,0 @@ -from _plotly_future_ import _chart_studio_error - -_chart_studio_error("plotly.chunked_requests") diff --git a/plotly/presentation_objs.py b/plotly/presentation_objs.py deleted file mode 100644 index 9822278c9e6..00000000000 --- a/plotly/presentation_objs.py +++ /dev/null @@ -1,3 +0,0 @@ -from _plotly_future_ import _chart_studio_error - -_chart_studio_error("presentation_objs") diff --git a/plotly/session.py b/plotly/session.py deleted file mode 100644 index 857bf31b30d..00000000000 --- a/plotly/session.py +++ /dev/null @@ -1,3 +0,0 @@ -from _plotly_future_ import _chart_studio_error - -_chart_studio_error("session") diff --git a/plotly/widgets.py b/plotly/widgets.py deleted file mode 100644 index 1d4fa030b85..00000000000 --- a/plotly/widgets.py +++ /dev/null @@ -1,3 +0,0 @@ -from _plotly_future_ import _chart_studio_error - -_chart_studio_error("widgets")