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

Simplified the logic used for importing Python version specific packages #57

Merged
merged 1 commit into from
Mar 21, 2020
Merged

Simplified the logic used for importing Python version specific packages #57

merged 1 commit into from
Mar 21, 2020

Conversation

kshitij10496
Copy link

Hey @jgonggrijp
Thank you for this package.

In this PR, I have tried to unify the import statements for Python version specific packages into a single conditional clause.

Copy link
Owner

@jgonggrijp jgonggrijp left a comment

Choose a reason for hiding this comment

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

Thank you for your PR, @kshitij10496 (which is your given name, Kshitij or Saraogi?). It does look a bit neater this way.

With one more small change, it could look a little bit neater still. Would you mind adding another commit for that? Cheers.


from pkg_resources import parse_version
from packaging import version
Copy link
Owner

Choose a reason for hiding this comment

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

While you're at it, to complete the neatness, would you mind moving these two lines above the if/else block? Thanks in advance.

@jgonggrijp jgonggrijp self-assigned this Aug 13, 2017
@kshitij10496
Copy link
Author

Thank you for your PR, @kshitij10496 (which is your given name, Kshitij or Saraogi?). It does look a bit neater this way.

I am happy to contribute. BTW, my first name is Kshitij.
I will reorder the import statements as you have suggested and squash the commits, if that works for you.

@jgonggrijp
Copy link
Owner

In this case I don't mind a squash, but in general it is better to leave history unchanged once it has been published. Do what you prefer, I'll merge it either way.

@kshitij10496
Copy link
Author

In this case I don't mind a squash, but in general it is better to leave history unchanged once it has been published.

I couldn't agree more.
I have updated the PR. Let me know if any additional changes need to be made.

@jgonggrijp
Copy link
Owner

Oops, I almost missed this: this project uses git-flow, incidentally by the same author as the original pip-tools. Basically, this means that your branch should be merged into develop, not into master (as your PR is requesting). This is also mentioned in the CONTRIBUTING.md.

I manually merged your branch into develop. GitHub will however not recognize this as acceptance until the next release is out, when master finally descends from your contribution. So this PR will appear "open" for the time being, even though I have already accepted it.

@jgonggrijp jgonggrijp added this to the The release after 1.0 (minor or patch) milestone Aug 14, 2017
@kshitij10496
Copy link
Author

@jgonggrijp That's fine by me.
Thanks for the prompt review and merge.

@jgonggrijp jgonggrijp merged commit de872db into jgonggrijp:master Mar 21, 2020
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.

2 participants