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

Sort dicts by their keys to get a stable representation. #118

Closed
wants to merge 2 commits into from
Closed

Sort dicts by their keys to get a stable representation. #118

wants to merge 2 commits into from

Conversation

icemac
Copy link
Contributor

@icemac icemac commented Sep 28, 2023

No description provided.

@viktordick
Copy link
Collaborator

Huh, this conflicts with #116 , where I planned to drop the whole str_repr function because absent support for Python 2 it became equivalent with repr. If I am not mistaken, this function is never called with dicts, the meta contents prepared in zodbsync.py already have dicts converted into sorted lists of tuples.

I have no objection to keeping str_repr around for this corner case, but I would like to understand where you encountered the situation that a dict is passed into str_repr.

@icemac
Copy link
Contributor Author

icemac commented Sep 29, 2023

@viktordick We had dicts of dicts as values in our local object_types.py. Refactoring this to tuples of tuples makes this PR obsolete.

Thank you for pushing me into the right direction.

@icemac icemac closed this Sep 29, 2023
@icemac icemac deleted the sort-dict-keys branch September 29, 2023 08:55
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

Successfully merging this pull request may close these issues.

None yet

2 participants