diff --git a/patsy/eval.py b/patsy/eval.py index 12ce0d4..0919787 100644 --- a/patsy/eval.py +++ b/patsy/eval.py @@ -18,6 +18,7 @@ import tokenize import ast import numbers +import pytest from patsy import PatsyError from patsy.util import PushbackAdapter, no_pickling, assert_no_pickling from patsy.tokens import pretty_untokenize, normalize_token_spacing, python_tokenize @@ -423,6 +424,13 @@ def test_EvalEnvironment_subset(): pytest.raises(NameError, subset_bc.eval, "a") +@pytest.mark.skipif( + sys.version_info >= (3, 13), + reason=( + "`frame.f_locals` may return write-through proxies in Python 3.13+, " + "breaking direct comparison by ids." + ), +) def test_EvalEnvironment_eq(): # Two environments are eq only if they refer to exactly the same # global/local dicts