How do I ensure that my code is being executed?
I get error: TypeError: init_builtin() takes exactly 1 argument (0 given) The only source file that can generate that error is Modules/_ctypes/_ctypes.c, but when I make changes to that file such as: PyErr_Format(PyExc_TypeError, "call takes exactly %d arguments XYZABC (%zd given)", inargs_index, actual_args); I do not see any difference after make clean and a full rebuild. How is this possible? I need to debug the arguments passed. Best, Neil
This is a mailing to discuss the development *of* Python, not its *use*.
You should be able to get help from python-list or #python on IRC.
On Tue Jan 20 2015 at 9:44:48 AM Neil Girdhar
I get error:
TypeError: init_builtin() takes exactly 1 argument (0 given)
The only source file that can generate that error is Modules/_ctypes/_ctypes.c, but when I make changes to that file such as:
PyErr_Format(PyExc_TypeError, "call takes exactly %d arguments XYZABC (%zd given)", inargs_index, actual_args);
I do not see any difference after make clean and a full rebuild. How is this possible? I need to debug the arguments passed.
Best,
Neil
_______________________________________________ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/ brett%40python.org
On Tue, Jan 20, 2015, at 09:51, Brett Cannon wrote:
This is a mailing to discuss the development *of* Python, not its *use*. You should be able to get help from python-list or #python on IRC.
To be fair, he's asking to debug his patch in https://bugs.python.org/issue2292
On Tue Jan 20 2015 at 9:53:52 AM Benjamin Peterson
On Tue, Jan 20, 2015, at 09:51, Brett Cannon wrote:
This is a mailing to discuss the development *of* Python, not its *use*. You should be able to get help from python-list or #python on IRC.
To be fair, he's asking to debug his patch in https://bugs.python.org/issue2292
Ah, sorry about that. The issue wasn't referenced in the email.
Sorry, I should have provided more context.
Best,
Neil
On Tue, Jan 20, 2015 at 9:55 AM, Brett Cannon
On Tue Jan 20 2015 at 9:53:52 AM Benjamin Peterson
wrote: On Tue, Jan 20, 2015, at 09:51, Brett Cannon wrote:
This is a mailing to discuss the development *of* Python, not its *use*. You should be able to get help from python-list or #python on IRC.
To be fair, he's asking to debug his patch in https://bugs.python.org/issue2292
Ah, sorry about that. The issue wasn't referenced in the email.
On Tue, Jan 20, 2015 at 3:35 PM, Neil Girdhar
I get error:
TypeError: init_builtin() takes exactly 1 argument (0 given)
The only source file that can generate that error is Modules/_ctypes/_ctypes.c, but when I make changes to that file such as:
PyErr_Format(PyExc_TypeError, "call takes exactly %d arguments XYZABC (%zd given)", inargs_index, actual_args);
I do not see any difference after make clean and a full rebuild. How is this possible? I need to debug the arguments passed.
The message says "argument", the source code says "arguments" (I suppose that you only added the XYZABC), so this cannot be source of this exception. grep for "given" in ceval.c
Good eye! I did the following grep:
~/cpython: grep -R takes.exac *
Doc/c-api/bytes.rst: Identical to :c:func:`PyBytes_FromFormat` except
that it takes exactly two
Doc/c-api/unicode.rst: Identical to :c:func:`PyUnicode_FromFormat` except
that it takes exactly two
Doc/library/unittest.mock.rst: TypeError: <lambda>() takes exactly 3
arguments (1 given)
Doc/whatsnew/2.0.rst:The ``\x`` escape in string literals now takes exactly
2 hex digits. Previously
Lib/test/test_compileall.py: def test_d_takes_exactly_one_dir(self):
Lib/test/test_inspect.py: # f1 takes exactly 2 arguments
Lib/test/test_inspect.py: # f1/f2 takes exactly/at most 2
arguments
Lib/tkinter/__init__.py: # TypeError: setvar() takes exactly 3
arguments (2 given)
Modules/_ctypes/_ctypes.c: "call takes exactly %d
arguments xxx (%zd given)",
Objects/methodobject.c: "%.200s() takes exactly one argument
(%zd given)",
Binary file Objects/methodobject.o matches
Binary file Programs/_freeze_importlib matches
Binary file Programs/_testembed matches
Python/ceval.c: "%.200s() takes exactly one argument
(%d given)",
Python/ceval.c.orig: "%.200s() takes exactly one
argument (%d given)",
Binary file Python/ceval.o matches
Binary file libpython3.5dm.a matches
Binary file python.exe matches
I'll keep searching…
On Tue, Jan 20, 2015 at 9:52 AM, Stefan Ring
On Tue, Jan 20, 2015 at 3:35 PM, Neil Girdhar
wrote: I get error:
TypeError: init_builtin() takes exactly 1 argument (0 given)
The only source file that can generate that error is Modules/_ctypes/_ctypes.c, but when I make changes to that file such as:
PyErr_Format(PyExc_TypeError, "call takes exactly %d arguments XYZABC (%zd given)", inargs_index, actual_args);
I do not see any difference after make clean and a full rebuild. How is this possible? I need to debug the arguments passed.
The message says "argument", the source code says "arguments" (I suppose that you only added the XYZABC), so this cannot be source of this exception.
grep for "given" in ceval.c
Okay, found it thanks.
On Tue, Jan 20, 2015 at 9:59 AM, Neil Girdhar
Good eye! I did the following grep:
~/cpython: grep -R takes.exac * Doc/c-api/bytes.rst: Identical to :c:func:`PyBytes_FromFormat` except that it takes exactly two Doc/c-api/unicode.rst: Identical to :c:func:`PyUnicode_FromFormat` except that it takes exactly two Doc/library/unittest.mock.rst: TypeError: <lambda>() takes exactly 3 arguments (1 given) Doc/whatsnew/2.0.rst:The ``\x`` escape in string literals now takes exactly 2 hex digits. Previously Lib/test/test_compileall.py: def test_d_takes_exactly_one_dir(self): Lib/test/test_inspect.py: # f1 takes exactly 2 arguments Lib/test/test_inspect.py: # f1/f2 takes exactly/at most 2 arguments Lib/tkinter/__init__.py: # TypeError: setvar() takes exactly 3 arguments (2 given) Modules/_ctypes/_ctypes.c: "call takes exactly %d arguments xxx (%zd given)", Objects/methodobject.c: "%.200s() takes exactly one argument (%zd given)", Binary file Objects/methodobject.o matches Binary file Programs/_freeze_importlib matches Binary file Programs/_testembed matches Python/ceval.c: "%.200s() takes exactly one argument (%d given)", Python/ceval.c.orig: "%.200s() takes exactly one argument (%d given)", Binary file Python/ceval.o matches Binary file libpython3.5dm.a matches Binary file python.exe matches
I'll keep searching…
On Tue, Jan 20, 2015 at 9:52 AM, Stefan Ring
wrote: On Tue, Jan 20, 2015 at 3:35 PM, Neil Girdhar
wrote: I get error:
TypeError: init_builtin() takes exactly 1 argument (0 given)
The only source file that can generate that error is Modules/_ctypes/_ctypes.c, but when I make changes to that file such as:
PyErr_Format(PyExc_TypeError, "call takes exactly %d arguments XYZABC (%zd given)", inargs_index, actual_args);
I do not see any difference after make clean and a full rebuild. How is this possible? I need to debug the arguments passed.
The message says "argument", the source code says "arguments" (I suppose that you only added the XYZABC), so this cannot be source of this exception.
grep for "given" in ceval.c
(in fact, it was Python/getargs.c)
On Tue, Jan 20, 2015 at 10:01 AM, Neil Girdhar
Okay, found it thanks.
On Tue, Jan 20, 2015 at 9:59 AM, Neil Girdhar
wrote: Good eye! I did the following grep:
~/cpython: grep -R takes.exac * Doc/c-api/bytes.rst: Identical to :c:func:`PyBytes_FromFormat` except that it takes exactly two Doc/c-api/unicode.rst: Identical to :c:func:`PyUnicode_FromFormat` except that it takes exactly two Doc/library/unittest.mock.rst: TypeError: <lambda>() takes exactly 3 arguments (1 given) Doc/whatsnew/2.0.rst:The ``\x`` escape in string literals now takes exactly 2 hex digits. Previously Lib/test/test_compileall.py: def test_d_takes_exactly_one_dir(self): Lib/test/test_inspect.py: # f1 takes exactly 2 arguments Lib/test/test_inspect.py: # f1/f2 takes exactly/at most 2 arguments Lib/tkinter/__init__.py: # TypeError: setvar() takes exactly 3 arguments (2 given) Modules/_ctypes/_ctypes.c: "call takes exactly %d arguments xxx (%zd given)", Objects/methodobject.c: "%.200s() takes exactly one argument (%zd given)", Binary file Objects/methodobject.o matches Binary file Programs/_freeze_importlib matches Binary file Programs/_testembed matches Python/ceval.c: "%.200s() takes exactly one argument (%d given)", Python/ceval.c.orig: "%.200s() takes exactly one argument (%d given)", Binary file Python/ceval.o matches Binary file libpython3.5dm.a matches Binary file python.exe matches
I'll keep searching…
On Tue, Jan 20, 2015 at 9:52 AM, Stefan Ring
wrote: On Tue, Jan 20, 2015 at 3:35 PM, Neil Girdhar
wrote: I get error:
TypeError: init_builtin() takes exactly 1 argument (0 given)
The only source file that can generate that error is Modules/_ctypes/_ctypes.c, but when I make changes to that file such as:
PyErr_Format(PyExc_TypeError, "call takes exactly %d arguments XYZABC (%zd given)", inargs_index, actual_args);
I do not see any difference after make clean and a full rebuild. How is this possible? I need to debug the arguments passed.
The message says "argument", the source code says "arguments" (I suppose that you only added the XYZABC), so this cannot be source of this exception.
grep for "given" in ceval.c
On Tue, Jan 20, 2015 at 8:35 AM, Neil Girdhar
I get error:
TypeError: init_builtin() takes exactly 1 argument (0 given)
The only source file that can generate that error is Modules/_ctypes/_ctypes.c, but when I make changes to that file such as:
PyErr_Format(PyExc_TypeError, "call takes exactly %d arguments XYZABC (%zd given)", inargs_index, actual_args);
I do not see any difference after make clean and a full rebuild. How is this possible? I need to debug the arguments passed.
Neil, I'm a little bit confused. Why are you modifying the Python interpreter to see if your code (presumably not part of the Python interpreter) is being executed? I will take a stab at your question though, and suggest you aren't actually running the interpreter you just built. Can you provide some more context for your question? One last thing. Are you working on Python itself (python-dev@python.org is the right place to ask questions) or using Python to develop an application (python-dev is not the right place, try python-list@python.org)? Skip
Hi Skip,
I'm trying to finish the implementation of PEP 448. I have updated the
patch to 3.5, fixed the grammar, and the ast. There is a bug with the
argument counting or unpacking, which I can't seem to locate.
Best,
Neil
On Tue, Jan 20, 2015 at 9:53 AM, Skip Montanaro
On Tue, Jan 20, 2015 at 8:35 AM, Neil Girdhar
wrote: I get error:
TypeError: init_builtin() takes exactly 1 argument (0 given)
The only source file that can generate that error is
Modules/_ctypes/_ctypes.c, but when I make changes to that file such as:
PyErr_Format(PyExc_TypeError, "call takes exactly %d arguments XYZABC (%zd
given)",
inargs_index, actual_args);
I do not see any difference after make clean and a full rebuild. How is
this possible? I need to debug the arguments passed.
Neil,
I'm a little bit confused. Why are you modifying the Python interpreter to see if your code (presumably not part of the Python interpreter) is being executed? I will take a stab at your question though, and suggest you aren't actually running the interpreter you just built.
Can you provide some more context for your question?
One last thing. Are you working on Python itself (python-dev@python.org is the right place to ask questions) or using Python to develop an application (python-dev is not the right place, try python-list@python.org)?
Skip
participants (5)
-
Benjamin Peterson
-
Brett Cannon
-
Neil Girdhar
-
Skip Montanaro
-
Stefan Ring