You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Because the annotations feature was postponed indefinitely, __future__.annotations.getMandatoryRelease() returns None in Python 3.11, which means a planned feature got dropped.
As a result, importing patsy.eval fails with a traceback like:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/home/ben/src/forks/patsy/patsy/__init__.py", line 77, in <module>
import patsy.highlevel
File "/home/ben/src/forks/patsy/patsy/highlevel.py", line 19, in <module>
from patsy.design_info import DesignMatrix, DesignInfo
File "/home/ben/src/forks/patsy/patsy/design_info.py", line 38, in <module>
from patsy.desc import ModelDesc, Term
File "/home/ben/src/forks/patsy/patsy/desc.py", line 14, in <module>
from patsy.eval import EvalEnvironment, EvalFactor
File "/home/ben/src/forks/patsy/patsy/eval.py", line 36, in <module>
_ALL_FUTURE_FLAGS = _all_future_flags()
^^^^^^^^^^^^^^^^^^^
File "/home/ben/src/forks/patsy/patsy/eval.py", line 32, in _all_future_flags
if feature.getMandatoryRelease() > sys.version_info:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: '>' not supported between instances of 'NoneType' and 'sys.version_info'
PR to follow.
The text was updated successfully, but these errors were encountered:
Fixespydata#186 by handling future features where the mandatory release
version is None, indicating the feature was dropped. These are now
included in patsy.eval._ALL_FUTURE_FLAGS rather than causing a
TypeError.
The first appearance of such a feature is in Python 3.11, in which
__future__.annotations.getMandatoryRelease() returns None.
Because the
annotations
feature was postponed indefinitely,__future__.annotations.getMandatoryRelease()
returnsNone
in Python 3.11, which means a planned feature got dropped.As a result, importing
patsy.eval
fails with a traceback like:PR to follow.
The text was updated successfully, but these errors were encountered: