Skip to content

Fix memoryview iter in whats_left.py#4255

Closed
tekknolagi wants to merge 1 commit into
RustPython:mainfrom
tekknolagi:main
Closed

Fix memoryview iter in whats_left.py#4255
tekknolagi wants to merge 1 commit into
RustPython:mainfrom
tekknolagi:main

Conversation

@tekknolagi

@tekknolagi tekknolagi commented Oct 31, 2022

Copy link
Copy Markdown

memoryview has no __iter__

@tekknolagi

Copy link
Copy Markdown
Author

Hold on, I might have completely misread this and the error is something different.

@tekknolagi tekknolagi changed the title Fix type() call in whats_left.py Fix memoryview iter in whats_left.py Oct 31, 2022
memoryview has no __iter__ and instead relies on the __getitem__
iteration.
@DimitrisJim

Copy link
Copy Markdown
Member

Hi @tekknolagi and thanks for the PR. You probably ran this with Python 3.9 which did not have a dedicated iterator. memoryview.__iter__ was added in 3.10 (python/cpython#22119) which we are currently following.

It might make sense to add a check in whats_left.py to inform people that >=3.10 is expected (similarly to the two other checks for the implementation and the -I flag).

@tekknolagi

Copy link
Copy Markdown
Author

Oh! I can pivot to doing that instead.

@fanninpm

fanninpm commented Nov 1, 2022

Copy link
Copy Markdown
Contributor

@DimitrisJim should we be advertising for Python 3.11, or is it too early to do that?

@DimitrisJim

Copy link
Copy Markdown
Member

Hey! Couldn't say with certainty, after we update some libs to 3.11 it might make sense.

@DimitrisJim

Copy link
Copy Markdown
Member

I see what you were trying to do here (fix the cron job for whatsleft.py?).

In that case, this could be solved easily by specifying that python 3.10 be used for the job (see the with used in the equivalent job for generating the cov data).

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