Re: [PATCH] git-p4: Avoid modules deprecated in Python 2.6.

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

Re: [PATCH] git-p4: Avoid modules deprecated in Python 2.6.

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:47:19

Reilly Grant [off-list ref] writes:
The popen2, sha and sets modules are deprecated in Python 2.6 (sha in
Python 2.5).  Both popen2 and sha are not actually used in git-p4.
Replace usage of sets.Set with the builtin set object.
Does the code already rely on a feature not found in Python older than 2.4
before your patch?  Otherwise I would have liked to see the last sentence
like this:

    Replace usage of sets.Set with the builtin set object, which has
    been available since Python 2.4.

    This change makes the script unusable with Python older than 2.4,
    which was released in 2004. Hopefully nobody uses ancient 2.3.

So that I did not have to check myself to get a feel of how safe this
change is.

Re: [PATCH] git-p4: Avoid modules deprecated in Python 2.6.

From: Reilly Grant <hidden>
Date: 2016-06-15 22:47:19

Junio C Hamano wrote:
Reilly Grant [off-list ref] writes:

  
quoted
The popen2, sha and sets modules are deprecated in Python 2.6 (sha in
Python 2.5).  Both popen2 and sha are not actually used in git-p4.
Replace usage of sets.Set with the builtin set object.
    
Does the code already rely on a feature not found in Python older than 2.4
before your patch?  Otherwise I would have liked to see the last sentence
like this:

    Replace usage of sets.Set with the builtin set object, which has
    been available since Python 2.4.

    This change makes the script unusable with Python older than 2.4,
    which was released in 2004. Hopefully nobody uses ancient 2.3.

So that I did not have to check myself to get a feel of how safe this
change is.
  
Thank you for the advice, this is my first patch.  The existing code
uses the built-in set module in other places so the 2.4 requirement
already exists.  I should have mentioned this in the original description.

-- 
Reilly Grant
reillyeon@qotw.net                     http://www.qotw.net/~reillyeon
GPG Key Signature: 2A41 A3E5 F3CA D3A0 F5CF  02DF B1EB CDEC 7850 E278
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help