GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — bpo-41732: add iterator to memoryview · Pull Request #22119 · python/cpython

Conversation

@ghost

@ghost ghost commented Sep 6, 2020 •
edited by bedevere-bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Custom iterator to memoryview - performance improvement while iterating over memoryview objs. bpo

https://bugs.python.org/issue41732

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Diogo Flores
bpo-41732: add iteratr to memoryview
fdd99ed
@the-knights-who-say-ni the-knights-who-say-ni added the CLA not signed label Sep 6, 2020
@the-knights-who-say-ni

the-knights-who-say-ni commented Sep 6, 2020

Copy link
Copy Markdown

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 Missing

Our 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
before our records are updated.

You can check yourself to see if the CLA has been received.

Thanks again for the contribution, we look forward to reviewing it!

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-bot bedevere-bot added the awaiting review label Sep 6, 2020
@ghost ghost mentioned this pull request Sep 6, 2020
Add iterator to memoryview gvanrossum/cpython#19
Closed
@corona10
corona10 requested review from gvanrossum and vstinner September 6, 2020 13:39
@corona10

corona10 commented Sep 6, 2020

Copy link
Copy Markdown
Member

@dxflores Please sign up for the CLA first! :)

I add the reviewers including @gvanrossum since this PR looks like from guido's mentoring :)

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ghost

ghost commented Sep 6, 2020

Copy link
Copy Markdown
Author

@corona10 I did before. I guess it's not showing up yet but I did sign it.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@gvanrossum

gvanrossum commented Sep 6, 2020 via email •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member
It may be because your GitHub username changed.
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ghost

ghost commented Sep 6, 2020

Copy link
Copy Markdown
Author

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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@gvanrossum

gvanrossum commented Sep 6, 2020

Copy link
Copy Markdown
Member

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

gvanrossum
gvanrossum approved these changes Sep 6, 2020
View reviewed changes

@gvanrossum gvanrossum left a comment

Copy link
Copy Markdown
Member

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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@bedevere-bot bedevere-bot added awaiting merge and removed awaiting review labels Sep 6, 2020
@blurb-it
📜🤖 Added by blurb_it.
f961a13
@ghost

ghost commented Sep 6, 2020

Copy link
Copy Markdown
Author

Thank you Guido, I will check again tomorrow. In the meantime I have added the News item.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

corona10
corona10 reviewed Sep 7, 2020
View reviewed changes
Comment thread Misc/NEWS.d/next/Library/2020-09-06-20-27-10.bpo-41732.1SKv26.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

dxflores @corona10
Update Misc/NEWS.d/next/Library/2020-09-06-20-27-10.bpo-41732.1SKv26.rst
c3dd9cd
Co-authored-by: Dong-hee Na <[email protected]>
corona10
corona10 approved these changes Sep 8, 2020
View reviewed changes
@corona10
corona10 merged commit b0ac5d7 into python:master Sep 8, 2020
@bedevere-bot bedevere-bot removed the awaiting merge label Sep 8, 2020
@gvanrossum

gvanrossum commented Sep 8, 2020

Copy link
Copy Markdown
Member

Still curious why the CLA didn’t appear signed.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ghost

ghost commented Sep 8, 2020

Copy link
Copy Markdown
Author

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?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@gvanrossum

gvanrossum commented Sep 8, 2020

Copy link
Copy Markdown
Member

Probably just a human delay due to Labor Day (a US holiday). It's green now!

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ghost
ghost deleted the memoryview_patch-41732 branch September 9, 2020 19:54
shihai1991 added a commit to shihai1991/cpython that referenced this pull request Sep 10, 2020
@shihai1991
Merge remote-tracking branch 'origin/master' into bpo_1635741_1
00b300c
* 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)
  ...
xzy3 pushed a commit to xzy3/cpython that referenced this pull request Oct 18, 2020
dxflores @xzy3-cdc
bpo-41732: add iterator to memoryview (pythonGH-22119)
3030f56
@DimitrisJim DimitrisJim mentioned this pull request Nov 1, 2022
Fix memoryview iter in whats_left.py RustPython/RustPython#4255
Closed
kyleknap added a commit to kyleknap/azure-storage-for-pytorch that referenced this pull request Apr 30, 2025
@kyleknap
Use memoryviews for writes only for Python 3.10+
176b163
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.
kyleknap added a commit to kyleknap/azure-storage-for-pytorch that referenced this pull request Apr 30, 2025
@kyleknap
Use memoryviews for writes only for Python 3.10+
c7d8931
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@vstinner vstinner Awaiting requested review from vstinner

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@the-knights-who-say-ni @corona10 @gvanrossum @bedevere-bot
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.