Commits

Amaury Forgeot d'Arc committed be8493f

Fix some metaclasses, and the sys module can now be imported

Comments (0)

Files changed (3)

pypy/module/sys/system.py

 app = gateway.applevel("""
 "NOT_RPYTHON"
 from _structseq import structseqtype, structseqfield
-class float_info:
-    __metaclass__ = structseqtype
+class float_info(metaclass=structseqtype):
 
     max = structseqfield(0)
     max_exp = structseqfield(1)
     radix = structseqfield(9)
     rounds = structseqfield(10)
 
-class long_info:
-    __metaclass__ = structseqtype
+class long_info(metaclass=structseqtype):
     bits_per_digit = structseqfield(0)
     sizeof_digit = structseqfield(1)
 """)

pypy/module/sys/version.py

 app = gateway.applevel('''
 "NOT_RPYTHON"
 from _structseq import structseqtype, structseqfield
-class version_info:
-    __metaclass__ = structseqtype
+class version_info(metaclass=structseqtype):
 
     major        = structseqfield(0, "Major release number")
     minor        = structseqfield(1, "Minor release number")

pypy/module/sys/vm.py

 "NOT_RPYTHON"
 from _structseq import structseqtype, structseqfield
 
-class windows_version_info:
-    __metaclass__ = structseqtype
+class windows_version_info(metaclass=structseqtype):
 
     name = "sys.getwindowsversion"