github agronholm/exceptiongroup 1.3.2

55 minutes ago
  • Fixed the repr() of exception groups being affected by mutation of the original exception sequence after construction (#154)
  • Fixed traceback limits being ignored for exceptions nested inside exception groups
  • Fixed catch() overwriting earlier handlers when distinct mapping keys normalize to the same exception types (#164)
  • Fixed catch() flattening exception groups raised by handlers when they were not the original matched group. Such groups are now propagated as-is, like with native except*, so code that previously received the bare exception(s) from such a group will now receive the exception group itself (#157)
  • Fixed catch() overwriting the __cause__ and __context__ of exceptions propagating out of it, to match native except*. Exceptions raised by handlers now keep the chaining they were raised with (e.g. raise ... from None) instead of inheriting the original group's __cause__, and re-raised exceptions now keep the original group's __context__ (#157)
  • Fixed catch() dropping exceptions that no handler matched when a handler raises an exception. Such exceptions are now propagated along with the handler's exception, like with native except*, so code that previously received only the handler's exception will now receive an exception group containing both (#161)
  • Fixed the subgroup() method returning the original group rather than a newly derived group when all the nested exceptions matched the condition
  • Fixed catch() overwriting handler exception chaining when the original exception is not an exception group (#167)
  • Fixed subgroup() and split() taking any class as the condition, so subgroup(bool) matched every exception instead of raising TypeError the way native exception groups do (#170)
  • Fixed EXCEPTIONGROUP_NO_PATCH=1 not preventing the monkey patching on Python < 3.11 (#171)
  • Fixed subgroup() and split() not checking the return value of derive(), so a subclass with a broken override made them raise AttributeError or return something that wasn't an exception group at all. They now raise TypeError, like native exception groups do (#169)

Don't miss a new exceptiongroup release

NewReleases is sending notifications on new releases.