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

Fixed issues caused due to upgrade of pip to v10.0.0 #75

Merged
merged 4 commits into from
Nov 11, 2018

Conversation

safiyat
Copy link
Collaborator

@safiyat safiyat commented Apr 17, 2018

Fixed issues caused due to upgrade of pip to v10.0.0 which removed the deprecated pip install --download support.

Among other changes,

  • Introduced a set of global variables named pip_version, pip_download_command and pip_no_binary_command. The variables pip_download_command and pip_no_binary_command are version dependent.
  • Now we are importing the main() method from pip (for pip<10.0.0) or from pip._internal (for pip>=10.0.0) as pip_main.
  • Introduced a new flag has_pip (pretty much like has_wheel) as a global flag to denote the presence of pip.
  • The help messages printed by the pip2pi parser now dynamically prints options for pip download and no-binary features based on installed pip version.

Tested with pip versions 7.0.0 and onwards. Two unit tests of normalized names fail with pip versions 8.0.0, 8.1.0 and 8.1.1 as they did earlier.

…e deprecated `pip install --download` support.

Among other changes,
- Introduced a set of global variables named `pip_version`, `pip_download_command` and `pip_no_binary_command`. The variables `pip_download_command` and `pip_no_binary_command` are version dependent.
- Now we are importing the `main()` method from `pip` (for pip<10.0.0) or from `pip._internal` (for pip>=10.0.0) as `pip_main`.
- Introduced a new flag `has_pip` (pretty much like `has_wheel`) as a global flag to denote the presence of pip.
- The help messages printed by the pip2pi parser now dynamically prints options for pip download and no-binary features based on installed pip version.
@safiyat
Copy link
Collaborator Author

safiyat commented Apr 17, 2018

Fixes #73 and #74 .

@safiyat
Copy link
Collaborator Author

safiyat commented Apr 24, 2018

@wolever @themartorana Please take a look.

@sinemetu1
Copy link
Contributor

@safiyat sent you a PR to get travis tests to run green with this branch.

Get Travis CI tests to run properly.
@safiyat
Copy link
Collaborator Author

safiyat commented Apr 26, 2018

Thanks to @sinemetu1, the Travis CI test configuration is fixed too.

@sinemetu1
Copy link
Contributor

@wolever bump

@kierun
Copy link

kierun commented Jun 8, 2018

@wolever Any chance of merging this soon?

@sinemetu1
Copy link
Contributor

@wolever can we get this merged in and cut a release?

@zulrang
Copy link

zulrang commented Sep 17, 2018

@wolever You still around? Can we please get this merged?

@sinemetu1
Copy link
Contributor

@sinemetu1
Copy link
Contributor

@wolever Ughhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh wtf 🤔

@kierun
Copy link

kierun commented Oct 4, 2018

@wolever
Copy link
Owner

wolever commented Oct 4, 2018

Ug, I'm very sorry. I have no excuse for why this took so long.

If there is a general consensus that this is functional, I'm happy to merge. Additionally, if any of y'all would like to take over maintenance, send me your PyPI usernames and I'll give you access to the repository.

Again, I'm very sorry for how long this has taken. While it definitely doesn't make up for it, if you'd like to send me your mailing addresses, I'll send you some PyCon Canada swag.

@safiyat
Copy link
Collaborator Author

safiyat commented Oct 5, 2018

@wolever I think the first thing to be done is to get this merged. Others have approved the change. You may review it too if you like.

You may provide access to me if you like. The pypi username is safiyat.

PyCon swag? All may be forgiven. Check mail.

@kierun
Copy link

kierun commented Oct 5, 2018

@wolever Cool to have you back!

@safiyat
Copy link
Collaborator Author

safiyat commented Oct 16, 2018

So I ran the UTs for all the versions of pip (again), this time including 18.0 and 18.1.
Four tests are failing.

pip==18.0
ERROR: test_get_source_with_wheels (__main__.Pip2PiHeavyTests)
ERROR: test_requirements_txt (__main__.Pip2PiHeavyTests)
ERROR: test_requirements_txt_with_aggressive_normalization (__main__.Pip2PiHeavyTests)
ERROR: test_wheels (__main__.Pip2PiHeavyTests)
Ran 8 tests in 0.958s
FAILED (errors=4)

pip==18.1
ERROR: test_get_source_with_wheels (__main__.Pip2PiHeavyTests)
ERROR: test_requirements_txt (__main__.Pip2PiHeavyTests)
ERROR: test_requirements_txt_with_aggressive_normalization (__main__.Pip2PiHeavyTests)
ERROR: test_wheels (__main__.Pip2PiHeavyTests)
Ran 8 tests in 0.972s
FAILED (errors=4)

Will fix this first, and then get it merged.
Apologies for the late update.

@kierun
Copy link

kierun commented Oct 19, 2018

Looks like all the tests pass … Can we merge this? Pretty please with sugar on top? ☺

I really want to get this installed on my work set up to stop the crazy™ system we use…

@safiyat safiyat force-pushed the add__pip.10.0.0_support branch 2 times, most recently from 0dbaecd to cd1abbc Compare November 9, 2018 08:02
…ution of each pip command.

When populated by one `pip_main` call, the variable remains in the environment properties for all subsequent calls, wreaking havoc since the directory is subsequently deleted.
Should be removed once fixed in `pip`, but will remain until then.

Also removed testing for py33 as pip 18.1 demands 3.4.
@safiyat
Copy link
Collaborator Author

safiyat commented Nov 11, 2018

The issue was the introduction of an environment variable PIP_REQ_TRACKER in v18.0.
It set the path to the request tracker directory (used by pip) in the environment variables and didn't unset it even after deleting the directory.
Will raise a separate issue with pip for the same.

Also, apologies for this delay in the fix. I'll try not to keep things hanging for so long in the future.

@safiyat safiyat merged commit c4eb0ff into wolever:master Nov 11, 2018
@safiyat safiyat deleted the add__pip.10.0.0_support branch November 11, 2018 06:21
@safiyat
Copy link
Collaborator Author

safiyat commented Nov 11, 2018

@sinemetu1 @kierun @zulrang pip2pi v0.8.0-rc1 is released. I have tested it as much as I could. Please provide your feedback so that we can do a final release.

@kierun
Copy link

kierun commented Nov 12, 2018

I just tried v0.8.0rc1 with pip version 18.1 and it worked just fine. ☺ Many thanks indeed.

@philipp2100
Copy link

Fixes #73 and #74 .

Doesn't fix #73 for me. I haven't checked #74.

@safiyat
Copy link
Collaborator Author

safiyat commented Jan 2, 2019

@philipp2100 Is it possible for you to test #85 for your use case? If it is, could you please test it and report whether it works for you?

@philipp2100
Copy link

Yes, that patch also fixes it.

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

6 participants