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

Use Python's standard filesystem encoding for command-line arguments #4507

Merged
merged 4 commits into from
Oct 3, 2022

Commits on Oct 1, 2022

  1. Use fsdecode for template substitution

    The idea in this PR is to converge on Python's `fsdecode` and `fsencode`
    for argument manipulation. This seems to match up with the Python
    standard library's assumptions: namely, on Windows, we use `fsdecode` to
    get back to Unicode strings:
    https://github.com/python/cpython/blob/54bbb5e3363ef3634f1fd7521ba3f3c42c81a331/Lib/subprocess.py#L561
    
    So let's start by dropping this utility and going straight for
    `fsdecode` here to match.
    sampsyo committed Oct 1, 2022
    Configuration menu
    Copy the full SHA
    82d4144 View commit details
    Browse the repository at this point in the history
  2. Standardize on Python's fsencode for arguments

    This can apparently never be `None`, as of Python 3.2.
    sampsyo committed Oct 1, 2022
    Configuration menu
    Copy the full SHA
    086bab5 View commit details
    Browse the repository at this point in the history

Commits on Oct 2, 2022

  1. Skip an unhelpful test on Windows

    On Windows, converting command-line arguments (hopefully!!!) only needs
    to deal with valid strings from the OS. So it is not really relevant to
    test with non-UTF-8, non-surrogate bytes.
    sampsyo committed Oct 2, 2022
    Configuration menu
    Copy the full SHA
    8baf3e3 View commit details
    Browse the repository at this point in the history
  2. Changelog for #4507

    sampsyo committed Oct 2, 2022
    Configuration menu
    Copy the full SHA
    1a73a45 View commit details
    Browse the repository at this point in the history