Thread (54 messages) read the whole thread 54 messages, 5 authors, 2019-12-07

Re: [PATCH v4 02/11] git-p4: change the expansion test from basestring to list

From: Ben Keene <hidden>
Date: 2019-12-05 17:05:47

On 12/5/2019 5:27 AM, Denton Liu wrote:
Hi Ben,

On Wed, Dec 04, 2019 at 10:29:28PM +0000, Ben Keene via GitGitGadget wrote:
quoted
From: Ben Keene <redacted>

Python 3+ handles strings differently than Python 2.7.
Do you mean Python 3?
quoted
Since Python 2 is reaching it's end of life, a series of changes are being submitted to enable python 3.7+ support. The current code fails basic tests under python 3.7.
Python 3.5 doesn't reach EOL until Q4 2020[1]. We should be testing
these changes under 3.5 to ensure that we're not accidentally
introducing stuff that's not backwards compatible.

I changed my commit text to say support for version 3.5 (which is 
actually the version I am running the test with).

quoted
Change references to basestring in the isinstance tests to use list instead. This prepares the code to remove all references to basestring.

The original code used basestring in a test to determine if a list or literal string was passed into 9 different functions.  This is used to determine if the shell should be evoked when calling subprocess methods.
Once again, I'd swap the above two paragraphs. Problem then solution.

Also, did you mean "invoked" instead of "evoked"?

Changed.  And yes, I meant 'invoked'. I wasn't trying to make my code 
feel anything!

quoted
Signed-off-by: Ben Keene <redacted>
(cherry picked from commit 5b1b1c145479b5d5fd242122737a3134890409e6)
---
  git-p4.py | 18 +++++++++---------
  1 file changed, 9 insertions(+), 9 deletions(-)
The patch itself looks good, though.

[1]: https://devguide.python.org/#branchstatus
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help