Skip to content

code: drop Experimental API label from ExceptionInfo.from_exc_info #10900

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

Merged
merged 1 commit into from
Apr 13, 2023

Conversation

bluetech
Copy link
Member

This API is OK, I don't think we're going to change something about it at this point.

This API is OK, I don't think we're going to change something about it
at this point.
@RonnyPfannschmidt
Copy link
Member

The only caveat this poses is that it may be harder to drop exception info as is (it's one of the inheritances from pylib that's unfortunately very intertwined

Copy link
Member

@RonnyPfannschmidt RonnyPfannschmidt left a comment

Choose a reason for hiding this comment

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

Since modern exceptions carry the traceback /context, maybe we can directly deprecate this

@bluetech
Copy link
Member Author

The only caveat this poses is that it may be harder to drop exception info as is (it's one of the inheritances from pylib that's unfortunately very intertwined

Right, but I don't see us dropping ExceptionInfo without a major overhaul, it's exposed by pytest.raises.

Since modern exceptions carry the traceback /context, maybe we can directly deprecate this

This is not yet possible, since various Python APIs still use the exc_info triplet, and AFAIU it's not guaranteed to be equivalent before 3.12 (or maybe 3.11). So we got to keep it for now.

@RonnyPfannschmidt
Copy link
Member

thanks for the clarification on python version ranges

indeed, raises is raising some serious future work ^^

@bluetech bluetech merged commit 784ffa0 into pytest-dev:main Apr 13, 2023
@bluetech bluetech deleted the exceptioninfo-from_exc_info-exp branch April 13, 2023 11:49
@nicoddemus
Copy link
Member

nicoddemus commented Apr 13, 2023

The only caveat this poses is that it may be harder to drop exception info as is (it's one of the inheritances from pylib that's unfortunately very intertwined

Curious, drop it in favor of what? As of now, it is inside pytest and it seems to do its role OK-ish -- perhaps it exposes other internals like ReprExceptionInfo and that's undesirable, is that what you mean?

@RonnyPfannschmidt
Copy link
Member

It's neither nicely serializable nor does it print pretty /filters nicely

Im very curious about the stuff rich and sentry do wrt exceptions, but it currently is on the lower end of the bucket list for me

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.

3 participants