From 9bd35b2c84c510a7d86301eeb4688c1cc5add71d Mon Sep 17 00:00:00 2001 From: Max Ghenis Date: Sat, 18 Apr 2026 06:51:08 -0400 Subject: [PATCH 1/2] Bump policyengine-core to >=3.25.0 to fix state_fips wipe regression PE-core 3.24.0-3.24.3 cache-invalidation wiped set_input values across apply_reform, which in policyengine-us manifested as state_fips getting cleared and the downstream state_name/state_code chain returning None (PolicyEngine/policyengine-us#8058). 3.25.0 preserves user inputs while still invalidating formula-output caches. Co-Authored-By: Claude Opus 4.7 (1M context) --- changelog.d/bump-pe-core-3.25.fixed.md | 1 + pyproject.toml | 2 +- uv.lock | 18 ++++++++++++++++++ 3 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 changelog.d/bump-pe-core-3.25.fixed.md diff --git a/changelog.d/bump-pe-core-3.25.fixed.md b/changelog.d/bump-pe-core-3.25.fixed.md new file mode 100644 index 00000000000..58d558a6cbd --- /dev/null +++ b/changelog.d/bump-pe-core-3.25.fixed.md @@ -0,0 +1 @@ +Bump `policyengine-core` minimum to `>=3.25.0` to pick up the `set_input` preservation fix from PolicyEngine/policyengine-core#475. Addresses the `state_fips` / `tax_unit_itemizes` / household-dataset regression (PolicyEngine/policyengine-us#8058) where `apply_reform` wiped user-provided dataset inputs during structural reforms. diff --git a/pyproject.toml b/pyproject.toml index 0f600aa89e5..cad2d0df376 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -23,7 +23,7 @@ classifiers = [ dependencies = [ "microdf-python>=1.0.0", "pandas>=2.0", - "policyengine-core>=3.24.4", + "policyengine-core>=3.25.1", "spm-calculator>=0.2.0", "tables>=3.9", "tqdm>=4.67.1", diff --git a/uv.lock b/uv.lock index 48bddffa2fe..a89dad549c0 100644 --- a/uv.lock +++ b/uv.lock @@ -2941,7 +2941,11 @@ wheels = [ [[package]] name = "policyengine-core" +<<<<<<< HEAD version = "3.25.1" +======= +version = "3.25.0" +>>>>>>> 80277c2821 (Bump policyengine-core to >=3.25.0 to fix state_fips wipe regression) source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "dpath" }, @@ -2967,14 +2971,24 @@ dependencies = [ { name = "standard-imghdr" }, { name = "wheel" }, ] +<<<<<<< HEAD sdist = { url = "https://files.pythonhosted.org/packages/37/66/a858dcefd08d0146c12c5c1e28a7614ed1ed673c3a7bf8c342027d694368/policyengine_core-3.25.1.tar.gz", hash = "sha256:6ccb89469f30e6c02d57977aef1f5a2e2802c4c8f10b831529052fc8f1cb90a5", size = 464737, upload-time = "2026-04-18T12:30:27.982Z" } wheels = [ { url = "https://files.pythonhosted.org/packages/4f/cf/4acec9277399ca9452bb66df796a07af90271355f7f8122fbc490603fed1/policyengine_core-3.25.1-py3-none-any.whl", hash = "sha256:196f26e067c1893aba6bde44ae4d1ede799fb6c0823866200500adcf4459d254", size = 230909, upload-time = "2026-04-18T12:30:25.525Z" }, +======= +sdist = { url = "https://files.pythonhosted.org/packages/08/e3/40f11fe87ae718f88359dba6bf5971a1bb9b322dd48069c7881db9006791/policyengine_core-3.25.0.tar.gz", hash = "sha256:3b59a59046465d2f5c959cfe278c598e7deaa94d04a4134f4742d9f24cdbd6de", size = 464281, upload-time = "2026-04-18T00:28:02.949Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/2c/f8/fd60f3c7f02d27c5c83a713cd7779707b4ddff6cd76143a9b4def1c7ec4d/policyengine_core-3.25.0-py3-none-any.whl", hash = "sha256:397127f8842dea12638880c231e6bdec346fb9c9259b7775bb060c06a3b0190b", size = 230805, upload-time = "2026-04-18T00:28:01.311Z" }, +>>>>>>> 80277c2821 (Bump policyengine-core to >=3.25.0 to fix state_fips wipe regression) ] [[package]] name = "policyengine-us" +<<<<<<< HEAD version = "1.653.3" +======= +version = "1.653.2" +>>>>>>> 80277c2821 (Bump policyengine-core to >=3.25.0 to fix state_fips wipe regression) source = { editable = "." } dependencies = [ { name = "microdf-python" }, @@ -3009,7 +3023,11 @@ requires-dist = [ { name = "jupyter-book", marker = "extra == 'dev'", specifier = ">=1.0.4.post1" }, { name = "microdf-python", specifier = ">=1.0.0" }, { name = "pandas", specifier = ">=2.0" }, +<<<<<<< HEAD { name = "policyengine-core", specifier = ">=3.24.4" }, +======= + { name = "policyengine-core", specifier = ">=3.25.0" }, +>>>>>>> 80277c2821 (Bump policyengine-core to >=3.25.0 to fix state_fips wipe regression) { name = "ruff", marker = "extra == 'dev'", specifier = ">=0.9.0" }, { name = "setuptools", marker = "extra == 'dev'", specifier = ">=80.9.0" }, { name = "spm-calculator", specifier = ">=0.2.0" }, From 072031ab4e3c8906849cb07b970b2973512c19bf Mon Sep 17 00:00:00 2001 From: Max Ghenis Date: Sat, 18 Apr 2026 08:41:26 -0400 Subject: [PATCH 2/2] Bump policyengine-core floor to 3.25.1 for _invalidate_all_caches perf fix PE-core 3.25.0 regressed YAML full-suite run time (17 min -> 51+ min per job, hit 1-hour GH Actions timeout) because `_invalidate_all_caches` walked every variable in the tax-benefit system and lazy-created a Holder for each. Fixed upstream in PolicyEngine/policyengine-core#478 by iterating only existing holders, restoring the original sub-second `apply_reform` cost. 3.25.1 ships the fix. Co-Authored-By: Claude Opus 4.7 (1M context) --- uv.lock | 22 ++-------------------- 1 file changed, 2 insertions(+), 20 deletions(-) diff --git a/uv.lock b/uv.lock index a89dad549c0..365f5684780 100644 --- a/uv.lock +++ b/uv.lock @@ -2941,11 +2941,7 @@ wheels = [ [[package]] name = "policyengine-core" -<<<<<<< HEAD version = "3.25.1" -======= -version = "3.25.0" ->>>>>>> 80277c2821 (Bump policyengine-core to >=3.25.0 to fix state_fips wipe regression) source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "dpath" }, @@ -2971,24 +2967,14 @@ dependencies = [ { name = "standard-imghdr" }, { name = "wheel" }, ] -<<<<<<< HEAD sdist = { url = "https://files.pythonhosted.org/packages/37/66/a858dcefd08d0146c12c5c1e28a7614ed1ed673c3a7bf8c342027d694368/policyengine_core-3.25.1.tar.gz", hash = "sha256:6ccb89469f30e6c02d57977aef1f5a2e2802c4c8f10b831529052fc8f1cb90a5", size = 464737, upload-time = "2026-04-18T12:30:27.982Z" } wheels = [ { url = "https://files.pythonhosted.org/packages/4f/cf/4acec9277399ca9452bb66df796a07af90271355f7f8122fbc490603fed1/policyengine_core-3.25.1-py3-none-any.whl", hash = "sha256:196f26e067c1893aba6bde44ae4d1ede799fb6c0823866200500adcf4459d254", size = 230909, upload-time = "2026-04-18T12:30:25.525Z" }, -======= -sdist = { url = "https://files.pythonhosted.org/packages/08/e3/40f11fe87ae718f88359dba6bf5971a1bb9b322dd48069c7881db9006791/policyengine_core-3.25.0.tar.gz", hash = "sha256:3b59a59046465d2f5c959cfe278c598e7deaa94d04a4134f4742d9f24cdbd6de", size = 464281, upload-time = "2026-04-18T00:28:02.949Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/2c/f8/fd60f3c7f02d27c5c83a713cd7779707b4ddff6cd76143a9b4def1c7ec4d/policyengine_core-3.25.0-py3-none-any.whl", hash = "sha256:397127f8842dea12638880c231e6bdec346fb9c9259b7775bb060c06a3b0190b", size = 230805, upload-time = "2026-04-18T00:28:01.311Z" }, ->>>>>>> 80277c2821 (Bump policyengine-core to >=3.25.0 to fix state_fips wipe regression) ] [[package]] name = "policyengine-us" -<<<<<<< HEAD -version = "1.653.3" -======= -version = "1.653.2" ->>>>>>> 80277c2821 (Bump policyengine-core to >=3.25.0 to fix state_fips wipe regression) +version = "1.653.4" source = { editable = "." } dependencies = [ { name = "microdf-python" }, @@ -3023,11 +3009,7 @@ requires-dist = [ { name = "jupyter-book", marker = "extra == 'dev'", specifier = ">=1.0.4.post1" }, { name = "microdf-python", specifier = ">=1.0.0" }, { name = "pandas", specifier = ">=2.0" }, -<<<<<<< HEAD - { name = "policyengine-core", specifier = ">=3.24.4" }, -======= - { name = "policyengine-core", specifier = ">=3.25.0" }, ->>>>>>> 80277c2821 (Bump policyengine-core to >=3.25.0 to fix state_fips wipe regression) + { name = "policyengine-core", specifier = ">=3.25.1" }, { name = "ruff", marker = "extra == 'dev'", specifier = ">=0.9.0" }, { name = "setuptools", marker = "extra == 'dev'", specifier = ">=80.9.0" }, { name = "spm-calculator", specifier = ">=0.2.0" },