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

Rename and document test.bytecode_helper as test.support.bytecode_helper #62778

Closed
ncoghlan opened this issue Jul 28, 2013 · 8 comments
Closed
Labels
3.9 only security fixes docs Documentation in the Doc dir tests Tests in the Lib/test dir type-feature A feature request or enhancement

Comments

@ncoghlan
Copy link
Contributor

BPO 18578
Nosy @ncoghlan, @berkerpeksag, @matrixise, @csabella
PRs
  • bpo-18578: Rename and document test.bytecode_helper as test.support.bytecode_helper #15168
  • Files
  • issue-18578.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 = None
    closed_at = <Date 2019-09-12.09:04:50.971>
    created_at = <Date 2013-07-28.12:35:46.865>
    labels = ['type-feature', 'tests', '3.9', 'docs']
    title = 'Rename and document test.bytecode_helper as test.support.bytecode_helper'
    updated_at = <Date 2019-10-05.23:59:00.431>
    user = 'https://github.com/ncoghlan'

    bugs.python.org fields:

    activity = <Date 2019-10-05.23:59:00.431>
    actor = 'ncoghlan'
    assignee = 'docs@python'
    closed = True
    closed_date = <Date 2019-09-12.09:04:50.971>
    closer = 'matrixise'
    components = ['Documentation', 'Tests']
    creation = <Date 2013-07-28.12:35:46.865>
    creator = 'ncoghlan'
    dependencies = []
    files = ['31247']
    hgrepos = []
    issue_num = 18578
    keywords = ['patch']
    message_count = 8.0
    messages = ['193821', '194905', '194972', '326600', '352055', '352061', '352062', '354026']
    nosy_count = 6.0
    nosy_names = ['ncoghlan', 'docs@python', 'berker.peksag', 'matrixise', 'seydou', 'cheryl.sabella']
    pr_nums = ['15168']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue18578'
    versions = ['Python 3.9']

    @ncoghlan
    Copy link
    Contributor Author

    test.bytecode_helper provides various utilities for sensibly testing bytecode generation. It isn't easy for CPython developers to discover, since it isn't documented and the file is mixed in with actual tests in the main test directory.

    As discussed in bpo-15494, it should be:

    1. Moved from Lib/test/ to Lib/test/support (and imports in tests adjusted accordingly)
    2. Documented in Doc/library/test.rst

    This change only affects the default branch (since test.bytecode_helper is new in 3.4)

    @ncoghlan ncoghlan assigned ncoghlan and unassigned ncoghlan Jul 28, 2013
    @seydou
    Copy link
    Mannequin

    seydou mannequin commented Aug 11, 2013

    I am working on a patch.

    @seydou
    Copy link
    Mannequin

    seydou mannequin commented Aug 12, 2013

    I have a hard time figuring out what exactly BytecodeTestCase methods actually do. Thus the documentation is not probably accurate.

    @ncoghlan ncoghlan self-assigned this Dec 18, 2013
    @ncoghlan ncoghlan removed their assignment Jun 28, 2015
    @csabella
    Copy link
    Contributor

    @seydou, would you be interested in making a GitHub pull request for your patch?

    @csabella csabella added docs Documentation in the Doc dir tests Tests in the Lib/test dir 3.8 only security fixes labels Sep 28, 2018
    @csabella csabella added the type-feature A feature request or enhancement label Sep 28, 2018
    @matrixise
    Copy link
    Member

    I wanted to merge the PR of Joannah but I have a question, are you sure that there is nobody using this module. Maybe we could add a warning when a user tries to use the module/function with a DeprecationWarning.

    Could we have a wrapper raising the warning when we call it and redirect to the new function?

    Thank you

    @matrixise
    Copy link
    Member

    Other discussion with Zach, and at the end, there is no problem to merge your PR.

    Thank you for your contribution

    @matrixise
    Copy link
    Member

    New changeset 92777d5 by Stéphane Wirtel (Joannah Nanjekye) in branch 'master':
    bpo-18578: Rename and document test.bytecode_helper as test.support.bytecode_helper (GH-15168)
    92777d5

    @matrixise matrixise added 3.9 only security fixes and removed 3.8 only security fixes labels Sep 12, 2019
    @ncoghlan
    Copy link
    Contributor Author

    ncoghlan commented Oct 5, 2019

    Just noting for the record that the reason a new warning wasn't needed here is because there is already a general "No compatibility guarantees" warning for the entire test package: https://docs.python.org/3/library/test.html

    Thanks for getting this resolved!

    @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 docs Documentation in the Doc dir tests Tests in the Lib/test dir type-feature A feature request or enhancement
    Projects
    None yet
    Development

    No branches or pull requests

    3 participants