Conversation
Instead of having to pass type/value/tb separately, allow to pass `exc=ExceptionInstance()`
vstinner
left a comment
There was a problem hiding this comment.
You must document these changes in Doc/library/traceback.rst. Don't forget a ".. versionchanged:: 3.7" section.
|
|
||
| Since python 3.7, instead of passing *etype*, *value* and *tb* separately, | ||
| it is recommended to use the *exc* keyword argument which will infer all the | ||
| required values. |
There was a problem hiding this comment.
You should also document that the traceback object is now get from exc if tb is not set.
There was a problem hiding this comment.
I think this would be better off in the main RST documentation, rather than the doc strings. Normally the doc strings exclude finer details, changes from previous versions, etc.
|
|
||
| Since python 3.7, instead of passing *etype*, *value* and *tb* separately, | ||
| it is recommended to use the *exc* keyword argument which will infer all the | ||
| required values. |
|
|
||
| Since python 3.7, instead of passing *etype* and *value* separately, it is | ||
| recommended to use the *exc* keyword argument which will infer all the | ||
| required values. |
| elif exc: | ||
| value = exc | ||
| tb = exc.__traceback__ | ||
| etype = type(value) |
There was a problem hiding this comment.
It seems like these lines are duplicated 3 times: write a private helper function to factorize the code.
| occurred with a caret on the next line indicating the approximate | ||
| position of the error. | ||
|
|
||
| The *etype* parameter is ignored since python 3.5 and get inferred from |
| *value*. | ||
|
|
||
| Since python 3.7, instead of passing *etype*, *value* and *tb* separately, | ||
| it is recommended to use the *exc* keyword argument which will infer all the |
There was a problem hiding this comment.
it is recommended to use the exc keyword argument, which [specifies] all the required values.
|
|
||
| Since python 3.7, instead of passing *etype*, *value* and *tb* separately, | ||
| it is recommended to use the *exc* keyword argument which will infer all the | ||
| required values. |
There was a problem hiding this comment.
I think this would be better off in the main RST documentation, rather than the doc strings. Normally the doc strings exclude finer details, changes from previous versions, etc.
|
Thanks for the review. I think I'll restart that from scratch and use the approach describe in https://bugs.python.org/issue26389, basically using |
|
terryjreedy
left a comment
There was a problem hiding this comment.
Wait until API decided on.
Bumps [cachetools](https://github.com/tkem/cachetools) from 4.0.0 to 4.1.0. - [Release notes](https://github.com/tkem/cachetools/releases) - [Changelog](https://github.com/tkem/cachetools/blob/master/CHANGELOG.rst) - [Commits](tkem/cachetools@v4.0.0...v4.1.0) Signed-off-by: dependabot-preview[bot] <support@dependabot.com> Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>

Instead of having to pass type/value/tb separately, allow to pass
exc=ExceptionInstance()