Closed Igosuki closed 2 years ago
Merging #25 (26ac099) into main (ec012da) will decrease coverage by
0.18%
. The diff coverage is95.23%
.
@@ Coverage Diff @@
## main #25 +/- ##
==========================================
- Coverage 80.99% 80.81% -0.19%
==========================================
Files 4 4
Lines 1021 1027 +6
==========================================
+ Hits 827 830 +3
- Misses 194 197 +3
Impacted Files | Coverage Δ | |
---|---|---|
src/de.rs | 88.02% <95.23%> (-0.41%) |
:arrow_down: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 9c1b162...26ac099. Read the comment docs.
Thanks for this!
Regarding the #[pyproto]
deprecation, yes, it's a little unfortunate. Half of the pain is in PyO3 and the other half is here in pythonize
.
The crux of the problem is illustrated by https://pyo3.rs/latest/migration.html#container-magic-methods-now-match-python-behavior. Both Python and PyO3 now generate containers implementations which satisfy both the "mapping" and "sequence" checks by default. (This is different in the #[pyproto]
approach where the differences were explicit.) I would like to add some functionality to PyO3 to tease these apart again.
To deal with this, pythonize
should perhaps try the sequence branch, and if that fails, the mapping branch.
@davidhewitt Thanks, that was the problem I could'nt pick between the two sequence/mapping signatures.
I have no idea why, but despite the deprecation, pyproto is still needed, otherwise CustomList doesn't work. Additionally, CustomDict is not considered a sequence...