FirebirdSQL / python3-driver

Firebird driver for Python that uses new Firebird API
https://www.firebirdsql.org/en/devel-python-driver/
MIT License
27 stars 10 forks source link

Python 3.11-rc2 error: _decompose no longer available in enum.py #14

Closed digitaldutch closed 1 year ago

digitaldutch commented 1 year ago

I just tried the driver in the Python 3.11 rc2 and get an error:

  File "C:\Users\me\AppData\Local\Programs\Python\Python311\Lib\site-packages\firebird\base\config.py", line 58, in <module>
    from enum import Enum, Flag, _decompose
ImportError: cannot import name '_decompose' from 'enum' (C:\Users\me\AppData\Local\Programs\Python\Python311\Lib\enum.py)

The problem is that the _decompose function is no longer available in the 3.11 version of enum.py.

pcisar commented 1 year ago

First, this problem is not in driver itself, but in firebird-base package. Second, fixed was committed to firebird-base, but as this package was already released recently, you should either wait a month for next release, or get the sources from git repository.