Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to 0.16 #25

Merged
merged 3 commits into from
Mar 6, 2022
Merged

Update to 0.16 #25

merged 3 commits into from
Mar 6, 2022

Conversation

Igosuki
Copy link
Contributor

@Igosuki Igosuki commented Mar 3, 2022

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...

@codecov-commenter
Copy link

Codecov Report

Merging #25 (26ac099) into main (ec012da) will decrease coverage by 0.18%.
The diff coverage is 95.23%.

Impacted file tree graph

@@            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%) ⬇️

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.

@davidhewitt
Copy link
Owner

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.

@Igosuki
Copy link
Contributor Author

Igosuki commented Mar 6, 2022

@davidhewitt Thanks, that was the problem I could'nt pick between the two sequence/mapping signatures.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants