-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Update fixedint dependency #43475
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Update fixedint dependency #43475
Conversation
7b4dfc7 to
ed6c7f0
Compare
There was a problem hiding this 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 relaxes the fixedint dependency from an exact pin to a version range to allow future compatible updates and records the change in the unreleased changelog section.
- Updated setup.py to change fixedint from ==0.1.6 to >=0.1.6,<1.0.0
- Added a changelog note documenting the dependency adjustment
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| sdk/monitor/azure-monitor-opentelemetry-exporter/setup.py | Adjusts fixedint dependency specification to a wider semver range. |
| sdk/monitor/azure-monitor-opentelemetry-exporter/CHANGELOG.md | Adds entry noting the relaxed fixedint dependency constraint. |
| _SAMPLING_HASH = 5381 | ||
| _INTEGER_MAX: int = Int32.maxval | ||
| _INTEGER_MIN: int = Int32.minval | ||
| _INTEGER_MAX: int = 2147483647 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we do something like
_INT32_MAX = 2**31 - 1 # 2147483647
_INT32_MIN = -2**31 # -2147483648
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
| ### Bugs Fixed | ||
|
|
||
| ### Other Changes | ||
| - Remove fixedint dependency |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will we never require fixedint?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is only used for a single constant. It's not a good reason to increase or vulnerability surface.
| _SAMPLING_HASH = 5381 | ||
| _INTEGER_MAX: int = Int32.maxval | ||
| _INTEGER_MIN: int = Int32.minval | ||
| _INTEGER_MAX: int = 2147483647 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utils.py also uses from fixedint import Int32
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch, let me see if that's needed
|
Converting to draft until we investigate more |
|
Needs tests for _get_DJB2_sample_score. |
41bbcf6 to
ed6c7f0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Description
Fixedint was added and pinned one day before the latest version came out. Updating it to allow for the latest version. Should be removed in the future.
All SDK Contribution checklist:
General Guidelines and Best Practices
Testing Guidelines