contrib/oauth.py should be removed

Bug #701545 reported by Martin Pool
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
Low
Colin Watson

Bug Description

contrib/oauth.py seems to be redundant with a library that's also available in Ubuntu and maybe in sourcecode, and it's an old buggy version. (See bug 314507.) We should check for any local changes that need to be removed, delete it, and check nothing breaks.

Related branches

Changed in launchpad:
status: New → Triaged
importance: Undecided → Low
Revision history for this message
Martin Pool (mbp) wrote :

I looked at the bzr history of this file. The only change since it was copied into the tree (on 2008-04-01) was my fix for bug 314507.

There is already a later oauth egg in lp-sourcedeps.

So it's basically a typo test: just delete the file, then see if that passes qa.

Changed in launchpad:
assignee: nobody → Martin Pool (mbp)
status: Triaged → In Progress
Revision history for this message
Martin Pool (mbp) wrote : Re: [Bug 701545] Re: contrib/oauth.py should be removed
Download full text (7.5 KiB)

I tried this obvious step and it failed as shown below. I guess that
the sourcecode oauth is not getting on the path, or something is
hardcoded to the old copy.

bin/compile_templates
Traceback (most recent call last):
  File "bin/compile_templates", line 26, in <module>
    canonical.launchpad.scripts.execute_zcml_for_scripts()
  File "/home/mbp/launchpad/lp-branches/work/lib/canonical/launchpad/scripts/__init__.py",
line 85, in execute_zcml_for_scripts
    scriptzcmlfilename, execute=True, context=context)
  File "/home/mbp/launchpad/lp-sourcedeps/eggs/zope.configuration-3.6.0-py2.6.egg/zope/configuration/xmlconfig.py",
line 647, in file
    include(context, name, package)
  File "/home/mbp/launchpad/lp-sourcedeps/eggs/zope.configuration-3.6.0-py2.6.egg/zope/configuration/xmlconfig.py",
line 546, in include
    processxmlfile(f, context)
  File "/home/mbp/launchpad/lp-sourcedeps/eggs/zope.configuration-3.6.0-py2.6.egg/zope/configuration/xmlconfig.py",
line 378, in processxmlfile
    parser.parse(src)
  File "/usr/lib/python2.6/xml/sax/expatreader.py", line 107, in parse
    xmlreader.IncrementalParser.parse(self, source)
  File "/usr/lib/python2.6/xml/sax/xmlreader.py", line 123, in parse
    self.feed(buffer)
  File "/usr/lib/python2.6/xml/sax/expatreader.py", line 207, in feed
    self._parser.Parse(data, isFinal)
  File "/usr/lib/python2.6/xml/sax/expatreader.py", line 349, in end_element_ns
    self._cont_handler.endElementNS(pair, None)
  File "/home/mbp/launchpad/lp-sourcedeps/eggs/zope.configuration-3.6.0-py2.6.egg/zope/configuration/xmlconfig.py",
line 357, in endElementNS
    self.context.end()
  File "/home/mbp/launchpad/lp-sourcedeps/eggs/zope.configuration-3.6.0-py2.6.egg/zope/configuration/config.py",
line 537, in end
    self.stack.pop().finish()
  File "/home/mbp/launchpad/lp-sourcedeps/eggs/zope.configuration-3.6.0-py2.6.egg/zope/configuration/config.py",
line 685, in finish
    actions = self.handler(context, **args)
  File "/home/mbp/launchpad/lp-sourcedeps/eggs/zope.configuration-3.6.0-py2.6.egg/zope/configuration/xmlconfig.py",
line 546, in include
    processxmlfile(f, context)
  File "/home/mbp/launchpad/lp-sourcedeps/eggs/zope.configuration-3.6.0-py2.6.egg/zope/configuration/xmlconfig.py",
line 378, in processxmlfile
    parser.parse(src)
  File "/usr/lib/python2.6/xml/sax/expatreader.py", line 107, in parse
    xmlreader.IncrementalParser.parse(self, source)
  File "/usr/lib/python2.6/xml/sax/xmlreader.py", line 123, in parse
    self.feed(buffer)
  File "/usr/lib/python2.6/xml/sax/expatreader.py", line 207, in feed
    self._parser.Parse(data, isFinal)
  File "/usr/lib/python2.6/xml/sax/expatreader.py", line 349, in end_element_ns
    self._cont_handler.endElementNS(pair, None)
  File "/home/mbp/launchpad/lp-sourcedeps/eggs/zope.configuration-3.6.0-py2.6.egg/zope/configuration/xmlconfig.py",
line 357, in endElementNS
    self.context.end()
  File "/home/mbp/launchpad/lp-sourcedeps/eggs/zope.configuration-3.6.0-py2.6.egg/zope/configuration/config.py",
line 537, in end
    self.stack.pop().finish()
  File "/home/mbp/launchpad/lp-sourcedeps/eggs/zope.configuration-3.6.0-py2.6.egg/zope/configuration/config.py",
line 68...

Read more...

Revision history for this message
Martin Pool (mbp) wrote :
Revision history for this message
Launchpad QA Bot (lpqabot) wrote :

Fixed in stable r12325 (http://bazaar.launchpad.net/~launchpad-pqm/launchpad/stable/revision/12325) by a commit, but not testable.

Changed in launchpad:
milestone: none → 11.02
tags: added: qa-untestable
Changed in launchpad:
status: In Progress → Fix Committed
Changed in launchpad:
status: Fix Committed → Fix Released
Revision history for this message
Martin Pool (mbp) wrote :

Per today's thread "buildbot failure in Launchpad on lucid_lp" it turns out that our test for this fails when run against the egg version of oauth. I'm not sure at the moment if that means the egg is actually buggy, or that the test is over-precise, or what.

Changed in launchpad:
status: Fix Released → Triaged
Revision history for this message
Martin Pool (mbp) wrote :

It turns out upstream has the fix for this, and Ubuntu's python-oauth has it, but Launchpad's egg of oauth doesn't have it yet.

Revision history for this message
Martin Pool (mbp) wrote :

After irc discussion with lifeless and wgrant, the plan is:

Wait until after this friday's rollout.

Add python-oauth to launchpad-*-dependencies, build that, remove from
download cache, let the losas know the package is needed (they
generally port the dependencies package to address this); tell
developers they need to update too.

Curtis Hovey (sinzui)
Changed in launchpad:
milestone: 11.02 → 11.03
Revision history for this message
Martin Pool (mbp) wrote :

https://dev.launchpad.net/LaunchpadPpa?#launchpad-dependencies reminds me that we probably also need to rebuild the EC2 instances. (Though maybe they should just update from the PPA before they start work?)

Martin Pool (mbp)
Changed in launchpad:
status: Triaged → In Progress
Revision history for this message
Martin Pool (mbp) wrote :

This is too hard. Here's where I got to; maybe somebody else can work it out.

As part of <http://pad.lv/701545-oauth>, I want to get Launchpad to use Ubuntu's python-oauth package.

In <https://code.launchpad.net/~mbp/meta-lp-deps/701545-add-dependency/+merge/49536> I added python-oauth as a dependency of launchpad-dependencies, and I have built and installed that package within my vm. So:

% python -c 'import oauth;print oauth'
<module 'oauth' from '/usr/lib/python2.6/dist-packages/oauth/__init__.pyc'>

works as I'd expect.

Even after deleting oauth from download-cache and deleting everything from eggs/, buildout still fails like so:

utilities/shhh.py PYTHONPATH= ./bin/buildout \
                configuration:instance_name=development -c buildout.cfg
While:
  Installing scripts.
  Getting distribution for 'oauth'.
Error: Couldn't find a distribution for 'oauth'.
Develop: '/home/mbp/launchpad/lp-branches/work/.'
Installing scripts.
Couldn't find index page for 'oauth' (maybe misspelled?)
Getting distribution for 'oauth'.

I've removed oauth from versions.cfg and setup.py, so the tree itself shouldn't require it. It looks like buildout is trying to install it as a requirement for some of the packages pulled in through eggs. How do I tell it not to? Surely there must be a way for it to satisfy those dependencies from OS-distributed packages?

Changed in launchpad:
status: In Progress → Triaged
milestone: 11.03 → none
Martin Pool (mbp)
Changed in launchpad:
assignee: Martin Pool (mbp) → nobody
William Grant (wgrant)
tags: removed: qa-untestable
Revision history for this message
Colin Watson (cjwatson) wrote :

I ported to oauthlib last November (see https://code.launchpad.net/~cjwatson/launchpad/+git/launchpad/+merge/393828) and hence removed lib/contrib/oauth.py, but I didn't notice this bug at the time.

Changed in launchpad:
assignee: nobody → Colin Watson (cjwatson)
status: Triaged → Fix Released
Revision history for this message
Martin Pool (mbp) wrote :

Hooray, well done Colin!

On Thu, Jul 29, 2021, 4:21 PM Colin Watson <email address hidden>
wrote:

> I ported to oauthlib last November (see
> https://code.launchpad.net/~cjwatson/launchpad/+git/launchpad/+merge/393828
> )
> and hence removed lib/contrib/oauth.py, but I didn't notice this bug at
> the time.
>
> ** Merge proposal linked:
>
> https://code.launchpad.net/~cjwatson/launchpad/+git/launchpad/+merge/393828
>
> ** Changed in: launchpad
> Assignee: (unassigned) => Colin Watson (cjwatson)
>
> ** Changed in: launchpad
> Status: Triaged => Fix Released
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/701545
>
> Title:
> contrib/oauth.py should be removed
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/launchpad/+bug/701545/+subscriptions
>
>

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.