Skip to content

[Bug]: Cannot await anext_awaitable returned by anext if passed from another function #1011

Description

@jonathandung

Describe the bug

TypeError: object anext_awaitable can't be used in 'await' expression

Operating system

Windows

CPU architecture

x86_64

GraalPy version

25.0.2

JDK version

No response

Context configuration

No response

Steps to reproduce

def function(it): return anext(it, 42)
async def agen(): yield
print(await function(agen()))

Expected behavior

None should be printed.

Stack trace

Additional context

Error occurred in a pytest run in a Github workflow, extracted MRE. No stack trace since I don't have GraalPy on my computer.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions