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 — [WIP] Investigate asyncio compiler error in wait method by Copilot · Pull Request #6737 · RustPython/RustPython

Conversation

Copilot AI commented Jan 15, 2026 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Contributor
  • Investigate try/finally exception handling around async await to align with CPython
  • Add focused codegen test covering raise inside finally in async context
  • Implement minimal codegen fix for finally exception routing
  • Run targeted codegen tests
Original prompt

This section details on the original issue you should resolve

<issue_title>Investigate asyncio compiler error</issue_title>
<issue_description>## Summary

Originally reported from: #6601 (comment)

Details

written by @terryluan12


As an update, I've narrowed down the hang to an issue in the wait method of the Condition class. I think it's an issue with the AST generation? (but not 100%)

The test that is failing is test_locks.ConditionTests.test_cancelled_error_re_aquire
The relevant function is below

async def wait(self):
    """Wait until notified.

    If the calling task has not acquired the lock when this
    method is called, a RuntimeError is raised.

    This method releases the underlying lock, and then blocks
    until it is awakened by a notify() or notify_all() call for
    the same condition variable in another task.  Once
    awakened, it re-acquires the lock and returns True.

    This method may return spuriously,
    which is why the caller should always
    re-check the state and be prepared to wait() again.
    """
    if not self.locked():
        raise RuntimeError('cannot wait on un-acquired lock')

    fut = self._get_loop().create_future()
    self.release()
    try:
        try:
            self._waiters.append(fut)
            try:
                await fut                          # A) It reaches here fine
                return True
            finally:
                self._waiters.remove(fut)

        finally:
            # Must re-acquire lock even if wait is cancelled.
            # We only catch CancelledError here, since we don't want any
            # other (fatal) errors with the future to cause us to spin.
            err = None
            while True:                             # B) The code enters a loop here to reacquire the lock
                try:
                    await self.acquire()            # C) While waiting here, the task is cancelled
                    break
                except exceptions.CancelledError as e:
                    err = e                         # D) The code reaches here fine

            if err is not None:
                try:
                    raise err                       # E) The error is reraised here
                finally:
                    err = None                      # F) It reaches here
    except BaseException:
        self._notify(1)                             # G) It is supposed to exit here
        raise

Whereas in CPython, the program is supposed to go from F) to G), RustPython instead goes from F) to B), re-entering the final statement again (reaquiring the lock again at C), reaching a deadlock state, and hanging.</issue_description>

<agent_instructions>Investigate the asyncio compiler bug and try to align it with CPython 3.14 compiler</agent_instructions>

Comments on the Issue (you are @copilot in this section)

  • Fixes Investigate asyncio compiler error #6736

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Sorry, something went wrong.

Uh oh!

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

All reactions
Initial plan
0f13975
Copilot AI assigned Copilot and youknowone Jan 15, 2026
@coderabbitai

coderabbitai Bot commented Jan 15, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


Comment @coderabbitai help to get the list of available commands and usage tips.

All reactions

Sorry, something went wrong.

Uh oh!

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

Copilot started work on behalf of youknowone January 15, 2026 08:34
View session
Copilot AI requested a review from youknowone January 15, 2026 09:16
Copilot stopped work on behalf of youknowone due to an error January 15, 2026 09:16
Copilot has encountered an internal error. If the problem persists, please contact GitHub Support, including the request ID `5800:24A883:3FE361:4871D3:6968AFCC`. To retry, leave a comment on this pull request asking Copilot to try again.
@youknowone

youknowone commented Jan 15, 2026

Copy link
Copy Markdown
Member

@copilot try again

All reactions

Sorry, something went wrong.

Uh oh!

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

Copilot started work on behalf of youknowone January 15, 2026 10:24
View session
Copilot stopped work on behalf of youknowone due to an error January 15, 2026 10:41
Copilot has encountered an internal error. If the problem persists, please contact GitHub Support, including the request ID `2C17:215F63:1B076C:1E4D44:6968C3A8`. To retry, leave a comment on this pull request asking Copilot to try again.
@youknowone

youknowone commented Jan 15, 2026

Copy link
Copy Markdown
Member

@copilot try again

All reactions

Sorry, something went wrong.

Uh oh!

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

Copilot started work on behalf of youknowone January 15, 2026 10:51
View session
Copilot stopped work on behalf of youknowone due to an error January 15, 2026 11:08
Copilot has encountered an internal error. If the problem persists, please contact GitHub Support, including the request ID `0401:21525E:335E8A:3A0271:6968CA60`. To retry, leave a comment on this pull request asking Copilot to try again.
@youknowone

youknowone commented Jan 15, 2026

Copy link
Copy Markdown
Member

@copilot try again

All reactions

Sorry, something went wrong.

Uh oh!

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

Copilot started work on behalf of youknowone January 15, 2026 11:29
View session
Copilot stopped work on behalf of youknowone due to an error January 15, 2026 11:43
Copilot has encountered an internal error. If the problem persists, please contact GitHub Support, including the request ID `A3C2:211A72:4D550B:57B8F7:6968D2AF`. To retry, leave a comment on this pull request asking Copilot to try again.
@fanninpm

fanninpm commented Jan 15, 2026

Copy link
Copy Markdown
Contributor

Do you think Copilot is running out of RAM?

All reactions

Sorry, something went wrong.

Uh oh!

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

@manoelhc

manoelhc commented Jan 15, 2026

Copy link
Copy Markdown
"400 Your input exceeds the context window of this model. Please adjust your input and try again."
All reactions

Sorry, something went wrong.

Uh oh!

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

@youknowone

youknowone commented Jan 15, 2026

Copy link
Copy Markdown
Member

@manoelhc could you share how did you check that? I expected those kind of message from error or in session, but couldn't find one

All reactions

Sorry, something went wrong.

Uh oh!

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

@youknowone youknowone mentioned this pull request Jan 15, 2026
Fix asyncio compile #6739
Merged
@youknowone youknowone closed this in #6739 Jan 16, 2026
@manoelhc

manoelhc commented Jan 16, 2026

Copy link
Copy Markdown

@youknowone You can see the copilot info in the Actions tab:

Actions -> Copilot coding agent

https://github.com/RustPython/RustPython/actions/workflows/copilot-swe-agent/copilot

Link of the job

All reactions

Sorry, something went wrong.

Uh oh!

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

@youknowone

youknowone commented Jan 17, 2026

Copy link
Copy Markdown
Member

Thank you!!

All reactions

Sorry, something went wrong.

Uh oh!

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

@youknowone
youknowone deleted the copilot/investigate-asyncio-compiler-error branch March 7, 2026 00:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@youknowone youknowone Awaiting requested review from youknowone

Uh oh!

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

Assignees

@youknowone youknowone

Copilot code review Copilot

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Investigate asyncio compiler error

Uh oh!

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

4 participants

@youknowone @fanninpm @manoelhc
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.