Add unstructuring and structuring support for deque in standard lib#355
Add unstructuring and structuring support for deque in standard lib#355Tinche merged 5 commits intopython-attrs:mainfrom
deque in standard lib#355Conversation
|
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. |
Tinche
left a comment
There was a problem hiding this comment.
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
cattrswork normally to unstructuredeque, but fails to structure obj intodeque(or genericdeque)Minimal reproducible example:
dequeis 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 :)