-
Notifications
You must be signed in to change notification settings - Fork 321
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
remove deprecated configs and associated code/tests #1698
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -188,9 +188,7 @@ | |
"json_url": json_url, | ||
"version_match": version_match, | ||
}, | ||
"navigation_with_keys": False, | ||
# "back_to_top_button": False, | ||
# "search_bar_position": "navbar", # TODO: Deprecated - remove in future version | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. AFAICT this config was being silently ignored, and associated code was already removed |
||
} | ||
|
||
html_sidebars = { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,41 +25,6 @@ def update_config(app): | |
theme_options = utils.get_theme_options_dict(app) | ||
warning = partial(utils.maybe_warn, app) | ||
|
||
# TODO: deprecation; remove after 0.14 release | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you confirm this was already removed long ago ? I didn't find it in theme.conf There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
if theme_options.get("logo_text"): | ||
logo = theme_options.get("logo", {}) | ||
logo["text"] = theme_options.get("logo_text") | ||
theme_options["logo"] = logo | ||
warning( | ||
"The configuration `logo_text` is deprecated. Use `'logo': {'text': }`." | ||
) | ||
|
||
# TODO: DEPRECATE after 0.14 | ||
if theme_options.get("footer_items"): | ||
theme_options["footer_start"] = theme_options.get("footer_items") | ||
warning( | ||
"`footer_items` is deprecated. Use `footer_start` or `footer_end` instead." | ||
) | ||
|
||
# TODO: DEPRECATE after v0.15 | ||
if theme_options.get("favicons"): | ||
warning( | ||
"The configuration `favicons` is deprecated. " | ||
"Use the sphinx-favicon extension instead." | ||
) | ||
|
||
# TODO: in 0.15, set the default navigation_with_keys value to False and remove this deprecation notice | ||
if theme_options.get("navigation_with_keys", None) is None: | ||
warning( | ||
"The default value for `navigation_with_keys` will change to `False` in " | ||
"the next release. If you wish to preserve the old behavior for your site, " | ||
"set `navigation_with_keys=True` in the `html_theme_options` dict in your " | ||
"`conf.py` file. Be aware that `navigation_with_keys = True` has negative " | ||
"accessibility implications: " | ||
"https://github.com/pydata/pydata-sphinx-theme/issues/1492" | ||
) | ||
theme_options["navigation_with_keys"] = False | ||
|
||
# Validate icon links | ||
if not isinstance(theme_options.get("icon_links", []), list): | ||
raise ExtensionError( | ||
|
@@ -228,18 +193,6 @@ def update_and_remove_templates( | |
if asset_path == theme_css_name: | ||
del context["css_files"][i] | ||
break | ||
# Add links for favicons in the topbar | ||
for favicon in context.get("theme_favicons", []): | ||
icon_type = Path(favicon["href"]).suffix.strip(".") | ||
opts = { | ||
"rel": favicon.get("rel", "icon"), | ||
"sizes": favicon.get("sizes", "16x16"), | ||
"type": f"image/{icon_type}", | ||
} | ||
if "color" in favicon: | ||
opts["color"] = favicon["color"] | ||
# Sphinx will auto-resolve href if it's a local file | ||
app.add_css_file(favicon["href"], **opts) | ||
|
||
# Add metadata to DOCUMENTATION_OPTIONS so that we can re-use later | ||
# Pagename to current page | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,5 +14,3 @@ | |
|
||
html_copy_source = True | ||
html_sourcelink_suffix = "" | ||
|
||
html_theme_options = {"navigation_with_keys": False} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
False is now the default in
theme.conf
so we don't need to specify it in our own docs (or in any tests) just to avoid the deprecation warning