diff options
author | David Foster <david@dafoster.net> | 2022-05-19 14:47:16 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-19 14:47:16 (GMT) |
commit | 30deeac64925effe46cb5f1cd091ccb4c850ce83 (patch) | |
tree | 14679d94703b68cd29fe7bed4f6de51ce5777c65 /Lib/venv | |
parent | 6b51773afd5658e15d23ce220f66fcc39c02dcae (diff) | |
download | cpython-30deeac64925effe46cb5f1cd091ccb4c850ce83.zip cpython-30deeac64925effe46cb5f1cd091ccb4c850ce83.tar.gz cpython-30deeac64925effe46cb5f1cd091ccb4c850ce83.tar.bz2 |
gh-92675: venv: Fix ensure_directories() to again accept a Path for env_dir (#92676)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Diffstat (limited to 'Lib/venv')
-rw-r--r-- | Lib/venv/__init__.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/venv/__init__.py b/Lib/venv/__init__.py index 7bfbadd..6032f36 100644 --- a/Lib/venv/__init__.py +++ b/Lib/venv/__init__.py @@ -116,7 +116,7 @@ class EnvBuilder: elif os.path.islink(d) or os.path.isfile(d): raise ValueError('Unable to create directory %r' % d) - if os.pathsep in env_dir: + if os.pathsep in os.fspath(env_dir): raise ValueError(f'Refusing to create a venv in {env_dir} because ' f'it contains the PATH separator {os.pathsep}.') if os.path.exists(env_dir) and self.clear: |