Bug: unsupported operand type(s) on Python 3.9
hemebond opened this issue · 0 comments
hemebond commented
System info
- OS:
Linux excession 5.14.0-2-amd64 #1 SMP Debian 5.14.9-2 (2021-10-03) x86_64 GNU/Linux
- Version:
$ python Python 3.9.8 (main, Nov 7 2021, 15:47:09) [GCC 11.2.0] on linux
Describe the bug
When using Python 3.9 importing gimpformats results in a TypeError:
>>> from gimpformats.gimpXcfDocument import GimpDocument
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File ".../gimpformats/gimpXcfDocument.py", line 23, in <module>
from . import utils
File ".../gimpformats/utils.py", line 6, in <module>
def fileOpen(fileName: BytesIO | str) -> tuple[str, bytes]:
TypeError: unsupported operand type(s) for |: 'type' and 'type'
Using a pipe for writing union types is only supported from Python 3.10 (PEP604)