summaryrefslogtreecommitdiff
path: root/tickets/2d3dd8a7be7a4d8c83680133018f378d/Maildir/new/1456001185.M553345P8737Q37.hrun
blob: 111ce5b7c37b27600a0c1e1e6590c9b06ce98f6f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
Return-Path: <obnam-dev-bounces@obnam.org>
X-Original-To: distix@pieni.net
Delivered-To: distix@pieni.net
Received: from bagpuss.pepperfish.net (bagpuss.pepperfish.net [148.251.8.16])
	(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by pieni.net (Postfix) with ESMTPS id 538EF2AB35
	for <distix@pieni.net>; Sat, 20 Feb 2016 16:20:49 +0100 (CET)
Received: from platypus.pepperfish.net (unknown [10.112.100.20])
	by bagpuss.pepperfish.net (Postfix) with ESMTP id A03CEECB;
	Sat, 20 Feb 2016 15:20:48 +0000 (GMT)
Received: from ip6-localhost ([::1] helo=platypus.pepperfish.net)
	by platypus.pepperfish.net with esmtp (Exim 4.80 #2 (Debian))
	id 1aX9Ky-0001Zs-Gt; Sat, 20 Feb 2016 15:20:48 +0000
Received: from inmail0 ([10.112.100.10] helo=mx0.pepperfish.net)
 by platypus.pepperfish.net with esmtp (Exim 4.80 #2 (Debian))
 id 1aX9Kw-0001Zk-OX
 for <obnam-dev@obnam.org>; Sat, 20 Feb 2016 15:20:47 +0000
Received: from pieni.net ([95.142.166.37] ident=postfix)
 by mx0.pepperfish.net with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256)
 (Exim 4.80) (envelope-from <liw@liw.fi>) id 1aX9Ku-0005N1-Ci
 for obnam-dev@obnam.org; Sat, 20 Feb 2016 15:20:46 +0000
Received: from exolobe1.liw.fi (91-145-75-165.bb.dnainternet.fi
 [91.145.75.165])
 (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))
 (No client certificate requested)
 by pieni.net (Postfix) with ESMTPSA id 7BDAE234F3;
 Sat, 20 Feb 2016 16:20:38 +0100 (CET)
Received: from exolobe1.liw.fi (localhost [127.0.0.1])
 by exolobe1.liw.fi (Postfix) with ESMTPS id C91B2401EA;
 Sat, 20 Feb 2016 17:20:37 +0200 (EET)
Date: Sat, 20 Feb 2016 17:20:36 +0200
From: Lars Wirzenius <liw@liw.fi>
To: Michel Alexandre Salim <michel@michel-slm.name>
Message-ID: <20160220152036.GE2352@exolobe1.liw.fi>
References: <CAMpBwxwanOh15agaxXeC+Y5mCOpXR0n5uLDf-gca9RtXpf8Kdg@mail.gmail.com>
MIME-Version: 1.0
In-Reply-To: <CAMpBwxwanOh15agaxXeC+Y5mCOpXR0n5uLDf-gca9RtXpf8Kdg@mail.gmail.com>
User-Agent: Mutt/1.5.23 (2014-03-12)
X-Spam-Score: -3.4
X-Spam-Score-int: -33
X-Spam-Bar: ---
X-Scanned-By: pepperfish.net, Sat, 20 Feb 2016 15:20:46 +0000
X-Spam-Report: Content analysis details: (-3.4 points)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -1.0 PPF_USER_AGENT_MUTT    User-Agent: contains Mutt (Mutt isn't a spam
 tool) -0.5 PPF_USER_AGENT         User-Agent: exists
 -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%
 [score: 0.0000]
X-ACL-Warn: message may be spam
X-Scan-Signature: e3f4159268887661620a079fea5a5efd
Cc: "obnam-dev@obnam.org" <obnam-dev@obnam.org>
Subject: Re: pep8 1.6.x patches for cliapp
X-BeenThere: obnam-dev@obnam.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Obnam development discussions <obnam-dev-obnam.org>
List-Unsubscribe: <http://listmaster.pepperfish.net/cgi-bin/mailman/listinfo/obnam-dev-obnam.org>,
 <mailto:obnam-dev-request@obnam.org?subject=unsubscribe>
List-Archive: <http://listmaster.pepperfish.net/pipermail/obnam-dev-obnam.org>
List-Post: <mailto:obnam-dev@obnam.org>
List-Help: <mailto:obnam-dev-request@obnam.org?subject=help>
List-Subscribe: <http://listmaster.pepperfish.net/cgi-bin/mailman/listinfo/obnam-dev-obnam.org>,
 <mailto:obnam-dev-request@obnam.org?subject=subscribe>
Content-Type: multipart/mixed; boundary="===============4040353759512269954=="
Mime-version: 1.0
Sender: obnam-dev-bounces@obnam.org
Errors-To: obnam-dev-bounces@obnam.org


--===============4040353759512269954==
Content-Type: multipart/signed; micalg=pgp-sha256;
 protocol="application/pgp-signature"; boundary="lteA1dqeVaWQ9QQl"
Content-Disposition: inline


--lteA1dqeVaWQ9QQl
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Hi,

Thank you for the patches. I didn't apply the first one, to move
__version__ to the end of __init__.py: instead, I solved the problem
in a different way, by moving it to version.py instead. This allows me
to use a release helper tool I recently wrote to set the version
number at release time.

I did apply the second patch. I've pushed the changes go the git
server.

On Sun, Feb 14, 2016 at 03:00:36PM +0000, Michel Alexandre Salim wrote:
> Hi Lars,
>=20
> Fedora recently rebuilt all its Python packages for the upcoming F24
> release, and it turns out pep8 1.6.x (currently in our development tree) =
is
> much stricter than the 1.5.x used in Fedora 23 (and presumably you use a
> similar pre-1.6 version to develop Obnam components).
>=20
> Please find attached two patches to fix errors in cliapp that were not
> errors prior to 1.6.x. Will work through the other Obnam packages and send
> patches separately.
>=20
> Best regards,
>=20
> --=20
> Michel Alexandre Salim

> From acecd4ec4ebd65077f52335639371853e6918da5 Mon Sep 17 00:00:00 2001
> From: Michel Alexandre Salim <salimma@fedoraproject.org>
> Date: Sun, 14 Feb 2016 21:40:37 +0700
> Subject: [PATCH 1/2] PEP8 has two conflicting rules about what should be =
at
>  the top of the file: - version bookkeeping info (note: not a recommended
>  practice anyway): =20
>  https://www.python.org/dev/peps/pep-0008/#version-bookkeeping - imports =
=20
>  https://www.python.org/dev/peps/pep-0008/#imports
>=20
> and since pep8 1.6 the latter takes precedence, resulting in multiple
> errors like this:
>=20
>     E402 module level import not at top of file
>=20
> Resolve this for now by moving the version string to after the imports.
> ---
>  cliapp/__init__.py | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>=20
> diff --git a/cliapp/__init__.py b/cliapp/__init__.py
> index 7e0aca1..fcb934d 100644
> --- a/cliapp/__init__.py
> +++ b/cliapp/__init__.py
> @@ -27,9 +27,6 @@ Homepage: http://liw.fi/cliapp/
>  '''
> =20
> =20
> -__version__ =3D '1.20160109'
> -
> -
>  from .util import MemoryProfileDumper
>  from .fmt import TextFormat
>  from .app import Application, AppException
> @@ -45,4 +42,7 @@ from .plugin import Plugin
>  from .pluginmgr import PluginManager
> =20
> =20
> +__version__ =3D '1.20160109'
> +
> +
>  __all__ =3D locals()
> --=20
> 2.5.0
>=20

> From 9dc71b5d260a63dcae7b4d1fd66e65df394e6b7d Mon Sep 17 00:00:00 2001
> From: Michel Alexandre Salim <salimma@fedoraproject.org>
> Date: Sun, 14 Feb 2016 21:57:16 +0700
> Subject: [PATCH 2/2] Fix for E731 "do not assign a lambda expression, use=
 a
>  def"
>=20
> ---
>  cliapp/app_tests.py | 3 ++-
>  cliapp/settings.py  | 3 ++-
>  2 files changed, 4 insertions(+), 2 deletions(-)
>=20
> diff --git a/cliapp/app_tests.py b/cliapp/app_tests.py
> index fde0916..6e87bbd 100644
> --- a/cliapp/app_tests.py
> +++ b/cliapp/app_tests.py
> @@ -362,6 +362,7 @@ class ExtensibleSubcommandTests(unittest.TestCase):
>          self.assertEqual(self.app.subcommands, {})
> =20
>      def test_adds_subcommand(self):
> -        help_callback =3D lambda args: None
> +        def help_callback(arg):
> +            pass
>          self.app.add_subcommand('foo', help_callback)
>          self.assertEqual(self.app.subcommands, {'foo': help_callback})
> diff --git a/cliapp/settings.py b/cliapp/settings.py
> index f05f11e..ca1d17d 100644
> --- a/cliapp/settings.py
> +++ b/cliapp/settings.py
> @@ -466,7 +466,8 @@ class Settings(object):
>          '''Build OptionParser for parsing command line.'''
> =20
>          # Call a callback function unless we're in configs_only mode.
> -        maybe =3D lambda func: (lambda *args: None) if configs_only else=
 func
> +        def maybe(func):
> +            return (lambda *args: None) if configs_only else func
> =20
>          # Maintain lists of callback function calls that are deferred.
>          # We call them ourselves rather than have OptionParser call them
> --=20
> 2.5.0
>=20

> _______________________________________________
> obnam-dev mailing list
> obnam-dev@obnam.org
> http://listmaster.pepperfish.net/cgi-bin/mailman/listinfo/obnam-dev-obnam=
=2Eorg


--=20
Schr=F6dinger's backup hypothesis: the condition of any backup is
undefined until a restore is attempted. -- andrewsh

--lteA1dqeVaWQ9QQl
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: Digital signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQIcBAEBCAAGBQJWyIREAAoJEGwvphbseiAxQOEP/2k3OLCo5QKLpM6oSn1h5BLk
g1c8XuHY6Gj2HEqvyvGpUYUFxpe0TYzewqnIx0VnCZ/9NF7vgj+3RrOiPTkwN0s9
qbMK+R3Rvx5+bTsrzRhcf6i4P/1HZqsaqOSQX5P/ft2i6kWItMnzHVWzWeyXTRwU
DYZxC0HMigT92ad/J0mGGcE8CyaTmDAPNUbmEhUIvC3SP1zkpCJZ6dcdTCIzzfyh
o4GwHIMs4vqdZnKM0Jjdwn0tTgY1UO5E+nqDqveuncD5AvchsNMIlXg/XqBb+m/q
Q5oM9BP4eKX8gMq7HJ/2bicBQulnxzskTUb6bchbZhZ5hnCUvqdPVDqvMogjaFG3
xPXbk719DKQc2n6f5fcaYYE+odJMcUjEEsp8BAtjeSERnT67bY25jg/myTTWmqJE
+g1GBphnn6RX+nXS7fXWpSY6V4XjlTIGhOW7TlCjmst51rvQZ4LvaVHvdUInATIg
u+i2kR66VK1H99/VK2qbsLrOTphkc41nubSRKq3+vYb79U5/eTU08fv2FxB4AGdh
p+M6NRsNaizwmLp8/zUGaTM6qnuqnC6o6ej1klXgSMfxpGJT0FuvIpQJUW8z9RRE
I/buqo44Pi94kcq6RyXVtdlcv7jMWatTSd/9QjUDulxEJIvL30Q/xVcmK8C7aFEL
LmpGPk8bm2uNbU4MwMId
=yQTf
-----END PGP SIGNATURE-----

--lteA1dqeVaWQ9QQl--


--===============4040353759512269954==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
obnam-dev mailing list
obnam-dev@obnam.org
http://listmaster.pepperfish.net/cgi-bin/mailman/listinfo/obnam-dev-obnam.org

--===============4040353759512269954==--