Skip to content

bpo-37206: Unrepresentable default values no longer represented as None. #13933

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions Lib/test/clinic.test
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ test_objects_converter
[clinic start generated code]*/

PyDoc_STRVAR(test_objects_converter__doc__,
"test_objects_converter($module, a, b=None, /)\n"
"test_objects_converter($module, a, b=<unrepresentable>, /)\n"
"--\n"
"\n");

Expand Down Expand Up @@ -126,7 +126,7 @@ exit:

static PyObject *
test_objects_converter_impl(PyObject *module, PyObject *a, PyObject *b)
/*[clinic end generated code: output=58009c0e42b4834e input=4cbb3d9edd2a36f3]*/
/*[clinic end generated code: output=0e461f38d3b2bd08 input=4cbb3d9edd2a36f3]*/


/*[clinic input]
Expand Down Expand Up @@ -1718,8 +1718,8 @@ test_str_converter
[clinic start generated code]*/

PyDoc_STRVAR(test_str_converter__doc__,
"test_str_converter($module, a=None, b=\'ab\', c=\'cd\', d=\'cef\', e=\'gh\',\n"
" f=\'ij\', g=\'kl\', h=\'mn\', /)\n"
"test_str_converter($module, a=<unrepresentable>, b=\'ab\', c=\'cd\',\n"
" d=\'cef\', e=\'gh\', f=\'ij\', g=\'kl\', h=\'mn\', /)\n"
"--\n"
"\n");

Expand Down Expand Up @@ -1765,7 +1765,7 @@ test_str_converter_impl(PyObject *module, const char *a, const char *b,
const char *f, Py_ssize_clean_t f_length,
const char *g, Py_ssize_clean_t g_length,
const char *h, Py_ssize_clean_t h_length)
/*[clinic end generated code: output=8415d82c56154307 input=8afe9da8185cd38c]*/
/*[clinic end generated code: output=ad868ad94a488e32 input=8afe9da8185cd38c]*/


/*[clinic input]
Expand Down
4 changes: 2 additions & 2 deletions Lib/test/test_inspect.py
Original file line number Diff line number Diff line change
Expand Up @@ -2269,8 +2269,8 @@ def p(name): return signature.parameters[name].default
test_callable(d.dump)

# static method
test_callable(str.maketrans)
test_callable('abc'.maketrans)
test_callable(bytes.maketrans)
test_callable(b'abc'.maketrans)

# class method
test_callable(dict.fromkeys)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Default values which cannot be represented as Python objects no longer
improperly represented as ``None`` in function signatures.
Loading