exaloop / exaloop/codon

ContextManager - missing 3 required positional arguments: 'exc_type', 'exc_val', and 'exc_tb'

Open
#758 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
16.8k
Forks
603
Avg merge
4d 23h
Merged PRs (30d)
6

Description

**Given:**
```
def get_session():
class _SessionContext:
def __init__(self):
print("init")

def __enter__(self):
return "enter"

def __exit__(self, exc_type, exc_val, exc_tb):
print("exit")
return _SessionContext()

@codon.jit(pyvars=['get_session'])
def main():
with get_session() as session:
print(session)

main()
```
**Expected:**
Success execution

**Actual:**
Error `is missing 3 required positional arguments: 'exc_type', 'exc_val', and 'exc_tb'`

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.