Adam Reichold

Results 536 comments of Adam Reichold

From https://github.com/PyO3/pyo3/pull/2238#discussion_r830675173 > we could probably support moving out of `self` if `PyCell` were adjusted to support only `2^64 - 3` instead of `2^64 - 2` shared borrows thereby creating...

Would something like ```rust #[pyclass] struct Foo(Option); #[pymethods] impl Foo { fn consume(&mut self) { let self_ = self.0.take().unwrap(); } } ``` work ATM? If so, maybe this would be...

I think #1208 tracks integration between Rust logging and Python logging. The guide also used to mention https://github.com/vorner/pyo3-log and there is also tracing integration project https://github.com/danielschemmel/tracing-for-pyo3-logging

Doesn't that coverage include whether an external function is called or not? While I am sympathetic to the idea that covering FFI definitions does not gain much (and this is...

That sounds reasonable to me. Especially since the always-covered test lines "dilute" the actual coverage, i.e. even with zero percent coverage but three times as much test code as production...

> I am trying to (indirectly) run code that is accessing sys.argv[0], but since it's not set I get an exception at runtime. I cannot modify the code. Couldn't you...

> One thing that is annoying about the workaround above is that it changes line numbers around. We are possibly discussing different things. I did not mean to prepend this...

> I still think there are use cases for implementing a run_ex, don't you? Since the workaround is actually more general (being able to express arbitrary preparations instead of just...

Did you try just removing the `obj.is_none()` check from `build_regex` and changing its return type to `PyResult` and letting the `#[pyfunction]` macro handle the `Option` layer?

> in practice I want to be able to call regex_match from other code with a pre-compiled regex. I am not sure if this works like you intend it to...