Skip to content

LITE-33618: Replace deprecated pkg_resources with importlib.resources for setuptools >= 82 compatibility#121

Merged
arnaugiralt merged 2 commits intomasterfrom
cr/LITE-33618
Mar 2, 2026
Merged

LITE-33618: Replace deprecated pkg_resources with importlib.resources for setuptools >= 82 compatibility#121
arnaugiralt merged 2 commits intomasterfrom
cr/LITE-33618

Conversation

@arnaugiralt
Copy link
Copy Markdown
Member

Extensions fail at runtime when setuptools >= 82 is installed because pkg_resources has been removed. ApplicationBase.get_descriptor() uses pkg_resources.resource_stream() to load extension.json, which breaks with newer setuptools versions. The fix is to replace it with importlib.resources.files() from the standard library (available since Python 3.9), eliminating the implicit setuptools dependency entirely.

Also refactored some brittle tests in test_helpers.

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Feb 11, 2026

CLA assistant check
All committers have signed the CLA.

jonatrios
jonatrios previously approved these changes Feb 27, 2026
@sonarqubecloud
Copy link
Copy Markdown

@arnaugiralt arnaugiralt requested a review from qarlosh March 2, 2026 01:36
@arnaugiralt arnaugiralt merged commit e3c1639 into master Mar 2, 2026
7 checks passed
@arnaugiralt arnaugiralt deleted the cr/LITE-33618 branch March 2, 2026 20:40
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.

4 participants