carsongee / pytest-pylint

pytest plugin for running pylint against your codebase
MIT License
75 stars 34 forks source link

`PytestRemovedIn8Warning` in `plugin.py:311` #177

Closed gaborschulz closed 1 year ago

gaborschulz commented 1 year ago

Pytest shows a warning that py.path.local is deprecated:

.../pytest_pylint/plugin.py:311: PytestRemovedIn8Warning: The (fspath: py.path.local) argument to PylintFile is deprecated. Please use the (path: pathlib.Path) argument instead.

https://docs.pytest.org/en/latest/deprecations.html#fspath-argument-for-node-constructors-replaced-with-pathlib-path

dolfandringa commented 1 year ago

I was working on a fix PR for this but staying backwards compatible with pytest 5.4 is kind of a nightmare. I made separate subclasses for PylintPlugin and PylintFile, but am still getting errors when running tox. Is pytest5.4 backwards compatibility something that should be kept? Or would it be possible to just bump the dependency on pytest to pytest>=7.0 for a next release and let anyone using pytest 5.4 just use pytest-pylint<=0.19.0?

dolfandringa commented 1 year ago

For reference, this is the disaster I am trying (and failing) to stay backwards compatible with pytest 5.4. https://github.com/carsongee/pytest-pylint/compare/main...dolfandringa:pytest-pylint:feature/pytest7_compliance?expand=1

carsongee commented 1 year ago

Yeah, I gave up to. I put out a 0.20.0 a few minutes ago as the last release to support pytest <7. I'll release 0.21.0 shortly to drop this and support the main branch of pytest/pytest 8.0 when it comes out