mirror of
https://github.com/pypa/pip
synced 2023-12-13 21:30:23 +01:00
Convert to str shutil.move src arg for py<=39
https://github.com/python/cpython/issues/76870
This commit is contained in:
parent
bd1563d421
commit
3181063f94
|
@ -664,7 +664,7 @@ def test_wheel_install_fails_with_unrelated_dist_info(
|
|||
package = create_basic_wheel_for_package(script, "simple", "0.1.0")
|
||||
new_name = "unrelated-2.0.0-py2.py3-none-any.whl"
|
||||
new_package = os.path.join(os.path.dirname(package), new_name)
|
||||
shutil.move(package, new_package)
|
||||
shutil.move(str(package), new_package)
|
||||
|
||||
result = script.pip(
|
||||
"install",
|
||||
|
|
|
@ -171,7 +171,11 @@ class VirtualEnvironment:
|
|||
self._create(clear=True)
|
||||
|
||||
def move(self, location: Union[Path, str]) -> None:
|
||||
shutil.move(self.location, location)
|
||||
if sys.version_info <= (3, 8):
|
||||
src = str(self.location)
|
||||
else:
|
||||
src = self.location
|
||||
shutil.move(src, location)
|
||||
self.location = Path(location)
|
||||
self._update_paths()
|
||||
|
||||
|
|
Loading…
Reference in a new issue