Compatibility Discussion: six vs. pies vs. otherPy2/Py3libs

I have been using six here and there basically since it was introduced.

As much as we would rather not have to use these libs at all if possible,
it is occasionally necessary for a few things in our cross-compatible PY2/PY3 projects.

I’m not sure exactly how many PY2/Py3 libs there are out there atm?..,
but since wxPy has adopted six, I have ran across other libs that require the other lib vise-versa, etc.

https://pypi.python.org/pypi/six/1.6.1
http://bitbucket.org/gutworth/six

https://pypi.python.org/pypi/pies/2.6.1
https://github.com/timothycrosley/pies

I guess the discussion should be about what would be best for wxPy in the long run and users experiences with the various compatibility libs.
I haven’t used anything but six as of this writing, but after reading the what the others good sides are, it has got me a bit more interested.

@Robin exactly what is the extent of the compatibility reachs as far as wxversion-wise(classic and phoenix) you aim to achieve for the end product vision/layout?
Would it include as far back as PY2.4? or should (2.6+, 3.3+) be the supported standard?

I noticed that in some aspects pies is more pythonic syntax-wise, as where six is compatible with older Python versions, etc…

Should more than one lib be adopted, or say, a merge specifically for wxPython of the better features of both/many maybe?

My wxrap.py(wxPython Classic-Phoenix wrapper) standalone module completely avoids these libs for sake of optimization and portability,
but it became of a bit more interest with the ongoing efforts to get Phoenix up and running right on PY3 as the underlying stuff may be using six/other/etc in the future.
Reducing the size of a compiled executable is also an endgame concern/goal I always look at. Ex: How much bigger/smaller it might be for something compiled as simple as import wx

Just curious what users/devs think on the subject of cross compatibility lib thing and how it might possibly change in the future…

Already changed :slight_smile: Originally the Python developers considered that using 2to3 was the way to go. Now it seems that the single code base supporting both Python 2 and 3 is the One True Way, hence http://python-future.org/ and GitHub - nandoflorestan/nine: Python 2 and 3 compatibility library, such that your code looks more like Python 3, neither of which I've used. I've heard good things about the former but know nothing about the latter.

···

On 19/04/2014 03:07, Metallicow wrote:

I have been using six here and there basically since it was introduced.

As much as we would rather not have to use these libs at all if possible,
it is occasionally necessary for a few things in our cross-compatible
PY2/PY3 projects.

I'm not sure exactly how many PY2/Py3 libs there are out there atm?...,
but since wxPy has adopted six, I have ran across other libs that
require *the other lib* vise-versa, etc.

six · PyPI
http://bitbucket.org/gutworth/six

pies · PyPI
GitHub - timothycrosley/deprecated.pies: The simplest (and tastiest) way to write one program that runs on both Python 2 and Python 3.

I guess the discussion should be about what would be best for wxPy in
the long run and users experiences with the various compatibility libs.
I haven't used anything but six as of this writing, but after reading
the what the others good sides are, it has got me a bit more interested.

@Robin exactly what is the extent of the compatibility reachs as far as
wxversion-wise(classic and phoenix) you aim to achieve for the end
product vision/layout?
Would it include as far back as PY2.4? or should (2.6+, 3.3+) be the
supported standard?

I noticed that in some aspects pies is more pythonic syntax-wise, as
where six is compatible with older Python versions, etc...

Should more than one lib be adopted, or say, a merge specifically for
wxPython of the better features of both/many maybe?

My wxrap.py(wxPython Classic-Phoenix wrapper) standalone module
completely avoids these libs for sake of optimization and portability,
but it became of a bit more interest with the ongoing efforts to get
Phoenix up and running right on PY3 as the underlying stuff may be using
six/other/etc in the future.
Reducing the size of a compiled executable is also an endgame
concern/goal I always look at. Ex: How much bigger/smaller it might be
for something compiled as simple as `import wx`...

Just curious what users/devs think on the subject of cross compatibility
lib thing and how it might possibly change in the future...

--
My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language.

Mark Lawrence

---
This email is free from viruses and malware because avast! Antivirus protection is active.

Mark Lawrence wrote:

I have been using six here and there basically since it was introduced.

As much as we would rather not have to use these libs at all if possible,
it is occasionally necessary for a few things in our cross-compatible
PY2/PY3 projects.

I'm not sure exactly how many PY2/Py3 libs there are out there atm?...,
but since wxPy has adopted six, I have ran across other libs that
require *the other lib* vise-versa, etc.

six · PyPI
http://bitbucket.org/gutworth/six

pies · PyPI
GitHub - timothycrosley/deprecated.pies: The simplest (and tastiest) way to write one program that runs on both Python 2 and Python 3.

I guess the discussion should be about what would be best for wxPy in
the long run and users experiences with the various compatibility libs.
I haven't used anything but six as of this writing, but after reading
the what the others good sides are, it has got me a bit more interested.

@Robin exactly what is the extent of the compatibility reachs as far as
wxversion-wise(classic and phoenix) you aim to achieve for the end
product vision/layout?
Would it include as far back as PY2.4? or should (2.6+, 3.3+) be the
supported standard?

Phoenix will only go back as far as Python 2.7. There are some things at the C API level that make supporting Python 2.6+ as well as 3 more difficult than it is worth.

It would be nice if we could continue to support 3.2 but 3.3 is sufficient if 3.2 is a hassle.

I noticed that in some aspects pies is more pythonic syntax-wise, as
where six is compatible with older Python versions, etc...

Should more than one lib be adopted, or say, a merge specifically for
wxPython of the better features of both/many maybe?

My wxrap.py(wxPython Classic-Phoenix wrapper) standalone module
completely avoids these libs for sake of optimization and portability,
but it became of a bit more interest with the ongoing efforts to get
Phoenix up and running right on PY3 as the underlying stuff may be using
six/other/etc in the future.
Reducing the size of a compiled executable is also an endgame
concern/goal I always look at. Ex: How much bigger/smaller it might be
for something compiled as simple as `import wx`...

Just curious what users/devs think on the subject of cross compatibility
lib thing and how it might possibly change in the future...

Already changed :slight_smile: Originally the Python developers considered that
using 2to3 was the way to go. Now it seems that the single code base
supporting both Python 2 and 3 is the One True Way, hence
http://python-future.org/ and GitHub - nandoflorestan/nine: Python 2 and 3 compatibility library, such that your code looks more like Python 3,
neither of which I've used. I've heard good things about the former but
know nothing about the latter.

I've also recently discovered python-future and it does look nice. I like the idea of being able to write the code for Py3 (mostly) but still have it work unchanged with Py2.7. It looks like nine also takes the same approach, but at first glance python-future seems more advanced, plus it helps you to make Py2 code Py3 compatible while you are migrating old code.

···

On 19/04/2014 03:07, Metallicow wrote:

--
Robin Dunn
Software Craftsman