-
-
Notifications
You must be signed in to change notification settings - Fork 9
WIP: file collection after deprecation of 'py' in pytest #114
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems incomplete. Can you also add type information while you modify it?
@ssbarnea I hope this fits your expectation |
It is getting close! mypy still fails. Once ready I will merge it and make a release. I don't want to prevent others from using pytest 7.x |
src/pytest_molecule/__init__.py
Outdated
|
||
else: | ||
|
||
def pytest_collect_file(parent: pytest.Collector, path) -> Optional["Node"]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mypy complains here with:
src/pytest_molecule/__init__.py:142: error: All conditional function variants must have identical signatures
@ssbarnea this is intentional since they actually are different in the pytest versions. Ideas? I tend to ignore the error but maybe you have a better idea for the implementation?
Thanks in advance!
I would just drop support for older pytest versions and require 7+. I personally do not have the bandwidth to keep compatibility with older versions. |
pytest-molecule suffers from one of the [deprecations](https://docs.pytest.org/en/7.0.x/changelog.html#id20): - pytest-dev/pytest#7259 - https://docs.pytest.org/en/latest/deprecations.html#fspath-argument-for-node-constructors-replaced-with-pathlib-path - https://docs.pytest.org/en/7.0.x/deprecations.html#legacy-path-hooks-deprecated
@ssbarnea i dropped the support for pytest < 7. Sorry for the delay - went on parental leave and forgot about that being open ;) |
Closing as #121 is implementing it. I tried to update your PR but it was created without permissions for maintainers to update it, so I was forced to create a new one. Thanks for taking time to do it! |
I actually didn't intentionally choose to do so. Perfect - thanks for your help. Sorry for the lengthy process - i learned quite a bit during it and hope to better contribute to upcoming changes ;) |
@SirUli I hope so. With community projects we never know how long it would take to ship a change. I will be happy to see more PRs from you. |
pytest-molecule suffers from one of the deprecations: