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

Question/consideration: Python 3.6 and consistent ordering, insertion preservations #39

Closed
kawa-kokosowa opened this issue Jul 7, 2017 · 1 comment

Comments

@kawa-kokosowa
Copy link
Contributor

kawa-kokosowa commented Jul 7, 2017

One of the things that has changed in Python 3.6 is consistent ordering and insertion preservation for datatypes which are hashed (dict, set, etc.). It may be possible to leverage this to your advantage to skip having to sort query string parameters with sorted() in Python 3.6.

I think this may be completely solved by the fact that using sorted is initiated by query_string=True, but then it should be called legacy_cache_key_fix or something?

Just brainstorming, something I thought of... I'll try to come back and elaborate/update the issue.

@ChaoticMind
Copy link

ChaoticMind commented Aug 16, 2017

The Python 3.6 release notes explicitly say that relying on the dict sorting order should be avoided (at least until their implementation is part of an official spec).

So I therefore think a feature relying on it for caching purposes shouldn't be incorporated (if I understand your suggestion correctly).

@sh4nks sh4nks closed this as completed Nov 1, 2017
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 22, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

3 participants