Remove OrderedDict from auth_store (#108546)

normal dicts keep track of insert order now so this should
no longer be needed
This commit is contained in:
J. Nick Koston 2024-01-20 15:36:43 -10:00 committed by GitHub
parent a042073d2f
commit 3c6e7b188e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -2,7 +2,6 @@
from __future__ import annotations from __future__ import annotations
import asyncio import asyncio
from collections import OrderedDict
from datetime import timedelta from datetime import timedelta
import hmac import hmac
from logging import getLogger from logging import getLogger
@ -319,9 +318,9 @@ class AuthStore:
self._set_defaults() self._set_defaults()
return return
users: dict[str, models.User] = OrderedDict() users: dict[str, models.User] = {}
groups: dict[str, models.Group] = OrderedDict() groups: dict[str, models.Group] = {}
credentials: dict[str, models.Credentials] = OrderedDict() credentials: dict[str, models.Credentials] = {}
# Soft-migrating data as we load. We are going to make sure we have a # Soft-migrating data as we load. We are going to make sure we have a
# read only group and an admin group. There are two states that we can # read only group and an admin group. There are two states that we can
@ -581,9 +580,9 @@ class AuthStore:
def _set_defaults(self) -> None: def _set_defaults(self) -> None:
"""Set default values for auth store.""" """Set default values for auth store."""
self._users = OrderedDict() self._users = {}
groups: dict[str, models.Group] = OrderedDict() groups: dict[str, models.Group] = {}
admin_group = _system_admin_group() admin_group = _system_admin_group()
groups[admin_group.id] = admin_group groups[admin_group.id] = admin_group
user_group = _system_user_group() user_group = _system_user_group()