Bug 610316 - python-paste is bundling libraries
Summary: python-paste is bundling libraries
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: python-paste
Version: 14
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Luke Macken
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-07-02 02:37 UTC by Toshio Ernie Kuratomi
Modified: 2016-09-20 02:40 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-08-16 18:55:56 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
Updated tempita unbundle patch (58.38 KB, patch)
2010-07-31 03:44 UTC, Toshio Ernie Kuratomi
no flags Details | Diff

Description Toshio Ernie Kuratomi 2010-07-02 02:37:53 UTC
Description of problem:

Several modules that python-paste has in the paste/util/ directory are bundled from other upstreams:

* doctest24.py -- from python stdlib
  - Unused
* intset.py -- http://code.activestate.com/recipes/466286/
  : used in python-netaddr as well.
  : paste has revision 6; other places are using revision 7
  - Used by util/ip4.py
* ip4.py -- http://code.activestate.com/recipes/466298-ipv4-address-set-type/
  : paste has current revision
  - Used by paste/auth/grantip.py
* killthread.py -- http://sebulba.wikispaces.com/recipe+thread2
  - Used by httpserver.py
* looper.py -- same file present in temptita/_looper.py
  - used by util/template.py (So it's all tempita)
* mimeparse.py -- this one actually has an upstream with a website:
  : http://code.google.com/p/mimeparse/downloads/list
  : paste has a snapshot from the source repository
  - used by wsgiwrappers.py
* PySourceColor.py -- http://bellsouthpwp.net/m/e/mefjr75/index.htm
  : Not sure what version paste is using as a basis. Upstream's
  : webserver is misconfigured. We can see the files but not download
  : them http://bellsouthpwp.net/m/e/mefjr75/python/
  - Used by debug/doctest_webapp.py
  - Used by exceptions/formatter
* scgiserver.py -- http://vallista.idyll.org/browser/software/scgiserver/trunk/scgiserver.py?format=txt
  : but the paste version has been modified
  - Unused
* string24.py -- from python
   - Unused
* subprocess24.py -- from python
  - Each of the following tries the system lib first.
  - debug/doctest_webapp.py debug/wdg_validate.py fixture.py
* template.py -- from tempita (tempita/__init__.py)
  - Used by debug/watchthreads.py
* UserDict24.py -- from python
  - Used in debug/fsdiff.py -- does *not* try system lib first
  - Used in request.py -- tries system lib first 

Of these, only a few really count as bundled libraries:
*  *24.py -- These come from the stdlib.  On python2.4+ only one of them will be used (I've just patched it so it won't be used either).  However the modules are not marked private so conceivably people using paste could use these.  That doesn't seem too likely, however, as only people worried about python older than 2.4 would use these instead of the stdlib alternatives.  With that in mind, I think my patch so paste itself doesn't use them is fine.

* template.py and looper.py -- these come from tempita.  I've just added a patch to our paste package in rawhide to use the system lib for this by default.

* mimeparse.py -- we need to package this with a snapshot from their version control system.  Possibly convince them to make a new release.

* PySourceColor -- Possibly port to pygments.  or see if upstream of this is active but just didn't keep their webserver working correctly.  At the moment, with the code inaccessible, it's as if this has no upstream so using a bundled copy isn't outrageous.

Version-Release number of selected component (if applicable):
python-paste-0.7.4-1

Additional info:

What needs to be done:
* Someone to submit my patches to paste upstream
* Someone to package mimeparser
* Someone to contact people about PySourceColor and decide on the next steps to take.

Comment 1 Dave Malcolm 2010-07-09 22:18:20 UTC
Is this patch correct:
http://cvs.fedoraproject.org/viewvc/devel/python-paste/paste-unbundle-tempita.patch?revision=1.1&view=markup

diffstat gives this:
 looper.py             |  152 ++++++++++
 looper/__init__.py    |    4 
 looper/_looper.py     |  152 ----------
 template.py           |  758 ++++++++++++++++++++++++++++++++++++++++++++++++++
 template/__init__.py  |    4 
 template/_template.py |  758 --------------------------------------------------
 6 files changed, 910 insertions(+), 918 deletions(-)

It seems to add a lot of code as well as remove lots.   Surely an unbundling patch should mostly remove lots of code, and only add a few lines at most?

It looks like it's just moving the code down one level.  I'm not sure I see the benefit - am I missing something here?  Sorry if I'm being dumb.

Comment 2 Toshio Ernie Kuratomi 2010-07-09 23:39:03 UTC
Looks like the patch is reversed but otherwise yes.  What you want to look at is the two __init__.py files.  This patch is meant to go upstream.  What it does is continues bundling the two files that make up tempita but make importing them first try to import the system libraries and if that fails, fall back to the bundled versions.  In Fedora and Red Hat packages we should be able to rm the files with the bundled code if we desire and make an explicit Requires: on the package that provides the system lib (in this case, python-tempita).

the advantage of this for upstream is:

1) If they consider the bundled code to be part of the public API, they can continue to keep that code in their namespace.  Note that this is something we should be telling upstream is a temporary measure as the other libraries will inevitably evolve and may change their API at a different rate from the bundling modules.

2) The upstream can continue to distribute the complete bundle so that people who download their tarball can have a working experience out-of-the-box.

I've un-reversed the patch in cvs and fixed the spec file to actually apply it:

http://cvs.fedoraproject.org/viewvc/devel/python-paste/paste-unbundle-tempita.patch?revision=1.2&view=markup

Comment 3 Toshio Ernie Kuratomi 2010-07-09 23:40:26 UTC
And there's currently a koji outage for the weekend so we've got to remember to make tag build on Monday.

Comment 4 Toshio Kuratomi 2010-07-11 19:05:33 UTC
New build in koji for rawhide with the patch properly applied.

https://koji.fedoraproject.org/koji/buildinfo?buildID=183032

Comment 5 Bug Zapper 2010-07-30 12:23:24 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 14 development cycle.
Changing version to '14'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 6 Toshio Ernie Kuratomi 2010-07-31 03:44:08 UTC
Created attachment 435720 [details]
Updated tempita unbundle patch

here's an updated patch for unbundling tempita.  paste-script was requiring a function that wasn't in the __all__ variable which  failed using the previous patch.

lmacken, could you take care of getting these patches to upstream?

Comment 7 Toshio Ernie Kuratomi 2010-07-31 03:44:37 UTC
And note: this updated patch has been applied to rawhide and f14.

Comment 8 Fedora End Of Life 2012-08-16 18:55:58 UTC
This message is a notice that Fedora 14 is now at end of life. Fedora 
has stopped maintaining and issuing updates for Fedora 14. It is 
Fedora's policy to close all bug reports from releases that are no 
longer maintained.  At this time, all open bugs with a Fedora 'version'
of '14' have been closed as WONTFIX.

(Please note: Our normal process is to give advanced warning of this 
occurring, but we forgot to do that. A thousand apologies.)

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, feel free to reopen 
this bug and simply change the 'version' to a later Fedora version.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we were unable to fix it before Fedora 14 reached end of life. If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora, you are encouraged to click on 
"Clone This Bug" (top right of this page) and open it against that 
version of Fedora.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping


Note You need to log in before you can comment on or make changes to this bug.