Python2.6 pkg_resources allowing incompat versions

Bug #1489969 reported by Joshua Harlow
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
anvil
Fix Committed
Undecided
Unassigned

Bug Description

Noticed the following:

[09:48:13] <@harlowja> Python 2.6.6 (r266:84292, Dec 19 2012, 19:54:30)
[09:48:13] <@harlowja> [GCC 3.4.6 20060404 (Red Hat 3.4.6-11)] on linux2
[09:48:13] <@harlowja> Type "help", "copyright", "credits" or "license" for more information.
[09:48:13] <@harlowja> >>> import pkg_resources
[09:48:13] <@harlowja> >>> r = pkg_resources.Requirement.parse( 'requests>=1.2.1,<=2.2.1,!=2.4.0' )
[09:48:13] <@harlowja> >>> x = '2.4.3'
[09:48:13] <@harlowja> >>> x in r
[09:48:13] <@harlowja> True
[09:48:33] <@harlowja> Python 2.7.10 (default, Jun 18 2015, 15:58:36)
[09:48:33] <@harlowja> [GCC 4.1.2 20080704 (Red Hat 4.1.2-46)] on linux2
[09:48:33] <@harlowja> Type "help", "copyright", "credits" or "license" for more information.
[09:48:33] <@harlowja> >>> import pkg_resources
[09:48:33] <@harlowja> >>> r = pkg_resources.Requirement.parse( 'requests>=1.2.1,<=2.2.1,!=2.4.0' )
[09:48:33] <@harlowja> >>> x = '2.4.3'
[09:48:33] <@harlowja> >>> x in r
[09:48:33] <@harlowja> False

The 2.6 version is fixed by upgrading setuptools, so that it will then work like the 2.7 version.

Joshua Harlow (harlowja)
description: updated
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to anvil (master)

Reviewed: https://review.openstack.org/218393
Committed: https://git.openstack.org/cgit/stackforge/anvil/commit/?id=7c027d40e2b616ba57f7c69f8162a6311461a566
Submitter: Jenkins
Branch: master

commit 7c027d40e2b616ba57f7c69f8162a6311461a566
Author: Joshua Harlow <email address hidden>
Date: Fri Aug 28 10:14:28 2015 -0700

    Ensure setuptools is somewhat recent

    Due to bugs in older setuptools version parsing
    we need to set a relatively new version of setuptools
    so that parsing works better (and/or correctly).

    This seems especially important on 2.6 which due to
    a busted setuptools (and associated pkg_resources) seems
    to be matching against incorrect versions.

    Closes-bug: #1489969

    Change-Id: Ib859c7df955edef0f38c5673bd21a4767c781e4a

Changed in anvil:
status: New → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.