Skip to content

Conversation

@bluetech
Copy link
Member

As a private attribute, we broke it in pytest 9.0.0, but since it's not using a _ prefix and has some external usage, let's keep it working until pytest 10 and deprecate it instead.

Fix #13946.

@psf-chronographer psf-chronographer bot added the bot:chronographer:provided (automation) changelog entry is part of PR label Nov 12, 2025
@bluetech bluetech added the backport 9.0.x apply to PRs at any point; backports the changes to the 9.0.x branch label Nov 12, 2025
Copy link
Member

@nicoddemus nicoddemus left a comment

Choose a reason for hiding this comment

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

I don't recall if it is OK to introduce deprecations in patch releases, or if it should be done only in minor releases.

@bluetech
Copy link
Member Author

I don't recall if it is OK to introduce deprecations in patch releases, or if it should be done only in minor releases.

Usually not, but in this case we broke it in pytest 9.0.0 and this restores it but makes it deprecated.

@nicoddemus
Copy link
Member

Usually not, but in this case we broke it in pytest 9.0.0 and this restores it but makes it deprecated.

If it was the case, we could split this PR in two: one restoring inicfg, which would be backported, and another with the deprecation.

But if we are OK with adding deprecations in patch releases, then this is fine. I didn't find in our backward compatibility policy when deprecations could be introduced, only when they are removed.

@bluetech
Copy link
Member Author

If it was the case, we could split this PR in two: one restoring inicfg, which would be backported, and another with the deprecation.

Good idea, let's do that.

@bluetech bluetech removed the backport 9.0.x apply to PRs at any point; backports the changes to the 9.0.x branch label Nov 13, 2025
@RonnyPfannschmidt
Copy link
Member

as far as im concerned its valid to add that deprecation right there - its a "bugfix" in a sense

@nicoddemus
Copy link
Member

nicoddemus commented Nov 13, 2025

as far as im concerned its valid to add that deprecation right there - its a "bugfix" in a sense

But we can do that in two parts: the bugfix does not necessarily needs to include the deprecation, it might come later.

But whatever you folks decide works for me.

As a private attribute, we broke it in pytest 9.0.0, but since it's not
using a `_` prefix and has some external usage, let's keep it working
until pytest 10 and deprecate it instead.

Fix pytest-dev#13946.
@bluetech
Copy link
Member Author

This PR now has two commits, one restores and one deprecates. I will cherry-pick only the first to 9.0.x.

@bluetech bluetech merged commit 90b9389 into pytest-dev:main Nov 13, 2025
33 checks passed
@bluetech bluetech deleted the inicfg-deprecate branch November 13, 2025 21:24
@bluetech bluetech added the backport 9.0.x apply to PRs at any point; backports the changes to the 9.0.x branch label Nov 13, 2025
@patchback
Copy link

patchback bot commented Nov 13, 2025

Backport to 9.0.x: 💔 cherry-picking failed — conflicts found

❌ Failed to cleanly apply 90b9389 on top of patchback/backports/9.0.x/90b9389af0e009bc021990919c54a3aaf3a217ca/pr-13955

Backporting merged PR #13955 into main

  1. Ensure you have a local repo clone of your fork. Unless you cloned it
    from the upstream, this would be your origin remote.
  2. Make sure you have an upstream repo added as a remote too. In these
    instructions you'll refer to it by the name upstream. If you don't
    have it, here's how you can add it:
    $ git remote add upstream https://github.com/pytest-dev/pytest.git
  3. Ensure you have the latest copy of upstream and prepare a branch
    that will hold the backported code:
    $ git fetch upstream
    $ git checkout -b patchback/backports/9.0.x/90b9389af0e009bc021990919c54a3aaf3a217ca/pr-13955 upstream/9.0.x
  4. Now, cherry-pick PR config: deprecate config.inicfg #13955 contents into that branch:
    $ git cherry-pick -x 90b9389af0e009bc021990919c54a3aaf3a217ca
    If it'll yell at you with something like fatal: Commit 90b9389af0e009bc021990919c54a3aaf3a217ca is a merge but no -m option was given., add -m 1 as follows instead:
    $ git cherry-pick -m1 -x 90b9389af0e009bc021990919c54a3aaf3a217ca
  5. At this point, you'll probably encounter some merge conflicts. You must
    resolve them in to preserve the patch from PR config: deprecate config.inicfg #13955 as close to the
    original as possible.
  6. Push this branch to your fork on GitHub:
    $ git push origin patchback/backports/9.0.x/90b9389af0e009bc021990919c54a3aaf3a217ca/pr-13955
  7. Create a PR, ensure that the CI is green. If it's not — update it so that
    the tests and any other checks pass. This is it!
    Now relax and wait for the maintainers to process your pull request
    when they have some cycles to do reviews. Don't worry — they'll tell you if
    any improvements are necessary when the time comes!

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

bluetech added a commit to bluetech/pytest that referenced this pull request Nov 13, 2025
Fix pytest-dev#13955.

(cherry picked from commit 1738920)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport 9.0.x apply to PRs at any point; backports the changes to the 9.0.x branch bot:chronographer:provided (automation) changelog entry is part of PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Error 'bool' object has no attribute 'origin' Config._getini

3 participants