Diaoul / babelfish

BabelFish is a Python library to work with countries and languages
BSD 3-Clause "New" or "Revised" License
25 stars 13 forks source link

Python 3.4 and inspect #15

Closed Toilal closed 10 years ago

Toilal commented 10 years ago

Calling some inspect functions with Python 3.4 on babelfish objects crash with stack overflow. see https://github.com/wackou/guessit/issues/109

>>> from babelfish.language import Language
>>> from inspect import ismethoddescriptor
>>> lang = Language("fra")
>>> ismethoddescriptor(lang)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "D:\Python\x64\Python34\Lib\inspect.py", line 113, in ismethoddescriptor
    return hasattr(tp, "__get__") and not hasattr(tp, "__set__")
  File "D:\devel\workspace\babelfish\babelfish\language.py", line 55, in __getattr__
    return getattr(cls, name)
  File "D:\devel\workspace\babelfish\babelfish\language.py", line 55, in __getattr__
    return getattr(cls, name)
  File "D:\devel\workspace\babelfish\babelfish\language.py", line 55, in __getattr__
    return getattr(cls, name)
  File "D:\devel\workspace\babelfish\babelfish\language.py", line 55, in __getattr__
    return getattr(cls, name)
  File "D:\devel\workspace\babelfish\babelfish\language.py", line 55, in __getattr__
    return getattr(cls, name)
  File "D:\devel\workspace\babelfish\babelfish\language.py", line 55, in __getattr__
    return getattr(cls, name)
  File "D:\devel\workspace\babelfish\babelfish\language.py", line 55, in __getattr__
    return getattr(cls, name)
Toilal commented 10 years ago

dupe