Re: when and why did python(-minimal) become essential?

2006-01-19 Thread Colin Watson
On Wed, Jan 18, 2006 at 11:36:13PM -0600, Joe Wreschnig wrote:
 On Thu, 2006-01-19 at 12:12 +1000, Anthony Towns wrote:
  Some reasons:
  
* compatability with Ubuntu -- so that packages can be easily ported back
  and forth between us and them; I expect most of the work ubuntu might do
  on improving boot up will require python-minimal
 
 This would be nice. Right now it's accomplished through patches Ubuntu
 makes to dh_python and cdbs. They'd probably like to drop those.

As a point of information, Ubuntu doesn't patch dh_python at present,
and I don't see any Python-related changes in cdbs at the moment either.

  I don't know what's actually in (or more importantly not in)
  python2.4-minimal though.
 
 I'm eyeballing right now. Things that jump out at me:
  * No character encoding, translation, or locale handling.
  * A little oddly, loss of shutil.
  * No sockets.

FWIW the relevant design docs from when this was done in Ubuntu are
here:

  https://wiki.ubuntu.com/EssentialPython (requirements)
  https://wiki.ubuntu.com/PythonInEssential (details)

The rationale for the set of included modules is in the latter, and was
basically done by taking each module in perl-base and mapping it to its
Python equivalent.

 The third seems like something software in base may want to do; I
 mention it specifically because perl-base include socket support.

Socket support does seem to be there:

  $ dpkg -c 
/mirror/ubuntu/pool/main/p/python2.4/python2.4-minimal_2.4.2-1ubuntu2_i386.deb 
| grep socket
  -rw-r--r-- root/root 49608 2006-01-17 12:59:02 
./usr/lib/python2.4/lib-dynload/_socket.so
  -rw-r--r-- root/root 12876 2006-01-17 12:58:18 
./usr/lib/python2.4/socket.py

Cheers,

-- 
Colin Watson   [EMAIL PROTECTED]


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: when and why did python(-minimal) become essential?

2006-01-19 Thread Andreas Schuldei
* Anthony Towns aj@azure.humbug.org.au [2006-01-19 19:21:07]:
  In Ubuntu, we've split the package in
  order to make -minimal essential, but never install it alone (both are part
  of base).
 
 Then what's the benefit of having python(-minimal) be essential at all?

you are able to do init.d scripts, pre- and postinsts etc in
python. That is a ease of development helper for ubuntu.

how agressive does debian use it's perl in this regard? i think
hardly at all.

i would welcome to either kick both higher level scrip languages
out (to shrink essential) and rewrite stuff like adduser in c or
c++ or see if we cant really use perl (or perhaps even
python-minimal) more for scripting in these places. it is an
underutilized resource currently and would be a win in
readability, structure and even speed. 


signature.asc
Description: Digital signature


Re: when and why did python(-minimal) become essential?

2006-01-19 Thread Joe Wreschnig
On Thu, 2006-01-19 at 09:31 +, Colin Watson wrote:
 On Wed, Jan 18, 2006 at 11:36:13PM -0600, Joe Wreschnig wrote:
  On Thu, 2006-01-19 at 12:12 +1000, Anthony Towns wrote:
   Some reasons:
   
 * compatability with Ubuntu -- so that packages can be easily ported 
   back
   and forth between us and them; I expect most of the work ubuntu might 
   do
   on improving boot up will require python-minimal
  
  This would be nice. Right now it's accomplished through patches Ubuntu
  makes to dh_python and cdbs. They'd probably like to drop those.

 As a point of information, Ubuntu doesn't patch dh_python at present,
 and I don't see any Python-related changes in cdbs at the moment either.

Oh, hrm. So packages that need to use python-minimal manually handle
their Python dependencies? That seems like a significant step backwards,
in terms of handling transitions.

   $ dpkg -c 
 /mirror/ubuntu/pool/main/p/python2.4/python2.4-minimal_2.4.2-1ubuntu2_i386.deb
  | grep socket
   -rw-r--r-- root/root 49608 2006-01-17 12:59:02 
 ./usr/lib/python2.4/lib-dynload/_socket.so
   -rw-r--r-- root/root 12876 2006-01-17 12:58:18 
 ./usr/lib/python2.4/socket.py

D'oh. Apparently I'm blind.

Thanks.
-- 
Joe Wreschnig [EMAIL PROTECTED]


signature.asc
Description: This is a digitally signed message part


Re: when and why did python(-minimal) become essential?

2006-01-19 Thread Joey Hess
Colin Watson wrote:
 FWIW the relevant design docs from when this was done in Ubuntu are
 here:
 
   https://wiki.ubuntu.com/EssentialPython (requirements)
   https://wiki.ubuntu.com/PythonInEssential (details)
 
 The rationale for the set of included modules is in the latter, and was
 basically done by taking each module in perl-base and mapping it to its
 Python equivalent.

FWIW, that's a fairly strange way to do it, since modules are
added/removed from perl-base as needed by the perl-using programs in the
base system. For example, perl-base includes Data::Dumper because debconf
(used to) use it, not because there's any other particular reason to
include that module in base, and I've just asked that Data::Dumper be
removed, so including its equivilant (pickle) in python-base on that
rationalle is decidely strange.

If we followed the same method for python-base, then we would

a) instroduce python-base iff we had some package(s) written in python
   that we wanted in the base system (apt-listchanges comes to mind)
b) include only the modules needed by the package(s).

-- 
see shy jo


signature.asc
Description: Digital signature


Re: when and why did python(-minimal) become essential?

2006-01-19 Thread Matt Zimmerman
On Thu, Jan 19, 2006 at 03:34:58PM -0500, Joey Hess wrote:
 If we followed the same method for python-base, then we would
 
 a) instroduce python-base iff we had some package(s) written in python
that we wanted in the base system (apt-listchanges comes to mind)
 b) include only the modules needed by the package(s).

Please don't do this; it implies that python-minimal would be part of base,
but not full python, and this is something that python upstream explicitly
objects to.

-- 
 - mdz


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: when and why did python(-minimal) become essential?

2006-01-19 Thread Martin Michlmayr
* Matt Zimmerman [EMAIL PROTECTED] [2006-01-19 12:45]:
 Please don't do this; it implies that python-minimal would be part
 of base, but not full python, and this is something that python
 upstream explicitly objects to.

Why?  Surely having a sub-set of python is better than nothing at all, no?
-- 
Martin Michlmayr
http://www.cyrius.com/


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: when and why did python(-minimal) become essential?

2006-01-19 Thread Pierre Habouzit
Le Jeu 19 Janvier 2006 22:47, Matt Zimmerman a écrit :
 On Thu, Jan 19, 2006 at 09:23:30PM +, Martin Michlmayr wrote:
  * Matt Zimmerman [EMAIL PROTECTED] [2006-01-19 12:45]:
   Please don't do this; it implies that python-minimal would be
   part of base, but not full python, and this is something that
   python upstream explicitly objects to.
 
  Why?  Surely having a sub-set of python is better than nothing at
  all, no?

 One of the appealing things about the Python language is their
 batteries included philosophy: users can assume that the standard
 library is available, documentation and examples are written to the
 full API, etc. When it's broken into pieces, they get complaints and
 support requests from their user community when things don't work the
 way they should.

 It is already a source of frustration to them that we don't install
 python-dev with python.

IMHO, python-minimal has not to be a developpement environment that is 
viable as-is, but only what is needed to run the scripts that need it. 
That has to be stated clearly in the description of the package, so 
that nobody would assume anything about it.

Honnestly, I would be really surprised that we can't find a consensus 
here, if it's needed one day (which currently isn't in Debian if I've 
followed that thread correctly enough).

Ubuntu does not AFAICT the same size requirements as debian do for base, 
and I really think that python upstream can understand that the *full* 
python suite on a embeded device just does not makes sense.

To me, this looks like a bad excuse.
-- 
·O·  Pierre Habouzit
··O[EMAIL PROTECTED]
OOOhttp://www.madism.org


pgp744tnc1Bg5.pgp
Description: PGP signature


Re: when and why did python(-minimal) become essential?

2006-01-19 Thread Matt Zimmerman
On Thu, Jan 19, 2006 at 09:23:30PM +, Martin Michlmayr wrote:
 * Matt Zimmerman [EMAIL PROTECTED] [2006-01-19 12:45]:
  Please don't do this; it implies that python-minimal would be part
  of base, but not full python, and this is something that python
  upstream explicitly objects to.
 
 Why?  Surely having a sub-set of python is better than nothing at all, no?

One of the appealing things about the Python language is their batteries
included philosophy: users can assume that the standard library is
available, documentation and examples are written to the full API, etc.
When it's broken into pieces, they get complaints and support requests from
their user community when things don't work the way they should.

It is already a source of frustration to them that we don't install
python-dev with python.

-- 
 - mdz


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: when and why did python(-minimal) become essential?

2006-01-19 Thread David Nusinow
On Thu, Jan 19, 2006 at 01:47:18PM -0800, Matt Zimmerman wrote:
 On Thu, Jan 19, 2006 at 09:23:30PM +, Martin Michlmayr wrote:
  * Matt Zimmerman [EMAIL PROTECTED] [2006-01-19 12:45]:
   Please don't do this; it implies that python-minimal would be part
   of base, but not full python, and this is something that python
   upstream explicitly objects to.
  
  Why?  Surely having a sub-set of python is better than nothing at all, no?
 
 One of the appealing things about the Python language is their batteries
 included philosophy: users can assume that the standard library is
 available, documentation and examples are written to the full API, etc.
 When it's broken into pieces, they get complaints and support requests from
 their user community when things don't work the way they should.

For what it's worth, we've caught hell from the ruby community for breaking
the standard library in to its component parts and not installing it all by
default. This problem has been largely abrogated as of late, but I'd rather
not see us piss off the python community for making a similar mistake.

That said, I don't really understand why it's Ok for Ubuntu to do this but
not us.

 - David Nusinow


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: when and why did python(-minimal) become essential?

2006-01-19 Thread Matt Zimmerman
On Thu, Jan 19, 2006 at 05:58:20PM -0500, David Nusinow wrote:
 That said, I don't really understand why it's Ok for Ubuntu to do this but
 not us.

Ubuntu never installs python-minimal without python, even in base.

-- 
 - mdz


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: when and why did python(-minimal) become essential?

2006-01-19 Thread David Nusinow
On Thu, Jan 19, 2006 at 03:18:48PM -0800, Matt Zimmerman wrote:
 On Thu, Jan 19, 2006 at 05:58:20PM -0500, David Nusinow wrote:
  That said, I don't really understand why it's Ok for Ubuntu to do this but
  not us.
 
 Ubuntu never installs python-minimal without python, even in base.

Ah, ok. Then why bother with the package at all then? Why not just make all
of python Essential: yes?

 - David Nusinow


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: when and why did python(-minimal) become essential?

2006-01-19 Thread Matt Zimmerman
On Thu, Jan 19, 2006 at 06:38:55PM -0500, David Nusinow wrote:
 On Thu, Jan 19, 2006 at 03:18:48PM -0800, Matt Zimmerman wrote:
  On Thu, Jan 19, 2006 at 05:58:20PM -0500, David Nusinow wrote:
   That said, I don't really understand why it's Ok for Ubuntu to do this but
   not us.
  
  Ubuntu never installs python-minimal without python, even in base.
 
 Ah, ok. Then why bother with the package at all then? Why not just make all
 of python Essential: yes?

Because it has additional dependencies on packages which are not Essential:
yes, and because -minimal is much smaller (if someone explicitly uninstalls
it, along with the standard packages which depend on it), we can assume they
are accepting the consequences).

-- 
 - mdz


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: when and why did python(-minimal) become essential?

2006-01-19 Thread Martin Michlmayr
* David Nusinow [EMAIL PROTECTED] [2006-01-19 17:58]:
 For what it's worth, we've caught hell from the ruby community for breaking
 the standard library in to its component parts and not installing it all by
 default. This problem has been largely abrogated as of late, but I'd rather
 not see us piss off the python community for making a similar mistake.

I definitely agree we should listen to the Python community,
especially with the lovely Martin v. Löwis doing so much good work for
us.
-- 
Martin Michlmayr
http://www.cyrius.com/


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: when and why did python(-minimal) become essential?

2006-01-19 Thread Thomas Bushnell BSG
Matt Zimmerman [EMAIL PROTECTED] writes:

 On Thu, Jan 19, 2006 at 06:38:55PM -0500, David Nusinow wrote:
 On Thu, Jan 19, 2006 at 03:18:48PM -0800, Matt Zimmerman wrote:
  On Thu, Jan 19, 2006 at 05:58:20PM -0500, David Nusinow wrote:
   That said, I don't really understand why it's Ok for Ubuntu to do this 
   but
   not us.
  
  Ubuntu never installs python-minimal without python, even in base.
 
 Ah, ok. Then why bother with the package at all then? Why not just make all
 of python Essential: yes?

 Because it has additional dependencies on packages which are not Essential:
 yes, and because -minimal is much smaller (if someone explicitly uninstalls
 it, along with the standard packages which depend on it), we can assume they
 are accepting the consequences).

I'm confused now.  Python depends on, say, foobie, where foobie is not
Essential, and is quite large.  

But python-minimal is always installed along with python.  So
anytime python-minimal is there, foobie is there too, since python
depends on it.  Right?

Programs that want to use python can assume that python-minimal is
there (since it's Essential), and since python-minimal is never
installed without python also installed, they can also now assume that
all of python, including foobie, is there.

What am I missing?

Thomas


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: when and why did python(-minimal) become essential?

2006-01-19 Thread Anthony Towns
On Fri, Jan 20, 2006 at 12:16:55AM -0500, David Nusinow wrote:
  The difference between installed (was installed initially) and
  installed (is installed now).  The compromise we struck with upstream
  was that we would not give the user a system with a broken Python.  If
  they create one on their own, that's their business (and they could strip it
  down themselves anyway).
 Just to clarify, because I'm also confused and genuinely curious... you
 guys use the minimal package during bootstrapping or something and then by
 the end of the installation process you will necessarily have the full
 python somehow. Is this correct?

