os.statvfs_result constructor incompatible with CPython (TypeError: expected a sequence with exactly 11 items. has 10)
This code works on CPython, but fails on PyPy3 7.3.8:
$ python3.7 -c 'import os; os.statvfs_result((4096, 4096, 20971520, 17750785, 17750785, 1600000, 1275269, 1275269, 4096, 255))'
$ python3.8 -c 'import os; os.statvfs_result((4096, 4096, 20971520, 17750785, 17750785, 1600000, 1275269, 1275269, 4096, 255))'
$ python3.9 -c 'import os; os.statvfs_result((4096, 4096, 20971520, 17750785, 17750785, 1600000, 1275269, 1275269, 4096, 255))'
$ pypy3.7 -c 'import os; os.statvfs_result((4096, 4096, 20971520, 17750785, 17750785, 1600000, 1275269, 1275269, 4096, 255))'
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "<builtin>/frozen _structseq", line 97, in structseq_new
TypeError: expected a sequence with exactly 11 items. has 10
$ pypy3.8 -c 'import os; os.statvfs_result((4096, 4096, 20971520, 17750785, 17750785, 1600000, 1275269, 1275269, 4096, 255))'
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "<builtin>/frozen _structseq", line 97, in structseq_new
TypeError: expected a sequence with exactly 11 items. has 10
$ pypy3.9 -c 'import os; os.statvfs_result((4096, 4096, 20971520, 17750785, 17750785, 1600000, 1275269, 1275269, 4096, 255))'
Traceback (most recent call last):
File "<string>", line 1, in <module>
TypeError: expected a sequence with exactly 11 items. has 10
Context: I'm using os.statvfs_result in a test-suite to monkey-patch os.statvfs(). This worked with some previous PyPy3 version, and it still works with pypy2.7 7.3.8
$ pypy3.7 --version
Python 3.7.12 (c8af402943f0c6c9155c76a45e3b64103783aacf, Feb 18 2022, 12:25:20)
[PyPy 7.3.8 with GCC 10.2.1 20210130 (Red Hat 10.2.1-11)]
$ pypy3.8 --version
Python 3.8.12 (d00b0afd2a5dd3c13fcda75d738262c864c62fa7, Feb 18 2022, 09:52:33)
[PyPy 7.3.8 with GCC 10.2.1 20210130 (Red Hat 10.2.1-11)]
$ pypy3.9 --version
Python 3.9.10 (8276b505180f70c5784a698a510f0a17317a85c3, Feb 19 2022, 16:50:47)
[PyPy 7.3.8 with GCC 10.2.1 20210130 (Red Hat 10.2.1-11)]
$ pypy2.7 --version
Python 2.7.18 (6862351a1edb17bf92c05d0f2c573ca7f9b40726, Feb 18 2022, 13:29:02)
[PyPy 7.3.8 with GCC 10.2.1 20210130 (Red Hat 10.2.1-11)]
I've checked the various PyPy3 versions I still have lying around in my ~/opt/, and this code worked fine with pypy3.7-v7.3.5-linux64, but started raising the TypeError with pypy3.7-v7.3.6-linux64.