Thread (1 message) 1 message, 1 author, 2016-06-15

Re: [PATCH] Makefile: Remove usage of deprecated Python "has_key" method

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:48:31

David Aguilar [off-list ref] writes:
On Sun, Mar 28, 2010 at 09:38:54AM -0700, Junio C Hamano wrote:
quoted
David Aguilar [off-list ref] writes:
quoted
"has_key" is a deprecated dictionary method in Python 2.6+.
Simplify the sys.path manipulation for installed scripts by
passing a default value to os.getenv().
It looks like the old code was replacing sys.path[0] but you are
prepending this.  Doesn't that change also make a difference?
The original code replaced sys.path[0] which is ''
(aka the current directory).  It's a little odd to
rely on the 0th element being something that is safe
to remove.

By prepending the path we have the same intended effect without
having to know that the 0th element is something that is
safe to remove.

Does removing '' break relative imports? (It might...)
That is exactly why I asked if it was an improvement that was not
described in the log message.

I'll queue with Johan's Ack, perhaps rewording the message a bit.
Thanks.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help