[PATCH] util.h: kill no longer needed definitions for Python < 2.6

Adrian Buehlmann adrian at cadifra.com
Thu May 14 14:32:26 CDT 2015


On 2015-05-14 20:34, Pierre-Yves David wrote:
> 
> 
> On 05/14/2015 12:10 AM, Adrian Buehlmann wrote:
>> # HG changeset patch
>> # User Adrian Buehlmann <adrian at cadifra.com>
>> # Date 1431587088 -7200
>> # Node ID 407a0d664643a749071a9f720f79664d81fbcf52
>> # Parent  297ea0df75d0f7ab552fc8986d04c8196de8d9dd
>> util.h: kill no longer needed definitions for Python < 2.6
>>
>> see e1fb276d4619
>>
>> diff --git a/mercurial/util.h b/mercurial/util.h
>> --- a/mercurial/util.h
>> +++ b/mercurial/util.h
>> @@ -18,8 +18,7 @@
>>    Mapping of some of the python < 2.x PyString* functions to py3k's PyUnicode.
>>
>>    The commented names below represent those that are present in the PyBytes
>> - definitions for python < 2.6 (below in this file) that don't have a direct
>> - implementation.
>> + definitions for python < 2.x that don't have a direct implementation.
>>   */
> 
> This comment change puzzle me. Do we have remaining extra definition? 
> what does tnio 2.x mean? should it be 2.7 ?

Yeah, I was confused myself about that comment.

What I can say, the comment references the code block that I killed
("PyBytes definitions for python < 2.6 (below in this file)").

"The commented names below represent .." are still there (after my removal).

I'm not sure we need to mention a specific Python version at all for these.

What I know for sure is, that the part

#if PY_VERSION_HEX < 0x02060000

should be removed, so that it will cause a nice compile time error if
someone tries to compile with Python 2.5 (or older). It also has become
unused after e1fb276d4619.


More information about the Mercurial-devel mailing list