FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

implement aiter by sum12 · Pull Request #3646 · RustPython/RustPython · GitHub

implement aiter - #3646

Merged
youknowone merged 3 commits into
RustPython:mainfrom
sum12:aiter
Apr 22, 2022
Merged

implement aiter#3646
youknowone merged 3 commits into
RustPython:mainfrom
sum12:aiter

Conversation

sum12 commented Apr 19, 2022

Copy link
Copy Markdown
Contributor

the caller is expected to make sure that the passed in object does in
fact supports the protocol

relates #3609

Copy link
Copy Markdown
Member

Will you add a simple test if it actually calls __aiter__ from the object?
When possible, we prefer to add tests from CPython's test, but if not possible.
Otherwise, adding a file to extra_tests/snipepts will be enough.
Then our CI will ensure their behavior is same in both CPython and RustPython.

Copy link
Copy Markdown
Contributor

Will you add a simple test if it actually calls __aiter__ from the object?
When possible, we prefer to add tests from CPython's test, but if not possible.
Otherwise, adding a file to extra_tests/snipepts will be enough.
Then our CI will ensure their behavior is same in both CPython and RustPython.

I think we can just update our copy of test_asyncgen.py to the version from CPython 3.10.

Copy link
Copy Markdown
Member

I think you already added tests from the CPython, but here is a guideline if you want to know the regular way: https://github.com/RustPython/RustPython/wiki/How-to-update-test-files

youknowone left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

looks good for codes. I have one more request for the commit message. For the commit for test update (64cb090), please leave the updated source of the CPython version. That will be very useful for future contributor of the file. Because git log Lib/test/test_asyncgen.py will show how it is changed by the history just by looking for the log.

Copy link
Copy Markdown
Member

Because #3647 updated the test file, rebase will be enough

sum12 added 3 commits April 21, 2022 09:48
the caller is expected to make sure that the passed in object does in
fact supports the protocol

relates RustPython#3609

youknowone left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

looks good, thank you!

youknowone merged commit f26c0ba into RustPython:main Apr 22, 2022

Copy link
Copy Markdown
Member

@sum12 If you want, converting it to use slots would be also an approachable task

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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


Back | FazBrowse Home | New Git URL