-
-
Notifications
You must be signed in to change notification settings - Fork 114
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
Add unstructuring and structuring support for deque
in standard lib
#355
Conversation
Thanks! I'm going to PyCon soon so my attention here will be somewhat delayed, hope that's ok. |
Never mind, enjoy your trip! Have fun 🤣 Looks like I need to fix some compatibility issues. I only test 3.10 on local yet. |
@Tinche Updated. Could you help to let CI run again? |
Codecov Report
❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more. @@ Coverage Diff @@
## main #355 +/- ##
==========================================
- Coverage 97.55% 89.36% -8.19%
==========================================
Files 21 21
Lines 1675 1702 +27
==========================================
- Hits 1634 1521 -113
- Misses 41 181 +140
... and 5 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
@Tinche PR is ready to review. But follow your schedules, it's fine. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left a comment, other than that, looks good!
Oh. You're right! 😅 My bad Run a real doctest
|
Thanks @lqhuang , good job. Please resolve the changelog merge conflict and let's get this in! |
fe6ebf4
to
baee96b
Compare
Already rebased from main. Thank you so much @Tinche ! |
Env
What's the problem
Current head version of
cattrs
work normally to unstructuredeque
, but fails to structure obj intodeque
(or genericdeque
)Minimal reproducible example:
deque
is a battery-included std container, so I think it's sensible to add a default structure hook for it.Some notable facts:
I once want to also add a structure hook for
defaultdict
, but I thought it's probably difficult to give a factory func fordefaultdict
, which is better to custom by user.What this PR does
_structure_deque()
andis_deque()
test_structuring
,test_converters
)Suggestions and improvements are appreciated!
Thanks :)