No, they install the full system by default (ie, python and python-minimal
both get installed by debootstrap as part of base), but allow it to be
stripped down to python-minimal later if the user wants to.

In warty there was no python-minimal, and python2.3 was installed along
with apt (pri: important), in hoary python-minimal was essential, and
installed with dpkg (pri: required) and python was installed with apt;
in breezy it's the same as hoary, with the exception that buildds only
get python-minimal; dapper is the same as breezy.

Cheers,
aj



signature.asc
Description: Digital signature


Re: when and why did python(-minimal) become essential?

2006-01-19 Thread Matt Zimmerman
On Fri, Jan 20, 2006 at 12:16:55AM -0500, David Nusinow wrote:
 Just to clarify, because I'm also confused and genuinely curious... you
 guys use the minimal package during bootstrapping or something and then by
 the end of the installation process you will necessarily have the full
 python somehow. Is this correct?

python is part of the base system in Ubuntu.

-- 
 - mdz


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: python packaging infrastructure

2006-01-19 Thread Steve Langasek
On Wed, Jan 18, 2006 at 01:06:39PM +0100, Matthias Klose wrote:
 Josselin Mouette writes:
  Le lundi 16 janvier 2006 à 15:24 +0100, Matthias Klose a écrit :
   This is the right direction, and adding support for extensions makes
   this complete. Does your proposal allow rebuilding these packages
   without actually changing anything (except the changelog).

  Being able to rebuild packages for a new python version without changing
  anything was the purpose of dh_python from the very beginning, for both
  packaging styles:
* for packages with a single python-foo package containing
  extension foo, build-depending on python-dev, a rebuild will
  generate a new package built against the new version;
* for packages with python2.3-foo and python2.4-foo, a rebuild
  will make python-foo depend on the new version. The only case
  that isn't handled is when the package isn't maintained much,
  and lacks python2.5-foo when the python2.5 transition
  approaches.
  This is independent of python-support.

 the design decision of putting the binary-all python packages in a
 separate directory into /var/lib/python2.x/site-packages has some
 problems when supporting packages with extensions (a proposal beeing
 made on #irc was to keep the extensions in the standard path).

 suppose you have the following scenario

 /usr/lib/python2.3/site-packages/foo/
   __init__.py
   fooext.so (doing a import foomod)
   foomod.py

 which is splitted into (by python-support)

 /usr/lib/python2.3/site-packages/foo/
   __init__.py
   fooext.so

 /var/lib/python2.3/site-packages/foo/
   __init__.py
   foomod.py


 Having /var/lib/python2.3/site-packages appended to sys.path let's the
 import of foomod fail (cannot be found).  Using just one package
 directory inside /usr/lib/python2.3/site-packages does avoid the
 problem (the way the current python-central works).

I think this objection is misguided for the following reason.

If a package includes a python extension, then any .py files it also
includes are either in the same directory (or same tree) with those .so
files, or they are in some other unrelated directory.

If they are in the same directory, then *that directory has the name of the
python implementation in its path*, because .so's are not shared between
python implementations.  In this case, it is not appropriate or reasonable
for these .py files to be managed via a symlink farm, because each minor
version of python has its own separate .py file (which may not vary from
release to release, but that's beside the point).

If they are in different directories, then foomod.py already doesn't enjoy a
privileged location in the current path; so whether they are symlink-farmed
or not, there must already be handling in place to locate foomod.py, so it
doesn't much matter which particular directory it's located in.

Perhaps you are arguing that a package should be able to ship
/usr/lib/python2.3/site-packages/foo/fooext.so and
/usr/lib/python/site-packages/foo/foomod.py, and have the infrastructure
make foomod.py (or foomod.pyc?) available in
/usr/lib/python2.3/site-packages/foo.  I'm not sure why this would be
advantageous?

 So how does python-support handle packages, where the extension
 module is split out in it's own binary package?

If they're split out in separate binary packages, then surely the extension
package doesn't require any special handling, and the module package can be
managed as before?  (since obviously it's not sensible to split
/usr/lib/python2.3/site-packages/foo between two separate packages...)

Also, if you really put all of these files in
/usr/lib/python2.3/site-packages, doesn't that make it unnecessarily
difficult to distinguish between symlinks managed by python-support, and
symlinks managed by the packaging system?  (I remember that Joss's
description of python-support provided for symlinking of other data files
that may be included in module directories, other than .py files...)

-- 
Steve Langasek   Give me a lever long enough and a Free OS
Debian Developer   to set it on, and I can move the world.
[EMAIL PROTECTED]   http://www.debian.org/


signature.asc
Description: Digital signature