Merge lp:~mbp/bzr/trivial-2.1 into lp:bzr/2.1

Proposed by Martin Pool
Status: Merged
Approved by: Andrew Bennetts
Approved revision: no longer in the source branch.
Merged at revision: 4877
Proposed branch: lp:~mbp/bzr/trivial-2.1
Merge into: lp:bzr/2.1
Diff against target: 25 lines (+2/-2)
2 files modified
Makefile (+1/-1)
bzrlib/tests/__init__.py (+1/-1)
To merge this branch: bzr merge lp:~mbp/bzr/trivial-2.1
Reviewer Review Type Date Requested Status
Andrew Bennetts Approve
Review via email: mp+57802@code.launchpad.net

Commit message

use -Wignore rather than catching ImportWarning, to restore py2.4 compatibility

Description of the change

not so trivial actually....
this reverts the change jelmer and I made to ignore ImportWarning, instead telling make to tell python not to treat this as an error.

unfortunately i'd already merged this all the way from 2.1 up to 2.3 before spiv pointed this out, so we'll have to do the same again here.

on python2.4 this will give a warning from make check but no more.

see also the discussion in https://code.launchpad.net/~jelmer/bzr/importwarning/+merge/57184

To post a comment you must log in.
Revision history for this message
Andrew Bennetts (spiv) :
review: Approve
Revision history for this message
Martin Pool (mbp) wrote :

sent to pqm by email

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'Makefile'
2--- Makefile 2010-02-17 17:11:16 +0000
3+++ Makefile 2011-04-15 01:53:25 +0000
4@@ -39,7 +39,7 @@
5 check: docs check-nodocs
6
7 check-nodocs: extensions
8- $(PYTHON) -Werror -O ./bzr selftest -1v $(tests)
9+ $(PYTHON) -Werror -Wignore::ImportWarning -O ./bzr selftest -1v $(tests)
10
11 # Run Python style checker (apt-get install pyflakes)
12 #
13
14=== modified file 'bzrlib/tests/__init__.py'
15--- bzrlib/tests/__init__.py 2011-04-14 04:04:52 +0000
16+++ bzrlib/tests/__init__.py 2011-04-15 01:53:25 +0000
17@@ -4162,7 +4162,7 @@
18 try:
19 self._module = __import__(self.module_name, {}, {}, [''])
20 return True
21- except (ImportWarning, ImportError):
22+ except ImportError:
23 return False
24
25 @property

Subscribers

People subscribed via source and target branches