diff --git a/CHANGELOG.md b/CHANGELOG.md index 050135befd..340f4cabba 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,16 @@ All notable changes to `dash` will be documented in this file. This project adheres to [Semantic Versioning](https://semver.org/). +## [2.14.1] - 2023-10-26 + +## Fixed + +- [#2672](https://github.com/plotly/dash/pull/2672) Fix `get_caller_name` in case the source is not available. + +## Changed + +- [#2674](https://github.com/plotly/dash/pull/2674) Raise flask & werkzeug limits to <3.1 + ## [2.14.0] - 2023-10-11 ## Fixed diff --git a/dash/_utils.py b/dash/_utils.py index cd4638e0a9..5b3b1d62e1 100644 --- a/dash/_utils.py +++ b/dash/_utils.py @@ -284,10 +284,10 @@ def parse_version(version): return tuple(int(s) for s in version.split(".")) -def get_caller_name(name: str): +def get_caller_name(): stack = inspect.stack() for s in stack: - for code in s.code_context: - if f"{name}(" in code: - return s.frame.f_locals.get("__name__", "__main__") + if s.function == "": + return s.frame.f_locals.get("__name__", "__main__") + return "__main__" diff --git a/dash/dash.py b/dash/dash.py index 7c0e38487c..08b5ea34c3 100644 --- a/dash/dash.py +++ b/dash/dash.py @@ -396,7 +396,7 @@ def __init__( # pylint: disable=too-many-statements ): _validate.check_obsolete(obsolete) - caller_name = get_caller_name(self.__class__.__name__) + caller_name = None if name else get_caller_name() # We have 3 cases: server is either True (we create the server), False # (defer server creation) or a Flask app instance (we use their server) diff --git a/dash/version.py b/dash/version.py index d0979fd030..e199aa5550 100644 --- a/dash/version.py +++ b/dash/version.py @@ -1 +1 @@ -__version__ = "2.14.0" +__version__ = "2.14.1" diff --git a/requires-install.txt b/requires-install.txt index f69a115de3..b4aed45cd7 100644 --- a/requires-install.txt +++ b/requires-install.txt @@ -1,5 +1,5 @@ -Flask>=1.0.4,<2.3.0 -Werkzeug<2.3.0 +Flask>=1.0.4,<3.1 +Werkzeug<3.1 plotly>=5.0.0 dash_html_components==2.0.0 dash_core_components==2.0.0 @@ -12,4 +12,4 @@ requests retrying ansi2html nest-asyncio -setuptools \ No newline at end of file +setuptools