Skip to content
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

[utils] traverse_obj: Move is_user_input into output template #8673

Merged
merged 3 commits into from Dec 6, 2023

Conversation

Grub4K
Copy link
Member

@Grub4K Grub4K commented Nov 28, 2023

IMPORTANT: PRs without the template will be CLOSED

Description of your pull request and other information

Preparations for traverse_obj rewrite in combination with output template adjustments.
Both private parameters should be moved out of the function and into outtmpl instead.

Template

Before submitting a pull request make sure you have:

In order to be accepted and merged into yt-dlp each piece of code must be in public domain or released under Unlicense. Check all of the following options that apply:

  • I am the original author of this code and I am willing to release it under Unlicense
  • I am not the original author of this code but it is in public domain or released under Unlicense (provide reliable evidence)

What is the purpose of your pull request?

@Grub4K Grub4K added the docs/meta/cleanup related to docs, code cleanup, templates, devscripts etc label Nov 28, 2023
@Grub4K
Copy link
Member Author

Grub4K commented Nov 28, 2023

We should try and do traverse_string in this PR as well, that one is way harder though.

It might make sense to instead have that be done when we know what we need for outtmpl, but it would be nice if we could separate concerns and not have a single, massive traversal + outtmpl PR

@pukkandan
Copy link
Member

but it would be nice if we could separate concerns and not have a single, massive traversal + outtmpl PR

We'll be able to split it up after we have the full picture.

@pukkandan
Copy link
Member

Raise a deprecation_warning if is_user_input is being used. We can remove the param completely after a while.

@Grub4K
Copy link
Member Author

Grub4K commented Nov 28, 2023

I don't think that should be needed. We are explicitly stating that it is private API only.

@pukkandan
Copy link
Member

Even so, no harm in leaving it for a bit just in case.

@Grub4K Grub4K marked this pull request as ready for review December 6, 2023 12:14
yt_dlp/utils/traversal.py Outdated Show resolved Hide resolved
@Grub4K Grub4K merged commit 0b6f829 into yt-dlp:master Dec 6, 2023
14 checks passed
@Grub4K Grub4K deleted the cleanup/traversal branch December 6, 2023 20:47
aalsuwaidi pushed a commit to aalsuwaidi/yt-dlp that referenced this pull request Apr 21, 2024
dirkf added a commit to dirkf/youtube-dl that referenced this pull request Apr 27, 2024
* remove `is_user_input` option per yt-dlp/yt-dlp#8673
* support traversal of compat_xml_etree_ElementTree_Element per yt-dlp/yt-dlp#8911
* allow un/branching using all and any per yt-dlp/yt-dlp#9571
* support traversal of compat_cookies.Morsel and multiple types in `set()` keys per yt-dlp/yt-dlp#9577
thx Grub4k for these
* also, move traversal tests to a separate class
dirkf added a commit to dirkf/youtube-dl that referenced this pull request Apr 27, 2024
* remove `is_user_input` option per yt-dlp/yt-dlp#8673
* support traversal of compat_xml_etree_ElementTree_Element per yt-dlp/yt-dlp#8911
* allow un/branching using all and any per yt-dlp/yt-dlp#9571
* support traversal of compat_cookies.Morsel and multiple types in `set()` keys per yt-dlp/yt-dlp#9577
thx Grub4k for these
* also, move traversal tests to a separate class
dirkf added a commit to dirkf/youtube-dl that referenced this pull request Apr 27, 2024
* remove `is_user_input` option per yt-dlp/yt-dlp#8673
* support traversal of compat_xml_etree_ElementTree_Element per yt-dlp/yt-dlp#8911
* allow un/branching using all and any per yt-dlp/yt-dlp#9571
* support traversal of compat_cookies.Morsel and multiple types in `set()` keys per yt-dlp/yt-dlp#9577
thx Grub4k for these
* also, move traversal tests to a separate class
dirkf added a commit to dirkf/youtube-dl that referenced this pull request Apr 27, 2024
* remove `is_user_input` option per yt-dlp/yt-dlp#8673
* support traversal of compat_xml_etree_ElementTree_Element per yt-dlp/yt-dlp#8911
* allow un/branching using all and any per yt-dlp/yt-dlp#9571
* support traversal of compat_cookies.Morsel and multiple types in `set()` keys per yt-dlp/yt-dlp#9577
thx Grub4k for these
* also, move traversal tests to a separate class
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs/meta/cleanup related to docs, code cleanup, templates, devscripts etc
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants