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

Qiskit / qiskit / 6883175831
88%

Build:
DEFAULT BRANCH: main
Ran 15 Nov 2023 09:51PM UTC
Jobs 1
Files 1109
Run time 2min
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

15 Nov 2023 08:28PM UTC coverage: 85.882% (-0.05%) from 85.927%
6883175831

push

github

web-flow
Fix `Channel.__hash__` in multiprocessing contexts (#11251)

* Fix `Channel.__hash__` in multiprocessing contexts

Storing an explicit hash key is fragile in cases that a channel might be
created in a different process to where it might be compared or the hash
used, because the hash seeding can vary depending on how the new
interpreter process was created, especially if it's not done by `fork`.

In this case, transmitting the stored `_hash` over pickle meant that a
`DriveChannel(0)` created in the main process of a macOS runner could
compare equal to a `DriveChannel(0)` created in a separate process
(standard start method `spawn`) and pickled over the wire to the main
process, but have different hashes, violating the Python data model.

Instead, we can just use the standard Python behaviour of creating the
hash on demand when requested; this should typically be preferred unless
absolutely necessary for critical performance reasons, because it will
generally fail safe.

* Fix `hash` and equality in other pulse objects

This removes all caching of items' `hash`es.  This practice is quite
fraught in multiprocessing contexts, and should only be done when it is
absolutely performance critical.

In a couple of cases, the pulse objects were using the cached `hash` as
the main component of their `__eq__` methods, which is not correct; it's
totally valid to have hash collisions without implying that two objects
are equal.

13 of 19 new or added lines in 5 files covered. (68.42%)

31 existing lines in 2 files now uncovered.

65923 of 76760 relevant lines covered (85.88%)

100350.09 hits per line

Jobs
ID Job ID Ran Files Coverage
1 6883175831.1 15 Nov 2023 09:51PM UTC 0
85.88
GitHub Action Run
Source Files on build 6883175831
Detailed source file information is not available for this build.
  • Back to Repo
  • 3c1a87c4 on github
  • Prev Build on gh-readonly-queue/main/pr-11253-f7f6cb1150d057249a0af04d72caac92780065c7 (#6881375153)
  • Next Build on main (#6890932634)
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