5d47c4ae4c
* Added `ToPyObject` and `Into<PyObject>` impls for `PyBackedStr`. * Create 4205.added.md * Added attributes limiting the `ToPyObject` and `IntoPy<PyObject>` impls to the case where `cfg(any(Py_3_10, not(Py_LIMITED_API)))`. When this cfg does not apply, the conversion is less trivial since the `storage` is actually `PyBytes`, not `PyString`. * Fixed imports format. * Updated the `ToPyObject` and `IntoPy<PyObject>` impls to support the `cfg(not(any(Py_3_10, not(Py_LIMITED_API))))` case by converting the `PyBytes` back to `PyString`. * Added `ToPyObject` and `IntoPy<PyObject>` impls for `PyBackedBytes`. * Added tests for the `PyBackedBytes` conversion impls. * Updated newsfragment entry to include the `PyBackedBytes` impls. * Changed the `IntoPy` and `ToPyObject` impls for `PyBackedBytes` to produce `PyBytes` regardless of the backing variant. Updated tests to demonstrate this. * retrigger checks * Updated `PyBackedStr` conversion tests to extract the result as a `PyBackedStr` instead of `&str` since the latter is not supported under some `cfg`'s. * Fixed `IntoPy<PyObject> for PyBackedBytes` impl to create `bytes` for both storage types as intended. Updated test to properly catch the error. --------- Co-authored-by: jrudolph <jrudolph@anl.gov> |
||
---|---|---|
.. | ||
.gitignore | ||
3761.changed.md | ||
3835.added.md | ||
3966.packaging.md | ||
4061.packaging.md | ||
4072.added.md | ||
4078.changed.md | ||
4079.added.md | ||
4086.fixed.md | ||
4095.added.md | ||
4095.changed.md | ||
4098.changed.md | ||
4100.changed.md | ||
4104.fixed.md | ||
4116.fixed.md | ||
4117.fixed.md | ||
4129.changed.md | ||
4148.added.md | ||
4158.added.md | ||
4184.packaging.md | ||
4197.added.md | ||
4205.added.md | ||
4206.added.md | ||
4210.added.md | ||
4210.changed.md | ||
4214.added.md |