Closed rruuaanng closed 1 hour ago
This confuses me, I can't understand why my commit didn't modify anything else, but it gave me this error.
The error "tests may fail, unable to create temporary directory" is not a big deal, you can ignore it. What is the purpose of your issue? I don't understand your problem.
The error "tests may fail, unable to create temporary directory" is not a big deal, you can ignore it. What is the purpose of your issue? I don't understand your problem.
Oh, victor, can you take a look at my PR? I ran that test locally and it passed, but I don't know why it had a strange error in CI.
I can't understand why it would fail, which is very confusing to me. But I run it without any problem.
For more information, see: https://github.com/python/cpython/actions/runs/11123486415/job/30907056284?pr=124747
It seems like you have a more serious issue:
test_copy_to_object (test.test_capi.test_abstract.CAPITest.test_copy_to_object) ...
Windows fatal exception: access violation
For more information, see: https://github.com/python/cpython/actions/runs/11123486415/job/30907056284?pr=124747更多信息,请参见:https://github.com/python/cpython/actions/runs/11123486415/job/30907056284?pr=124747
It seems like you have a more serious issue:看来你可能有一个更严重的问题:
test_copy_to_object (test.test_capi.test_abstract.CAPITest.test_copy_to_object) ... Windows fatal exception: access violation
Yes, his error was in my test case, but it seems he has no problem
#include "Python.h"
static PyObject *
test(PyObject *module, PyObject *args)
{
PyObject *obj;
Py_ssize_t len;
int result;
char *buf, fort;
if (!PyArg_ParseTuple(args, "Os#C", &obj, &buf, &len, &fort)) {
return NULL;
}
result = PyObject_CopyToObject(obj, buf, len, fort);
if (result < 0) {
return NULL;
}
Py_INCREF(obj);
return obj;
}
static PyMethodDef methods[] = {
{"test", test, METH_VARARGS, "Copy data from Python object to buffer"},
{NULL, NULL, 0, NULL}
};
static struct PyModuleDef module = {
PyModuleDef_HEAD_INIT,
"asd",
NULL,
-1,
methods
};
PyMODINIT_FUNC
PyInit_asd(void) {
return PyModule_Create(&module);
}
output
>>> import asd
>>> asd.test(bytes(3), 'aaa', 'C')
b'aaa'
In Lib\test\testcapi\test_abstract.py
static PyObject *
object_copy_to_object(PyObject *self, PyObject *args)
{
PyObject *obj;
Py_ssize_t len;
int result;
char *buf, fort;
// import _testcapi;_testcapi.object_copy_to_object(bytes(3), 'abc', 'C')
if (!PyArg_ParseTuple(args, "Os#C", &obj, &buf, &len, &fort)) {
return NULL;
}
// printf("%s\t%lld\t%c", buf, len, fort);
result = PyObject_CopyToObject(obj, buf, len, fort);
if (result < 0) {
return NULL;
}
Py_INCREF(obj);
return obj;
}
output
>>> import _testcapi
>>>_testcapi.object_copy_to_object(bytes(3), 'abc', 'C')
b'abc'
OMG, what should I do?
I don't understand why he is so bad in CI.
Bug report
Bug description:
For more information, see: https://github.com/python/cpython/actions/runs/11123486415/job/30907056284?pr=124747
CPython versions tested on:
CPython main branch
Operating systems tested on:
Other