[PATCH v2] version: show enabled extensions (issue4209)

Sean Farley sean.michael.farley at gmail.com
Wed Jun 18 18:54:52 CDT 2014


Augie Fackler writes:

> On Sat, Jun 14, 2014 at 12:05:07AM +0300, anatoly techtonik wrote:
>> On Thu, Jun 12, 2014 at 5:05 AM, Greg Ward <greg at gerg.ca> wrote:
>>
>> > > +        maxnamelen = max(len(n) for n in names)
>> > > +        for i,n in enumerate(names):
>> >
>> > This shows that you didn't run contrib/check-code.py. Should be a
>> > space after the comma.
>> >
>>
>> Awesome tool. Is it available as a pre-commit hook?
>>
>>
>> >py ../contrib/check-code.py extensions.py
>> extensions.py:374:
>>  >           and callable(module.get_version)):
>>  callable not available in Python 3, use getattr(f, '__call__', None)
>>
>> Hmm.. Another Python 3 wart?
>> Should the correct hint be hasattr(module.getversion, '__call__')?
>> (util.safehasattr)
>
> The hint could actually stand to be safehasattr.

Python 3.2 brought callable back.


More information about the Mercurial-devel mailing list