-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
[prerelease] ExceptionInfo.traceback[...].path
changed from py.path to pathlib.Path
#9423
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Can we assess the impact of |
At least a quick search seems to suggest that this is only an issue for |
In 92ba96b we have changed the `path` attribute to return a `pathlib.Path` instead of `py.path.local` without a deprecation hoping it would be alright. But these types are somewhat public, reachable through `ExceptionInfo.traceback`, and broke code in practice. So restore them in the legacypath plugin and add `Path` alternatives under a different name - `source_path`. Fix pytest-dev#9423.
In 92ba96b we have changed the `path` attribute to return a `pathlib.Path` instead of `py.path.local` without a deprecation hoping it would be alright. But these types are somewhat public, reachable through `ExceptionInfo.traceback`, and broke code in practice. So restore them in the legacypath plugin and add `Path` alternatives under a different name - `source_path`. Fix pytest-dev#9423.
In 92ba96b we have changed the `path` attribute to return a `pathlib.Path` instead of `py.path.local` without a deprecation hoping it would be alright. But these types are somewhat public, reachable through `ExceptionInfo.traceback`, and broke code in practice. So restore them in the legacypath plugin and add `Path` alternatives under a different name - `source_path`. Fix pytest-dev#9423.
In 92ba96b we have changed the `path` attribute to return a `pathlib.Path` instead of `py.path.local` without a deprecation hoping it would be alright. But these types are somewhat public, reachable through `ExceptionInfo.traceback`, and broke code in practice. So restore them in the legacypath plugin and add `Path` alternatives under a different name - `source_path`. Fix pytest-dev#9423.
We've decided to accept this breaking change. Will send a PR to update the changelog. |
As for the
ExceptionInfo.traceback[...].path
one: The PR looks good, but it seems to me that we should retain and perhaps deprecate thepath
attribute properly, instead of (more or less silently) replacing it, despite it being public API)?Originally posted by @The-Compiler in #9415 (reply in thread)
The text was updated successfully, but these errors were encountered: