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

Qiskit / qiskit / 6883175831 / 1
88%
main: 88%

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

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.

65923 of 76760 relevant lines covered (85.88%)

100350.09 hits per line

Source Files on job 6883175831.1
  • Tree
  • List 0
  • Changed 26
  • Source Changed 0
  • Coverage Changed 7
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 6883175831
  • 3c1a87c4 on github
  • Prev Job for on main (#6881375153.1)
  • Next Job for on main (#6890932634.1)
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