Skip to content

Impl PySequence Protocol#3316

Merged
youknowone merged 46 commits into
RustPython:mainfrom
qingshi163:sequence-protocol
Mar 12, 2022
Merged

Impl PySequence Protocol#3316
youknowone merged 46 commits into
RustPython:mainfrom
qingshi163:sequence-protocol

Conversation

@qingshi163

@qingshi163 qingshi163 commented Oct 15, 2021

Copy link
Copy Markdown
Contributor

@DimitrisJim

DimitrisJim commented Oct 16, 2021

Copy link
Copy Markdown
Member

Mentioning here so it isn't forgotten, ItemProtocol for PyObjectRef should be amended (maybe after #3306?) to also try the sequence protocol after the mapping one (and before trying to grab __getitem__).


// Sequence Protocol
// https://docs.python.org/3/c-api/sequence.html

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.

Suggested change
#[allow(type_complexity)]

Those types are one-time use types.

@youknowone

Copy link
Copy Markdown
Member

I want to request @Snowapril 's review later. He must have been reviewed those mapping/sequence details when he implemented PyMapping

Comment thread vm/src/protocol/sequence.rs Outdated
@youknowone youknowone marked this pull request as draft October 16, 2021 07:24
@youknowone

Copy link
Copy Markdown
Member

@DimitrisJim I think processing #3306 as it is and work on ItemProtocol after this PR would be simpler.

@DimitrisJim

Copy link
Copy Markdown
Member

sounds good to me

@qingshi163 qingshi163 force-pushed the sequence-protocol branch 2 times, most recently from 944eb0d to baeca0a Compare October 17, 2021 09:21
@Snowapril Snowapril mentioned this pull request Nov 15, 2021
@qingshi163 qingshi163 changed the title [WIP] Impl PySequence Protocol Impl PySequence Protocol Dec 7, 2021
@qingshi163 qingshi163 marked this pull request as ready for review December 7, 2021 17:55
@qingshi163 qingshi163 requested a review from youknowone December 7, 2021 17:55
@qingshi163

Copy link
Copy Markdown
Contributor Author

@youknowone will you review this pr?

@Snowapril

Copy link
Copy Markdown
Contributor

@qingshi163 Hello. Could I ask you is there any progress here?
Does only reviewing required for more progress?

@youknowone

Copy link
Copy Markdown
Member

I am sorry, I wasn't aware of pending reveiw request

@youknowone

Copy link
Copy Markdown
Member

@qingshi163 I rebased it to merge, sorry for late review

@youknowone youknowone merged commit def4a2b into RustPython:main Mar 12, 2022
@qingshi163 qingshi163 deleted the sequence-protocol branch May 11, 2022 17:22
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.

4 participants