Repository navigation
feat(v4): PR 2 of the 4.0 cut - remove the 3.9 rename/wrapper/alias shims - #860
Conversation
✅ Looks goodNo unmitigated P0/P1 findings identified in the supplied diff. Executive summary
MethodologyNo findings. Checked affected variance routing against Code QualityNo findings. The reviewed callers use canonical parameters, and removed imports and configuration attributes have no remaining production references. PerformanceNo findings. The changes introduce no new numerical workloads or retained-data requirements. MaintainabilityNo findings. Removal probes account for submodule name collisions, and dedicated tests pin rejection of removed interfaces ( Tech DebtNo findings. Existing tracked limitations do not become new silent correctness failures through these changes. SecurityNo findings in the changed code. No apparent secrets or new security-sensitive behavior. Documentation/TestsNo findings. The fragment Validation confidence is limited to source inspection and syntax checks; runtime statistical tests remain unverified in this environment. |
…hims Mechanical shim removals (spec section 9 "4.0 cut sequence" item 2); 62 ledger rows flip terminal under the open cut window, __version__ stays 3.13.0. - Renamed params lose their old spellings (TypeError): DiD.fit time->post (M-030), permutation_test/leave_one_out_test time->post (M-137/M-138), WooldridgeDiD.fit cohort->first_treat (M-032), dCDH fit group/controls -> unit/covariates (M-033/M-034), twowayfeweights group->unit (M-097), every *_col spelling on HAD/RDD/RDPlot/the HAD pretest functions and trim_weights(weight_col) (M-035..M-042, M-088/M-089, M-098..M-113), StackedDiD(clean_control) (M-043), WooldridgeDiDResults.to_dataframe( aggregation)/summary(aggregation) (M-044/M-087), ContinuousDiD(covariates) (M-084); the "event" value spelling is rejected (M-086/M-136/M-150). - robust= dropped on DiD/TWFE/MPD, TripleDifference, HAD, LinearRegression (M-045..M-047, M-115) with the legacy-CR1 remap; resolve_vcov_type is a one-arg validator; _vcov_type_explicit and the replicate-weight hc1 ternary stay. SyntheticDiD lambda_reg/zeta removed (M-001/M-002). - Results-field aliases removed with their serialized dual keys: SDiD placebo_effects (M-003), RDD treatment_col (M-094), StackedDiD(Results) clean_control (M-095), dCDH groups (M-114), CiC estimator (M-143); __setstate__ legacy-key migrations kept so 3.x pickles still load (Wooldridge now pops "event" unconditionally). - The eight wrapper functions (M-070..M-077) and the CDiD/Stacked/Gardner aliases + module __getattr__ (M-132..M-135) are gone; diff_diff.trop / synthetic_control / stacked_did / chaisemartin_dhaultfoeuille now name the submodules. - WooldridgeDiDResults.summary(alpha=None) is positional, routed through the family alpha guard, and renders the headline row only; to_dataframe rejects unknown levels. BusinessReport schema 2.0 -> 3.0 (clean_control key dropped). practitioner routes CiC by .method only. - Enforcement: matrix removed-probe treats a submodule as absent and an explicit-signature absence as removed despite **kwargs (+ self-tests); naming guard allowlist for kept plumbing/__setstate__ keys/shared vocabulary; pytest M-143 filter dropped; spec, migration guide, REPORTING, REGISTRY, guides, api rst, autosummary stubs, benchmarks and notebooks updated; shim-test files converted to removal pins in place.
5aab2c0 to
3063a46
Compare
|
🔁 AI review rerun (requested by @igerber) Head SHA: ✅ Looks goodNo unmitigated P0/P1 findings. The prior approval remains appropriate. Executive summary
MethodologyNo findings. Checked changed variance selection against Code QualityNo findings. Production callers inspected use canonical parameters; no remaining uses of removed PerformanceNo findings. The changes introduce no additional numerical workloads. MaintainabilityNo findings. Removal probes cover submodule name collisions, and legacy result-state migrations remain available. Tech DebtNo findings. No new untracked correctness limitation was identified. SecurityNo findings in the changed code. No apparent secrets or new security-sensitive behavior. Documentation/Tests
Validation completed: syntax parsing of all 86 changed Python files and |
Summary
PR 2 of the 4.0 cut (
docs/v4-design.mdsection 9 "4.0 cut sequence", item 2). The 3.9 rename / wrapper / alias shims whose ledger rows areshimmedwithremoved_in: "4.0"are deleted and 62docs/v4-deprecations.yamlrows flip terminal under the cut window opened by #854.__version__stays3.13.0; the release PR is the last step. No numerical behaviour changes.TypeError):DifferenceInDifferences.fit(time=)->post=(M-030) and the same onpermutation_test/leave_one_out_test(M-137/M-138);WooldridgeDiD.fit(cohort=)->first_treat=(M-032); dCDHfit(group=, controls=)->unit=, covariates=(M-033/M-034) andtwowayfeweights(group=)(M-097); every*_colspelling on HAD, RDD, RDPlot, the HAD pretest functions andtrim_weights(weight_col=)(M-035..M-042, M-088/M-089, M-098..M-113);StackedDiD(clean_control=)->control_group=(M-043);WooldridgeDiDResults.to_dataframe(aggregation=)/summary(aggregation=)->level=(M-044/M-087);ContinuousDiD(covariates=)moves tofit()(M-084). The"event"level spelling is rejected in favour of"event_study"(M-086/M-136/M-150).robust=is dropped on DiD/TWFE/MultiPeriodDiD, TripleDifference, HAD andLinearRegression(M-045..M-047, M-115) together with the legacy-CR1 remap;resolve_vcov_typeis a one-arg validator. The replicate-weighthc1remap and_vcov_type_explicitplumbing stay.SyntheticDiD(lambda_reg=, zeta=)removed (M-001/M-002).placebo_effects(M-003), RDDtreatment_col(M-094), StackedDiD(Results)clean_control(M-095), dCDHgroups(M-114), CiCestimator(M-143). Every__setstate__legacy-key migration is KEPT so 3.x pickles still load (Wooldridge now pops the stale"event"key unconditionally).imputation_did,two_stage_did,stacked_did,trop,synthetic_control,triple_difference,bacon_decompose,chaisemartin_dhaultfoeuille; M-070..M-077) and theCDiD/Stacked/Gardneraliases plus the module__getattr__alias diet (M-132..M-135) are deleted.diff_diff.trop/.synthetic_control/.stacked_did/.chaisemartin_dhaultfoeuillenow name the submodules.WooldridgeDiDResults.summary(alpha=None)is positional like every sibling, routed through the family alpha guard, and renders the headline row only (useaggregate(...)/to_dataframe(level=)for the tables);to_dataframerejects unknown levels.BusinessReport.to_dict()schema2.0->3.0(theassumptionblock'sclean_controlkey is gone;control_groupstays).practitioner_next_stepsroutes CiC by.methodonly.removedprobe treats a resolved submodule as absent (wrapper shared its module's name) and accepts an explicit-signature absence despite**kwargs(+ self-tests); naming-guard allowlist entries for kept plumbing,__setstate__keys and shared vocabulary; the M-143 pytest filter dropped; spec, migration guide, REPORTING/REGISTRY notes, guides, API rst, autosummary stubs, benchmarks and three notebooks updated; shim-test files converted to removal pins in place.llms-full.txtrecommendedtreatment=; the surviving keyword istakeup=. A newtests/test_guides.pypin checks every "removed in 4.0 - use ..." sentence against the realfit()signature.Methodology references (required if estimator / math changes)
classicaldefault, DiD keepshc1, the replicate-weight remap is untouched.Validation
tests/test_v4_rename_mechanical.py,tests/test_v4_rename_semantic.py,tests/test_v4_wrapper_shims.py,tests/test_aliases.py,tests/test_methodology_sdid.py,tests/test_v4_merge_cic.py); matrix probe self-tests intests/test_v4_matrix.py; naming-guard re-pin intests/test_naming_guard.py; migration-sentence pin intests/test_guides.py; ~35 estimator suites migrated to the canonical spellings.changelog_compile.py check, Sphinx-Wbuild, py_compile + 20-row smoke of the edited benchmarks, nbmake on24_staggered_vs_collapsed_power.ipynb(the one notebook with a code-cell edit). Gate simulation: 0 / 63 / 56 due problems at 3.13.0 / 3.14.0 / 4.0.0, as the spec predicts.Security / privacy
Changelog
changelog.d/20261018-v4-pr2-shim-removals.md