Hitting an error with `poetry_requirements` for ev...
# general
Hitting an error with
for everybody's favourite package: Torch. In pyproject.toml I have the following
Copy code
torch = [
    {markers = "platform_machine == 'arm64' and sys_platform == 'darwin'", url = "<https://download.pytorch.org/>..."},
    {markers = "platform_machine == 'x86_64' and sys_platform == 'darwin'", url = "<https://download.pytorch.org/>..."},
    {markers = "platform_machine == 'x86_64' and sys_platform == 'linux'", url = "<https://download.pytorch.org/>..."}
Either this is borked somehow, or there's a bug with parsing, because I'm receiving an error:
Copy code
ValueError: Invalid requirement 'torch @ <https://download.pytorch.org/whl/cpu/torch-1.9.1-cp39-none-macosx_11_0_arm64.whl;(platform_machine> == 'arm64' and sys_platform == 'darwin')': 

Parse error at ""== 'arm6"": Expected string_end
The quoting in the message looks kinda suss. I'm unsure whether I can rewrite these into a form that pants will prefer, or whether I should remove them from pyproject and do something else altogether.
It looks like a bug with parsing to me. I'd definitely file an issue.
👍 1
I'll see if I can create a minimal repro
Thanks for the repro gists Bob. I've got a fix out here that I'll cherry-pick back through 2.15.x and 2.16.x; so you should see the fix available in 2.15.1, 2.16.0 and on main / 2.17.0.
🙌 1