Skip to content

Commit

Permalink
Merge pull request #187 from musicinmybrain/python3.11
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewwardrop authored Aug 16, 2022
2 parents 5fc8811 + c7da2ad commit bd3c12a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion patsy/eval.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,11 @@ def _all_future_flags():
flags = 0
for feature_name in __future__.all_feature_names:
feature = getattr(__future__, feature_name)
if feature.getMandatoryRelease() > sys.version_info:
mr = feature.getMandatoryRelease()
# None means a planned feature was dropped, or at least postponed
# without a final decision; see, for example,
# https://docs.python.org/3.11/library/__future__.html#id2.
if mr is None or mr > sys.version_info:
flags |= feature.compiler_flag
return flags

Expand Down

0 comments on commit bd3c12a

Please sign in to comment.