Skip to content

Fix pytest 8.4 incompatibility#29

Open
ndhansen wants to merge 4 commits intowronglink:masterfrom
ndhansen:master
Open

Fix pytest 8.4 incompatibility#29
ndhansen wants to merge 4 commits intowronglink:masterfrom
ndhansen:master

Conversation

@ndhansen
Copy link

@ndhansen ndhansen commented Jun 16, 2025

When this package was written, it was targetting version pytest 2.0, which had no public cleanup interface, and it called the protected config._cleanup. In version 2.7 the public add_cleanup flag was added (MR).

Then, in version 8.4, the protected variable was renamed, and this package broke.

My MR fixes this bug. I reused the existing tests to make sure it works, and ran them using python 3.13 and pytest 8.4. I don't have any older python versions lying around to test it with, but given the scope of the change it's unlikely to cause regressions.

I bumped the required version of pytest to 7.0, simply because with python 3.13 I wasn't able to get it to work on older versions and I decided the subset of people using this plugin and pytest <7 would be small.

Fixes #28

@eliasdorneles
Copy link

I ran into the same problem!

Hello @wronglink -- any chance you could look into this?

Copy link

@arthurio arthurio left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for taking a crack at it 👍🏻

@@ -1,5 +1,5 @@
[tox]
envlist = py26,py27,py34,py35,py36,py37,flake8
envlist = py26,py27,py34,py35,py36,py37,py313,flake8

Choose a reason for hiding this comment

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

Let's remove the old ones and add the intermediary ones?

Suggested change
envlist = py26,py27,py34,py35,py36,py37,py313,flake8
envlist = py34,py35,py36,py37,py38,py39,py310,py311,py312,py313,flake8

@stainbank
Copy link

Any chance of getting this merged?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fails with pytest 8.4.0

4 participants