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

Regression for executing packages #48445

Closed
vajda mannequin opened this issue Oct 24, 2008 · 4 comments
Closed

Regression for executing packages #48445

vajda mannequin opened this issue Oct 24, 2008 · 4 comments
Assignees
Labels
interpreter-core (Objects, Python, Grammar, and Parser dirs) type-bug An unexpected behavior, bug, or error

Comments

@vajda
Copy link
Mannequin

vajda mannequin commented Oct 24, 2008

BPO 4195
Nosy @ncoghlan, @benjaminp
Files
  • patch.2751.diff: patch to runpy.py
  • issue4195_runpy_package_support.diff: Updated patch with test cases and doc updates
  • 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/ncoghlan'
    closed_at = <Date 2009-02-08.01:59:36.058>
    created_at = <Date 2008-10-24.18:44:58.858>
    labels = ['interpreter-core', 'type-bug']
    title = 'Regression for executing packages'
    updated_at = <Date 2009-02-08.01:59:36.056>
    user = 'https://bugs.python.org/vajda'

    bugs.python.org fields:

    activity = <Date 2009-02-08.01:59:36.056>
    actor = 'ncoghlan'
    assignee = 'ncoghlan'
    closed = True
    closed_date = <Date 2009-02-08.01:59:36.058>
    closer = 'ncoghlan'
    components = ['Interpreter Core']
    creation = <Date 2008-10-24.18:44:58.858>
    creator = 'vajda'
    dependencies = []
    files = ['11876', '11885']
    hgrepos = []
    issue_num = 4195
    keywords = ['patch']
    message_count = 4.0
    messages = ['75175', '75203', '76560', '81362']
    nosy_count = 3.0
    nosy_names = ['ncoghlan', 'benjamin.peterson', 'vajda']
    pr_nums = []
    priority = 'normal'
    resolution = 'accepted'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue4195'
    versions = ['Python 3.1', 'Python 2.7']

    @vajda
    Copy link
    Mannequin Author

    vajda mannequin commented Oct 24, 2008

    Copy of bpo-2751.

    Having discussed this with Nick a bit more over email, he suggested that
    package execution could actually be properly supported by looking for a
    __main__ module inside the package and executing it instead. This is
    consistent with the way .zip archives are executed and would neatly
    resolve this problem. I attached a simple patch implementing this.

    Nick also said that fixing this might be considered a new feature and
    might have to wait until 2.7. Given that this worked on Python 2.5,
    albeit unintentionally, I'd argue that this is closer to a fix of a
    somewhat buggy Python 2.5 feature than a new feature in 2.6.

    @vajda vajda mannequin added interpreter-core (Objects, Python, Grammar, and Parser dirs) type-bug An unexpected behavior, bug, or error labels Oct 24, 2008
    @ncoghlan
    Copy link
    Contributor

    Added revised version of patch with test cases and documentation
    updates, as well as fixing a potential recursion issue with pathological
    packages where __main__ was also a package)

    @ncoghlan
    Copy link
    Contributor

    Missed the window for 2.6/3.0. Guido agreed on python-dev that it counts
    as a new feature, so it was definitely out for the already-released 2.6,
    and also wasn't really an option for the release candidate phase of 3.0.

    Assigning to myself for 2.7/3.1 - I'll put it in once the 3.0
    maintenance branch has been cut (so I can update both 2.x and 3.x at the
    same time.

    For 2.6 and 3.0 though, short run scripts such as "python -m jcc.main"
    are going to be the order of the day.

    @ncoghlan ncoghlan self-assigned this Nov 28, 2008
    @ncoghlan
    Copy link
    Contributor

    ncoghlan commented Feb 8, 2009

    Incorporated as:
    2.7: r69419
    3.1: r69421

    @ncoghlan ncoghlan closed this as completed Feb 8, 2009
    @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
    interpreter-core (Objects, Python, Grammar, and Parser dirs) type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant