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

Qiskit / qiskit / 10220627516
90%
main: 88%

Build:
Build:
LAST BUILD BRANCH: evolve_sparseobservable
DEFAULT BRANCH: main
Ran 02 Aug 2024 07:14PM UTC
Jobs 1
Files 855
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

02 Aug 2024 06:09PM UTC coverage: 89.944% (-0.02%) from 89.967%
10220627516

push

github

web-flow
Avoid exporting incorrect `PyInit_*` symbols (#12889) (#12893)

Using the `#[pymodule]` derive macro in PyO3 0.21 always causes a
`PyInit_*` symbol with a matching name to be exported in the output
`cdylib`.  This is required for the top-level module, in order for
Python to import it---it needs to know which symbol in a shared library
file it should call---but submodules must be manually initialised, so do
not need it.  Including it is typically harmless (and something we've
been doing for a long time), but it is technically against the coding
rules for CPython extensions[^1].

Recent versions of `abi3audit` (0.0.11+) have tightened their symbol
checkers to better match the CPython guidelines, which causes our wheels
to be rejected by their audits.  This is, in theory, not a break of abi3
because CPython could never introduce an API-elvel `PyInit_*` function
themselves without causing problems, so there ought to be no problems
for our users, even with future Python versions. That said, we still
want to pass the audit, because the coding guidelines are useful.

This commit is not the cleanest way of doing things.  PyO3 0.22 includes
a `#[pymodule(submodule)]` option on the attribute macro, which lets us
use all the standard code generation while suppressing the unnecessary
`PyInit_*` symbol.  When we are ready to move to PyO3 0.22, we probably
want to revert this commit to switch to that form.

[^1]: https://docs.python.org/3/c-api/intro.html

(cherry picked from commit 120b73d21)

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

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

21 existing lines in 4 files now uncovered.

66730 of 74191 relevant lines covered (89.94%)

230583.19 hits per line

Jobs
ID Job ID Ran Files Coverage
1 10220627516.1 02 Aug 2024 07:14PM UTC 0
89.94
GitHub Action Run
Source Files on build 10220627516
Detailed source file information is not available for this build.
  • Back to Repo
  • 5c19652f on github
  • Prev Build on gh-readonly-queue/stable/1.2/pr-12892-ded5957e1fb39e45e415463316b1e7454274e5d4 (#10218314693)
  • Next Build on stable/1.2 (#10221777333)
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