[pypy-commit] pypy py3k: Fix more __metaclass__ constructs

amauryfa noreply at buildbot.pypy.org
Thu Oct 13 01:33:45 CEST 2011


Author: Amaury Forgeot d'Arc <amauryfa at gmail.com>
Branch: py3k
Changeset: r48008:6876c3ff9b9a
Date: 2011-10-13 01:30 +0200
http://bitbucket.org/pypy/pypy/changeset/6876c3ff9b9a/

Log:	Fix more __metaclass__ constructs

diff --git a/pypy/module/posix/app_posix.py b/pypy/module/posix/app_posix.py
--- a/pypy/module/posix/app_posix.py
+++ b/pypy/module/posix/app_posix.py
@@ -16,8 +16,7 @@
 error = OSError
 
 
-class stat_result:
-    __metaclass__ = structseqtype
+class stat_result(metaclass=structseqtype):
 
     name = "posix.stat_result"
 
diff --git a/pypy/module/pwd/app_pwd.py b/pypy/module/pwd/app_pwd.py
--- a/pypy/module/pwd/app_pwd.py
+++ b/pypy/module/pwd/app_pwd.py
@@ -1,6 +1,6 @@
 from _structseq import structseqtype, structseqfield
 
-class struct_passwd:
+class struct_passwd(metaclass=structseqtype):
     """
     pwd.struct_passwd: Results from getpw*() routines.
 
@@ -8,7 +8,6 @@
       (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")
diff --git a/pypy/module/rctime/app_time.py b/pypy/module/rctime/app_time.py
--- a/pypy/module/rctime/app_time.py
+++ b/pypy/module/rctime/app_time.py
@@ -2,8 +2,7 @@
 
 from _structseq import structseqtype, structseqfield
 
-class struct_time:
-    __metaclass__ = structseqtype
+class struct_time(metaclass=structseqtype):
     __module__ = 'time'
     name = 'time.struct_time'
 


More information about the pypy-commit mailing list