Skip to content

[misc] Use ini_options table for pytest config - #17952

Merged
bashonly merged 1 commit into
yt-dlp:masterfrom
yardenac:fix-pytest
Oct 29, 2026
Merged

bashonly merged 1 commit into
yt-dlp:masterfrom
yardenac:fix-pytest

Conversation

@yardenac

@yardenac yardenac commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Description of your pull request and other information

de445c9 changed this mode 6 months ago, presumably because using native toml is cleaner

but pytest 9.2 makes this complicated. it has a regression that no longer accepts verbosity options as string-typed integers, whereas earlier versions accepted no other format, and they clearly intend to deprecate the old format pytest-dev/pytest#15290

the only future-proof options are to test for the pytest version every time, require >=9.2 (which is too new to be a dependency anyway) or to switch back to ini mode, as this does.

Fixes #17951

Template

Before submitting a pull request you must attest to the following:

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

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

What is the purpose of your pull request? Check those that apply and remove the others:

de445c9 changed this mode 6 months ago, presumably because using native toml is cleaner

but pytest 9.2 makes this complicated. it has a regression that no longer accepts
verbosity options as string-typed integers, whereas earlier versions accepted no other
format, and they clearly intend to deprecate the old format pytest-dev/pytest#15290

the only future-proof options are to test for the pytest version every time, require >=9.2
(which is too new to be a dependency anyway) or to switch back to ini mode, as this does.
@yardenac
yardenac requested review from a team and bashonly October 29, 2026 19:51

@bashonly bashonly left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had completely forgotten ini_options was a thing. Thanks!

@bashonly bashonly added docs/meta/cleanup related to docs, code cleanup, templates, devscripts etc external-issue Issue with an external tool or site labels Oct 29, 2026
@bashonly bashonly changed the title use pytest's ini mode again [misc] Use ini_options table for pytest config Oct 29, 2026
@bashonly
bashonly merged commit 0b8f725 into yt-dlp:master Oct 29, 2026
29 checks passed
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 external-issue Issue with an external tool or site

Projects

None yet

Development

Successfully merging this pull request may close these issues.

pytest no longer accepts integers-as-strings

2 participants