Fix tox CI failure using pip constraints file#372
Merged
Conversation
Use a pip constraints file with PIP_CONSTRAINT environment variable to properly constrain setuptools version across all pip operations, including isolated build environments. The previous approach of adding setuptools<70 to tox.ini deps only affected the main tox environment. When pip creates isolated build environments per PEP 517 to build packages from source (like flatdict), it installs the latest setuptools by default. Since setuptools 70+ removed the deprecated pkg_resources module that flatdict 4.0.1's setup.py requires, the build fails. Setting PIP_CONSTRAINT to a constraints file containing setuptools<70 ensures all pip operations (including isolated builds) use setuptools 69.x, which still includes pkg_resources, allowing flatdict to build successfully. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
somethingnew2-0
approved these changes
Feb 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Constrain the
setuptoolsversion across all pip operations, including isolated build environments. This fixes a breakage wherebysetuptools 70+removed the deprecatedpkg_resourcesmodule thatflatdict 4.0.1'ssetup.pyrequires, causing the build to fail:Setting
PIP_CONSTRAINTto a constraints file containingsetuptools<70ensures all pip operations (including isolated builds) usesetuptools 69.x, which still includespkg_resources, allowingflatdictto build successfully.Ideally, we can remove this with future upgrades to the
oktaorflatdictpackages.