[issue8139] ossaudiodev not initializing its types
Bertrand Janin
report at bugs.python.org
Sun Mar 14 20:36:16 CET 2010
New submission from Bertrand Janin <tamentis at neopulsar.org>:
With Python 3.1.2-rc1, here is what happens when trying to open a mixer:
Python 3.1.2rc1 (r312rc1:78737, Mar 14 2010, 15:17:09)
[GCC 4.3.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import ossaudiodev
>>> m = ossaudiodev.openmixer()
>>> m.fileno()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'ossaudiodev.oss_mixer_device' object has no attribute 'fileno'
This seems to be due to the fact that the module does not initialize its types with PyType_Ready(), hence the Mixer type never gets its tp_getattro property from its parent type. I attached a small patch to fix this.
----------
components: Extension Modules
files: ossaudiodev.c.patch
keywords: patch
messages: 101063
nosy: tamentis
severity: normal
status: open
title: ossaudiodev not initializing its types
type: behavior
versions: Python 3.1, Python 3.2, Python 3.3
Added file: http://bugs.python.org/file16547/ossaudiodev.c.patch
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue8139>
_______________________________________
More information about the Python-bugs-list
mailing list