Jump to solution
Verify

The Fix

pip install urllib3==2.6.0

Based on closed urllib3/urllib3 issue #3638 · PR/commit linked

Production note: Most teams hit this during upgrades or environment changes. Roll out with a canary and smoke critical endpoints (health, OpenAPI/docs) before 100%.

Jump to Verify Open PR/Commit
@@ -0,0 +1 @@ @@ -0,0 +1 @@ +Ensured successful urllib3 builds by setting Hatchling requirement to >= 1.27.0. \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml
repro.py
[sdist] dist/urllib3-2.5.1.dev5.tar.gz [wheel] dist/urllib3-2.5.1.dev5-py3-none-any.whl
verify
Re-run the minimal reproduction on your broken version, then apply the fix and re-run.
fix.md
Option A — Upgrade to fixed release\npip install urllib3==2.6.0\nWhen NOT to use: This fix is not applicable if using a hatchling version outside the specified range.\n\n

Why This Fix Works in Production

  • Trigger: TypeError: Field `project.license-files` must be a table
  • Mechanism: The hatchling version requirement was incorrectly set, causing build failures
  • Why the fix works: Updated the hatchling version requirements to ensure successful builds. (first fixed release: 2.6.0).
Production impact:
  • If left unfixed, the same config can fail only in production (env differences), causing startup failures or partial feature outages.

Why This Breaks in Prod

  • Shows up under Python 3.13.4 in real deployments (not just unit tests).
  • The hatchling version requirement was incorrectly set, causing build failures
  • Surfaces as: TypeError: Field `project.license-files` must be a table

Proof / Evidence

  • GitHub issue: #3638
  • Fix PR: https://github.com/urllib3/urllib3/pull/3639
  • First fixed release: 2.6.0
  • Reproduced locally: No (not executed)
  • Last verified: 2026-02-09
  • Confidence: 0.85
  • Did this fix it?: Yes (upstream fix exists)
  • Own content ratio: 0.78

Discussion

High-signal excerpts from the issue thread (symptoms, repros, edge-cases).

“### Subject The hatchling>=1.6.0,<2 version requirement is incorrect and results in build failures with any hatchling version between 1.6.0 and 1.27.0 excluded. The error is as follow: This is due to this change being required to address an”
Issue thread · issue description · source

Failure Signature (Search String)

  • TypeError: Field `project.license-files` must be a table

Error Message

Stack trace
error.txt
Error Message ------------- TypeError: Field `project.license-files` must be a table

Minimal Reproduction

repro.py
[sdist] dist/urllib3-2.5.1.dev5.tar.gz [wheel] dist/urllib3-2.5.1.dev5-py3-none-any.whl

Environment

  • Python: 3.13.4
  • urllib3: 2.5.1

Why It Broke

The hatchling version requirement was incorrectly set, causing build failures

Fix Options (Details)

Option A — Upgrade to fixed release Safe default (recommended)

pip install urllib3==2.6.0

When NOT to use: This fix is not applicable if using a hatchling version outside the specified range.

Use when you can deploy the upstream fix. It is usually lower-risk than long-lived workarounds.

Fix reference: https://github.com/urllib3/urllib3/pull/3639

First fixed release: 2.6.0

Last verified: 2026-02-09. Validate in your environment.

Get updates

We publish verified fixes weekly. No spam.

Subscribe

When NOT to Use This Fix

  • This fix is not applicable if using a hatchling version outside the specified range.

Verify Fix

verify
Re-run the minimal reproduction on your broken version, then apply the fix and re-run.

Did This Fix Work in Your Case?

Quick signal helps us prioritize which fixes to verify and improve.

Prevention

  • Add a CI check that diffs key outputs after upgrades (OpenAPI schema snapshots, JSON payload shapes, CLI output).
  • Upgrade behind a canary and run integration tests against the canary before 100% rollout.
  • Add a TLS smoke test that performs a real handshake in CI (include CA bundle validation and hostname checks).
  • Alert on handshake failures by error string and endpoint to catch cert/CA changes quickly.

Version Compatibility Table

VersionStatus
2.6.0 Fixed

Related Issues

No related fixes found.

Sources

We don’t republish the full GitHub discussion text. Use the links above for context.