-
Notifications
You must be signed in to change notification settings - Fork 121
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
fix: Replace pkg_resources with importlib.metadata #935
fix: Replace pkg_resources with importlib.metadata #935
Conversation
@@ -39,9 +38,7 @@ | |||
from braket.tasks.local_quantum_task import LocalQuantumTask | |||
from braket.tasks.local_quantum_task_batch import LocalQuantumTaskBatch | |||
|
|||
_simulator_devices = { |
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.
Hi, thank you for the contribution!
Seems that Python 3.9 has a different behavior for using entry_points
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.
@math411 thanks for pointing this out. Updated to use a backport for Python 3.9 as recommend by the offical doc (see the "Compatibility Note" part).
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #935 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 133 133
Lines 8906 8909 +3
Branches 2007 2008 +1
=========================================
+ Hits 8906 8909 +3 ☔ View full report in Codecov by Sentry. |
Hi @math411, thanks for the review! I don't have the write permission to the repo. Feel free to merge when you see fit. |
Description of changes:
pkg_resources
is deprecated since setuptools > 67.5. Import insrc/braket/devices/local_simulator.py
would cause the following warningIt might be good to replace
pkg_resources
with other Python built-in modules, likeimportlib.metadata
.Testing done:
Merge Checklist
Put an
x
in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your pull request.General
Tests
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.