-
I have a plugin, pytest-raisin, which allows using exception instances with
Since pytest 7.0.0, there's a new warning:
The line it indicates is here. I took care not to use anything with a leading underscore in the plugin implementation. I've been using this plugin all over the place and it's very handy I think, it would be a shame if it got broken in pytest 8. Actually I still have some hopes that the idea might get accepted into pytest itself (originally proposed in #4538). Anything we could do either in pytest or in pytest-raisin to not trigger this warning? I had a look and #7469 seems related, specifically the part that says:
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
Hi @wimglenn, You got it pretty much correctly - as part of formalizing pytest's public API, we audited
My suggestion is to open an issue describing your use case for these, and we can make them public if it makes sense. |
Beta Was this translation helpful? Give feedback.
Hi @wimglenn,
You got it pretty much correctly - as part of formalizing pytest's public API, we audited
ExceptionInfo
andRaisesContext
, and decided:ExceptionInfo
, but mark it's ctor private (so pytest is formally free to break how the type is constructed, but not any public methods/attributes).RaisesContext
.My suggestion is to open an issue describing your use case for these, and we can make them public if it makes sense.