You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For #13823 I'd like strictness options to have a consistent strict_foo naming scheme, however the option xfail_strict has it in reverse. I'd like to rename it to strict_xfail, while keeping xfail_strict as an alias.
To achieve this cleanly, I propose we add support for aliases to parser.addini(). It's pretty useful functionality for backward compatibility, and plugins may want to use it as well.
Not sure if I like the additional churn after we already had multiple iterations of strict options changed (even with an alias, it gets confusing if people see/use different things to do the same thing).
Note how --strict and --strict-* are currently CLI options, but xfail_strict = True is an ini option. IMHO naming consistency between the two isn't important, because they're two different things, and already inconsistent anyways.
If anything, IMHO we should have strict / strict_markers / strict_config / strict_xfail as ini options (see #13823 (comment)) rather than CLI flags, and then it makes sense to make the naming consistent. But if we go there, please let's do it in one step instead of doing the xfail_strict rename/alias in one release and the CLI -> INI move of the rest in another.
If we end up with aliasing options, IMHO there's a discussion to be had whether to deprecate the old way. Yes, it causes churn, but so does having two ways to do the same thing (especially for newcomers which might see both in different tutorials, and then they also need to know about which pytest version they use, etc.).
Activity
config: add support for ini option aliases
config: add support for ini option aliases
The-Compiler commentedon Oct 20, 2025
Not sure if I like the additional churn after we already had multiple iterations of strict options changed (even with an alias, it gets confusing if people see/use different things to do the same thing).
Note how
--strictand--strict-*are currently CLI options, butxfail_strict = Trueis an ini option. IMHO naming consistency between the two isn't important, because they're two different things, and already inconsistent anyways.If anything, IMHO we should have
strict/strict_markers/strict_config/strict_xfailas ini options (see #13823 (comment)) rather than CLI flags, and then it makes sense to make the naming consistent. But if we go there, please let's do it in one step instead of doing thexfail_strictrename/alias in one release and the CLI -> INI move of the rest in another.If we end up with aliasing options, IMHO there's a discussion to be had whether to deprecate the old way. Yes, it causes churn, but so does having two ways to do the same thing (especially for newcomers which might see both in different tutorials, and then they also need to know about which pytest version they use, etc.).
bluetech commentedon Oct 21, 2025
@The-Compiler this issue is about ini option aliases, just to make sure, do you have an objection to the feature itself?
I'll reply to the rest of the comment in #13823 to keep the discussion about
strictin one place.WIP: config: add support for ini option aliases
config: add support for ini option aliases
chore(deps): update pytest (major)
Merge branch 'renovate/pytest-9.x' into 'main'
🔒️ Update dependency pytest to v9 [SECURITY] (#16)
[SECURITY] Update dependency pytest to v9 [SECURITY] (#2)
Update dependency pytest to v9 (#35)