Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

please can we kill off USE_FROZEN_DICTS #3941

Closed
richvdh opened this issue Sep 24, 2018 · 10 comments
Closed

please can we kill off USE_FROZEN_DICTS #3941

richvdh opened this issue Sep 24, 2018 · 10 comments
Assignees

Comments

@richvdh
Copy link
Member

richvdh commented Sep 24, 2018

I have just spent an hour wondering why things work on debian at all, despite it only having frozendict 0.5 (which canonicaljson ought to conflict with), and the tests failing spectacularly.

It turns out that in our default config, we set USE_FROZEN_DICTS=False, which does make things work on debian, but also means that our UTs are testing something rather different to our production environment.

Please can we decide whether events should be frozendicts or not?

@richvdh
Copy link
Member Author

richvdh commented Sep 24, 2018

the debian packaging now runs the tests, which means that this is a blocker for doing the next release.

@hawkowl
Copy link
Contributor

hawkowl commented Sep 26, 2018

What do we get by having them be frozendicts? Just ensuring we accidentally don't change it later?

@erikjohnston
Copy link
Member

erikjohnston commented Sep 26, 2018 via email

@richvdh
Copy link
Member Author

richvdh commented Sep 26, 2018

Thanks for the insights, Erik. I wouldn't super object if the default (including for the unit tests) was USE_FROZEN_DICTS=False, and USE_FROZEN_DICTS was enabled for [some of?] the sytest runs. Thoughts?

@erikjohnston
Copy link
Member

erikjohnston commented Sep 26, 2018 via email

@hawkowl
Copy link
Contributor

hawkowl commented Sep 26, 2018

Python 3.3 has a MappingProxyType, which is a wrapper around a mapping (dict) that is read only, which I think is faster than creating a new FrozenDict.

@hawkowl hawkowl self-assigned this Oct 1, 2018
@hawkowl
Copy link
Contributor

hawkowl commented Oct 1, 2018

Course of action: make it configurable, add it to some of the sytest CI runs, and our unittest runs.

@hawkowl
Copy link
Contributor

hawkowl commented Oct 2, 2018

See PR: #3987

@richvdh
Copy link
Member Author

richvdh commented Oct 2, 2018

Course of action: make it configurable, add it to some of the sytest CI runs, and our unittest runs.

We turned it off for the UT runs, to keep things the same in the UTs and production.

@richvdh richvdh closed this as completed Oct 3, 2018
@richvdh
Copy link
Member Author

richvdh commented Oct 10, 2018

matrix-org/sytest#500 is the PR to turn on frozendicts for sytests.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants