Skip to content
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

stack_size([size]) is actually stack_size(size=0) #69140

Closed
mattip opened this issue Aug 28, 2015 · 8 comments
Closed

stack_size([size]) is actually stack_size(size=0) #69140

mattip opened this issue Aug 28, 2015 · 8 comments
Assignees
Labels
docs Documentation in the Doc dir type-bug An unexpected behavior, bug, or error

Comments

@mattip
Copy link
Contributor

mattip commented Aug 28, 2015

BPO 24952
Nosy @berkerpeksag, @vadmium, @mattip
Files
  • stack_size.patch
  • stack_size2.7.patch
  • stack_size.patch: better patch against 3.5 documentation
  • stack_size2.7.patch: better patch against 2.7 documentation
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = 'https://github.com/vadmium'
    closed_at = <Date 2015-08-31.03:48:28.267>
    created_at = <Date 2015-08-28.14:59:08.065>
    labels = ['type-bug', 'docs']
    title = 'stack_size([size]) is actually stack_size(size=0)'
    updated_at = <Date 2015-08-31.03:48:28.265>
    user = 'https://github.com/mattip'

    bugs.python.org fields:

    activity = <Date 2015-08-31.03:48:28.265>
    actor = 'martin.panter'
    assignee = 'martin.panter'
    closed = True
    closed_date = <Date 2015-08-31.03:48:28.267>
    closer = 'martin.panter'
    components = ['Documentation']
    creation = <Date 2015-08-28.14:59:08.065>
    creator = 'mattip'
    dependencies = []
    files = ['40281', '40282', '40304', '40305']
    hgrepos = []
    issue_num = 24952
    keywords = ['patch']
    message_count = 8.0
    messages = ['249280', '249281', '249302', '249367', '249368', '249376', '249379', '249380']
    nosy_count = 5.0
    nosy_names = ['docs@python', 'python-dev', 'berker.peksag', 'martin.panter', 'mattip']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue24952'
    versions = ['Python 2.7', 'Python 3.4', 'Python 3.5', 'Python 3.6']

    @mattip
    Copy link
    Contributor Author

    mattip commented Aug 28, 2015

    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

    @mattip mattip added docs Documentation in the Doc dir type-bug An unexpected behavior, bug, or error labels Aug 28, 2015
    @mattip
    Copy link
    Contributor Author

    mattip commented Aug 28, 2015

    Add a patch for 2.7

    @vadmium
    Copy link
    Member

    vadmium commented Aug 28, 2015

    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 bpo-8706 about supporting named keyword parameters, and bpo-13386 and bpo-23738 about other possible notations to document the default value.

    @mattip
    Copy link
    Contributor Author

    mattip commented Aug 30, 2015

    Add the default value 0 to the documentation, please review this patch and not the previous one

    @mattip
    Copy link
    Contributor Author

    mattip commented Aug 30, 2015

    Add default value of 0 to documentation for 2.7

    @vadmium
    Copy link
    Member

    vadmium commented Aug 31, 2015

    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.

    @vadmium vadmium assigned vadmium and unassigned docspython Aug 31, 2015
    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Aug 31, 2015

    New changeset 328383905eaf by Martin Panter <vadmium> in branch '3.4':
    Issue bpo-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 bpo-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 bpo-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 bpo-24952: Clarify default argument of stack_size() in threading, thread
    https://hg.python.org/cpython/rev/79afd50396c5

    @vadmium
    Copy link
    Member

    vadmium commented Aug 31, 2015

    Thanks for the patches

    @vadmium vadmium closed this as completed Aug 31, 2015
    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    docs Documentation in the Doc dir type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants