-
-
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
Can't lock package with git
and extras
#2504
Comments
This works with |
Interesting! I can definitely replicate this. |
|
I did some digging today and an easy fix for this is to make the following change in def write_lockfile(self, content):
"""Write out the lockfile.
"""
newlines = self._lockfile_newlines
def encode_objects(obj):
if isinstance(obj, ArrayElement): # prettytoml.elements.array.ArrayElement
return obj.primitive_value
return obj
s = simplejson.dumps( # Send Unicode in to guarentee Unicode out.
content, indent=4, separators=(u',', u': '), sort_keys=True,
default=encode_objects
)
with atomic_open_for_write(self.lockfile_location, newline=newlines) as f:
f.write(s)
if not s.endswith(u'\n'):
f.write(u'\n') # Write newline at end of document. GH #319. |
thanks for digging into this, I know very little about the toml parser -- do you have a sense of what's going on here? |
When the lockfile is read from the file, it just copies the structure over from the parsed TOML. I'm not sure why, but the TOML structure returns a specialized |
Development since v2018.5.18 completely killed our deployment. This bug and #2317 are easily worked around (patch and external variable substitution) |
This bug is a 3.7+ bug and should only be happening since the combination of 3.7 + 2018.7.1. I took the weekend off of working on this project, but we’d definitely merge a failing test / fix if we haven’t already (not totally caught up here) |
This is definitely happening on 3.6.* for me. |
@bryanforbes would you be willing to submit a PR with your changes or mind if I do? |
@JacobHayes you're more than welcome to do the PR. I'm swamped this week. |
Issue description
A package spec with
git
andextras
fails to lock. This happens regardless of theeditable
flag.Expected result
The package should be installed with all extras.
Actual result
Steps to replicate
pipenv install
$ pipenv --support
Pipenv version:
'2018.7.1'
Pipenv location:
'/usr/local/lib/python3.6/site-packages/pipenv'
Python location:
'/usr/local/opt/python/bin/python3.6'
Other Python installations in
PATH
:2.7
:/usr/local/bin/python2.7
2.7
:/usr/local/bin/python2.7
2.7
:/usr/bin/python2.7
3.6
:/usr/local/bin/python3.6m
3.6
:/usr/local/bin/python3.6
2.7.15
:/usr/local/bin/python
2.7.10
:/usr/bin/python
2.7.15
:/usr/local/bin/python2
3.6.5
:/usr/local/bin/python3
PEP 508 Information:
System environment variables:
Apple_PubSub_Socket_Render
COLORFGBG
COLORTERM
COPYFILE_DISABLE
EDITOR
GOPATH
HOME
ITERM_PROFILE
ITERM_SESSION_ID
LANG
LOGNAME
PAGER
PATH
PWD
SECURITYSESSIONID
SHELL
SHLVL
SSH_AUTH_SOCK
TERM
TERM_PROGRAM
TERM_PROGRAM_VERSION
TERM_SESSION_ID
TMPDIR
TMUX
TMUX_PANE
TMUX_PLUGIN_MANAGER_PATH
USER
XPC_FLAGS
XPC_SERVICE_NAME
__CF_USER_TEXT_ENCODING
PYTHONDONTWRITEBYTECODE
PIP_PYTHON_PATH
Pipenv–specific environment variables:
Debug–specific environment variables:
PATH
:/Users/jacobhayes/bin:/Users/jacobhayes/bin:/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/bin:/Users/jacobhayes/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
SHELL
:/usr/local/bin/fish
EDITOR
:vim
LANG
:en_US.UTF-8
PWD
:/Users/jacobhayes/test
Contents of
Pipfile
('/Users/jacobhayes/test/Pipfile'):The text was updated successfully, but these errors were encountered: