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

Qiskit / qiskit / 6890289762
87%
main: 88%

Build:
Build:
LAST BUILD BRANCH: dependabot/cargo/mimalloc-0.1.52
DEFAULT BRANCH: main
Ran 16 Nov 2023 12:10PM UTC
Jobs 1
Files 1265
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

16 Nov 2023 10:26AM UTC coverage: 86.963% (+0.02%) from 86.945%
6890289762

push

github

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

* 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.

(cherry picked from commit 3c1a87c48)

Co-authored-by: Jake Lishman <jake.lishman@ibm.com>

2 of 2 new or added lines in 2 files covered. (100.0%)

4 existing lines in 1 file now uncovered.

74217 of 85343 relevant lines covered (86.96%)

92025.04 hits per line

Jobs
ID Job ID Ran Files Coverage
1 6890289762.1 16 Nov 2023 12:10PM UTC 0
86.96
GitHub Action Run
Source Files on build 6890289762
Detailed source file information is not available for this build.
  • Back to Repo
  • ff85be70 on github
  • Prev Build on gh-readonly-queue/stable/0.45/pr-11250-f292e01846a2bf0341dc093f0b832156655e401e (#6880689439)
  • Next Build on stable/0.45 (#6894104286)
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