Help!

New python policy

 
Post new topic   General Reply to Topic (not reply to a specific post)    Forums Home -> Python RSS
Next:  Updated libapache2-mod-python package  
Author Message
Raphael Hertzog
External


Since: May 28, 2005
Posts: 713



PostPosted: Fri Jun 02, 2006 1:00 pm    Post subject: New python policy
Archived from groups: linux>debian>maint>python (more info?)


Hello everybody,

there has (again) been some grumblings about the python transition (hi
Thomas!). The python Bof at the debconf has been successfull at deciding a
new python policy. However this policy is not implemented yet. That's what
causing this delay...

The new policy is more or less the following (people may correct me if I'm
wrong):
The major changes are for packages providing public modules:
* they should support all current python versions (the set of supported
python versions is defined by the python-all and python-all-dev packages)
* the same packages should indicate via an XC-Python-Version field in the
debian/control file (source paragraph) the python versions that they
support. This field can be either a list of supported versions ("2.3,
2.4") or an interval (">= 2.4" or ">=2.1, <<2.4") or "all" (if no
restrictions are known).
* the dependencies (hopefully created automatically by dh_python) will
indicate the right interval automatically:
right now for example it would be "python (>=2.3), python (<< 2.5)"
for a package saying "XC-Python-Version: all"
* the packages should provide all "python2.X-foo"
that they really provide (i.e. it must of course correspond to the
content of the package, which in turn should correspond to what
XC-Python-Version says). This Provides field can also be generated
by dh_python. (This is particularly relevant for binary modules of
course but it can make sense for non-binary modules as well, for example
if they don't support an old version anymore, stopping to provide
python2.3-foo would for example forbid upgrading a /usr/bin/python2.3
application relying on it)

For applications:
* if they use /usr/bin/python, they should simply depend on python-foo
modules that they use.
* if they use /usr/bin/python2.X, they should depend on python2.X-foo
modules that they use.

For private modules (not sure here):
* no change except that they can also use XC-Python-Version to get
a good python dependency automatically


As you can see, the bulk of the work is:
- modifying the rules file to build all versions for binary modules
- implementing the dh_python changes

Note: The policy doesn't require pycentral or python-support. But both of
these tools help to achieve the multiple-version support with a single
copy of the .py files.

Cheers,
--
Raphaël Hertzog

Premier livre français sur Debian GNU/Linux :
http://www.ouaza.com/livre/admin-debian/


--
To UNSUBSCRIBE, email to debian-python-REQUEST.RemoveThis@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster.RemoveThis@lists.debian.org
Back to top
Matthias Klose
External


Since: Nov 10, 2004
Posts: 1107



PostPosted: Fri Jun 02, 2006 7:20 pm    Post subject: Re: New python policy [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Joe Wreschnig writes:
> On Fri, 2006-06-02 at 12:52 +0200, Raphael Hertzog wrote:
> > * the dependencies (hopefully created automatically by dh_python) will
> > indicate the right interval automatically:
> > right now for example it would be "python (>=2.3), python (<< 2.5)"
> > for a package saying "XC-Python-Version: all"
>
> What's the point of such a tight upper dependency? The whole idea was to
> reduce the work for transitions, this still requires a rebuild when we
> upgrade to Python 2.5 (or in fact, whenever the supported versions of
> Python change).
>
> Such information is necessary for extensions, but irrelevant for
> programs or other modules.

No, see my posting from February. If a module depends on an extension,
it has to have this strict dependency.

> > * the packages should provide all "python2.X-foo"
> > that they really provide (i.e. it must of course correspond to the
> > content of the package, which in turn should correspond to what
> > XC-Python-Version says). This Provides field can also be generated
> > by dh_python. (This is particularly relevant for binary modules of
> > course but it can make sense for non-binary modules as well, for example
> > if they don't support an old version anymore, stopping to provide
> > python2.3-foo would for example forbid upgrading a /usr/bin/python2.3
> > application relying on it)
> >
> > For applications:
> > * if they use /usr/bin/python, they should simply depend on python-foo
> > modules that they use.
> > * if they use /usr/bin/python2.X, they should depend on python2.X-foo
> > modules that they use.
>
> IMO use of python2.x-foo should be discouraged. Maintainers of
> applications that need specific Python versions should ask maintainers
> of the modules they need, and only the ones they need, to provide the
> version-specific virtual package.

correct, but for those applications we try to include support for all
supported python versions in python-foo.

> > For private modules (not sure here):
> > * no change except that they can also use XC-Python-Version to get
> > a good python dependency automatically
>
> See my first comment. This misses the point, if an application has to be
> rebuilt whenever the Python version changes. Then all we get is a
> precarious tower of tools to do exactly what we did before.

only if the application uses a non-default python version.

> Given that we still have a ton of (virtual) python2.x-foo packages under
> this policy, and any Python package would still need to be rebuilt
> during a transition, I don't see how this policy does anything useful.

see my slides from Debconf.

- we are able to make a transition with one upload (python-defaults)
- no extension modules need to be uploaded for a transition
(potentially depending on new shlibs).
- all rebuilds/uploads can be handled by bin-NMU's.

that sounds pretty useful.

Matthias

http://people.debian.org/~doko/pycentral/


--
To UNSUBSCRIBE, email to debian-python-REQUEST.RemoveThis@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster.RemoveThis@lists.debian.org
Back to top
Matthias Klose
External


Since: Nov 10, 2004
Posts: 1107



PostPosted: Sat Jun 03, 2006 1:30 am    Post subject: Re: New python policy [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Steve Langasek writes:
> On Fri, Jun 02, 2006 at 11:50:53AM -0500, Joe Wreschnig wrote:
> > On Fri, 2006-06-02 at 12:52 +0200, Raphael Hertzog wrote:
> > > * the dependencies (hopefully created automatically by dh_python) will
> > > indicate the right interval automatically:
> > > right now for example it would be "python (>=2.3), python (<< 2.5)"
> > > for a package saying "XC-Python-Version: all"
>
> > What's the point of such a tight upper dependency? The whole idea was to
> > reduce the work for transitions, this still requires a rebuild when we
> > upgrade to Python 2.5 (or in fact, whenever the supported versions of
> > Python change).
>
> > Such information is necessary for extensions, but irrelevant for
> > programs or other modules.
>
> Indeed, the intent was that this strict upper bound would apply to
> extensions, not to modules. Not sure if that intent got lost somewhere
> along the way.

IIRC We did conclude that we need the Provides: pythonX.Y-foo for
modules as well and have to regenerate this information if we change
the set of supported python versions.


--
To UNSUBSCRIBE, email to debian-python-REQUEST.DeleteThis@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster.DeleteThis@lists.debian.org
Back to top
Raphael Hertzog
External


Since: May 28, 2005
Posts: 713



PostPosted: Sun Jun 04, 2006 7:00 pm    Post subject: Re: New python policy [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Fri, 02 Jun 2006, Joe Wreschnig wrote:
[Steve Langasek]
> > Yes, this was also discussed in the BoF, with the same conclusion: because
> > providing python2.x-foo can only be done safely if the package depends on
> > the python2.x versions of all other modules it requires, making transitions
> > more brittle as a result, these virtual packages should really only be
> > provided in response to specific demand for them.
>
> For those of us who were not at the BoF and only getting sketchy
> information about it (e.g. Raphael's information is wrong, or at least
> horribly incomplete, I guess, and presentation slides are not a good
> summary of technical policy), when are we going to have a real proposal
> to comment on, or at least follow?

I don't think so since AFAIK nobody took notes. And since time was passing I
posted this summary to at least have something written.

> What happened to "Python 2.4 first, new infrastructure later"?

I don't know really...

Matthias has created python2.4 packages using pycentral. He would like to
use that as "official helper tool".

Now he's rewriting dh_python in that direction. More on pycentral vs
python-support in another mail.

Cheers,
--
Raphaël Hertzog

Premier livre français sur Debian GNU/Linux :
http://www.ouaza.com/livre/admin-debian/


--
To UNSUBSCRIBE, email to debian-python-REQUEST.TakeThisOut@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster.TakeThisOut@lists.debian.org
Back to top
Josselin Mouette
External


Since: Nov 09, 2004
Posts: 1252



PostPosted: Tue Jun 06, 2006 12:30 pm    Post subject: Re: New python policy [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Le vendredi 02 juin 2006 à 12:52 +0200, Raphael Hertzog a écrit :
> For applications:
> * if they use /usr/bin/python, they should simply depend on python-foo
> modules that they use.
> * if they use /usr/bin/python2.X, they should depend on python2.X-foo
> modules that they use.

And on python2.X, as python2.X-foo will not necessarily depend on
python2.X in the future.

> For private modules (not sure here):
> * no change except that they can also use XC-Python-Version to get
> a good python dependency automatically

Private modules can be handled by python-support to avoid having a
strict dependency on python (>= 2.3), python (<< 2.4).
--
.''`. Josselin Mouette /\./\
: :' : josselin.mouette RemoveThis @ens-lyon.org
`. `' joss RemoveThis @debian.org
`- Debian GNU/Linux -- The power of freedom
Back to top
Josselin Mouette
External


Since: Nov 09, 2004
Posts: 1252



PostPosted: Tue Jun 06, 2006 12:30 pm    Post subject: Re: New python policy [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Le samedi 03 juin 2006 à 01:21 +0200, Matthias Klose a écrit :
> Steve Langasek writes:
> > Indeed, the intent was that this strict upper bound would apply to
> > extensions, not to modules. Not sure if that intent got lost somewhere
> > along the way.
>
> IIRC We did conclude that we need the Provides: pythonX.Y-foo for
> modules as well and have to regenerate this information if we change
> the set of supported python versions.

Indeed, and we also stated this Provides: field should be optional, and
only added if a depending application needs it.
--
.''`. Josselin Mouette /\./\
: :' : josselin.mouette RemoveThis @ens-lyon.org
`. `' joss RemoveThis @debian.org
`- Debian GNU/Linux -- The power of freedom
Back to top
Josselin Mouette
External


Since: Nov 09, 2004
Posts: 1252



PostPosted: Tue Jun 06, 2006 12:30 pm    Post subject: Re: New python policy [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Le vendredi 02 juin 2006 à 16:58 -0500, Joe Wreschnig a écrit :
> What happened to "Python 2.4 first, new infrastructure later"?

Matthias disagreed with that proposal, and it was decided to push the
changes as fast as possible so that he accepts to upload python2.4
after.
--
.''`. Josselin Mouette /\./\
: :' : josselin.mouette.DeleteThis@ens-lyon.org
`. `' joss.DeleteThis@debian.org
`- Debian GNU/Linux -- The power of freedom
Back to top
Display posts from previous:   
Post new topic   General Reply to Topic (not reply to a specific post)    Forums Home -> Python All times are: Eastern Time (US & Canada)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum