[openstack-dev] [hacking] proposed rules drop for 1.0

Sean Dague sean at dague.net
Tue Dec 9 16:27:29 UTC 2014

On 12/09/2014 11:15 AM, Brian Curtis wrote:
> On Tue, Dec 9, 2014 at 9:05 AM, Sean Dague <sean at dague.net> wrote:
>> - [H305 H306 H307] Organize your imports according to the `Import order
>>   template`_ and `Real-world Import Order Examples`_ below.
>> I think these remain reasonable guidelines, but H302 is exceptionally
>> tricky to get right, and we keep not getting it right.
>> H305-307 are actually impossible to get right. Things come in and out of
>> stdlib in python all the time.
> Do you have concrete examples of where this has been an issue? Modules
> are only added roughly every 18 months and only on the 3.x line as of
> the middle of 2010 when 2.7.0 was released. Nothing should have left
> the 2.x line within that time as well, and I don't recall anything
> having completed a deprecation cycle on the 3.x side.

argparse - which is stdlib in 2.7, not in 2.6. So hacking on 2.6 would
give different results from 2.7. Less of an issue now that 2.6 support
in OpenStack has been dropped for most projects, but it's a very
concrete example.

This check should run on any version of python and give the same
results. It does not, because it queries python to know what's in stdlib
vs. not.

Having a deprecation cycle isn't the concern here, it's the checks
working the same on python 2.7, 3.3, 3.4, 3.5


Sean Dague

More information about the OpenStack-dev mailing list