Skip to content

Avoid adding an empty directory to sys.path when running a module with -m #77234

@ztane

Description

@ztane
mannequin
BPO 33053
Nosy @brettcannon, @ncoghlan, @vstinner, @jwilk, @ned-deily, @njsmith, @ericsnowcurrently, @eryksun, @ztane
PRs
  • bpo-33053: -m adds *starting* directory to sys.path #6231
  • bpo-33053: Remove test_cmd_line_script debugging print #6237
  • [3.7] bpo-33053: -m now adds *starting* directory to sys.path (GH-6231) #6236
  • [3.6] bpo-28655: Fix test_import.test_missing_source_legacy() #9589
  • 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 2018-03-25.13:50:03.376>
    created_at = <Date 2018-03-12.11:57:14.902>
    labels = ['interpreter-core', '3.8', 'type-feature', '3.7']
    title = 'Avoid adding an empty directory to sys.path when running a module with `-m`'
    updated_at = <Date 2018-09-26.16:09:42.678>
    user = 'https://github.com/ztane'

    bugs.python.org fields:

    activity = <Date 2018-09-26.16:09:42.678>
    actor = 'vstinner'
    assignee = 'ncoghlan'
    closed = True
    closed_date = <Date 2018-03-25.13:50:03.376>
    closer = 'ncoghlan'
    components = ['Interpreter Core']
    creation = <Date 2018-03-12.11:57:14.902>
    creator = 'ztane'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 33053
    keywords = ['patch']
    message_count = 30.0
    messages = ['313641', '313966', '314020', '314021', '314023', '314025', '314028', '314036', '314040', '314081', '314088', '314089', '314092', '314130', '314192', '314214', '314233', '314248', '314276', '314403', '314404', '314411', '314412', '314414', '314415', '314431', '314432', '315043', '315079', '326481']
    nosy_count = 10.0
    nosy_names = ['brett.cannon', 'ncoghlan', 'vstinner', 'jwilk', 'ned.deily', 'njs', 'eric.snow', 'eryksun', 'ztane', 'Viv']
    pr_nums = ['6231', '6237', '6236', '9589']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue33053'
    versions = ['Python 3.7', 'Python 3.8']

    Metadata

    Metadata

    Assignees

    Labels

    3.7 (EOL)end of life3.8 (EOL)end of lifeinterpreter-core(Objects, Python, Grammar, and Parser dirs)type-featureA feature request or enhancement

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions