Skip to content

On Unix, shutil.which() and subprocess no longer look for the executable in the current directory if PATH environment variable is not set #79936

@vstinner

Description

@vstinner
BPO 35755
Nosy @gpshead, @vstinner, @giampaolo, @tiran, @jwilk, @serhiy-storchaka, @koobs, @izbyshev
PRs
  • bpo-35755: Remove current directory from posixpath.defpath #11586
  • bpo-35755: Remove current directory from posixpath.defpath #11586
  • bpo-35755: Remove current directory from posixpath.defpath #11586
  • bpo-35755: shutil.which() uses os.confstr("CS_PATH") #12858
  • bpo-35755: Don't say "to mimick Unix which command behavior" #12861
  • [3.7] bpo-35755: shutil.which() uses os.confstr("CS_PATH") #12862
  • Files
  • execv_curdir.py
  • subprocess_curdir.py
  • empty_path.py
  • 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 2019-04-17.16:53:09.123>
    created_at = <Date 2019-01-16.23:41:46.541>
    labels = ['type-security', '3.8', 'library']
    title = 'On Unix, shutil.which() and subprocess no longer look for the executable in the current directory if PATH environment variable is not set'
    updated_at = <Date 2019-04-24.10:54:33.118>
    user = 'https://github.com/vstinner'

    bugs.python.org fields:

    activity = <Date 2019-04-24.10:54:33.118>
    actor = 'koobs'
    assignee = 'none'
    closed = True
    closed_date = <Date 2019-04-17.16:53:09.123>
    closer = 'vstinner'
    components = ['Library (Lib)']
    creation = <Date 2019-01-16.23:41:46.541>
    creator = 'vstinner'
    dependencies = []
    files = ['48063', '48064', '48065']
    hgrepos = []
    issue_num = 35755
    keywords = ['patch', 'patch', 'patch']
    message_count = 29.0
    messages = ['333801', '333804', '333807', '333826', '333827', '333830', '333832', '333834', '333835', '333837', '333905', '340352', '340357', '340366', '340384', '340399', '340400', '340401', '340402', '340403', '340404', '340410', '340416', '340418', '340419', '340420', '340422', '340446', '340485']
    nosy_count = 8.0
    nosy_names = ['gregory.p.smith', 'vstinner', 'giampaolo.rodola', 'christian.heimes', 'jwilk', 'serhiy.storchaka', 'koobs', 'izbyshev']
    pr_nums = ['11586', '11586', '11586', '12858', '12861', '12862']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'security'
    url = 'https://bugs.python.org/issue35755'
    versions = ['Python 3.8']

    Metadata

    Metadata

    Assignees

    No one assigned

      Labels

      3.8 (EOL)end of lifestdlibStandard Library Python modules in the Lib/ directorytype-securityA security issue

      Projects

      No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions