Skip to content

Commit

Permalink
Remove old config options - part 1 (streamlit#9005)
Browse files Browse the repository at this point in the history
PR Removes the following config options that were deprecated and are
past their expiration dates:
- `global.logLevel`
- `global.dataFrameSerialization`
- `ui.hideSidebarNav`
- `deprecation.showfileUploaderEncoding`
- `deprecation.showImageFormat`
  • Loading branch information
mayagbarnes authored Jul 2, 2024
1 parent 059c709 commit a7ac4de
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 71 deletions.
64 changes: 1 addition & 63 deletions lib/streamlit/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -328,18 +328,6 @@ def _global_development_mode() -> bool:
)


_create_option(
"global.logLevel",
description="""Level of logging: 'error', 'warning', 'info', or 'debug'.
Default: 'info'
""",
deprecated=True,
deprecation_text="global.logLevel has been replaced with logger.level",
expiration_date="2020-11-30",
replaced_by="logger.level",
)

_create_option(
"global.e2eTest",
description="Are we in an e2e (playwright) test? Set automatically when our e2e tests are running.",
Expand Down Expand Up @@ -401,21 +389,6 @@ def _global_development_mode() -> bool:
type_=bool,
)

_create_option(
"global.dataFrameSerialization",
description="""
DataFrame serialization.
Acceptable values:
- 'legacy': Serialize DataFrames using Streamlit's custom format. Slow
but battle-tested.
- 'arrow': Serialize DataFrames using Apache Arrow. Much faster and versatile.""",
default_val="arrow",
type_=str,
deprecated=True,
deprecation_text="Legacy serialization has been removed. All dataframes will be serialized using Apache Arrow.",
expiration_date="2023-11-01",
)

# Config Section: Logger #
_create_section("logger", "Settings to customize Streamlit log messages.")
Expand All @@ -427,9 +400,7 @@ def _logger_log_level() -> str:
Default: 'info'
"""
if get_option("global.logLevel"):
return str(get_option("global.logLevel"))
elif get_option("global.developmentMode"):
if get_option("global.developmentMode"):
return "debug"
else:
return "info"
Expand Down Expand Up @@ -925,17 +896,6 @@ def _browser_server_port() -> int:
visibility="hidden",
)

_create_option(
"ui.hideSidebarNav",
description="Flag to hide the sidebar page navigation component.",
default_val=False,
type_=bool,
deprecated=True,
deprecation_text="ui.hideSidebarNav has been deprecated and replaced with client.showSidebarNavigation. It will be removed in a future version.",
expiration_date="2024-01-20",
visibility="hidden",
)


# Config Section: Mapbox #

Expand Down Expand Up @@ -986,28 +946,6 @@ def _browser_server_port() -> int:

_create_section("deprecation", "Configuration to show or hide deprecation warnings.")

_create_option(
"deprecation.showfileUploaderEncoding",
description="Set to false to disable the deprecation warning for the file uploader encoding.",
default_val=True,
scriptable=True,
type_=bool,
deprecated=True,
deprecation_text="deprecation.showfileUploaderEncoding has been deprecated and will be removed in a future version.",
expiration_date="2021-01-06",
)

_create_option(
"deprecation.showImageFormat",
description="Set to false to disable the deprecation warning for the image format parameter.",
default_val=True,
scriptable=True,
type_=bool,
deprecated=True,
deprecation_text="The format parameter for st.image has been removed.",
expiration_date="2021-03-24",
)

_create_option(
"deprecation.showPyplotGlobalUse",
description="Set to false to disable the deprecation warning for using the global pyplot instance.",
Expand Down
2 changes: 0 additions & 2 deletions lib/streamlit/runtime/app_session.py
Original file line number Diff line number Diff line change
Expand Up @@ -883,8 +883,6 @@ def _populate_config_msg(msg: Config) -> None:
msg.max_cached_message_age = config.get_option("global.maxCachedMessageAge")
msg.allow_run_on_save = config.get_option("server.allowRunOnSave")
msg.hide_top_bar = config.get_option("ui.hideTopBar")
# ui.hideSidebarNav is deprecated, will be removed in the future
msg.hide_sidebar_nav = config.get_option("ui.hideSidebarNav")
if config.get_option("client.showSidebarNavigation") is False:
msg.hide_sidebar_nav = True
msg.toolbar_mode = _get_toolbar_mode()
Expand Down
5 changes: 0 additions & 5 deletions lib/tests/streamlit/config_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -348,22 +348,18 @@ def test_config_option_keys(self):
"theme.secondaryBackgroundColor",
"theme.textColor",
"theme.font",
"deprecation.showfileUploaderEncoding",
"deprecation.showImageFormat",
"deprecation.showPyplotGlobalUse",
"global.appTest",
"global.developmentMode",
"global.disableWatchdogWarning",
"global.disableWidgetStateDuplicationWarning",
"global.e2eTest",
"global.logLevel",
"global.maxCachedMessageAge",
"global.minCachedMessageSize",
"global.showWarningOnDirectExecution",
"global.storeCachedForwardMessagesInMemory",
"global.suppressDeprecationWarnings",
"global.unitTest",
"global.dataFrameSerialization",
"logger.enableRich",
"logger.level",
"logger.messageFormat",
Expand Down Expand Up @@ -397,7 +393,6 @@ def test_config_option_keys(self):
"server.sslCertFile",
"server.sslKeyFile",
"ui.hideTopBar",
"ui.hideSidebarNav",
]
)
keys = sorted(config._config_options.keys())
Expand Down
2 changes: 1 addition & 1 deletion proto/streamlit/proto/NewSession.proto
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ message Config {
// See config option "ui.hideTopBar".
bool hide_top_bar = 6;

// See config option "ui.hideSidebarNav".
// See config option "client.showSidebarNavigation".
bool hide_sidebar_nav = 7;

// See config option "client.toolbarMode".
Expand Down

0 comments on commit a7ac4de

Please sign in to comment.