• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

Qiskit / qiskit-ibm-runtime / 8100122935 / 10
83%
main: 83%

Build:
DEFAULT BRANCH: main
Ran 29 Feb 2024 05:37PM UTC
Files 184
Run time 7s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

29 Feb 2024 05:27PM UTC coverage: 81.621%. Remained the same
8100122935.10

push

github

web-flow
Migrate from `pkg_resources` to `importlib.metadata` (#1449)

PR #1347 added `setuptools` to `requirements-dev.txt` in an effort
to make `qiskit-ibm-runtime` work with Python 3.12.  However,
`qiskit_ibm_runtime/api/session.py` actually imports `pkg_resources`,
which is provided by setuptools, so really setuptools should have been
added to [`REQUIREMENTS`](https://github.com/Qiskit/qiskit-ibm-runtime/blob/e152d1227/setup.py#L21)
in `setup.py` so that it is installed automatically for any downstream
users of Qiskit Runtime, too.

Better yet, however, is to drop this explicit dependency on setuptools,
since [`pkg_resources` is deprecated](https://setuptools.pypa.io/en/latest/pkg_resources.html)
in favor of `importlib`.  Hence, this PR migrates from `pkg_resources`
to `importlib.metadata` (there are a few more words about this
[here](https://github.com/googleapis/python-api-core/issues/27#issuecomment-676563754)).

My investigation into this was prompted by us trying to add
Python 3.12 support to the circuit-knitting-toolbox
(https://github.com/Qiskit-Extensions/circuit-knitting-toolbox/pull/429),
and seeing CI errors prompted by `qiskit-ibm-runtime`'s importing
of `pkg_resources`.

Co-authored-by: Kevin Tian <kevin.tian@ibm.com>

5085 of 6230 relevant lines covered (81.62%)

0.82 hits per line

Source Files on job unit-tests_python3.10-macOS-latest - 8100122935.10
  • Tree
  • List 184
  • Changed 1
  • Source Changed 1
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 8100122935
  • e151d69f on github
  • Prev Job for on main (#8099839975.1)
  • Next Job for on main (#8103371306.2)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc