launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #05102
[Merge] lp:~jtv/launchpad/minilint-1 into lp:launchpad
Jeroen T. Vermeulen has proposed merging lp:~jtv/launchpad/minilint-1 into lp:launchpad.
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~jtv/launchpad/minilint-1/+merge/77112
= Summary =
Some more lint that was introduced, or left in place in files that people worked on, while I was landing my megalint-2 cleanup branch.
= Launchpad lint =
I left a few bits in place that were harder to fix.
Checking for conflicts and issues in changed files.
Linting changed files:
lib/canonical/launchpad/webapp/tests/test_errorlog.py
lib/lp/soyuz/stories/webservice/xx-hasbuildrecords.txt
lib/lp/code/mail/tests/test_branchmergeproposal.py
lib/lp/soyuz/stories/soyuz/xx-builds-pages.txt
./lib/lp/soyuz/stories/soyuz/xx-builds-pages.txt
13: source exceeds 78 characters.
17: source exceeds 78 characters.
--
https://code.launchpad.net/~jtv/launchpad/minilint-1/+merge/77112
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~jtv/launchpad/minilint-1 into lp:launchpad.
=== modified file 'lib/canonical/launchpad/webapp/tests/test_errorlog.py'
--- lib/canonical/launchpad/webapp/tests/test_errorlog.py 2011-09-26 08:23:59 +0000
+++ lib/canonical/launchpad/webapp/tests/test_errorlog.py 2011-09-27 08:07:26 +0000
@@ -1,4 +1,4 @@
-# Copyright 2009 Canonical Ltd. This software is licensed under the
+# Copyright 2009-2011 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
"""Tests for error logging & OOPS reporting."""
@@ -6,21 +6,17 @@
__metaclass__ = type
import datetime
+import httplib
import logging
-import httplib
-import os
-import shutil
-import stat
import StringIO
import sys
-import tempfile
from textwrap import dedent
import traceback
from fixtures import TempDir
from lazr.batchnavigator.interfaces import InvalidBatchSizeError
from lazr.restful.declarations import error_status
-from oops_datedir_repo import DateDirRepo
+from lp_sitecustomize import customize_get_converter
import pytz
import testtools
from testtools.matchers import StartsWith
@@ -35,7 +31,6 @@
from zope.security.interfaces import Unauthorized
from canonical.config import config
-from lp.app import versioninfo
from canonical.launchpad.layers import WebServiceLayer
from canonical.launchpad.webapp.errorlog import (
_filter_session_statement,
@@ -50,13 +45,11 @@
IUnloggedException,
NoReferrerError,
)
-from canonical.testing import reset_logging
+from lp.app import versioninfo
from lp.app.errors import (
GoneError,
TranslationUnavailable,
)
-from lp.services.osutils import remove_tree
-from lp_sitecustomize import customize_get_converter
UTC = pytz.utc
@@ -294,9 +287,11 @@
del utility._oops_config.publishers[:]
req_vars = [
- ('name2', 'value2'), ('name1', 'value1'),
- ('name1', 'value3')]
- url='https://launchpad.net/example'
+ ('name2', 'value2'),
+ ('name1', 'value1'),
+ ('name1', 'value3'),
+ ]
+ url = 'https://launchpad.net/example'
try:
raise ArbitraryException('xyz\nabc')
except ArbitraryException:
@@ -323,8 +318,8 @@
unprintable = '<unprintable UnprintableException object>'
self.assertEqual(unprintable, report['value'])
- self.assertIn( 'UnprintableException: ' + unprintable,
- report['tb_text'])
+ self.assertIn(
+ 'UnprintableException: ' + unprintable, report['tb_text'])
def test_raising_unauthorized_without_request(self):
"""Unauthorized exceptions are logged when there's no request."""
@@ -567,7 +562,6 @@
self.assertEqual("SELECT '%s'", oops['timeline'][0][3])
-
class TestSensitiveRequestVariables(testtools.TestCase):
"""Test request variables that should not end up in the stored OOPS.
@@ -631,10 +625,12 @@
self.logger = logging.getLogger(self.getUniqueString())
self.error_utility = ErrorReportingUtility()
self.oopses = []
+
def publish(report):
report['id'] = str(len(self.oopses))
self.oopses.append(report)
return report.get('id')
+
del self.error_utility._oops_config.publishers[:]
self.error_utility._oops_config.publishers.append(publish)
self.logger.addHandler(
=== modified file 'lib/lp/code/mail/tests/test_branchmergeproposal.py'
--- lib/lp/code/mail/tests/test_branchmergeproposal.py 2011-09-26 15:32:00 +0000
+++ lib/lp/code/mail/tests/test_branchmergeproposal.py 2011-09-27 08:07:26 +0000
@@ -1,4 +1,4 @@
-# Copyright 2009-2010 Canonical Ltd. This software is licensed under the
+# Copyright 2009-2011 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
"""Tests for BranchMergeProposal mailings"""
@@ -219,9 +219,9 @@
bugtask = bug.default_bugtask
bmp.source_branch.linkBug(bug, bmp.registrant)
private_bug = self.factory.makeBug(
- title='I am a private bug',
- owner = private_bug_owner,
- private=True)
+ title='I am a private bug',
+ owner=private_bug_owner,
+ private=True)
private_bugtask = private_bug.default_bugtask
with person_logged_in(private_bug_owner):
bmp.source_branch.linkBug(private_bug, bmp.registrant)
=== modified file 'lib/lp/soyuz/stories/soyuz/xx-builds-pages.txt'
--- lib/lp/soyuz/stories/soyuz/xx-builds-pages.txt 2011-09-26 07:53:20 +0000
+++ lib/lp/soyuz/stories/soyuz/xx-builds-pages.txt 2011-09-27 08:07:26 +0000
@@ -1,4 +1,5 @@
-= Builds pages =
+Builds pages
+============
These pages are based in the BuildRecordView class and
template/builds-list.pt. Basically they have a buildstate selector
@@ -109,7 +110,9 @@
>>> anon_browser.open("http://launchpad.dev/ubuntu/+builds")
-== Build titles ==
+
+Build titles
+------------
The anonymous user can review the build titles, including 'not
initialized' one (fix bug #52704).
@@ -184,7 +187,9 @@
i386 build of netapplet 0.99.6-1 in ubuntu warty RELEASE
------------------------------
-== Searches on the build state ==
+
+Searches on the build state
+---------------------------
Then anonymous user checks the results of some searches on build state.
@@ -250,7 +255,9 @@
taking 3 minutes — see the log
------------------------------
-== Form errors ==
+
+Form errors
+-----------
The form will not permit the anonymous user to enter a bad value (bug
#41104).
@@ -282,10 +289,12 @@
... "&build_text=binutils&build_state=all")
Traceback (most recent call last):
...
- UnexpectedFormData: No suitable state found for value "[u'building', u'all']"
-
-
-== Builder history ==
+ UnexpectedFormData: No suitable state found for value
+ "[u'building', u'all']"
+
+
+Builder history
+---------------
Check "Build History" contents, see the information about several
job processed by this builder. The main difference for the other
@@ -369,7 +378,8 @@
...
-== Builds page messages ==
+Builds page messages
+--------------------
When the anonymous user first views the builds page a distribution
that has no builds, for instance 'debian' in our sampledata, the page
@@ -419,7 +429,8 @@
repeat the same set of accesses done for Distribution Builds page.
>>> anon_browser.open(
- ... "http://launchpad.dev/ubuntu/hoary/+source/mozilla-firefox/+builds")
+ ... "http://launchpad.dev/"
+ ... "ubuntu/hoary/+source/mozilla-firefox/+builds")
When anonymous user first load only 'No packages currently building'
message is presented.
@@ -451,7 +462,8 @@
* DistroArchSeries Builds.
-== Partner builds ==
+Partner builds
+--------------
Anonymous user can see builds of partner packages on the same builds
page as any other packages from the primary archive.
@@ -477,7 +489,8 @@
...
-== Upload status ==
+Upload status
+-------------
A (distro) source package release page shows any builds for that source and
the status of the build. If the build has been uploaded but not yet
=== modified file 'lib/lp/soyuz/stories/webservice/xx-hasbuildrecords.txt'
--- lib/lp/soyuz/stories/webservice/xx-hasbuildrecords.txt 2011-09-26 07:53:20 +0000
+++ lib/lp/soyuz/stories/webservice/xx-hasbuildrecords.txt 2011-09-27 08:07:26 +0000
@@ -1,4 +1,5 @@
-= Objects that contains build records =
+Objects that contains build records
+===================================
Build records can be looked up in different contexts, they are:
@@ -24,7 +25,8 @@
... print entry['title']
-== Filtering builds ==
+Filtering builds
+----------------
Celso Providelo PPA builds can be browsed via the API.
@@ -83,7 +85,8 @@
0
-== Distribution builds ==
+Distribution builds
+-------------------
Distributions, like ubuntu, allow users to call browse builds.
@@ -99,7 +102,8 @@
i386 build of pmount 0.1-1 in ubuntu breezy-autotest RELEASE
-== DistroSeries builds ==
+DistroSeries builds
+-------------------
DistroSeries, like ubuntu/hoary, allow users to call browse builds.