Victor Stinner

Results 702 comments of Victor Stinner

@mgorny: > $ python3.13 -c 'import foo; foo.bar()' > python3.13: ./Include/internal/pycore_object.h:284: _PyObject_Init: Assertion `_PyType_HasFeature(typeobj, Py_TPFLAGS_HEAPTYPE) || _Py_IsImmortal(typeobj)' failed. > Aborted (core dumped) How did you install this `python3.13`? It seems...

> it's not related debug build I guess. I can reproduce it in non-debug build Python 3.13(install by pyenv) To check if you're using a debug build, you can check:...

The following code is a reference leak, you don't have to INCREF the TypeError exception: ```c Py_INCREF(PyExc_TypeError); PyErr_SetString(PyExc_TypeError, "foo"); return NULL; ``` You should just: ```c PyErr_SetString(PyExc_TypeError, "foo"); return NULL;...

I wrote PR gh-121725 to fix the assertion. I'm not sure if it's correct. It's an heuristic.

Fixed by change https://github.com/python/cpython/commit/b826e459ca6b640f896c2a9551bb2c78d10f0e2b in the main branch. A backport will follow in the 3.13 branch. Thanks for the bug report @mgorny. Thanks everyone who helped to analyze the root...

What's the status of this PR?

Thanks for the `ndarray = None` change ;-)

I merged your PR, thanks @skirpichev. Maybe these tests are not exhaustive, but it's better than no tests!

> Failed subtests: test_rshift_print - test.test_capi.test_number.CAPITest.test_rshift_print Oops, that's a real bug: I wrote PR gh-123338 to fix the tests.

``` >>> a.break_it() >>> float(a) # and only NOW this branch will work... XXX 3.14 ``` I don't understand the example. float(a) does now return XXX? Or does it print...