wx.lib.six is deepsixed

Hi all,

Just a heads up that I'm removing the wx.lib.six module, and have added an installation requirement on the real six module. The reasons that prompted adding it into wx.lib are all pretty much gone, and I don't mind adding dependencies for Phoenix since that is well managed by pip and wheels now. So feel free to use the six module in your library modules or whatever.

The change is done including updating all the existing uses of six. It will get pushed later this evening once a few other things are done.

···

--
Robin Dunn
Software Craftsman
http://wxPython.org

Fine idea.

I’m going to add, however, that I have found very little need for six in writting pyton2/3 compatible code these days. So before you use it, ask yourself if you really need to…

This is a nice overview:

https://docs.python.org/3/howto/pyporting.html

And I wonder if we should consider using python-future:

http://python-future.org/overview.html

Anyone have experience with that?

-CHB

···

On Thu, Jun 30, 2016 at 9:43 PM, Robin Dunn robin@alldunn.com wrote:

Hi all,

Just a heads up that I’m removing the wx.lib.six module, and have added an installation requirement on the real six module. The reasons that prompted adding it into wx.lib are all pretty much gone, and I don’t mind adding dependencies for Phoenix since that is well managed by pip and wheels now. So feel free to use the six module in your library modules or whatever.

The change is done including updating all the existing uses of six. It will get pushed later this evening once a few other things are done.

Robin Dunn

Software Craftsman

http://wxPython.org

You received this message because you are subscribed to the Google Groups “wxPython-dev” group.

To unsubscribe from this group and stop receiving emails from it, send an email to wxPython-dev+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception

Chris.Barker@noaa.gov

Most of my code was or is 2/3 neutral.

···

Besides the future imports, I
mainly had to take care for str/unicode.

  IIRC, the effort for being compatible to Classic and Phoenix was

more effort than 2/3.

  So, for some programs/modules I have a header like this:

from __future__ import print_function, absolute_import, unicode_literals
try:
    basestring
_PYTHON2 = True
except: # Python 3
    basestring = (bytes,str)
    unicode = str
_PYTHON2 = False
  Personally, I prefer to have such a header over an additional

dependency and also “explicit is better than implicit”.

  On many occasions I used the basestring/unicode just because I did

the port to Phoenix in one evening. When I have a closer look
later, I often find that I just can use str instead due to
future unicode_literals.

  For wxPython of course we can't rely on all strings being unicode.

  Regards,

  Dietmar

  On 01.07.2016 18:59, Chris Barker wrote:

Fine idea.

      I'm going to add, however, that I have found very little

need for six in writting pyton2/3 compatible code these days.
So before you use it, ask yourself if you really need to…

This is a nice overview:

https://docs.python.org/3/howto/pyporting.html

And I wonder if we should consider using python-future:

http://python-future.org/overview.html

Anyone have experience with that?

-CHB

      On Thu, Jun 30, 2016 at 9:43 PM, Robin

Dunn robin@alldunn.com
wrote:

        Hi all,



        Just a heads up that I'm removing the wx.lib.six module, and

have added an installation requirement on the real six
module. The reasons that prompted adding it into wx.lib are
all pretty much gone, and I don’t mind adding dependencies
for Phoenix since that is well managed by pip and wheels
now. So feel free to use the six module in your library
modules or whatever.

        The change is done including updating all the existing uses

of six. It will get pushed later this evening once a few
other things are done.

            --

            Robin Dunn

            Software Craftsman

            [http://wxPython.org](http://wxPython.org)



            --

            You received this message because you are subscribed to

the Google Groups “wxPython-dev” group.

            To unsubscribe from this group and stop receiving emails

from it, send an email to wxPython-dev+unsubscribe@googlegroups.com.

            For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

      Christopher Barker, Ph.D.

      Oceanographer



      Emergency Response Division

      NOAA/NOS/OR&R            (206) 526-6959   voice

      7600 Sand Point Way NE   (206) 526-6329   fax

      Seattle, WA  98115       (206) 526-6317   main reception



      Chris.Barker@noaa.gov

  You received this message because you are subscribed to the Google

Groups “wxPython-dev” group.

  To unsubscribe from this group and stop receiving emails from it,

send an email to wxPython-dev+unsubscribe@googlegroups.com.

  For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

Chris Barker wrote:

Fine idea.

I’m going to add, however, that I have found very little need for six in writting pyton2/3
compatible code these days. So before you use it, ask yourself if you really need to…

This is a nice overview:

https://docs.python.org/3/howto/pyporting.html

And
I wonder if we should consider using python-future:

http://python-future.org/overview.html

Anyone
have experience with that?

I looked at python-future back when it was still fairly new. It looks like it has come a long way since then. I’ll take a closer look.

···


Robin Dunn

Software Craftsman

http://wxPython.org