Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 34k
bpo-41732: add iterator to memoryview#22119
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
Uh oh!
There was an error while loading. Please reload this page.
Conversation
ghost commented Sep 6, 2020 • edited by bedevere-bot
Loading Uh oh!
There was an error while loading. Please reload this page.
edited by bedevere-bot
Uh oh!
There was an error while loading. Please reload this page.
the-knights-who-say-ni commented Sep 6, 2020
Hello, and thanks for your contribution! I'm a bot set up to make sure that the project can legally accept this contribution by verifying everyone involved has signed the PSF contributor agreement (CLA). CLA MissingOur records indicate the following people have not signed the CLA: @dxflores For legal reasons we need all the people listed to sign the CLA before we can look at your contribution. Please follow the steps outlined in the CPython devguide to rectify this issue. If you have recently signed the CLA, please wait at least one business day You can check yourself to see if the CLA has been received. Thanks again for the contribution, we look forward to reviewing it! |
corona10 commented Sep 6, 2020
@dxflores Please sign up for the CLA first! :) I add the reviewers including @gvanrossum since this PR looks like from guido's mentoring :) |
ghost commented Sep 6, 2020
@corona10 I did before. I guess it's not showing up yet but I did sign it. |
gvanrossum commented Sep 6, 2020 via email • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
It may be because your GitHub username changed. |
ghost commented Sep 6, 2020
Guido, I did sign it today (and I changed my username yesterday). I can send you the confirmation via e-mail if you would like. |
gvanrossum commented Sep 6, 2020
No, it just takes time (there's a human in the loop). In a day, try the "check yourself" instructions from the comment about it. In the meantime you can also add a News item (instructions will be revealed when you click "Details" for the failed test). |
gvanrossum left a comment
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.
LGTM. (Diogo is my mentee, I've reviewed the code extensively.)
ghost commented Sep 6, 2020
Thank you Guido, I will check again tomorrow. In the meantime I have added the News item. |
Misc/NEWS.d/next/Library/2020-09-06-20-27-10.bpo-41732.1SKv26.rst Outdated Show resolvedHide resolved
Uh oh!
There was an error while loading. Please reload this page.
Co-authored-by: Dong-hee Na <donghee.na92@gmail.com>
gvanrossum commented Sep 8, 2020
Still curious why the CLA didn’t appear signed. |
ghost commented Sep 8, 2020
Could it have something to do with the fact that I logged in to BPO directly with my e-mail instead of with my GitHub account? |
gvanrossum commented Sep 8, 2020
Probably just a human delay due to Labor Day (a US holiday). It's green now! |
* origin/master: (1373 commits) bpo-1635741: Port mashal module to multi-phase init (python#22149) bpo-1635741: Port _string module to multi-phase init (pythonGH-22148) bpo-1635741: Convert _sha256 types to heap types (pythonGH-22134) bpo-1635741: Port the termios to multi-phase init (PEP 489) (pythonGH-22139) bpo-41732: add iterator to memoryview (pythonGH-22119) bpo-40744: Drop support for SQLite pre 3.7.3 (pythonGH-20909) bpo-41316: Make tarfile follow specs for FNAME (pythonGH-21511) bpo-41720: Add "return NotImplemented" in turtle.Vec2D.__rmul__(). (pythonGH-22092) bpo-1635741 port _curses_panel to multi-phase init (PEP 489) (pythonGH-21986) bpo-1635741: Port _overlapped module to multi-phase init (pythonGH-22051) bpo-1635741: Port _opcode module to multi-phase init (PEP 489) (pythonGH-22050) bpo-1635741 port zlib module to multi-phase init (pythonGH-21995) [doc] Add link to Generic in typing (pythonGH-22125) bpo-41513: Expand comments and add references for a better understanding (pythonGH-22123) bpo-1635741: Port _sha1, _sha512, _md5 to multiphase init (pythonGH-21818) closes bpo-41723: Fix an error in the py_compile documentation. (pythonGH-22110) [doc] Fix padding in some typing definitions (pythonGH-22114) Fix documented Python version for venv --upgrade-deps (pythonGH-22113) bpo-40318: Migrate to SQLite3 trace v2 API (pythonGH-19581) bpo-41687: Fix sendfile implementation to work with Solaris (python#22040) ...
The core SDK validates that if a bytes iterable is provided that the object has an __iter__() method available: https://github.com/Azure/azure-sdk-for-python/blob/08e0cd870062e11e22998d6e10ef55581b35c045/sdk/core/azure-core/azure/core/rest/_helpers.py#L146 However memoryview objects did not expose an __iter__() until Python 3.10 via: python/cpython#22119 We still want to leverage memoryviews when possible to reduce the number of potential copies so we wrap the bytearrays sent for stage_blocks if we are on Python 3.10+. Otherwise, we just directly provide the bytearray as is.
The core SDK validates that if a bytes iterable is provided that the object has an __iter__() method available: https://github.com/Azure/azure-sdk-for-python/blob/08e0cd870062e11e22998d6e10ef55581b35c045/sdk/core/azure-core/azure/core/rest/_helpers.py#L146 However memoryview objects did not expose an __iter__() until Python 3.10 via: python/cpython#22119 We still want to leverage memoryviews when possible to reduce the number of potential copies so we wrap the bytearrays sent for stage_blocks if we are on Python 3.10+. Otherwise, we just directly provide the bytearray as is.
Custom iterator to memoryview - performance improvement while iterating over memoryview objs. bpo
https://bugs.python.org/issue41732