Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Solving slashes or other less usual symbols in vcs refs were not being interpreted correctly. #5935

Merged
merged 4 commits into from Sep 17, 2023

Conversation

matteius
Copy link
Member

@matteius matteius commented Sep 16, 2023

Thank you for contributing to Pipenv!

The issue

Fixes issue #5934

The fix

urllib urlparse has to be better at separating netlocs from the remaining path than I can do.

The checklist

  • Associated issue
  • A news fragment in the news/ directory to describe this fix with the extension .bugfix.rst, .feature.rst, .behavior.rst, .doc.rst. .vendor.rst. or .trivial.rst (this will appear in the release changelog). Use semantic line breaks and name the file after the issue number or the PR #.

Copy link
Contributor

@oz123 oz123 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In general, looks ok. Just the tests look scary.
Would like to hear if @thehesiod approve that these changes work.
Can this branch upstream be protected from removal?

):
pypi_lockfile["default"]["google-api-python-client"] = {
"git": "https://github.com/thehesiod/google-api-python-client.git@thehesiod/batch-retries2",
"markers": "python_version >= '3.7'",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will this test break if the branch is removed?
We should have an isolated test that does not depend on other people's repository.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are unit level tests but I had to do them as integration to leverage the pipfile/lockfile stuff we get from those fixtures, but I am starting to write tests that are more unit level in nature -- so we are really just testing the string conversions that happen through these constructs -- no actual lock resolution or installation happening in these tests. More like is it giving intelligible things to pip resolver or installer based on the inputs. For example, that commit hash was from a different test and not actually part of that repo.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can use your own repo with a fake branch too right?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't care using mine, however I'm guessing you'll want to keep your own long term ;)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are unit level tests but I had to do them as integration to leverage the pipfile/lockfile stuff we get from those fixtures, but I am starting to write tests that are more unit level in nature -- so we are really just testing the string conversions that happen through these constructs -- no actual lock resolution or installation happening in these tests. More like is it giving intelligible things to pip resolver or installer based on the inputs. For example, that commit hash was from a different test and not actually part of that repo.

You also submit a PR with the example files to plette repo. I started a collection of test cases there.

@matteius matteius merged commit cdf41de into main Sep 17, 2023
16 checks passed
@matteius matteius deleted the git-branches-with-slash branch September 17, 2023 09:59
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.

None yet

3 participants