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

Subversion interactive support #6439

Merged
merged 2 commits into from
May 19, 2019
Merged

Subversion interactive support #6439

merged 2 commits into from
May 19, 2019

Conversation

johnthagen
Copy link
Contributor

@johnthagen johnthagen commented Apr 24, 2019

Subtask of #6386

@cjerdonek could you tag this as Trivial?

@johnthagen johnthagen marked this pull request as ready for review April 24, 2019 19:22
@johnthagen
Copy link
Contributor Author

@cjerdonek Could you look over the implementation before I start adding tests? Also, any ideas as to why a few tests are failing? I couldn't see how what I changed in the Subversion constructor would cause the regression.

@cjerdonek
Copy link
Member

Also, any ideas as to why a few tests are failing?

It's probably because the url is being passed positionally as the first argument in other code, and so it's being used as the use_interactive argument rather than the first args argument: def __init__(self, use_interactive=None, *args, **kwargs):. You can see some of the test failures are showing that url is None, which means the url isn't getting passed to the VersionControl base class.

Could you look over the implementation before I start adding tests?

Will do later..

@cjerdonek cjerdonek added C: vcs pip's interaction with version control systems like git, svn and bzr skip news Does not need a NEWS file entry (eg: trivial changes) labels Apr 25, 2019
@johnthagen
Copy link
Contributor Author

It's probably because the url is being passed positionally as the first argument in other code

You were right. I've fixed up the constructor signature to fix this.

@johnthagen
Copy link
Contributor Author

@cjerdonek

I also think the class should grow a private _vcs_version instance attribute to cache the version value from the method you just wrote. It can initially be set to None (unset), with a None version value being stored as some other non-None value (perhaps False)

I used a separate _call_vcs_version_failed attribute because I think it composes better with the type system. That way _vcs_version can be Optional[Tuple[int, ...]] rather than Union[Optional[Tuple[int, ...]], bool].

@johnthagen
Copy link
Contributor Author

@cjerdonek Presuming the CI passes, this PR should be ready for review. Tests have been added.

Copy link
Member

@cjerdonek cjerdonek left a comment

Choose a reason for hiding this comment

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

Thanks! Some quick comments (not exhaustive).

src/pip/_internal/vcs/subversion.py Outdated Show resolved Hide resolved
src/pip/_internal/vcs/subversion.py Outdated Show resolved Hide resolved
src/pip/_internal/vcs/subversion.py Outdated Show resolved Hide resolved
src/pip/_internal/vcs/subversion.py Outdated Show resolved Hide resolved
src/pip/_internal/vcs/subversion.py Outdated Show resolved Hide resolved
@johnthagen
Copy link
Contributor Author

@cjerdonek I believe all of your comments have now been addressed.

@johnthagen
Copy link
Contributor Author

@cjerdonek Was wondering if you had any more comments for this PR. Thanks.

@cjerdonek
Copy link
Member

I'll get to it. Just try to be patient..

Copy link
Member

@cjerdonek cjerdonek left a comment

Choose a reason for hiding this comment

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

Thanks for your patience. Here are some additional review comments.

src/pip/_internal/vcs/subversion.py Outdated Show resolved Hide resolved
src/pip/_internal/vcs/subversion.py Outdated Show resolved Hide resolved
src/pip/_internal/vcs/subversion.py Outdated Show resolved Hide resolved
src/pip/_internal/vcs/subversion.py Outdated Show resolved Hide resolved
src/pip/_internal/vcs/subversion.py Outdated Show resolved Hide resolved
src/pip/_internal/vcs/subversion.py Outdated Show resolved Hide resolved
tests/unit/test_vcs.py Outdated Show resolved Hide resolved
@BrownTruck
Copy link
Contributor

Hello!

I am an automated bot and I have noticed that this pull request is not currently able to be merged. If you are able to either merge the master branch into this pull request or rebase this pull request against master then it will be eligible for code review and hopefully merging!

@BrownTruck BrownTruck added the needs rebase or merge PR has conflicts with current master label May 7, 2019
@pypa-bot pypa-bot removed the needs rebase or merge PR has conflicts with current master label May 8, 2019
@johnthagen
Copy link
Contributor Author

@cjerdonek Thanks for the review.

Presuming the CI passes, I believe that I have addressed all of your comments.

@cjerdonek
Copy link
Member

Strange, this was already fixed in the latest PR before this review. Perhaps you are commenting on an older review?

The explanation on this: I had some "pending" comments from before that I didn't publish because I decided to wait instead for your next version. And then when I reviewed your newer version, not all of the pending comments were still applicable (the GitHub UI hid the ones that were marked "outdated," but they got published anyways when I clicked okay).

@johnthagen
Copy link
Contributor Author

@cjerdonek Ah, that makes sense.

Copy link
Member

@cjerdonek cjerdonek left a comment

Choose a reason for hiding this comment

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

Looking good! Just a few more (final?) comments..

src/pip/_internal/vcs/subversion.py Show resolved Hide resolved
src/pip/_internal/vcs/subversion.py Outdated Show resolved Hide resolved
src/pip/_internal/vcs/subversion.py Outdated Show resolved Hide resolved
src/pip/_internal/vcs/subversion.py Outdated Show resolved Hide resolved
tests/unit/test_vcs.py Outdated Show resolved Hide resolved
tests/unit/test_vcs.py Outdated Show resolved Hide resolved
@johnthagen
Copy link
Contributor Author

@cjerdonek I believe all of your review comments have been addressed.

@cjerdonek
Copy link
Member

@johnthagen I squashed / rebased your changes into two commits (one with the code changes, and one with the method moves) to make it easier for people to see, and also made a few tiny tweaks, if that's okay.

@johnthagen
Copy link
Contributor Author

@cjerdonek Sounds great, thanks!

@cjerdonek cjerdonek merged commit 07ce2ab into pypa:master May 19, 2019
@cjerdonek
Copy link
Member

Great, and thanks again for sticking with this, @johnthagen!

@johnthagen johnthagen deleted the svn-interactive branch May 19, 2019 23:10
@johnthagen
Copy link
Contributor Author

@cjerdonek Of course! Thanks for all of the detailed reviews.

@lock lock bot added the auto-locked Outdated issues that have been locked by automation label Jun 19, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Jun 19, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
auto-locked Outdated issues that have been locked by automation C: vcs pip's interaction with version control systems like git, svn and bzr skip news Does not need a NEWS file entry (eg: trivial changes)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants