Skip to content

Drop the runtime setuptools pin - #3476

Merged
SVilgelm merged 2 commits into
masterfrom
svilgelm/drop-setuptools-runtime-dep
Oct 22, 2026
Merged

SVilgelm merged 2 commits into
masterfrom
svilgelm/drop-setuptools-runtime-dep

Conversation

@SVilgelm

@SVilgelm SVilgelm commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Why are the changes needed?

flytekit has listed setuptools<82 as a runtime dependency since #3388. That pin only provided pkg_resources, which marshmallow-jsonschema 0.13 and older import on load. Downstream environments that install flytekit are then stuck on setuptools 81 or older, and those versions carry CVE-2026-59890 / GHSA-h35f-9h28-mq5c (fixed in setuptools 83).

marshmallow-jsonschema 0.14.0 switched to importlib.metadata, so the pin is no longer needed.

What changes were proposed in this pull request?

  • Require marshmallow-jsonschema>=0.14.0.
  • Remove setuptools<82 from the runtime dependencies. Nothing in flytekit, its plugins or its tests imports pkg_resources, setuptools or distutils. The [build-system] requirement is unchanged.
  • flytekit-deck-standard: add setuptools<82 to the ydata-profiling and all extras and to its dev requirements. ydata-profiling (latest 4.18.4) still imports pkg_resources without declaring setuptools, so it had only worked because flytekit pulled setuptools in.

How was this patch tested?

Installed dev-requirements.in the way make setup-global-uv does. That resolved setuptools 84.2.1 (which has no pkg_resources) and marshmallow-jsonschema 0.16.0. The make unit_test selection passes: 1964 passed, 23 skipped. tests/flytekit/unit/core and types also pass, including test_type_engine.py, which imports marshmallow_jsonschema directly. flytekit-deck-standard tests pass with the new pin (10 passed).

Check all the applicable boxes

  • I updated the documentation accordingly.
  • All new and existing tests passed.
  • All commits are signed-off.

Related PRs

#3388, #3430

marshmallow-jsonschema 0.14.0 replaced pkg_resources with importlib.metadata, so flytekit no longer needs setuptools at runtime.

Assisted-by: Claude Code <noreply@anthropic.com>
Signed-off-by: Sergey Vilgelm <sergey@union.ai>
ydata-profiling 4.18.4 still imports pkg_resources and doesn't declare setuptools.

Assisted-by: Claude Code <noreply@anthropic.com>
Signed-off-by: Sergey Vilgelm <sergey@union.ai>
@SVilgelm
SVilgelm merged commit 3fbaf5e into master Oct 22, 2026
49 of 56 checks passed
@SVilgelm
SVilgelm deleted the svilgelm/drop-setuptools-runtime-dep branch October 22, 2026 18:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant