EliAndrewC / sideboard

BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Six-ify codebase #10

Closed EliAndrewC closed 10 years ago

EliAndrewC commented 10 years ago

Although we included six (Python's 2-to-3 version compatibility library) from the beginning, we haven't really been using it.

The task for this ticket is to look over what helper functions six provides, then review the existing Sideboard code base and swap out our hopefully-forwards-compatible code with six's way of doing it.

Examples include:

robdennis commented 10 years ago

If we were targeting single source, for explicit byte strings on 2 that should be Unicode on 3, we'd want to use str('foo').

On Mon, Mar 24, 2014 at 6:34 PM, Eli Courtwright notifications@github.com wrote:

Although we included six (Python's 2-to-3 version compatibility library) from the beginning, we haven't really been using it. The task for this ticket is to look over what helper functions six provides, then review the existing Sideboard code base and swap out our hopefully-forwards-compatible code with six's way of doing it. Examples include:

  • checking whether something is a string

- we have a lot of all = [b'foo', b'bar'] which is probably incorrect, unless 2to3 actually knows how to catch that. I'm not sure what the correct thing to do there is, but six probably has something.

Reply to this email directly or view it on GitHub: https://github.com/appliedsec/sideboard/issues/10

ftobia commented 10 years ago

Have we agreed anywhere that we're just targeting 2.7 and 3.3+? i.e. can we explicitly skip 3.2?

EliAndrewC commented 10 years ago

I've always assumed that and feel that it's preferable to commit to not supporting 3.2

EliAndrewC commented 10 years ago

Closing this since we already did it as part of our Python 3 compatibility work.