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

C implementation of OkapiIndex._search_wids can crash on Python 3.10+ #48

Merged
merged 3 commits into from
Feb 2, 2024

Conversation

icemac
Copy link
Member

@icemac icemac commented Jan 29, 2024

If a wordinfo of an index contains more than 10 entries it is switched from dict to BTree.

This is not tested in the context of OkapiIndex._search_wids:

  • in Python 3.8+ it shows: DeprecationWarning: an integer is required (got type float). Implicit conversion to integers using __int__ is deprecated, and may be removed in a future version of Python. score(result, items, docid2len, idf, meandoclen)
  • in Python 3.10+ ot breaks with
    • KeyError (32 bit BTree)
    • SystemError (64 bit BTree)

@icemac icemac added the bug label Jan 29, 2024
@icemac icemac self-assigned this Jan 29, 2024
@icemac icemac marked this pull request as ready for review January 29, 2024 10:26
Copy link
Member

@dataflake dataflake left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't have enough knowledge to comment here.

@icemac icemac merged commit d2e67db into master Feb 2, 2024
42 checks passed
@icemac icemac deleted the fix-conversion-problem branch February 2, 2024 12:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants