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

Cache: Raise KeyError if None is used as key in Cache #6950

Merged

Conversation

pythonic64
Copy link
Contributor

@pythonic64 pythonic64 commented Jun 17, 2020

Continuation of point (1) from #6815.
Request ensures that None cannot be used as key in Cache and avoids KeyError when purging of Cache occurs.
If None is set as key then loop in _purge_by_timeout or _purge_oldest will call Cache.remove with None as key and clear entire category which will result in KeyError be raised in next iteration of the loop.

@matham matham added the Notes: API-break API was broken with backwards incompatibality label Jun 18, 2020
@matham matham merged commit d34097c into kivy:master Jun 18, 2020
@matham matham added this to the 2.0.0 milestone Oct 28, 2020
@matham matham changed the title Raise KeyError if None is used as key in Cache Cache: Raise KeyError if None is used as key in Cache Dec 9, 2020
@matham matham added the Component: Misc compat, cache, tools, network, etc. label Dec 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Misc compat, cache, tools, network, etc. Notes: API-break API was broken with backwards incompatibality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants