Commits

Amaury Forgeot d'Arc committed 6876c3f

Fix more __metaclass__ constructs

Comments (0)

Files changed (3)

pypy/module/posix/app_posix.py

 error = OSError
 
 
-class stat_result:
-    __metaclass__ = structseqtype
+class stat_result(metaclass=structseqtype):
 
     name = "posix.stat_result"
 

pypy/module/pwd/app_pwd.py

 from _structseq import structseqtype, structseqfield
 
-class struct_passwd:
+class struct_passwd(metaclass=structseqtype):
     """
     pwd.struct_passwd: Results from getpw*() routines.
 
       (pw_name,pw_passwd,pw_uid,pw_gid,pw_gecos,pw_dir,pw_shell)
     or via the object attributes as named in the above tuple.
     """
-    __metaclass__ = structseqtype
     name = "pwd.struct_passwd"
 
     pw_name   = structseqfield(0, "user name")

pypy/module/rctime/app_time.py

 
 from _structseq import structseqtype, structseqfield
 
-class struct_time:
-    __metaclass__ = structseqtype
+class struct_time(metaclass=structseqtype):
     __module__ = 'time'
     name = 'time.struct_time'