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 — Add itertools.chain.__setstate__ by nonzerofloat · Pull Request #3779 · RustPython/RustPython

Conversation

@nonzerofloat

@nonzerofloat nonzerofloat commented Jun 11, 2022

Copy link
Copy Markdown

No description provided.

Sorry, something went wrong.

Uh oh!

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

All reactions
@youknowone

youknowone commented Jun 11, 2022

Copy link
Copy Markdown
Member

@nonzerofloat you may forgot to set git config user.email

All reactions

Sorry, something went wrong.

Uh oh!

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

@nonzerofloat

nonzerofloat commented Jun 11, 2022 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Author

Generally git do not allow commits without an email registered. That's perhaps because the commit's email is not consistent with my account's email. I have fixed.

Correct lint errors.

All reactions

Sorry, something went wrong.

Uh oh!

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

youknowone
youknowone requested changes Jun 13, 2022
View reviewed changes
Comment thread vm/src/stdlib/itertools.rs Resolved

Uh oh!

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

youknowone
youknowone reviewed Jun 13, 2022
View reviewed changes
Comment thread vm/src/stdlib/itertools.rs Outdated
impl IterNextIterable for PyItertoolsChain {}
impl IterNext for PyItertoolsChain {
fn next(zelf: &Py<Self>, vm: &VirtualMachine) -> PyResult<PyIterReturn> {
let iterables = zelf.iterables.read();

@youknowone youknowone Jun 13, 2022

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.

This change may cause dead-lock

Sorry, something went wrong.

Uh oh!

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

All reactions

@nonzerofloat nonzerofloat Jun 15, 2022

Copy link
Copy Markdown
Author

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.

Can you give me more detailed explanation for deadlock? I suspect the place is suitable. Deadlock is unexpected.

Sorry, something went wrong.

Uh oh!

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

All reactions

@youknowone youknowone Jun 16, 2022

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.

Guess we have a chain with self-editing iterable on __iter__. Previously, we locked iterable only before and after get_iter, it is safe.
After change, this line will hold the lock for entire loop. Any write operation in get_iter will be permanently blocked.

Sorry, something went wrong.

Uh oh!

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

All reactions
@rng-dynamics

rng-dynamics commented Jun 19, 2022

Copy link
Copy Markdown
Contributor

The implementation of itertools.chain has changed with #3788. I guess we should rebase this MR onto main (or something similar).

All reactions

Sorry, something went wrong.

Uh oh!

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

@nonzerofloat @youknowone
Add itertools.chain.__setstate__
1ccce90
@youknowone
youknowone force-pushed the issue1 branch from 2228181 to 1ccce90 Compare August 7, 2022 06:16
@dannasman dannasman mentioned this pull request Oct 19, 2022
Chain reduce #4232
Merged
@youknowone

youknowone commented Feb 21, 2023 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Member

Oh, this is done in #4232

Thanks @dannasman !

And thank you for contributing @nonzerofloat

dannasman reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

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

@youknowone youknowone closed this Feb 21, 2023
Josh015
Josh015 reviewed Feb 21, 2023
View reviewed changes
Comment thread vm/src/stdlib/itertools.rs
fn setstate(&self, state: PyTupleRef, vm: &VirtualMachine) -> PyResult<()> {
let args = state.as_slice();
if args.is_empty() {
let msg = String::from("function takes at leat 1 arguments (0 given)");

@Josh015 Josh015 Feb 21, 2023

Copy link
Copy Markdown

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.

leat should be least.

Sorry, something went wrong.

Uh oh!

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

All reactions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@youknowone youknowone youknowone requested changes
+1 more reviewer
@Josh015 Josh015 Josh015 left review comments
Reviewers whose approvals may not affect merge requirements

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

@nonzerofloat @youknowone @rng-dynamics @Josh015
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.