Skip to content

Add -P command line option and PYTHONSAFEENV environment variable #57684

Closed
@ncoghlan

Description

@ncoghlan
BPO 13475
Nosy @gpshead, @ncoghlan, @pitrou, @kristjanvalur, @vstinner, @mattheww, @jwilk, @merwok, @ericsnowcurrently
PRs
  • gh-57684: Add -P cmdline option and PYTHONSAFEPATH env var #31542
  • Files
  • issue13475_1.diff
  • issue13475_2.diff: updated patch to address Antoine's comments
  • issue13475_long_only.diff: switch to long options
  • 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 = None
    created_at = <Date 2011-11-25.00:46:33.649>
    labels = ['type-feature', '3.9']
    title = "Add '--mainpath'/'--nomainpath' command line options to override sys.path[0] initialisation"
    updated_at = <Date 2022-02-24.02:55:12.913>
    user = 'https://github.com/ncoghlan'

    bugs.python.org fields:

    activity = <Date 2022-02-24.02:55:12.913>
    actor = 'vstinner'
    assignee = 'none'
    closed = False
    closed_date = None
    closer = None
    components = []
    creation = <Date 2011-11-25.00:46:33.649>
    creator = 'ncoghlan'
    dependencies = []
    files = ['25723', '25730', '25759']
    hgrepos = []
    issue_num = 13475
    keywords = ['patch']
    message_count = 37.0
    messages = ['148295', '148305', '148310', '148336', '148350', '148378', '148379', '148394', '148433', '148458', '148552', '161676', '161677', '161685', '161686', '161689', '161691', '161695', '161696', '161749', '161926', '162677', '162708', '165164', '168428', '176160', '176522', '176526', '176527', '176529', '216789', '314041', '314193', '339624', '413868', '413871', '413877']
    nosy_count = 11.0
    nosy_names = ['gregory.p.smith', 'ncoghlan', 'pitrou', 'kristjan.jonsson', 'vstinner', 'mattheww', 'jwilk', 'eric.araujo', 'Arfrever', 'eric.snow', 'nisaac']
    pr_nums = ['31542']
    priority = 'normal'
    resolution = None
    stage = 'patch review'
    status = 'open'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue13475'
    versions = ['Python 3.9']

    Metadata

    Metadata

    Assignees

    No one assigned

      Labels

      3.9only security fixestype-featureA feature request or enhancement

      Projects

      No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions