This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: stack_size([size]) is actually stack_size(size=0)
Type: behavior Stage: resolved
Components: Documentation Versions: Python 3.6, Python 3.4, Python 3.5, Python 2.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: martin.panter Nosy List: berker.peksag, docs@python, martin.panter, mattip, python-dev
Priority: normal Keywords: patch

Created on 2015-08-28 14:59 by mattip, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
stack_size.patch mattip, 2015-08-28 14:59 review
stack_size2.7.patch mattip, 2015-08-28 15:16 review
stack_size.patch mattip, 2015-08-30 19:24 better patch against 3.5 documentation review
stack_size2.7.patch mattip, 2015-08-30 19:30 better patch against 2.7 documentation review
Messages (8)
msg249280 - (view) Author: mattip (mattip) * Date: 2015-08-28 14:59
when using thread.stack_size or threading.stack_size, if no argument is provided the stack size is reset to default. Trivial patch for 3.5 provided
msg249281 - (view) Author: mattip (mattip) * Date: 2015-08-28 15:16
Add a patch for 2.7
msg249302 - (view) Author: Martin Panter (martin.panter) * (Python committer) Date: 2015-08-28 22:21
In my mind this notation implies the folowing should work:

>>> threading.stack_size(size=0)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: stack_size() takes no keyword arguments

Perhaps you really just want make it more explicit that the special value 0 is used by default if the argument omitted? See also Issue 8706 about supporting named keyword parameters, and Issue 13386 and Issue 23738 about other possible notations to document the default value.
msg249367 - (view) Author: mattip (mattip) * Date: 2015-08-30 19:24
Add the default value 0 to the documentation, please review this patch and not the previous one
msg249368 - (view) Author: mattip (mattip) * Date: 2015-08-30 19:30
Add default value of 0 to documentation for 2.7
msg249376 - (view) Author: Martin Panter (martin.panter) * (Python committer) Date: 2015-08-31 01:18
This version looks okay. I’ll commit it when I get a chance.

BTW, there’s no point changing the version for each patch. The version field only applies to the whole bug report.
msg249379 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2015-08-31 03:43
New changeset 328383905eaf by Martin Panter <vadmium> in branch '3.4':
Issue #24952: Clarify default argument of stack_size() in threading, _thread
https://hg.python.org/cpython/rev/328383905eaf

New changeset 606082fa2804 by Martin Panter <vadmium> in branch '3.5':
Issue #24952: Merge 3.4 into 3.5
https://hg.python.org/cpython/rev/606082fa2804

New changeset 501c9ab07996 by Martin Panter <vadmium> in branch 'default':
Issue #24952: Merge 3.5 into 3.6
https://hg.python.org/cpython/rev/501c9ab07996

New changeset 79afd50396c5 by Martin Panter <vadmium> in branch '2.7':
Issue #24952: Clarify default argument of stack_size() in threading, thread
https://hg.python.org/cpython/rev/79afd50396c5
msg249380 - (view) Author: Martin Panter (martin.panter) * (Python committer) Date: 2015-08-31 03:48
Thanks for the patches
History
Date User Action Args
2022-04-11 14:58:20adminsetgithub: 69140
2015-08-31 03:48:28martin.pantersetstatus: open -> closed
resolution: fixed
messages: + msg249380

stage: commit review -> resolved
2015-08-31 03:43:52python-devsetnosy: + python-dev
messages: + msg249379
2015-08-31 01:18:42martin.pantersetversions: + Python 2.7, Python 3.4, Python 3.6
nosy: + berker.peksag

messages: + msg249376

assignee: docs@python -> martin.panter
stage: commit review
2015-08-30 19:30:49mattipsetfiles: + stack_size2.7.patch

messages: + msg249368
versions: + Python 3.5, - Python 2.7
2015-08-30 19:24:37mattipsetfiles: + stack_size.patch

messages: + msg249367
versions: - Python 3.4, Python 3.5, Python 3.6
2015-08-28 22:21:13martin.pantersetnosy: + martin.panter

messages: + msg249302
versions: + Python 3.4, Python 3.5, Python 3.6
2015-08-28 15:16:03mattipsetfiles: + stack_size2.7.patch

messages: + msg249281
versions: + Python 2.7, - Python 3.5
2015-08-28 14:59:08mattipcreate