Merge lp:~jelmer/brz/flakes-fix into lp:brz/3.0

Proposed by Jelmer Vernooij
Status: Merged
Approved by: Jelmer Vernooij
Approved revision: 7349
Merge reported by: The Breezy Bot
Merged at revision: not available
Proposed branch: lp:~jelmer/brz/flakes-fix
Merge into: lp:brz/3.0
Diff against target: 136 lines (+30/-13)
6 files modified
breezy/git/object_store.py (+3/-1)
breezy/git/server.py (+15/-4)
breezy/plugins/bash_completion/tests/test_bashcomp.py (+1/-1)
breezy/tests/blackbox/test_remember_option.py (+1/-2)
breezy/tests/test_source.py (+5/-1)
byov.conf (+5/-4)
To merge this branch: bzr merge lp:~jelmer/brz/flakes-fix
Reviewer Review Type Date Requested Status
Jelmer Vernooij Approve
Review via email: mp+384002@code.launchpad.net

Commit message

Fix compatibility with newer versions of flake8.

Description of the change

Fix compatibility with newer versions of flake8.

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'breezy/git/object_store.py'
2--- breezy/git/object_store.py 2019-04-14 03:19:31 +0000
3+++ breezy/git/object_store.py 2020-05-30 01:13:39 +0000
4@@ -791,13 +791,15 @@
5 self.generate_pack_contents(have, want, progress, get_tagged,
6 lossy=True))
7
8- def generate_pack_contents(self, have, want, progress=None,
9+ def generate_pack_contents(self, have, want, shallow=None, progress=None,
10 ofs_delta=False, get_tagged=None, lossy=False):
11 """Iterate over the contents of a pack file.
12
13 :param have: List of SHA1s of objects that should not be sent
14 :param want: List of SHA1s of objects that should be sent
15 """
16+ if shallow is not None:
17+ raise NotImplementedError('shallow is currently not supported')
18 processed = set()
19 ret = self.lookup_git_shas(have + want)
20 for commit_sha in have:
21
22=== modified file 'breezy/git/server.py'
23--- breezy/git/server.py 2018-11-11 14:23:06 +0000
24+++ breezy/git/server.py 2020-05-30 01:13:39 +0000
25@@ -92,12 +92,23 @@
26 have = self.object_store.find_common_revisions(graph_walker)
27 if wants is None:
28 return
29+ shallows = getattr(graph_walker, 'shallow', frozenset())
30 if isinstance(self.object_store, BazaarObjectStore):
31- return self.object_store.generate_pack_contents(
32- have, wants, progress, get_tagged=get_tagged, lossy=True)
33+ if shallows:
34+ return self.object_store.generate_pack_contents(
35+ have, wants, shallow=shallows,
36+ progress=progress, get_tagged=get_tagged, lossy=True)
37+ else:
38+ return self.object_store.generate_pack_contents(
39+ have, wants, progress=progress,
40+ get_tagged=get_tagged, lossy=True)
41 else:
42- return self.object_store.generate_pack_contents(
43- have, wants, progress)
44+ if shallows:
45+ return self.object_store.generate_pack_contents(
46+ have, wants, shallow=shallows, progress=progress)
47+ else:
48+ return self.object_store.generate_pack_contents(
49+ have, wants, progress=progress)
50
51
52 class BzrTCPGitServer(TCPGitServer):
53
54=== modified file 'breezy/plugins/bash_completion/tests/test_bashcomp.py'
55--- breezy/plugins/bash_completion/tests/test_bashcomp.py 2018-11-11 04:08:32 +0000
56+++ breezy/plugins/bash_completion/tests/test_bashcomp.py 2020-05-30 01:13:39 +0000
57@@ -85,7 +85,7 @@
58 surplus = set(words) & self.completion_result
59 if surplus:
60 raise AssertionError('Completion should omit %r but it has %r'
61- % (surplus, res, self.completion_result))
62+ % (surplus, self.completion_result))
63
64 def get_script(self):
65 commands.install_bzr_command_hooks()
66
67=== modified file 'breezy/tests/blackbox/test_remember_option.py'
68--- breezy/tests/blackbox/test_remember_option.py 2018-11-11 04:08:32 +0000
69+++ breezy/tests/blackbox/test_remember_option.py 2020-05-30 01:13:39 +0000
70@@ -195,8 +195,7 @@
71 $ echo new parent > file
72 $ brz commit -m 'new parent'
73 $ cd ..
74- ''' % {'working_dir': self.working_dir},
75- null_output_matches_anything=True)
76+ ''', null_output_matches_anything=True)
77
78 def assertLocations(self, expected_locations):
79 br, _ = branch.Branch.open_containing(self.working_dir)
80
81=== modified file 'breezy/tests/test_source.py'
82--- breezy/tests/test_source.py 2019-05-28 21:46:53 +0000
83+++ breezy/tests/test_source.py 2020-05-30 01:13:39 +0000
84@@ -332,6 +332,7 @@
85 new_path.insert(
86 0, os.path.join(os.path.dirname(__file__), '..', '..', 'tools'))
87 self.overrideAttr(sys, 'path', new_path)
88+ import argparse
89 from flake8.main.application import Application
90 from flake8.formatting.base import BaseFormatter
91 app = Application()
92@@ -352,8 +353,11 @@
93 def handle(self, error):
94 self.errors.append(error)
95
96+ try:
97+ app.initialize([])
98+ except argparse.ArgumentError as e:
99+ self.skipTest('broken flake8: %r' % e)
100 app.formatter = Formatter()
101- app.initialize([])
102 app.run_checks()
103 app.report()
104 self.assertEqual(app.formatter.errors, [])
105
106=== modified file 'byov.conf'
107--- byov.conf 2019-06-21 15:14:28 +0000
108+++ byov.conf 2020-05-30 01:13:39 +0000
109@@ -2,14 +2,15 @@
110 # Start with an up to date system by default
111 vm.update = True
112 # External sources dependencies, packages are not recent enough
113-dulwich.clone = (git clone git://jelmer.uk/dulwich ../dulwich.git)
114-dulwich.install = (cd ../dulwich.git && ./setup.py install --user)
115+dulwich.clone = (git clone git://jelmer.uk/dulwich -b 0.19 ../dulwich-0.19.git)
116+dulwich.clone3 = (git clone git://jelmer.uk/dulwich ../dulwich.git)
117+dulwich.install = (cd ../dulwich-0.19.git && ./setup.py install --user)
118 dulwich.install3 = (cd ../dulwich.git && python3 ./setup.py install --user)
119 subunit.clone = (git clone https://github.com/testing-cabal/subunit.git ../subunit)
120 fastimport.clone = (git clone git://jelmer.uk/python-fastimport.git ../fastimport.git)
121 fastimport.install = (cd ../fastimport.git && ./setup.py install --user)
122 fastimport.install3 = (cd ../fastimport.git && python3 ./setup.py install --user)
123-sphinx_epytext.install = (pip install sphinx==1.8.5 sphinx_epytext)
124+sphinx_epytext.install = (pip install "setuptools<45" sphinx==1.8.5 sphinx_epytext)
125 sphinx_epytext.install3 = (pip3 install sphinx_epytext)
126 flake8.install = (pip install flake8)
127 flake8.install3 = (pip3 install flake8)
128@@ -32,7 +33,7 @@
129 vm.packages = {brz.build_deps}, {subunit.build_deps}, bzr, git, python-junitxml
130 [brz-xenial]
131 vm.release = xenial
132-byoci.setup.command = ({dulwich.clone} && {dulwich.install} && {dulwich.install3} && {fastimport.clone} && {fastimport.install} && {fastimport.install3} && {subunit.clone} && {flake8.install} && {flake8.install3} && {sphinx_epytext.install} && {sphinx_epytext.install3} && {cython.install} && {cython.install3})
133+byoci.setup.command = ({dulwich.clone} && {dulwich.install} && {dulwich.clone3} && {dulwich.install3} && {fastimport.clone} && {fastimport.install} && {fastimport.install3} && {subunit.clone} && {flake8.install} && {flake8.install3} && {sphinx_epytext.install} && {sphinx_epytext.install3} && {cython.install} && {cython.install3})
134 # FIXME: bzr log -l2 should be by default -- vila 2018-03-09
135 byoci.tests.command = bash -o pipefail -c "bzr log -l2 && PYTHONPATH=../subunit/python:$PYTHONPATH PATH=../subunit/filters:$HOME/.local/bin:$PATH make check-ci | subunit2junitxml -o ../results.xml -f | subunit2pyunit"
136 [brz-bionic]

Subscribers

People subscribed via source and target branches