You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ pip install 'click==7.0'
$ python regression.py
Press ENTER or type command to continue
(editor is actually launched)
Actual Behavior
With 7.1:
$ pip install 'click==7.1'
$ python regression.py
Traceback (most recent call last):
File "regression.py", line 4, in <module>
click.edit(filename=Path('here.txt'))
File "/Users/samuel/workspace/tmp/click-regression/.venv/lib/python3.7/site-packages/click/termui.py", line 588, in edit
editor.edit_file(filename)
File "/Users/samuel/workspace/tmp/click-regression/.venv/lib/python3.7/site-packages/click/_termui_impl.py", line 466, in edit_file
"{} {}".format(shlex_quote(editor), shlex_quote(filename)),
File "/usr/local/Cellar/python/3.7.7/Frameworks/Python.framework/Versions/3.7/lib/python3.7/shlex.py", line 319, in quote
if _find_unsafe(s) is None:
TypeError: expected string or bytes-like object
Although the ability to use Path wasn't documented explicitly, it seems desirable from a compatibility perspective.
Environment
Python version: Python 3.7.7
Click version: 7.1
Other
Based on the traceback, looks like it could be related to #1470
The text was updated successfully, but these errors were encountered:
Expected Behavior
In click 7.0, you could pass a
pathlib.Path
object asclick.edit()
'sfilename
parameter. In 7.1 this fails with aTypeError
To reproduce, create a
regression.py
file like so:With 7.0:
(editor is actually launched)
Actual Behavior
With 7.1:
Although the ability to use
Path
wasn't documented explicitly, it seems desirable from a compatibility perspective.Environment
Other
Based on the traceback, looks like it could be related to #1470
The text was updated successfully, but these errors were encountered: