figsoda / figsoda/pep-508

Fails to parse `--hash=` values embedded in requirements.txt

Open
#2 10 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
24
Forks
1
PR merge metrics
No merged PRs in 30d

Description

The contents of `requirements.txt` used for parsing: https://github.com/anotherbridge/pdfalyzer/blob/master/requirements.txt

Within the following code: [extractor.rs](https://github.com/aswinnnn/pyscan/blob/master/src/parser/extractor.rs#L33)

Here's the `Err` values:
```
[
found ''\\'' at 68..69,
]
[
found end of input at 0..1,
]
[
found end of input at 0..1,
]
[
found ''\\'' at 68..69,
]
[
found end of input at 0..1,
]
[
found end of input at 0..1,
]
[
found ''\\'' at 71..72,
]
[
found end of input at 0..1,
]
[
found end of input at 0..1,
]
[
found ''\\'' at 72..73,
]
[
found end of input at 0..1,
]
[
found end of input at 0..1,
]
[
found ''\\'' at 70..71,
]
[
found end of input at 0..1,
]
[
found end of input at 0..1,
]
[
found ''\\'' at 68..69,
]
[
found end of input at 0..1,
]
[
found end of input at 0..1,
]
[
found ''\\'' at 75..76,
]
[
found end of input at 0..1,
]
[
found end of input at 0..1,
]
[
found ''\\'' at 81..82,
]
[
found end of input at 0..1,
]
[
found end of input at 0..1,
]
[
found ''\\'' at 66..67,
]
[
found end of input at 0..1,
]
[
found end of input at 0..1,
]
[
found ''\\'' at 65..66,
]
[
found end of input at 0..1,
]
[
found end of input at 0..1,
]
[
found ''\\'' at 79..80,
]
[
found end of input at 0..1,
]
[
found end of input at 0..1,
]
[
found ''\\'' at 67..68,
]
[
found end of input at 0..1,
]
[
found end of input at 0..1,
]
[
found end of input at 0..1,
]
[
found end of input at 0..1,
]
[
found end of input at 0..1,
]
[
found end of input at 0..1,
]
[
found end of input at 0..1,
]
[
found end of input at 0..1,
]
[
found end of input at 0..1,
]
[
found end of input at 0..1,
]
[
found end of input at 0..1,
]
[
found end of input at 0..1,
]
[
found end of input at 0..1,
]
[
found end of input at 0..1,
]
[
found end of input at 0..1,
]
[
found end of input at 0..1,
]
[
found end of input at 0..1,
]
[
found end of input at 0..1,
]
[
found end of input at 0..1,
]
[
found end of input at 0..1,
]
[
found end of input at 0..1,
]
[
found end of input at 0..1,
]
[
found end of input at 0..1,
]
[
found end of input at 0..1,
]
[
found end of input at 0..1,
]
[
found end of input at 0..1,
]
[
found end of input at 0..1,
]
[
found end of input at 0..1,
]
[
found end of input at 0..1,
]
[
found end of input at 0..1,
]
[
found end of input at 0..1,
]
[
found end of input at 0..1,
]
[
found end of input at 0..1,
]
[
found end of input at 0..1,
]
[
found end of input at 0..1,
]
[
found end of input at 0..1,
]
[
found end of input at 0..1,
]
[
found end of input at 0..1,
]
[
found end of input at 0..1,
]
[
found end of input at 0..1,
]
[
found end of input at 0..1,
]
[
found end of input at 0..1,
]
[
found end of input at 0..1,
]
[
found end of input at 0..1,
]
[
found end of input at 0..1,
]
[
found end of input at 0..1,
]
[
found end of input at 0..1,
]
[
found end of input at 0..1,
]
[
found end of input at 0..1,
]
[
found end of input at 0..1,
]
[
found end of input at 0..1,
]
[
found end of input at 0..1,
]
[
found end of input at 0..1,
]
[
found end of input at 0..1,
]
[
found end of input at 0..1,
]
[
found end of input at 0..1,
]
[
found end of input at 0..1,
]
[
found end of input at 0..1,
]
[
found end of input at 0..1,
]
[
found end of input at 0..1,
]
[
found end of input at 0..1,
]
[
found end of input at 0..1,
]
[
found end of input at 0..1,
]
[
found end of input at 0..1,
]
[
found ''\\'' at 72..73,
]
[
found end of input at 0..1,
]
[
found end of input at 0..1,
]
[
found end of input at 0..1,
]
[
found end of input at 0..1,
]
[
found end of input at 0..1,
]
[
found end of input at 0..1,
]
[
found end of input at 0..1,
]
[
found end of input at 0..1,
]
[
found end of input at 0..1,
]
[
found end of input at 0..1,
]
[
found end of input at 0..1,
]
[
found end of input at 0..1,
]
[
found end of input at 0..1,
]
[
found ''\\'' at 70..71,
]
[
found end of input at 0..1,
]
[
found end of input at 0..1,
]
[
found end of input at 0..0,
]
Ok(Dependency { name: "lxml", extras: [], spec: None, marker: None })
```

I added `lxml` at the end of the file to see if it was a file quirk, and unfortunately not. Is this because it's unsupported in pep-508 crate for now? Wouldn't parsing the text before `;` would be a feasible workaround?

Your crate is one of the core ones I use [issue originally mentioned at aswinnnn/pyscan#16] and would appreciate it if you could look into it. Thanks.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.