[openstack-dev] New python dependency - extras-0.0.1

Monty Taylor mordred at inaugust.com
Fri Nov 23 07:43:52 UTC 2012



On 11/22/2012 11:29 PM, Mark McLoughlin wrote:
> Hey,
>
> A new Oslo dependency is proposed here:
>
>    https://review.openstack.org/16789
>
> The library is called 'extras' and released its first version nearly a
> month ago:
>
>    http://pypi.python.org/pypi/extras/0.0.1
>    https://github.com/testing-cabal/extras

As a follow up to that, it actually started off life inside of the 
testtools project which has been around for a while, and I got Robert to 
split some of the elements which were generally useful outside of 
testing context - so don't let the month-ago part scare you off. :)

> I don't forsee any objections apart from perhaps 'is a separate library
> for just try_import() really worth it?'
>
> I'm inclined to approve it, just want to give folks a chance to express
> an opinion.

Over on the CI python projects, we've been using pyflakes instead of 
pylint quite successfully recently. It's got a much higher signal to 
noise ratio, and regularly finds actual bugs for me (including a couple 
I found in pyflakes-cleaning oslo-incubator the other day) There are two 
things done in the general openstack projects that prevent pyflakes from 
being on the table for consideration - one is the try: import foo 
except: foo = None pattern, which confuses the "you're redefined this 
variable" detection. The other is the way we use gettext - for which we 
don't have a great solution.

ANYWAY - I like the clarity of the try_import call and that it gets us 
one step closer to possible better static analysis.

There's my pitch. :)

Monty



More information about the OpenStack-dev mailing list