Skip to content

Conversation

@gemenerik
Copy link
Member

@gemenerik gemenerik commented Aug 7, 2025

  • Update VERSION detection in cfclient/__init__.py to use importlib.metadata instead of the deprecated pkg_resources
  • Maintain same functionality and fallback behavior for different scenarios

- Update VERSION detection in cfclient/__init__.py to use importlib.metadata
  instead of the deprecated pkg_resources
- Maintain same functionality and fallback behavior for different scenarios
@gemenerik gemenerik requested review from ataffanel and Copilot August 7, 2025 12:37
@gemenerik gemenerik self-assigned this Aug 7, 2025
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR modernizes the package version detection by replacing the deprecated pkg_resources with the recommended importlib.metadata for retrieving the cfclient package version.

  • Replaces pkg_resources.require() with importlib.metadata.version()
  • Updates exception handling from DistributionNotFound to PackageNotFoundError

@gemenerik gemenerik requested a review from ArisMorgens August 21, 2025 13:49
Copy link
Member

@ataffanel ataffanel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ataffanel ataffanel merged commit bd0a511 into master Aug 27, 2025
1 check passed
@ataffanel ataffanel deleted the rik/replace-pkg-resources branch August 27, 2025 11: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.

3 participants