Skip to content

Fix memoryview iter in whats_left.py #4255

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

Closed
wants to merge 1 commit into from

Conversation

tekknolagi
Copy link

@tekknolagi tekknolagi commented Oct 31, 2022

memoryview has no __iter__

@tekknolagi
Copy link
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
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
Author

Oh! I can pivot to doing that instead.

@fanninpm
Copy link
Contributor

fanninpm commented Nov 1, 2022

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

@DimitrisJim
Copy link
Member

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

@DimitrisJim
Copy link
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