<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>You are already naming the cython plugin in your coverage
configuration file, but that error sounds like the plugin isn't
enabled properly. I don't know why that would be.</p>
<p>--Ned.<br>
</p>
<div class="moz-cite-prefix">On 4/8/22 12:45 PM, Jose, Nimi wrote:<br>
</div>
<blockquote type="cite"
cite="mid:DM6PR04MB7049E3FE409AF07A1E4CAC5589E99@DM6PR04MB7049.namprd04.prod.outlook.com">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="Generator" content="Microsoft Word 15 (filtered
medium)">
<style>@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri",sans-serif;
        color:windowtext;}.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;}div.WordSection1
        {page:WordSection1;}</style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
<div class="WordSection1">
<p class="MsoNormal">Hello,<br>
<br>
I would like to ask for help with the coverage measurement
issue I am facing.<br>
<br>
Environment used:<br>
<span style="background:silver;mso-highlight:silver">1.
Coverage.py 6.3.1 with C extension<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="background:silver;mso-highlight:silver">2. Gcc 9.4<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="background:silver;mso-highlight:silver">3. Cython
0.29.28<br>
4. Linux-x86<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="background:silver;mso-highlight:silver">5.
def_encoding: utf-8<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="background:silver;mso-highlight:silver">6.
fs_encoding: utf-8<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="background:silver;mso-highlight:silver">7. python3.8</span><br>
<br>
Folder Structure:<br>
<u><span style="background:silver;mso-highlight:silver">/usr/lib/python3.8/site-packages<br>
--- Source<o:p></o:p></span></u></p>
<p class="MsoNormal"><u><span
style="background:silver;mso-highlight:silver">
-- file.py<br>
--file2.pyx<br>
--- Test<br>
-- test_file.py<o:p></o:p></span></u></p>
<p class="MsoNormal"><u><span
style="background:silver;mso-highlight:silver">
--_init_.py<o:p></o:p></span></u></p>
<p class="MsoNormal"><u><span
style="background:silver;mso-highlight:silver">
--_test</span></u><br>
Content in my .coveragerc is:<br>
<span
style="font-size:11.5pt;font-family:"Arial",sans-serif;color:#1D1C1D;background:silver;mso-highlight:silver">[run]<br>
plugins = Cython.Coverage</span><span
style="font-size:11.5pt;font-family:"Arial",sans-serif;color:#1D1C1D;background:#F8F8F8"><o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.5pt;font-family:"Arial",sans-serif;color:#1D1C1D;background:#F8F8F8"><o:p> </o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.5pt;font-family:"Arial",sans-serif;color:#1D1C1D;background:#F8F8F8">I
have my Source/setup.py with:<br>
</span><span style="background:silver;mso-highlight:silver">#####################################################################<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="background:silver;mso-highlight:silver"># Arguments
for compilation<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="background:silver;mso-highlight:silver">#####################################################################<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="background:silver;mso-highlight:silver"># Directives
to be passed to the Cythonize generator<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="background:silver;mso-highlight:silver">cython_directives
= {<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="background:silver;mso-highlight:silver">
"embedsignature": True,<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="background:silver;mso-highlight:silver">
"language_level": 3,<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="background:silver;mso-highlight:silver">}<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="background:silver;mso-highlight:silver"><o:p> </o:p></span></p>
<p class="MsoNormal"><span
style="background:silver;mso-highlight:silver"># Directives
to be passed to distutils extensions compiler<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="background:silver;mso-highlight:silver">distutils_macros
= []<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="background:silver;mso-highlight:silver"><o:p> </o:p></span></p>
<p class="MsoNormal"><span
style="background:silver;mso-highlight:silver">cython_directives['linetrace']
= True<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="background:silver;mso-highlight:silver">
cython_directives['binding'] = True<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="background:silver;mso-highlight:silver">
distutils_macros.append(('CYTHON_TRACE_NOGIL', '1'))</span><o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">After successfully run the command <span
style="background:red;mso-highlight:red">
coverage run</span> , coverage report generating warnings
says:<br>
<span style="background:yellow;mso-highlight:yellow">/usr/lib/python3.8/site-packages/coverage/report.py:81:
CoverageWarning: Couldn't parse Python file
'/usr/lib/python3.8/site-packages/source/file2.pyx'
(couldnt-parse)<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="background:yellow;mso-highlight:yellow"> coverage._warn(msg,
slug="couldnt-parse")</span><o:p></o:p></p>
<p class="MsoNormal" style="margin-bottom:12.0pt">And coverage
report does not contain any data regarding cython symbols.
<br>
<br>
Can you please help me to figure out the issue with cython
files? What will be the reason for this parsing error and what
is the solution for it?<br>
<br>
Looking forward to hearing from you.<br>
<br>
Thanks in advance!<o:p></o:p></p>
<p class="MsoNormal">Regards,<o:p></o:p></p>
<p class="MsoNormal">Nimi Jose<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</blockquote>
</body>
</html>