Repository: bokeh/bokeh

Issue:
remove f-strings from docstrings
@mattpap  I know we made a few changes around this already but evidently f-strings are not allowed as docstrings (and result in None for `__doc__`) so we should undo them:

https://bugs.python.org/issue28739

```
>>> class foo:
...    f'''{10}'''
...
>>> foo.__doc__ is None
True
```
seems we are stuck with `format_docstring`


Discussion:
> https://bugs.python.org/issue28739

People still call this a simple programming language. Either they should have made this work or throw a syntax error, but they chose the hidden option number three, make it confusing.
Unless you want to do this, I will revert those changes when I have a moment.

Resolving patch:
diff --git a/bokeh/embed/server.py b/bokeh/embed/server.py
--- a/bokeh/embed/server.py
+++ b/bokeh/embed/server.py
@@ -25,6 +25,7 @@
 from ..core.templates import AUTOLOAD_TAG, FILE
 from ..resources import DEFAULT_SERVER_HTTP_URL
 from ..util.serialization import make_id
+from ..util.string import format_docstring
 from .bundle import bundle_for_objs_and_resources
 from .elements import html_page_for_render_items
 from .util import RenderItem
@@ -44,7 +45,7 @@
 #-----------------------------------------------------------------------------
 
 def server_document(url="default", relative_urls=False, resources="default", arguments=None):
-    f''' Return a script tag that embeds content from a Bokeh server.
+    ''' Return a script tag that embeds content from a Bokeh server.
 
     Bokeh apps embedded using these methods will NOT set the browser window title.
 
@@ -105,7 +106,7 @@ def server_document(url="default", relative_urls=False, resources="default", arg
     return tag
 
 def server_session(model=None, session_id=None, url="default", relative_urls=False, resources="default"):
-    f''' Return a script tag that embeds content from a specific existing session on
+    ''' Return a script tag that embeds content from a specific existing session on
     a Bokeh server.
 
     This function is typically only useful for serving from a a specific session
@@ -360,3 +361,6 @@ def _src_path(url, elementid):
 #-----------------------------------------------------------------------------
 # Code
 #-----------------------------------------------------------------------------
+
+server_document.__doc__ = format_docstring(server_document.__doc__, DEFAULT_SERVER_HTTP_URL=DEFAULT_SERVER_HTTP_URL)
+server_session.__doc__ = format_docstring(server_session.__doc__, DEFAULT_SERVER_HTTP_URL=DEFAULT_SERVER_HTTP_URL)
diff --git a/bokeh/server/tornado.py b/bokeh/server/tornado.py
--- a/bokeh/server/tornado.py
+++ b/bokeh/server/tornado.py
@@ -33,6 +33,7 @@
 from ..resources import Resources
 from ..settings import settings
 from ..util.dependencies import import_optional
+from ..util.string import format_docstring
 from .auth_provider import NullAuth
 from .connection import ServerConnection
 from .contexts import ApplicationContext
@@ -60,7 +61,7 @@
 #-----------------------------------------------------------------------------
 
 class BokehTornado(TornadoApplication):
-    f''' A Tornado Application used to implement the Bokeh Server.
+    ''' A Tornado Application used to implement the Bokeh Server.
 
     Args:
         applications (dict[str,Application] or Application) :
@@ -587,3 +588,13 @@ def _keep_alive(self):
 #-----------------------------------------------------------------------------
 # Code
 #-----------------------------------------------------------------------------
+
+BokehTornado.__doc__ = format_docstring(
+    BokehTornado.__doc__,
+    DEFAULT_CHECK_UNUSED_MS=DEFAULT_CHECK_UNUSED_MS,
+    DEFAULT_KEEP_ALIVE_MS=DEFAULT_KEEP_ALIVE_MS,
+    DEFAULT_MEM_LOG_FREQ_MS=DEFAULT_MEM_LOG_FREQ_MS,
+    DEFAULT_STATS_LOG_FREQ_MS=DEFAULT_STATS_LOG_FREQ_MS,
+    DEFAULT_UNUSED_LIFETIME_MS=DEFAULT_UNUSED_LIFETIME_MS,
+    DEFAULT_WEBSOCKET_MAX_MESSAGE_SIZE_BYTES=DEFAULT_WEBSOCKET_MAX_MESSAGE_SIZE_BYTES,
+)


Test patch: