Initial import from Docker volume

This commit is contained in:
root
2025-12-26 13:11:43 +00:00
commit 4998dc066a
13336 changed files with 1767801 additions and 0 deletions

26
tools/immutabledict.py Executable file
View File

@@ -0,0 +1,26 @@
# This file is part of Tryton. The COPYRIGHT file at the toplevel of this
# repository contains the full copyright notices and license terms.
from copy import deepcopy
class ImmutableDict(dict):
__slots__ = ()
def _not_allowed(cls, *args, **kwargs):
raise TypeError("Operation not allowed on ImmutableDict")
def __deepcopy__(self, memo):
return ImmutableDict(
(k, deepcopy(v, memo=memo)) for k, v in self.items())
__setitem__ = _not_allowed
__delitem__ = _not_allowed
__ior__ = _not_allowed
clear = _not_allowed
pop = _not_allowed
popitem = _not_allowed
setdefault = _not_allowed
update = _not_allowed
del _not_allowed