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

Test Wheel-Version before installing it #1569

Merged
merged 12 commits into from Feb 20, 2014

Conversation

Projects
None yet
3 participants
@Ivoz
Member

Ivoz commented Feb 15, 2014

Let me know what you think of error messages, and if the tests are thorough enough.

Should issue a logger warn if minor version great than VERSION_COMPATIBLE, and raise UnsupportedWheel if major version greater.

@qwcode

This comment has been minimized.

Show comment
Hide comment
@qwcode

qwcode Feb 15, 2014

Contributor

we only have wheel 1.0 now, and It's unlikely we'd not support an older version of the spec. when 1.1 is out, then we can adjust the installer logic, if needed, to fork depending on the version of the spec.

Contributor

qwcode commented Feb 15, 2014

we only have wheel 1.0 now, and It's unlikely we'd not support an older version of the spec. when 1.1 is out, then we can adjust the installer logic, if needed, to fork depending on the version of the spec.

Show outdated Hide outdated pip/wheel.py

@dstufft dstufft added this to the 1.5.3 milestone Feb 16, 2014

@qwcode

This comment has been minimized.

Show comment
Hide comment
@qwcode

qwcode Feb 16, 2014

Contributor

per IRC conversation, the value in this, is when pip v1.5.3 is old, and possibly still in use, so it can't try to install newer wheels, and possibly fail quietly and do bad things. at first, I was only thinking about new pips with old wheel versions.

Contributor

qwcode commented Feb 16, 2014

per IRC conversation, the value in this, is when pip v1.5.3 is old, and possibly still in use, so it can't try to install newer wheels, and possibly fail quietly and do bad things. at first, I was only thinking about new pips with old wheel versions.

Show outdated Hide outdated pip/wheel.py
Show outdated Hide outdated pip/wheel.py
Show outdated Hide outdated pip/req/req_install.py
@Ivoz

This comment has been minimized.

Show comment
Hide comment
@Ivoz

Ivoz Feb 18, 2014

Member

I still like the functional tests - because they test the critical piece of functionality of this feature - that pip won't install wheels of future versions.

Member

Ivoz commented Feb 18, 2014

I still like the functional tests - because they test the critical piece of functionality of this feature - that pip won't install wheels of future versions.

Show outdated Hide outdated pip/wheel.py
@dstufft

This comment has been minimized.

Show comment
Hide comment
@dstufft

dstufft Feb 18, 2014

Member

This looks good to me, any other issues you see @qwcode ?

Member

dstufft commented Feb 18, 2014

This looks good to me, any other issues you see @qwcode ?

@Ivoz

This comment has been minimized.

Show comment
Hide comment
@Ivoz

Ivoz Feb 18, 2014

Member

Hold up two secs, found a logic problem in the test

edit: done ↓

Member

Ivoz commented Feb 18, 2014

Hold up two secs, found a logic problem in the test

edit: done ↓

# E.g if wheel to install is 1.0 and we support up to 1.2
lower_v = (vc[0], max(0, vc[1] - 1))
wheel.check_compatibility(lower_v, name)

This comment has been minimized.

@qwcode

qwcode Feb 19, 2014

Contributor

I don't think I'm getting the significance of this test?
any version <= than the supported version is supported atm. ok, add a test for that.
why narrow in on this scenario of only testing when less in the minor series?

@qwcode

qwcode Feb 19, 2014

Contributor

I don't think I'm getting the significance of this test?
any version <= than the supported version is supported atm. ok, add a test for that.
why narrow in on this scenario of only testing when less in the minor series?

This comment has been minimized.

@Ivoz

Ivoz Feb 19, 2014

Member

ok, add a test for that.

This is that test. The function should run without throwing anything; lower_v is purely an example of a version that's <= our compatible version. It could've tested a major version lower if I put the - 1 on the other side; this is mostly just border testing.

Do you think it's worth it to be extremely thorough, produce a multitude of versions that should run cleanly?

@Ivoz

Ivoz Feb 19, 2014

Member

ok, add a test for that.

This is that test. The function should run without throwing anything; lower_v is purely an example of a version that's <= our compatible version. It could've tested a major version lower if I put the - 1 on the other side; this is mostly just border testing.

Do you think it's worth it to be extremely thorough, produce a multitude of versions that should run cleanly?

Show outdated Hide outdated pip/wheel.py
@qwcode

This comment has been minimized.

Show comment
Hide comment
@qwcode

qwcode Feb 19, 2014

Contributor

ok, lgtm

Contributor

qwcode commented Feb 19, 2014

ok, lgtm

dstufft added a commit that referenced this pull request Feb 20, 2014

Merge pull request #1569 from Ivoz/test-wheel-version
Test Wheel-Version before installing it

@dstufft dstufft merged commit 3480805 into pypa:develop Feb 20, 2014

1 check passed

default The Travis CI build passed
Details
@Ivoz

This comment has been minimized.

Show comment
Hide comment
@Ivoz

Ivoz Feb 20, 2014

Member

@qwcode many thanks for all the review, helping figure out how to use pkg_resources!

Member

Ivoz commented Feb 20, 2014

@qwcode many thanks for all the review, helping figure out how to use pkg_resources!

@Ivoz Ivoz deleted the Ivoz:test-wheel-version branch Jun 11, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment