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

Remove test.support.strip_python_stderr() #83172

Closed
vstinner opened this issue Dec 6, 2019 · 4 comments
Closed

Remove test.support.strip_python_stderr() #83172

vstinner opened this issue Dec 6, 2019 · 4 comments
Labels
3.9 only security fixes tests Tests in the Lib/test dir

Comments

@vstinner
Copy link
Member

vstinner commented Dec 6, 2019

BPO 38991
Nosy @gpshead, @vstinner
PRs
  • bpo-38991: Remove test.support.strip_python_stderr() #17490
  • 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 = None
    closed_at = <Date 2019-12-08.07:38:43.487>
    created_at = <Date 2019-12-06.23:39:15.118>
    labels = ['tests', '3.9']
    title = 'Remove test.support.strip_python_stderr()'
    updated_at = <Date 2019-12-08.07:38:43.487>
    user = 'https://github.com/vstinner'

    bugs.python.org fields:

    activity = <Date 2019-12-08.07:38:43.487>
    actor = 'vstinner'
    assignee = 'none'
    closed = True
    closed_date = <Date 2019-12-08.07:38:43.487>
    closer = 'vstinner'
    components = ['Tests']
    creation = <Date 2019-12-06.23:39:15.118>
    creator = 'vstinner'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 38991
    keywords = ['patch']
    message_count = 4.0
    messages = ['357955', '357958', '357960', '357993']
    nosy_count = 2.0
    nosy_names = ['gregory.p.smith', 'vstinner']
    pr_nums = ['17490']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue38991'
    versions = ['Python 3.9']

    @vstinner
    Copy link
    Member Author

    vstinner commented Dec 6, 2019

    Python 3.3 compiled in debug mode dumps the total number of references at exit into stderr. Something like:

    $ python3.3-dbg -X showrefcount -c pass
    [18563 refs, 6496 blocks]

    In Python 3.4, bpo-17323 disabled this feature by default and added -X showrefcount command line option:

    commit 1f8898a
    Author: Ezio Melotti <ezio.melotti@gmail.com>
    Date: Tue Mar 26 01:59:56 2013 +0200

    bpo-17323: The "[X refs, Y blocks]" printed by debug builds has been disabled by default.  It can be re-enabled with the `-X showrefcount` option.
    

    test.support module still has strip_python_stderr() function to remove "[18563 refs, 6496 blocks]" from stderr, but it's now useless.

    Attached PR removes the function. The PR also avoids calling str.strip().

    @vstinner vstinner added 3.9 only security fixes tests Tests in the Lib/test dir labels Dec 6, 2019
    @gpshead
    Copy link
    Member

    gpshead commented Dec 7, 2019

    do we have any buildbots using -X showrefcount?

    @vstinner
    Copy link
    Member Author

    vstinner commented Dec 7, 2019

    do we have any buildbots using -X showrefcount?

    No. What would be the purpose of such buildbot?

    -X showrefcount is tested by test_cmd_line.test_showrefcount().

    I ran "./python -X showrefcount -m test -j0 -r": all tests pass. (test_pty fail when run in parallel, but pass when run sequentially: bpo-38547, it's unrelated to this change).

    @vstinner
    Copy link
    Member Author

    vstinner commented Dec 8, 2019

    New changeset 6cac113 by Victor Stinner in branch 'master':
    bpo-38991: Remove test.support.strip_python_stderr() (GH-17490)
    6cac113

    @vstinner vstinner closed this as completed Dec 8, 2019
    @vstinner vstinner closed this as completed Dec 8, 2019
    @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
    3.9 only security fixes tests Tests in the Lib/test dir
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants