Skip to content

cli: remove deprecated {,plugin-}config paths #6149

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

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 0 additions & 26 deletions docs/cli/config.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,6 @@ your platform:
:bdg-info-line:`Example`

- ``/home/USERNAME/.config/streamlink/config``

:bdg-danger-line:`Deprecated`

- ``${HOME}/.streamlinkrc``
* - macOS
- :bdg-primary:`Path`

Expand All @@ -38,11 +34,6 @@ your platform:
:bdg-info-line:`Example`

- ``/Users/USERNAME/Library/Application Support/streamlink/config``

:bdg-danger-line:`Deprecated`

- ``${XDG_CONFIG_HOME:-${HOME}/.config}/streamlink/config``
- ``${HOME}/.streamlinkrc``
* - Windows
- :bdg-primary:`Path`

Expand All @@ -52,10 +43,6 @@ your platform:

- ``C:\Users\USERNAME\AppData\Roaming\streamlink\config``

:bdg-danger-line:`Deprecated`

- ``%APPDATA%\streamlink\streamlinkrc``

You can also specify the location yourself using the :option:`--config` option.

Loading config files can be suppressed using the :option:`--no-config` option.
Expand Down Expand Up @@ -129,10 +116,6 @@ Streamlink expects these configs to be named like the main config but with ``.<p
:bdg-info-line:`Example`

- ``/home/USERNAME/.config/streamlink/config.twitch``

:bdg-danger-line:`Deprecated`

- ``${HOME}/.streamlinkrc.pluginname``
* - macOS
- :bdg-primary:`Path`

Expand All @@ -141,11 +124,6 @@ Streamlink expects these configs to be named like the main config but with ``.<p
:bdg-info-line:`Example`

- ``/Users/USERNAME/Library/Application Support/streamlink/config.twitch``

:bdg-danger-line:`Deprecated`

- ``${XDG_CONFIG_HOME:-${HOME}/.config}/streamlink/config.pluginname``
- ``${HOME}/.streamlinkrc.pluginname``
* - Windows
- :bdg-primary:`Path`

Expand All @@ -155,9 +133,5 @@ Streamlink expects these configs to be named like the main config but with ``.<p

- ``C:\Users\USERNAME\AppData\Roaming\streamlink\config.twitch``

:bdg-danger-line:`Deprecated`

- ``%APPDATA%\streamlink\streamlinkrc.pluginname``

Have a look at the :ref:`list of plugins <plugins:Plugins>`, or
check the :option:`--plugins` option to see the name of each built-in plugin.
4 changes: 0 additions & 4 deletions src/streamlink_cli/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
APPDATA = Path(os.environ.get("APPDATA") or Path.home() / "AppData")
CONFIG_FILES = [
APPDATA / "streamlink" / "config",
DeprecatedPath(APPDATA / "streamlink" / "streamlinkrc"),
]
PLUGIN_DIRS = [
APPDATA / "streamlink" / "plugins",
Expand All @@ -33,8 +32,6 @@
XDG_CONFIG_HOME = Path(os.environ.get("XDG_CONFIG_HOME", "~/.config")).expanduser()
CONFIG_FILES = [
Path.home() / "Library" / "Application Support" / "streamlink" / "config",
DeprecatedPath(XDG_CONFIG_HOME / "streamlink" / "config"),
DeprecatedPath(Path.home() / ".streamlinkrc"),
]
PLUGIN_DIRS = [
Path.home() / "Library" / "Application Support" / "streamlink" / "plugins",
Expand All @@ -47,7 +44,6 @@
XDG_STATE_HOME = Path(os.environ.get("XDG_STATE_HOME", "~/.local/state")).expanduser()
CONFIG_FILES = [
XDG_CONFIG_HOME / "streamlink" / "config",
DeprecatedPath(Path.home() / ".streamlinkrc"),
]
PLUGIN_DIRS = [
XDG_DATA_HOME / "streamlink" / "plugins",
Expand Down
12 changes: 0 additions & 12 deletions src/streamlink_cli/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -709,12 +709,6 @@ def setup_config_args(parser, ignore_unknown=False):
else:
# Only load first available default config
for config_file in filter(lambda path: path.is_file(), CONFIG_FILES): # pragma: no branch
if type(config_file) is DeprecatedPath:
warnings.warn(
f"Loaded config from deprecated path, see CLI docs for how to migrate: {config_file}",
StreamlinkDeprecationWarning,
stacklevel=1,
)
config_files.append(config_file)
break

Expand All @@ -726,12 +720,6 @@ def setup_config_args(parser, ignore_unknown=False):
config_file = config_file.with_name(f"{config_file.name}.{pluginname}")
if not config_file.is_file():
continue
if type(config_file) is DeprecatedPath:
warnings.warn(
f"Loaded plugin config from deprecated path, see CLI docs for how to migrate: {config_file}",
StreamlinkDeprecationWarning,
stacklevel=1,
)
config_files.append(config_file)
break

Expand Down
Loading