simion / pip-upgrader

An interactive pip requirements upgrader. It also updates the version in your requirements.txt file.
Apache License 2.0
522 stars 38 forks source link

Errors with environment markers #31

Closed Esgrove closed 9 months ago

Esgrove commented 4 years ago

Great tool but seems it does not work with environment markers in requirements files:

Found valid requirements file(s):
requirements.txt
1/22: Appium-Python-Client ... upgrade available: 0.50 ==> 0.51 (uploaded on 2020-04-12 03:16:19)
2/22: colorama ... up to date: 0.4.3
3/22: grpcio ... upgrade available: 1.27.2 ==> 1.28.1 (uploaded on 2020-04-03 18:11:34)
4/22: grpcio-tools ... upgrade available: 1.27.2 ==> 1.28.1 (uploaded on 2020-04-03 18:12:52)
5/22: numpy ... up to date: 1.18.2
6/22: matplotlib ... up to date: 3.2.1
7/22: mido ... up to date: 1.2.9
Error while parsing package osascript==2019.4.13; sys_platform == 'darwin' (skipping).
Exception:  too many values to unpack (expected 2)
9/22: python-rtmidi ... up to date: 1.4.0
10/22: paramiko ... up to date: 2.7.1
11/22: protobuf ... up to date: 3.11.3
12/22: PyAudio ... up to date: 0.2.11
13/22: PyAutoGUI ... up to date: 0.9.50
Error while parsing package pyobjc-core==6.2; sys_platform == 'darwin' (skipping).
Exception:  too many values to unpack (expected 2)
Error while parsing package pyobjc==6.2; sys_platform == 'darwin' (skipping).
Exception:  too many values to unpack (expected 2)
16/22: pyscreenshot ... up to date: 1.0
17/22: requests ... up to date: 2.23.0

Any chance to get support for this pip feature?

simion commented 4 years ago

Hi, yes, I'll try to implement support for these markers soon :) Thanks

PawelLipski commented 2 years ago

+1, same for the support for Python versions like:

pytest==7.0.1; python_version=="3.6"
pytest==7.1.2; python_version>="3.7"
pytest-mock==3.6.1; python_version=="3.6"
pytest-mock==3.7.0; python_version>="3.7"

Currently it crashes on

Error while parsing package pytest-mock==3.6.1; python_version=="3.6" (skipping). 
Exception:  too many values to unpack (expected 2)

:///