On 23/11/14 17:19, Bill Allombert wrote:
> On Wed, Nov 05, 2014 at 02:38:39PM +1100, Brian May wrote:
>> We need two virtual package names, one for Python2 and one for Python3.
> 
> What I am unclear is why a single virtual package httpd-wsgi3 will work
> for python 3.2, 3.3, 3.4 etc.

All versions of Python 2.x are broadly source-compatible, and all
versions of Python 3.x are broadly source-compatible, but correct Python
2.x code usually needs significant source changes to be interpreted
correctly by Python 3.x. As a result of porting being required, and the
way we package extensions in Debian, dependency declarations need to
change across the 2 -> 3 boundary, from python-foo to python3-foo.

It would be appropriate for a webapp that requires module foo, and whose
code is correct Python 2, to depend on httpd-wsgi and python-foo; it
would be appropriate for a webapp that requires foo, and whose code is
correct Python 3, to depend on httpd-wsgi3 and python3-foo.

C extensions for versions of Python 2.x are not ABI-compatible with
other versions of 2.x, but that doesn't really matter here, because the
WSGI implementation will be linked to the libpython2.x from our default
Python 2.x version (whatever that happens to be), and all python-*
extensions that might be used by the webapp are available for at least
that default version (and possibly other versions).

The same logic presumably applies for 3.x and python3-* extensions.

A concrete example of what is wrong: fookebox depends on (among others)
python-sqlalchemy, and recommends httpd-wsgi.

Even if we assume that fookebox's source code is simultaneously correct
Python 2 and Python 3 code (which is possible to write, but sometimes
difficult), if it was run under libapache2-mod-wsgi-py3 it would
probably fail to start up, because python3-sqlalchemy is not pulled in
by its dependencies.

    S


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to