Skip to content

Commit 1a46eed

Browse files
authored
Merge pull request #11190 from q0w/fix-venv-move
Convert to str shutil.move src arg for py<=39
2 parents 4868e92 + 49657d8 commit 1a46eed

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

tests/functional/test_install_wheel.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -664,7 +664,7 @@ def test_wheel_install_fails_with_unrelated_dist_info(
664664
package = create_basic_wheel_for_package(script, "simple", "0.1.0")
665665
new_name = "unrelated-2.0.0-py2.py3-none-any.whl"
666666
new_package = os.path.join(os.path.dirname(package), new_name)
667-
shutil.move(package, new_package)
667+
shutil.move(os.fspath(package), new_package)
668668

669669
result = script.pip(
670670
"install",

tests/lib/venv.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import compileall
2+
import os
23
import shutil
34
import subprocess
45
import sys
@@ -171,7 +172,7 @@ def clear(self) -> None:
171172
self._create(clear=True)
172173

173174
def move(self, location: Union[Path, str]) -> None:
174-
shutil.move(self.location, location)
175+
shutil.move(os.fspath(self.location), location)
175176
self.location = Path(location)
176177
self._update_paths()
177178

0 commit comments

Comments
 (0)