Resolves#344.
This change also:
- Makes `Distribution.requires()` into a generator for performance (i.e.
avoid building `list[Requirement]` and then iterating `list[Requirement`
and instead do both at the same time) and so that we can handle invalid
requirement exceptions in `PackageDAG.from_pkgs()` for each individual
requirement string
- Modified conftest to avoid adding a extra comma at the end and removed
some older code
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>