[issue34495] excess_args asserts if args == nullptr

2018-08-24 Thread Tatyana


New submission from Tatyana :

Since version 3.7 PyTuple_GET_SIZE performs assert(PyTuple_Check(args)); Due to 
this change, object_new and object_init cannot be called with args == nullptr.

Such behavior breaks existing user's code, particularly a code generated with 
Swig.

--
components: Library (Lib)
messages: 324041
nosy: tkrasnukha
priority: normal
pull_requests: 8390
severity: normal
status: open
title: excess_args asserts if args == nullptr
type: crash
versions: Python 3.7, Python 3.8

___
Python tracker 
<https://bugs.python.org/issue34495>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue34495] excess_args asserts if args == nullptr

2018-08-29 Thread Tatyana


Tatyana  added the comment:

So, user has to do

PyObject *empty_args = PyTuple_New(0);
inst = PyBaseObject_Type.tp_new(type_obj, empty_args, Py_None);
Py_DECREF(empty_args);


when type_obj doesn't require arguments for constructing?

--

___
Python tracker 
<https://bugs.python.org/issue34495>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com