Skip to content

fix: replace unmaintained flatdict with internal implementation#455

Closed
pankaj28843 wants to merge 1 commit intozscaler:masterfrom
pankaj28843:fix/remove-flatdict-dependency
Closed

fix: replace unmaintained flatdict with internal implementation#455
pankaj28843 wants to merge 1 commit intozscaler:masterfrom
pankaj28843:fix/remove-flatdict-dependency

Conversation

@pankaj28843
Copy link
Contributor

@pankaj28843 pankaj28843 commented Feb 9, 2026

Replaces flatdict with internal FlatDict implementation.

Problem

flatdict 4.0.1 (last release Feb 2020) uses pkg_resources in setup.py.
setuptools 82+ removed pkg_resources, breaking pip install.

Changes

  • Add FlatDict class to zscaler/utils.py
  • Update import in config_setter.py
  • Remove flatdict from dependencies
  • Update poetry.lock

Testing

All 450 unit tests pass.

Fixes #454

flatdict 4.0.1 uses pkg_resources which was removed in setuptools 82.
Add minimal FlatDict to utils.py with same API for SDK usage.
Remove flatdict from dependencies.

Fixes build with pip 25+ and setuptools 82+.
@pankaj28843 pankaj28843 force-pushed the fix/remove-flatdict-dependency branch from d5f0998 to 635bf50 Compare February 9, 2026 13:38
@willguibr willguibr self-assigned this Feb 11, 2026
@willguibr willguibr added 🐛 type/bug :bug: type/bug documentation Improvements or additions to documentation type/enhancement New feature or request ⚙️ In development ⚙️ Under active development labels Feb 11, 2026
@willguibr willguibr moved this to ⚙️ In development in Zscaler Automation Dashboard 🛣 Feb 11, 2026
@willguibr
Copy link
Member

Hi @pankaj28843 , thank you for taking the time to report this issue and submit a PR — we really appreciate it!

We've addressed this in #457, which replaces flatdict with internal flatten_dict/unflatten_dict helpers (same approach you proposed). Your contribution is credited in the changelog and release notes.
As noted in our README, we're not currently accepting external PRs, but we welcome issue reports and suggestions like yours. Closing this in favor of #457.

Zscaler DevRel

@willguibr willguibr closed this Feb 11, 2026
@github-project-automation github-project-automation bot moved this from ⚙️ In development to 🚀 Shipped in Zscaler Automation Dashboard 🛣 Feb 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🐛 type/bug :bug: type/bug documentation Improvements or additions to documentation ⚙️ In development ⚙️ Under active development type/enhancement New feature or request

Projects

Status: 🚀 Shipped

Development

Successfully merging this pull request may close these issues.

[BUG] Build fails with setuptools 82+ due to flatdict dependency using deprecated pkg_resources

2 participants