rust-pyo3: implementation of LazyAncestors...
rust-pyo3: implementation of LazyAncestors
There is a difference in the implementaion of `__contains__`
between PyO3 and rust-cpython: if the specified signature in
Rust code is for a precise type (e.g., `PyRevision`) rust-cpython
would automatically convert the potential resulting `TypeError` into
`Ok(false)`, whereas PyO3 let it bubble up.
Hence we treat the case manually and add it to the common test.
In Mercurial Python code, `None in` for a `LazyAncestors` object can
really happens, namely in this lambda from `discover._postprocessobsolete`:
```
ispushed = lambda n: torev(n) in futurecommon
```
This lambda can get called with `n` such that `torev(n)` is `False`
(seen in `test-bookmarks-push-pull.t`).