-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
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
[plugins] Load plugins on demand #11305
Open
coletdjnz
wants to merge
72
commits into
yt-dlp:master
Choose a base branch
from
coletdjnz:misc/globals-and-plugins-revive
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 56 commits
Commits
Show all changes
72 commits
Select commit
Hold shift + click to select a range
40f772c
Rough demo
Grub4K 8c297d1
Its lazy now at least?
Grub4K 00709d5
Fix tests and add test for reloading
Grub4K 25b921b
Merge with 'upstream/master'
Grub4K 3d939b6
Merge remote-tracking branch 'upstream/master' into misc/globals-and-…
coletdjnz 9f1f2c5
fix
coletdjnz 4266658
Get plugin overrides working
coletdjnz 413ae76
Make globals internal-only
coletdjnz cb9e38a
Fix reloading
coletdjnz 3561d2a
load plugins in youtubedl if they haven't already
coletdjnz 6547ff4
minor refactoring
coletdjnz 42771dd
Add test for override plugins
coletdjnz a19dd28
revert back to init_subclass, add guard against multiple imports of s…
coletdjnz 9269248
add test for plugin dirs
coletdjnz 21e13bf
Decouple plugins.py from plugin types
coletdjnz 109c019
Add public functions to add custom external plugin paths
coletdjnz 97684b0
Add --no-plugins
coletdjnz 9811496
Fix lazy extractors
coletdjnz 2723802
minor refactoring
coletdjnz 072e680
Merge remote-tracking branch 'upstream/master' into misc/globals-and-…
coletdjnz 2699951
Cleanup after merge
coletdjnz 51f3740
Move away from contextvars
coletdjnz 97088ae
may this help?
coletdjnz 4e4bc2f
fix
coletdjnz d48d00d
Fix no-external
coletdjnz 37aed89
fix no-external not including PYTHONPATH
coletdjnz 600b2ec
Avoid searching disk for plugins when plugins are disabled
coletdjnz cd490ee
Improve error message when invalid directory provided
coletdjnz dad04bd
Fix IN_CLI import
coletdjnz 5de3062
Update yt_dlp/extractor/extractors.py
coletdjnz 78c09c7
revert formatter
coletdjnz fff5e7b
Merge remote-tracking branch 'upstream/master' into misc/globals-and-…
coletdjnz 0210836
misc cleanup
coletdjnz fd23673
fix test import order
coletdjnz 0e825cd
set plugin_dirs to empty to disable plugins
coletdjnz 1883400
Merge remote-tracking branch 'upstream/master' into misc/globals-and-…
coletdjnz a6979c7
Fix --no-plugins --plugin-dirs '/path' importing from pythonpath
coletdjnz 93aa21b
some more refactoring
coletdjnz 74050a8
Get tests working
coletdjnz 317e7a4
ruff
coletdjnz 243174b
Update README.md
coletdjnz b5b8334
Update yt_dlp/options.py
coletdjnz f14e168
Update README.md
coletdjnz a036660
Update yt_dlp/extractor/extractors.py
coletdjnz 8a585c0
Update yt_dlp/__init__.py
coletdjnz afbbb36
Update yt_dlp/globals.py
coletdjnz a290aa0
Update yt_dlp/plugins.py
coletdjnz b738e60
Update yt_dlp/plugins.py
coletdjnz e2883ff
cleanup from review
coletdjnz 78bc4e7
Update yt_dlp/options.py
coletdjnz eb6cba8
Update README.md
coletdjnz b6c3d22
Rename --no-plugins to --no-plugin-dirs
coletdjnz 68644c3
Implement _CLASS_LOOKUP in make_lazy_extractors.py
coletdjnz 8b8d6c5
fix for older python versions
coletdjnz d134dc3
ruff
coletdjnz 4e7ee9f
use repr
coletdjnz a78576e
Autopep8 ignore lazy_extractors.py
coletdjnz 782b70e
fix
coletdjnz f31a5c2
does this work now?
coletdjnz c3211e4
or this?
coletdjnz a209cb8
Fix lazy_extractors generation
coletdjnz d25341f
Add some more excludes for autopep8
coletdjnz 7b31c53
Update yt_dlp/options.py
coletdjnz 35c779d
Update yt_dlp/plugins.py
coletdjnz 92f0776
Update yt_dlp/plugins.py
coletdjnz aff93ef
Update yt_dlp/options.py
coletdjnz cf5bad8
Update yt_dlp/plugins.py
coletdjnz 914d554
Update yt_dlp/plugins.py
coletdjnz f9ef24c
Update yt_dlp/plugins.py
coletdjnz 635d550
Apply suggestions from code review
coletdjnz 86138e6
formatting
coletdjnz 2589ba4
Fix --no-config-locations
coletdjnz File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,4 +2,5 @@ | |
|
||
|
||
class PackagePluginIE(InfoExtractor): | ||
_VALID_URL = 'package' | ||
pass |
10 changes: 10 additions & 0 deletions
10
test/testdata/reload_plugins/yt_dlp_plugins/extractor/normal.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
from yt_dlp.extractor.common import InfoExtractor | ||
|
||
|
||
class NormalPluginIE(InfoExtractor): | ||
_VALID_URL = 'normal' | ||
REPLACED = True | ||
|
||
|
||
class _IgnoreUnderscorePluginIE(InfoExtractor): | ||
pass |
5 changes: 5 additions & 0 deletions
5
test/testdata/reload_plugins/yt_dlp_plugins/postprocessor/normal.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
from yt_dlp.postprocessor.common import PostProcessor | ||
|
||
|
||
class NormalPluginPP(PostProcessor): | ||
REPLACED = True |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Create dev release to test all is working