Skip to content

stdin-filename doesn't support UNC path in python 3.8/3.9 on Windows #4209

Closed
@guotuofeng

Description

Describe the bug

In Windows, the UNC path is not supported when using as --stdin-filename. For example, let's say one path is: \\?\D:\git\OLive\setup.py

When running

python.exe -mblack --stdin-filename \\?\D:\git\OLive\setup.py -v -

The following error message will be shown.
image

To Reproduce

Windows Python pathlib doesn't support UNC path.
Expected behavior
UNC path \\?\D:\git\OLive\setup.py should be supported in Windows allow as stdin-filename

Environment

  • Windows
  • Python 3.8.18
  • black: 24.1.1
  • Black's version:
  • OS and Python version:

Additional context

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    T: bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions