-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Evaluate pathlib compatibility for Python < 3.5 #2438
Comments
I poked around a bit more. Python 2.7.12 (v2.7.12:d33e0cf91556, Jun 27 2016, 15:24:40) [MSC v.1500 64 bit (AMD64)] on win32
Possible fix is to use pathlib2 instead of pathlib, looks like it supports the exist_ok argument. Python 2.7.12 (v2.7.12:d33e0cf91556, Jun 27 2016, 15:24:40) [MSC v.1500 64 bit (AMD64)] on win32
|
We fall back to pathlib2 which we vendor. I guess you have manually installed the old, deprecated |
We do list 3.4 as supported, and the built-in pathlib on 3.4 does not have |
Or maybe we should use the vendored pathlib2 on 3.4. |
@techalchemy you were indeed correct about having pathlib installed in my environment. I removed it on both my windows and linux systems and can confirm that this fixed my specific issue. Many thanks for the tip. |
- Fixes #2438 Signed-off-by: Dan Ryan <[email protected]>
@uranusjr @techalchemy You may also use |
We already handled this. |
Running Python 2.7.12 with pipenv installed in user site (pip install --user pipenv) fails because
pathlib.Path.mkdir function doesn't have a exist_ok argument specified.
Actual error (from bottom of full output):
TypeError: mkdir() got an unexpected keyword argument 'exist_ok'
Seems like it's confied to python2 as python2 doesn't have pathlib natively in the standard library and must use a backport.
Full output:
project_dir>pipenv update --dev
Running $ pipenv lock then $ pipenv sync.
Locking [dev-packages] dependencies...
Traceback (most recent call last):
File "c:\python27\lib\runpy.py", line 174, in _run_module_as_main
"main", fname, loader, pkg_name)
File "c:\python27\lib\runpy.py", line 72, in run_code
exec code in run_globals
File "<user_base>\Scripts\pipenv.exe_main.py", line 9, in
File "<user_base>\Python\Python27\site-packages\pipenv\vendor\click\core.py", line 722, in call
return self.main(*args, **kwargs)
File "<user_base>\Python27\site-packages\pipenv\vendor\click\core.py", line 697, in main
rv = self.invoke(ctx)
File "<user_base>\Python27\site-packages\pipenv\vendor\click\core.py", line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "<user_base>\Python27\site-packages\pipenv\vendor\click\core.py", line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "<user_base>\Python27\site-packages\pipenv\vendor\click\core.py", line 535, in invoke
return callback(*args, **kwargs)
File "<user_base>\Python27\site-packages\pipenv\vendor\click\decorators.py", line 17, in new_func
return f(get_current_context(), *args, **kwargs)
File "<user_base>\Python27\site-packages\pipenv\cli.py", line 850, in update
verbose=verbose, clear=clear, pre=pre, keep_outdated=keep_outdated, pypi_mirror=pypi_mirror
File "<user_base>\Python27\site-packages\pipenv\core.py", line 1098, in do_lock
dev=settings['dev']
File "<user_base>\Python27\site-packages\pipenv\utils.py", line 1177, in get_vcs_deps
src_dir.mkdir(mode=0o775, exist_ok=True)
TypeError: mkdir() got an unexpected keyword argument 'exist_ok'
pipenv_help.txt
Expected result
Expected the update to run without error
Actual result
Failed as shown at the beginning
Steps to replicate
In pristine project directory (no Pipfile) using python 2.7.12 or greater run:
pipenv install future
You should actually see the problem there as well.
If not, then run "pipenv update"
The text was updated successfully, but these errors were encountered: