AcademySoftwareFoundation / AcademySoftwareFoundation/rez
rez-pip error when using python3.7
- Dominant language
- Python
- Stars
- 1.1k
- Forks
- 374
- Avg merge
- 9d 12h
- Merged PRs (30d)
- 5
Description
### System
- Windows 10
- rez 2.61.1
- python 3.7
### Error
```
$ rez-pip -i -r --python-version 2.7 ampq
... [trim some site information]
Collecting amqp
Downloading amqp-2.6.0-py2.py3-none-any.whl (47 kB)
|UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU| 47 kB 280 kB/s
Collecting vine<5.0.0a1,>=1.1.3
Downloading vine-1.3.0-py2.py3-none-any.whl (14 kB)
Installing collected packages: vine, amqp
Successfully installed amqp-2.6.0 vine-1.3.0
WARNING: You are using pip version 20.1; however, version 20.1.1 is available.
You should consider upgrading via the 'c:\python27\python.exe -m pip install --upgrade pip' command.
21:57:18 INFO Installed [amqp-2.6.0] i:\tools\rez\packages\release\amqp\2.6.0\package.py (ff5a17a870e473adea6d65972631222d54a381e6)
Traceback (most recent call last):
File "c:\progra~1\rez\261~1.1\lib\site-packages\rez\serialise.py", line 72, in open_file_for_write
f.write(content)
File "C:\Program Files\rez\2.61.1\Python\Lib\contextlib.py", line 119, in __exit__
next(self.gen)
File "c:\progra~1\rez\261~1.1\lib\site-packages\rez\vendor\atomicwrites\__init__.py", line 154, in _open
self.commit(f)
File "c:\progra~1\rez\261~1.1\lib\site-packages\rez\vendor\atomicwrites\__init__.py", line 185, in commit
replace_atomic(f.name, self._path)
File "c:\progra~1\rez\261~1.1\lib\site-packages\rez\vendor\atomicwrites\__init__.py", line 92, in replace_atomic
return _replace_atomic(src, dst)
File "c:\progra~1\rez\261~1.1\lib\site-packages\rez\vendor\atomicwrites\__init__.py", line 75, in _replace_atomic
_windows_default_flags | _MOVEFILE_REPLACE_EXISTING
File "c:\progra~1\rez\261~1.1\lib\site-packages\rez\vendor\atomicwrites\__init__.py", line 70, in _handle_errors
raise WinError()
OSError: [WinError 17] The system cannot move the file to a different disk drive.
```
### Description
Looks like `serialise.py` is set up to catch a `WindowsError`, but the vendored `atomicwrites` raises an `OSError` in python 3.7
[`WindowsError` merged into `OSError` in python 3.3](https://docs.python.org/3/library/exceptions.html#OSError)
Contributor guide
Research direction
Start with serialise.py and the vendored atomicwrites files shown in the traceback, then reproduce the issue with the reported rez-pip command on Python 3.7 and Windows. Done means the command completes without the WinError and serialization still works for the installed package.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- operating-systems, tooling
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100