Expected Behavior
_tempfilepager() in _termui_impl.py uses a depreciated function that is considered insecure by the core Python team. It is recommended to use mkstemp() instead.
import tempfile
filename = tempfile.mkstemp() # Suggested replacement
Actual Behavior
Python's warning:
Use of this function may introduce a security hole in your program. By the time you get around to doing anything with the file name it returns, someone else may have beaten you to the punch.
import tempfile
filename = tempfile.mktemp() # Depreciated and insecure
Environment
- Python version: 3.8.5
- Click version: 7.1.2
Expected Behavior
_tempfilepager() in _termui_impl.py uses a depreciated function that is considered insecure by the core Python team. It is recommended to use mkstemp() instead.
Actual Behavior
Python's warning:
Environment