1212from snakeoil .compatibility import cmp
1313from snakeoil .currying import post_curry , pretty_docs
1414from snakeoil .data_source import local_source
15+ from snakeoil .klass import immutable
1516from snakeoil .mappings import LazyFullValLoadDict
1617from snakeoil .osutils import normpath , pjoin
1718
@@ -49,7 +50,7 @@ def gen_doc_additions(init, slots):
4950 )
5051
5152
52- class fsBase :
53+ class fsBase ( immutable . Simple ) :
5354 """base class, all extensions must derive from this class"""
5455
5556 __slots__ = ("location" , "mtime" , "mode" , "uid" , "gid" )
@@ -63,18 +64,16 @@ class fsBase:
6364 )
6465
6566 klass .inject_richcmp_methods_from_cmp (locals ())
66- klass .inject_immutable_instance (locals ())
6767
6868 def __init__ (self , location , strict = True , ** d ):
6969 d ["location" ] = normpath (location )
7070
71- s = object .__setattr__
7271 if strict :
7372 for k in self .__attrs__ :
74- s (self , k , d [k ])
73+ object . __setattr__ (self , k , d [k ])
7574 else :
7675 for k , v in d .items ():
77- s (self , k , v )
76+ object . __setattr__ (self , k , v )
7877
7978 gen_doc_additions (__init__ , __attrs__ )
8079
0 commit comments