micropipenv 1.3.1 generate an invalid output if the Pipfile.lock has an VCS package
lcy0321 opened this issue · 3 comments
Describe the bug
micropipenv 1.3.1 generate an invalid output if the Pipfile.lock has VCS packages.
To Reproduce
- Create a Pipfile with the following content:
[[source]]
name = "pypi"
url = "https://pypi.org/simple"
verify_ssl = true
[packages]
discord-py = {editable = true, ref = "87bc79e6e311da60b024ae61a2a3757e55606aa6", git = "https://github.com/Rapptz/discord.py"}
[dev-packages]
[requires]
python_version = "3.10"
- Run
pipenv lock
to generate the Pipfile.lock - Run
micropipenv requirements --no-hashes
- Get the following output that is invalid for pip to install
--index-url https://pypi.org/simple
#
# Default dependencies
#
aiohttp==3.8.1; python_version >= '3.6'
aiosignal==1.2.0; python_version >= '3.6'
async-timeout==4.0.2; python_version >= '3.6'
attrs==21.4.0; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'
charset-normalizer==2.1.0; python_version >= '3.6'
--editable git+https://github.com/Rapptz/discord.py@87bc79e6e311da60b024ae61a2a3757e55606aa6#egg=discord-pyfrozenlist==1.3.0; python_version >= '3.7'
idna==3.3; python_version >= '3.5'
multidict==6.0.2; python_version >= '3.7'
yarl==1.7.2; python_version >= '3.6'
Note that the "--editable" line is incorrectly combined with "frozenlist" line.
Expected behavior
The output is an valid requirement.txt format.
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
This issue may have been fixed in #40, but it seems to have reappeared after #237.
You are right. It seems that the \n
is on the wrong side at this line:
Line 1118 in b7166f8
I'm sorry for that. I'll fix it ASAP and add a test for it.
Could you please take a look at the linked PR? There are also some new tests for this so it should never happen again.
/kind bug
/priority important-soon
/assign @frenzymadness