<div dir="ltr"><div>Dear Antonio,</div><div><br></div><div>It is hard for us to do that, sorry. The problem is not petsc4py itself, but Cython-generated code. </div><div><br></div><div>The first thing you need is to install in-development Cython (as long as it already supports Py 3.11, I have not checked).</div><div>Then you can use petsc4py from a git checkout, although that may be a bit inconvenient to implement in your build script.<br></div><div>Alternatively, you can keep using the latest release tarball, but then in your build script run `rm <span style="color:rgb(0,0,0);white-space:pre-wrap">src/petsc4py.PETSc.c</span>`, that will force Cython to run again. </div><div>Another way to force C sources regeneration could be `python setup.py build_src --force`.<br></div><div><br></div><div>I hope that helps,</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, 15 Jan 2022 at 12:03, Antonio T. sagitter <<a href="mailto:sagitter@fedoraproject.org">sagitter@fedoraproject.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi all.<br>
<br>
Please, can you adapt petsc4py-3.16.3 to Python-3.11?<br>
We have a special development branch where we move up the use of <br>
Python-3.11 (Python-3.11 is expected for Fedora 37).<br>
<br>
In file included from src/PETSc.c:4:<br>
src/petsc4py.PETSc.c:318:11: error: too few arguments to function <br>
‘PyCode_New’<br>
   318 |           PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, <br>
fn, name, fline, lnos)<br>
       |           ^~~~~~~~~~<br>
src/petsc4py.PETSc.c:341687:34: note: in expansion of macro <br>
‘__Pyx_PyCode_New’<br>
341687 |   __pyx_codeobj__23 = (PyObject*)__Pyx_PyCode_New(0, 0, 3, 0, <br>
CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, <br>
__pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__22, <br>
__pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_PETSc_Log_pyx, <br>
__pyx_n_s_wrapped_func, 110, __pyx_empty_bytes); if <br>
(unlikely(!__pyx_codeobj__23)) __PYX_ERR(28, 110, __pyx_L1_error)<br>
        |                                  ^~~~~~~~~~~~~~~~<br>
<br>
Red Hat Bugzilla's bug: <br>
<a href="https://bugzilla.redhat.com/show_bug.cgi?id=2039365#c3" rel="noreferrer" target="_blank">https://bugzilla.redhat.com/show_bug.cgi?id=2039365#c3</a><br>
<br>
-- <br>
---<br>
Antonio Trande<br>
Fedora Project<br>
mailto: <a href="mailto:sagitter@fedoraproject.org" target="_blank">sagitter@fedoraproject.org</a><br>
GPG key: 0xCC1CFEF30920C8AE<br>
GPG key server: <a href="https://keyserver1.pgp.com/" rel="noreferrer" target="_blank">https://keyserver1.pgp.com/</a><br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div>Lisandro Dalcin<br>============<br>Senior Research Scientist<br>Extreme Computing Research Center (ECRC)<br>King Abdullah University of Science and Technology (KAUST)<br><a href="http://ecrc.kaust.edu.sa/" target="_blank">http://ecrc.kaust.edu.sa/</a><br></div></div></div></div>