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

OverflowError: cannot fit 'int' into an index-sized integer #14

Closed
extesy opened this issue Sep 2, 2023 · 2 comments
Closed

OverflowError: cannot fit 'int' into an index-sized integer #14

extesy opened this issue Sep 2, 2023 · 2 comments

Comments

@extesy
Copy link

extesy commented Sep 2, 2023

Here is the minimal test case:

from theine import Cache

cache: Cache = Cache(policy="tlfu", size=10000)

def test1() -> None:
    print(len(cache))
    cache.clear()

def test2() -> None:
    print(len(cache))
    cache.clear()

I am running this test file using pytest. Second test fails with OverflowError: cannot fit 'int' into an index-sized integer error. If I remove cache.clear() then it works. If I change the policy to "clockpro" then it also works.

Environment: MacOS 13.5.1, python 3.8.16.

@Yiling-J
Copy link
Owner

Yiling-J commented Sep 2, 2023

@extesy please upgrade theine-core to v0.4.3 and try again 🙏

@extesy
Copy link
Author

extesy commented Sep 2, 2023

@Yiling-J That fixed the problem. Thank you for a quick response!

@extesy extesy closed this as completed Sep 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants