← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1652458] Re: Tests unnecessarily use pep8 internals

 

Reviewed:  https://review.openstack.org/416829
Committed: https://git.openstack.org/cgit/openstack/python-keystoneclient/commit/?id=ffdab4ea43389b94f3c1d1ead5d97870d7c3c311
Submitter: Jenkins
Branch:    master

commit ffdab4ea43389b94f3c1d1ead5d97870d7c3c311
Author: Steve Martinelli <s.martinelli@xxxxxxxxx>
Date:   Tue Jan 3 09:51:55 2017 -0500

    remove hacking checks from keystoneclient
    
    the only hacking check in keystoneclient is related to
    older versions of oslo libraries, which are no longer
    supported by keystoneclient, for example:
    
    $ pip freeze | grep oslo.utils
    oslo.utils==3.18.0
    $ python
    >>> import oslo.utils
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
    ImportError: No module named oslo.utils
    >>> import oslo_utils
    >>>
    
    Let's just remove the hacking check since theres no
    way someone could incorrectly import the older
    versions.
    
    Closes-Bug: 1652458
    
    Signed-off-by: Adam Williamson <awilliam@xxxxxxxxxx>
    
    Change-Id: I14165903b46d2fc26e8c9de591917893f58516db


** Changed in: python-keystoneclient
       Status: In Progress => Fix Released

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Identity (keystone).
https://bugs.launchpad.net/bugs/1652458

Title:
  Tests unnecessarily use pep8 internals

Status in OpenStack Identity (keystone):
  In Progress
Status in python-keystoneclient:
  Fix Released

Bug description:
  test_hacking_checks.py isn't aware of the pep8 library being renamed
  pycodestyle; it's trivial to have it work with either name.

  The test also uses a rather unnecessarily baroque method to run only
  the K333 check; it's really not necessary to mock patch pep8's
  internals to do this, you can use its public API just as well.

  Here's a patch which fixes both issues. I'm really not interested in
  jumping through fifteen thousand hoops and signing my firstborn over
  to the openstack foundation just to submit some patches I wrote in the
  course of distro package fixing. I work for Red Hat, which is (I
  believe) a corporate member of the the foundation, so I don't even
  know if it's appropriate/allowed for me to sign up as a personal
  member.

  If it helps, I'm happy to declare this patch available under a very
  permissive license like CC-0, or just sign it over to a contributor,
  for the purpose of getting it merged.

To manage notifications about this bug go to:
https://bugs.launchpad.net/keystone/+bug/1652458/+subscriptions