Skip to content

Commit bc170cb

Browse files
committed
fix(test): deepcopy the SDG fixture instead of pydantic v2 model_copy
The compat leg (3.10, pydantic 1.10) failed v1.3.0's release run on the side-channel regression test: PyApplication.model_copy(deep=True) is v2-only. copy.deepcopy is version-neutral and matches the test's intent (it mutates nested call sites).
1 parent f06ec30 commit bc170cb

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

test/test_dataflow_sdg.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
transitive flow; the module-global write/read pair is stitched across
1010
files; closure captures bind at the definition site.
1111
"""
12+
import copy
13+
1214
import pytest
1315

1416
from pathlib import Path
@@ -210,7 +212,7 @@ def test_sdg_survives_when_jedi_side_channel_is_dark(fixture_app):
210212
site's callee_signature to simulate the side channel going fully dark --
211213
the deterministic body-callee path must carry the graph alone.
212214
"""
213-
app = fixture_app.model_copy(deep=True)
215+
app = copy.deepcopy(fixture_app) # version-neutral; .model_copy is pydantic v2-only
214216
for c in _callable_index(app).values():
215217
for cs in c.call_sites or []:
216218
cs.callee_signature = None

0 commit comments

Comments
 (0)