David Hewitt
David Hewitt
I think it should be possible to make it a compile-time only effect, so personally I'd be happy to accept such a PR. Might want to let @samuelcolvin confirm before...
Serde fails with the same error message: https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=97bd7df54428c3e668c287b59565cd67 Part of the problem will be that a Python `str` is allowed to have invalid unicode sequences (see e.g. [PEP 383](https://peps.python.org/pep-0383/#discussion) and...
We did this mostly following the process we'd already undergone in `pydantic-core`. IIRC the PGO did show improvements, we can test the shipped artefacts against locally-built to see the difference....
I think there are two different feature requests here, and let's separate them. Custom modes like `mode={"mode1", "mode2"}` might be a lot of work, so let's keep that out of...
I'm open to exploring this. Is the rustfmt configuration for VSCode straightforward? I have been wondering about a pre-commit hook for a while anyway, a lot of the time I...
👍 I guess that even if these options are unstable, the worst case (as we are using stable toolchain) is that we have to fixup formatting at the same time...
For the options, personally I would vote for `imports_granularity=Module,group_imports=StdExternalCrate`. I think `Module` grouping is closer to what we already have and also is IMO slighty easier to read than `Crate`...
You're absolutely correct in identifying `Number` as the root cause and IMO that's an unnecessary constraint (especially as this is an error message). Probably the whole `Number` enum can be...
Interestingly, tweaking to add a "real" implementation of `IntoPyObjectRef` fixes the problem, though I think I would need to add a method to the `IntoPyObjectRef` trait (maybe `into_pyobject_ref`) to actually...
... this also makes me wonder, should we do more crazy things like un-deprecate `ToPyObject`? We could instead maybe have this blanket: ```rust impl IntoPyObject