Skip to content

fix(dependency_getter): stricten URL guessing#570

Merged
mkniewallner merged 1 commit intofpgmaas:mainfrom
mkniewallner:fix/stricten-url-regex
Mar 7, 2024
Merged

fix(dependency_getter): stricten URL guessing#570
mkniewallner merged 1 commit intofpgmaas:mainfrom
mkniewallner:fix/stricten-url-regex

Conversation

@mkniewallner
Copy link
Collaborator

@mkniewallner mkniewallner commented Mar 6, 2024

Resolves #539.

PR Checklist

  • A description of the changes is added to the description of this PR.
  • If there is a related issue, make sure it is linked to this PR.
  • If you've fixed a bug or added code that should be tested, add tests!
  • [not applicable] Documentation in docs is updated

Description of changes

This strictens URL guessing when parsing requirements.txt format files by using urllib.parse.urlparse. At some point it would be nice to leverage parsing of dependencies to https://pypi.org/project/packaging/, although the library does not support legacy URL formats that AFAIK are still supported by pip, despite not being recommended anymore. I have a draft PR for this in mkniewallner#29 that I should someday finish.

@codecov
Copy link

codecov bot commented Mar 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.4%. Comparing base (bd78e3e) to head (3bb2173).

Additional details and impacted files
@@          Coverage Diff          @@
##            main    #570   +/-   ##
=====================================
  Coverage   90.4%   90.4%           
=====================================
  Files         39      39           
  Lines       1084    1084           
  Branches     220     220           
=====================================
  Hits         980     980           
  Misses        89      89           
  Partials      15      15           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@mkniewallner mkniewallner force-pushed the fix/stricten-url-regex branch from 77b5915 to 92f7c80 Compare March 6, 2024 22:07
@mkniewallner mkniewallner force-pushed the fix/stricten-url-regex branch from 92f7c80 to 3bb2173 Compare March 6, 2024 22:18
@mkniewallner mkniewallner marked this pull request as ready for review March 6, 2024 22:24
@mkniewallner mkniewallner requested a review from fpgmaas March 6, 2024 22:24
@mkniewallner mkniewallner added this to the 0.13 milestone Mar 7, 2024
@mkniewallner mkniewallner merged commit 63ca221 into fpgmaas:main Mar 7, 2024
@mkniewallner mkniewallner deleted the fix/stricten-url-regex branch March 24, 2024 10:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Packages having a name starting with "http" are interpreted as URL and incorrrectly parsed from requirements.txt

2 participants