Skip to content

fix: add chardet<6 constraint to published engine package#406

Merged
johnnygreco merged 2 commits intomainfrom
fix/chardet-constraint-in-published-pkg
Mar 12, 2026
Merged

fix: add chardet<6 constraint to published engine package#406
johnnygreco merged 2 commits intomainfrom
fix/chardet-constraint-in-published-pkg

Conversation

@johnnygreco
Copy link
Copy Markdown
Contributor

Summary

  • The workspace-level constraint-dependencies in [tool.uv] is not included in published wheel metadata, so PyPI consumers get chardet>=6 (via sqlfluff), triggering RequestsDependencyWarning from requests<2.33
  • Adds chardet>=3.0.2,<6 as an explicit dependency of data-designer-engine so the constraint ships with the published package

Test plan

  • Verified by installing data-designer 0.5.3rc3 from PyPI in a clean venv — chardet==7.1.0 was installed and warning fired
  • Verified by installing from local source with the fix — chardet==5.2.0 was installed and no warning

The workspace-level constraint-dependencies in [tool.uv] is not included
in published wheel metadata, so PyPI consumers still get chardet>=6 via
sqlfluff, triggering RequestsDependencyWarning from requests<2.33.

Move the pin to an explicit dependency in data-designer-engine so it
ships with the package.
@johnnygreco johnnygreco requested a review from a team as a code owner March 12, 2026 22:25
Now that chardet<6 is an explicit dependency of data-designer-engine,
the workspace constraint-dependencies entry is no longer needed.
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Mar 12, 2026

Greptile Summary

This PR fixes a packaging gap where the chardet<6 upper-bound constraint was only defined at the uv workspace level (constraint-dependencies) and therefore never included in published wheel metadata, causing PyPI consumers to receive chardet>=6 via sqlfluff and trigger RequestsDependencyWarning from requests<2.33.

The fix correctly moves the constraint from the workspace root into data-designer-engine's explicit dependency list so it ships with the published package. The lock file is regenerated consistently, resolving chardet==5.2.0.

  • Removed constraint-dependencies = ["chardet>=3.0.2,<6"] from the workspace-level pyproject.toml (it had no effect on published packages)
  • Added chardet>=3.0.2,<6 as an explicit dependency in packages/data-designer-engine/pyproject.toml with an explanatory inline comment
  • Updated uv.lock to reflect the moved constraint and regenerated cleanly at chardet==5.2.0
  • The data-designer meta-package (which depends on data-designer-engine) will transitively inherit the constraint for downstream consumers

Confidence Score: 5/5

  • This PR is safe to merge — it is a targeted, well-reasoned dependency constraint fix with no logic changes and verified test results.
  • The change is minimal and correct: it moves a version constraint from a location that has no effect on published packages to one that does. The lock file resolves consistently, the fix is backed by before/after PyPI install verification described in the test plan, and no application code is touched.
  • No files require special attention.

Important Files Changed

Filename Overview
packages/data-designer-engine/pyproject.toml Adds chardet>=3.0.2,<6 as an explicit published dependency to ensure PyPI consumers receive the upper-bound constraint that was previously only in the workspace-level config and never shipped with the wheel.
pyproject.toml Removes the workspace-level constraint-dependencies for chardet (which was never included in published wheel metadata) now that the constraint has been moved into the engine package itself.
uv.lock Lock file regenerated to reflect the moved constraint: workspace-level constraints entry removed, chardet added as an explicit dependency of data-designer-engine at version 5.2.0; lock revision bumped from 3 to 2.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    subgraph Before["Before (broken for PyPI consumers)"]
        A1["workspace pyproject.toml\nconstraint-dependencies:\nchardet>=3.0.2,<6"] -->|NOT exported to wheel metadata| B1["Published wheel\n(no chardet constraint)"]
        B1 --> C1["pip install data-designer-engine\n→ sqlfluff pulls chardet>=6\n→ requests<2.33 fires\nRequestsDependencyWarning ⚠️"]
    end

    subgraph After["After (fix)"]
        A2["packages/data-designer-engine/\npyproject.toml\ndependencies: chardet>=3.0.2,<6"] -->|Included in wheel metadata| B2["Published wheel\n(chardet>=3.0.2,<6 constraint)"]
        B2 --> C2["pip install data-designer-engine\n→ chardet==5.2.0 resolved\n→ No warning ✅"]
    end
Loading

Last reviewed commit: 0ea5e76

@johnnygreco johnnygreco merged commit 447ed59 into main Mar 12, 2026
47 checks passed
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.

2 participants