This is an archive of the discontinued Mercurial Phabricator instance.

hg-cpython: fix new occuring TypeError
ClosedPublic

Authored by Alphare on May 21 2021, 12:21 PM.

Details

Summary

dd339191f2dc introduced a minor refactoring of error types that highlighted
a fragile error creation mechanism that was in place in the Rust MixedIndex.

PyErr::from_instance also accepts a Python class, as long as it's an
Exception class. Before the aforementioned commit, we never ran into a case
where this duck-typing mechanism failed. We rectify this behavior by doing the
instantiation ourselves.

Diff Detail

Repository
rHG Mercurial
Branch
default
Lint
No Linters Available
Unit
No Unit Test Coverage

Event Timeline

Alphare created this revision.May 21 2021, 12:21 PM
This revision was not accepted when it landed; it landed in state Needs Review.
This revision was automatically updated to reflect the committed changes.
baymax updated this revision to Diff 28180.May 21 2021, 1:12 PM

✅ refresh by Heptapod after a successful CI run (🐙 💚)