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

Freezing modules has manual steps but could be automated. #89182

Closed
ericsnowcurrently opened this issue Aug 26, 2021 · 11 comments
Closed

Freezing modules has manual steps but could be automated. #89182

ericsnowcurrently opened this issue Aug 26, 2021 · 11 comments
Assignees
Labels
3.11 only security fixes build The build process and cross-build type-feature A feature request or enhancement

Comments

@ericsnowcurrently
Copy link
Member

BPO 45019
Nosy @gvanrossum, @brettcannon, @ambv, @ericsnowcurrently, @tirkarthi, @kumaraditya303, @arhadthedev
PRs
  • bpo-45019: Add a tool to generate list of modules to include for frozen modules #27980
  • [3.10] bpo-45056: Remove trailing unused constants from co_consts (GH-28109) #28125
  • bpo-45019: Do some cleanup related to frozen modules. #28319
  • bpo-45019: Silence a warning in test_ctypes. #28362
  • bpo-45019: Clean up the frozen __hello__ module. #28374
  • bpo-45019: Fix freeze_modules.py to print argv incase of error #29744
  • bpo-45019: Cleanup module freezing and deepfreeze #29772
  • 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/ericsnowcurrently'
    closed_at = <Date 2021-08-31.14:07:12.930>
    created_at = <Date 2021-08-26.19:06:19.608>
    labels = ['type-feature', 'build', '3.11']
    title = 'Freezing modules has manual steps but could be automated.'
    updated_at = <Date 2021-11-26.16:51:23.136>
    user = 'https://github.com/ericsnowcurrently'

    bugs.python.org fields:

    activity = <Date 2021-11-26.16:51:23.136>
    actor = 'gvanrossum'
    assignee = 'eric.snow'
    closed = True
    closed_date = <Date 2021-08-31.14:07:12.930>
    closer = 'eric.snow'
    components = ['Build']
    creation = <Date 2021-08-26.19:06:19.608>
    creator = 'eric.snow'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 45019
    keywords = ['patch']
    message_count = 11.0
    messages = ['400369', '400676', '400677', '400679', '401738', '401838', '401861', '401894', '401901', '406987', '407071']
    nosy_count = 7.0
    nosy_names = ['gvanrossum', 'brett.cannon', 'lukasz.langa', 'eric.snow', 'xtreak', 'kumaraditya', 'arhadthedev']
    pr_nums = ['27980', '28125', '28319', '28362', '28374', '29744', '29772']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue45019'
    versions = ['Python 3.11']

    @ericsnowcurrently
    Copy link
    Member Author

    Currently we freeze the 3 main import-related modules, as well as one module for testing. Adding more modules or otherwise making any adjustments requires manually editing several files (frozen.c, Makefile.pre.in, ...). Those files aren't particularly obvious and it's easy to miss one. So it would be helpful to have a tool that generates the necessary lines in the relevant files, to avoid manual editing.

    I'll be putting up a PR shortly.

    @ericsnowcurrently ericsnowcurrently added the 3.11 only security fixes label Aug 26, 2021
    @ericsnowcurrently ericsnowcurrently self-assigned this Aug 26, 2021
    @ericsnowcurrently ericsnowcurrently added build The build process and cross-build type-feature A feature request or enhancement 3.11 only security fixes labels Aug 26, 2021
    @ericsnowcurrently ericsnowcurrently self-assigned this Aug 26, 2021
    @ericsnowcurrently ericsnowcurrently added build The build process and cross-build type-feature A feature request or enhancement labels Aug 26, 2021
    @ericsnowcurrently
    Copy link
    Member Author

    New changeset 044e8d8 by Eric Snow in branch 'main':
    bpo-45019: Add a tool to generate list of modules to include for frozen modules (gh-27980)
    044e8d8

    @gvanrossum
    Copy link
    Member

    Is this ready to close?

    @ericsnowcurrently
    Copy link
    Member Author

    I'm just waiting for the buildbots to finish.

    @ericsnowcurrently
    Copy link
    Member Author

    New changeset a2d8c4b by Eric Snow in branch 'main':
    bpo-45019: Do some cleanup related to frozen modules. (gh-28319)
    a2d8c4b

    @tirkarthi
    Copy link
    Member

    The PR 28319 seems to have introduced a new deprecation warning in tests :

    0:00:13 load avg: 2.82 [ 98/427] test_ctypes passed
    Hello world!
    /home/karthikeyan/stuff/python/cpython/Lib/ctypes/test/test_values.py:5: DeprecationWarning: the imp module is deprecated in favour of importlib and slated for removal in Python 3.12; see the module's documentation for alternative uses
    import imp

    @ericsnowcurrently
    Copy link
    Member Author

    On Wed, Sep 15, 2021 at 7:51 AM Karthikeyan Singaravelan
    <report@bugs.python.org> wrote:

    The PR 28319 seems to have introduced a new deprecation warning in tests :

    I'll fix that.

    @ericsnowcurrently
    Copy link
    Member Author

    New changeset 4b30aaa by Eric Snow in branch 'main':
    bpo-45019: Silence a warning in test_ctypes. (gh-28362)
    4b30aaa

    @ericsnowcurrently
    Copy link
    Member Author

    New changeset 3814e20 by Eric Snow in branch 'main':
    bpo-45019: Clean up the frozen __hello__ module. (gh-28374)
    3814e20

    @arhadthedev
    Copy link
    Member

    If a directory is renamed anyway, maybe deepfrozen_modules is better? deepfreeze_modules looks like "modules that are part of deepfreeze tool itself". Also it rhymes with frozen_modules.

    @gvanrossum
    Copy link
    Member

    New changeset b0b10e1 by Kumar Aditya in branch 'main':
    bpo-45019: Cleanup module freezing and deepfreeze (bpo-29772)
    b0b10e1

    @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.11 only security fixes build The build process and cross-build type-feature A feature request or enhancement
    Projects
    None yet
    Development

    No branches or pull requests

    4 participants