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

reap threads in test_capi #61451

Closed
ezio-melotti opened this issue Feb 20, 2013 · 8 comments
Closed

reap threads in test_capi #61451

ezio-melotti opened this issue Feb 20, 2013 · 8 comments
Assignees
Labels
stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error

Comments

@ezio-melotti
Copy link
Member

BPO 17249
Nosy @mhammond, @pitrou, @ezio-melotti, @bitdancer, @serhiy-storchaka
Files
  • reap_threads.diff
  • issue17249.diff
  • 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/ezio-melotti'
    closed_at = <Date 2013-02-23.04:02:50.554>
    created_at = <Date 2013-02-20.03:01:29.018>
    labels = ['type-bug', 'library']
    title = 'reap threads in test_capi'
    updated_at = <Date 2013-02-23.04:53:56.504>
    user = 'https://github.com/ezio-melotti'

    bugs.python.org fields:

    activity = <Date 2013-02-23.04:53:56.504>
    actor = 'python-dev'
    assignee = 'ezio.melotti'
    closed = True
    closed_date = <Date 2013-02-23.04:02:50.554>
    closer = 'ezio.melotti'
    components = ['Library (Lib)']
    creation = <Date 2013-02-20.03:01:29.018>
    creator = 'ezio.melotti'
    dependencies = []
    files = ['29126', '29159']
    hgrepos = []
    issue_num = 17249
    keywords = ['patch']
    message_count = 8.0
    messages = ['182463', '182548', '182651', '182667', '182675', '182713', '182714', '182715']
    nosy_count = 6.0
    nosy_names = ['mhammond', 'pitrou', 'ezio.melotti', 'r.david.murray', 'python-dev', 'serhiy.storchaka']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue17249'
    versions = ['Python 2.7', 'Python 3.2', 'Python 3.3', 'Python 3.4']

    @ezio-melotti
    Copy link
    Member Author

    The attached patch fixes the following warning:

    $ ./python -m test test_capi
    [1/1] test_capi
    Warning -- threading._dangling was modified by test_capi
    1 test altered the execution environment:
        test_capi

    This test was introduced in f7993dc6bf26, and it seems to predate unittest. Maybe it should be moved outside test_main while we are at it.

    @ezio-melotti ezio-melotti added tests Tests in the Lib/test dir type-bug An unexpected behavior, bug, or error labels Feb 20, 2013
    @bitdancer
    Copy link
    Member

    Looks like a straightforward translation to me. There's no obvious reason not to move it to being a real test, which means it would sure be nice if we knew why it was left in test_main.

    @ezio-melotti
    Copy link
    Member Author

    The attached patch converts the function in a real test, using proper skips and assert methods.

    @ezio-melotti ezio-melotti added stdlib Python modules in the Lib dir and removed tests Tests in the Lib/test dir labels Feb 22, 2013
    @bitdancer
    Copy link
    Member

    Looks good to to me.

    @serhiy-storchaka
    Copy link
    Member

    This test was introduced in a4154dd5939a.

    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Feb 23, 2013

    New changeset c6ca87fbea39 by Ezio Melotti in branch '2.7':
    bpo-17249: convert a test in test_capi to use unittest and reap threads.
    http://hg.python.org/cpython/rev/c6ca87fbea39

    New changeset 329732a1572f by Ezio Melotti in branch '3.2':
    bpo-17249: convert a test in test_capi to use unittest and reap threads.
    http://hg.python.org/cpython/rev/329732a1572f

    New changeset 81f98372f893 by Ezio Melotti in branch '3.3':
    bpo-17249: merge with 3.2.
    http://hg.python.org/cpython/rev/81f98372f893

    New changeset f716a178b4e1 by Ezio Melotti in branch 'default':
    bpo-17249: merge with 3.3.
    http://hg.python.org/cpython/rev/f716a178b4e1

    @ezio-melotti
    Copy link
    Member Author

    Fixed, thanks for the reviews!

    @ezio-melotti ezio-melotti self-assigned this Feb 23, 2013
    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Feb 23, 2013

    New changeset 041d0f68c67d by Ezio Melotti in branch '2.7':
    bpo-17249: check for the availability of the thread module.
    http://hg.python.org/cpython/rev/041d0f68c67d

    New changeset 01fdf24c9d75 by Ezio Melotti in branch '3.2':
    bpo-17249: check for the availability of the thread module.
    http://hg.python.org/cpython/rev/01fdf24c9d75

    New changeset eb9edac39751 by Ezio Melotti in branch '3.3':
    bpo-17249: null merge.
    http://hg.python.org/cpython/rev/eb9edac39751

    New changeset cb46ccdc226a by Ezio Melotti in branch 'default':
    bpo-17249: null merge.
    http://hg.python.org/cpython/rev/cb46ccdc226a

    @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
    stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    3 participants