Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Infinite loop (and OOM later) with datetype library #7786

Closed
minmax opened this issue Apr 27, 2024 · 1 comment
Closed

Infinite loop (and OOM later) with datetype library #7786

minmax opened this issue Apr 27, 2024 · 1 comment
Labels
addressed in next version Issue is fixed and will appear in next published version bug Something isn't working

Comments

@minmax
Copy link

minmax commented Apr 27, 2024

I try to use datetype library, but pyright going wild.

It consume all available memory (for the node) and eventually crashes with

FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory

Lib source code: https://github.com/glyph/DateType
Used lib version: datetype==2024.2.28
Pyright version: 1.1.360

Minimal code to reproduce:

from datetype import AwareDateTime
from datetime import datetime

def foo(d: AwareDateTime):
    pass

foo(datetime.now())

Also if run pyright on https://raw.githubusercontent.com/glyph/DateType/trunk/src/datetype/__init__.py
it will also fail with an OOM.

@minmax minmax added the bug Something isn't working label Apr 27, 2024
erictraut added a commit that referenced this issue Apr 28, 2024
…atching under certain circumstances that involve recursive protocol definitions. This addresses #7786.
@erictraut erictraut added the addressed in next version Issue is fixed and will appear in next published version label Apr 28, 2024
erictraut added a commit that referenced this issue Apr 28, 2024
…atching under certain circumstances that involve recursive protocol definitions. This addresses #7786.
erictraut added a commit that referenced this issue Apr 28, 2024
…otocol matching under certain circumstances that involve recursive protocol definitions. This addresses #7786."

This reverts commit 2870e25.
@erictraut
Copy link
Collaborator

This is addressed in pyright 1.1.361, which I just published.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
addressed in next version Issue is fixed and will appear in next published version bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants