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

Cleanup Modules/_math.c #72443

Closed
vstinner opened this issue Sep 23, 2016 · 4 comments
Closed

Cleanup Modules/_math.c #72443

vstinner opened this issue Sep 23, 2016 · 4 comments
Labels
3.7 (EOL) end of life

Comments

@vstinner
Copy link
Member

BPO 28256
Nosy @mdickinson, @vstinner, @tiran, @serhiy-storchaka
Files
  • math.patch
  • 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 2016-10-18.14:33:01.553>
    created_at = <Date 2016-09-23.09:59:22.715>
    labels = ['3.7']
    title = 'Cleanup Modules/_math.c'
    updated_at = <Date 2016-10-18.14:33:01.552>
    user = 'https://github.com/vstinner'

    bugs.python.org fields:

    activity = <Date 2016-10-18.14:33:01.552>
    actor = 'vstinner'
    assignee = 'none'
    closed = True
    closed_date = <Date 2016-10-18.14:33:01.553>
    closer = 'vstinner'
    components = []
    creation = <Date 2016-09-23.09:59:22.715>
    creator = 'vstinner'
    dependencies = []
    files = ['44792']
    hgrepos = []
    issue_num = 28256
    keywords = ['patch']
    message_count = 4.0
    messages = ['277266', '277276', '278883', '278884']
    nosy_count = 5.0
    nosy_names = ['mark.dickinson', 'vstinner', 'christian.heimes', 'python-dev', 'serhiy.storchaka']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = None
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue28256'
    versions = ['Python 3.7']

    @vstinner
    Copy link
    Member Author

    On a code coverage report, I noticed that _math.c has a very bad coverage. In fact, we define dead code when the system provides most required math functions.

    Attached patch avoids declaring unused functions.

    See the coverage at:
    http://tiran.bitbucket.org/python-lcov/Modules/index.html

    @vstinner vstinner added the 3.7 (EOL) end of life label Sep 23, 2016
    @tiran
    Copy link
    Member

    tiran commented Sep 23, 2016

    It think you have the #ifdef checks reversed, e.g. #ifdef HAVE_ACOSH instead of #ifndef HAVE_ACOSH.

    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Oct 18, 2016

    New changeset 8999d702ac29 by Victor Stinner in branch 'default':
    Issue bpo-28256: Cleanup _math.c
    https://hg.python.org/cpython/rev/8999d702ac29

    @vstinner
    Copy link
    Member Author

    Thanks for the review Serhiy and Christian, it seems like a review was needed :-D

    I pushed my fix to Python 3.7.

    @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.7 (EOL) end of life
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants