Python < 3.10 - TypeError: 'staticmethod' object is not callable
- 主要言語
- Python
- スター
- 93.8k
- フォーク
- 7.7k
- PR マージ指標
- PR 指標を取得中
説明
### Describe the bug
It looks like ManimGL is no longer compatible with Python < 3.10, as, prior to this Python version, `@staticmethod` were not regular callable (hence, using them as a wrapper didn't work).
See here https://stackoverflow.com/a/76237739.
**Code**:
```python
from manimlib import *
```
**Wrong display or Error traceback**:
```
manim_slides/slide/manimlib.py:4: in
from manimlib import Scene, ThreeDCamera
.venv/lib/python3.9/site-packages/manimlib/__init__.py:12: in
from manimlib.window import *
.venv/lib/python3.9/site-packages/manimlib/window.py:20: in
class Window(PygletWindow):
.venv/lib/python3.9/site-packages/manimlib/window.py:117: in Window
def on_mouse_motion(self, x: int, y: int, dx: int, dy: int) -> None:
E TypeError: 'staticmethod' object is not callable
```
### Additional context
See:
> Static methods ([@staticmethod](https://docs.python.org/3/library/functions.html#staticmethod)) and class methods ([@classmethod](https://docs.python.org/3/library/functions.html#classmethod)) now inherit the method attributes (__module__, __name__, __qualname__, __doc__, __annotations__) and have a new __wrapped__ attribute. Moreover, static methods are now callable as regular functions. (Contributed by Victor Stinner in [bpo-43682](https://bugs.python.org/issue?@action=redirect&bpo=43682).)
from https://docs.python.org/3/whatsnew/3.10.html
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
評価
この issue はまだ評価されていません。