Bug#829744: Add new-package-should-not-package-python2-module tag

2016-10-01 Thread Chris Lamb
Niels Thykier wrote:

> I say we schedule this for December 2016 or early January 2017 then.

Can we have it "I:" now and "W:" then? :)

Python 2.7 is absolutely still supported throughout stretch (!) the here
idea is only to prevent unnecessary extra Python 2 packages by asking the
maintainer to pause for a moment before "automatically" packaging the
Python 2 version.


Regards,

-- 
  ,''`.
 : :'  : Chris Lamb
 `. `'`  la...@debian.org / chris-lamb.co.uk
   `-



Bug#829744: Add new-package-should-not-package-python2-module tag

2016-09-30 Thread Scott Kitterman
On Friday, September 30, 2016 05:01:00 PM Niels Thykier wrote:
> On Wed, 06 Jul 2016 00:30:08 -0400 Scott Kitterman
> 
>  wrote:
> > [...]
> > 
> > If that's the case, then it's premature before the freeze. Python2.7 is
> > 'supported' through the expected stretch lifetime, so I don't see it being
> > anything other than a maintainer call.  For the next release, it'll maybe
> > be different.
> > 
> > Scott K
> 
> I say we schedule this for December 2016 or early January 2017 then.
> That would ensure that the tag is effective for the entire development
> cycle of Buster.
> 
> Would this be an acceptable compromise?

I think that's reasonable.

Thanks,

Scott K

signature.asc
Description: This is a digitally signed message part.


Bug#829744: Add new-package-should-not-package-python2-module tag

2016-09-30 Thread Niels Thykier
On Wed, 06 Jul 2016 00:30:08 -0400 Scott Kitterman
 wrote:
> [...]
> 
> If that's the case, then it's premature before the freeze. Python2.7 is 
> 'supported' through the expected stretch lifetime, so I don't see it being 
> anything other than a maintainer call.  For the next release, it'll maybe be 
> different.
> 
> Scott K
> 
> 

I say we schedule this for December 2016 or early January 2017 then.
That would ensure that the tag is effective for the entire development
cycle of Buster.

Would this be an acceptable compromise?

Thanks,
~Niels



Bug#829744: Add new-package-should-not-package-python2-module tag

2016-08-23 Thread Chris Lamb
Hi,

> Add new-package-should-not-package-python2-module tag

Any update on this?

(Just to point out that this only warns for the initial upload…)


Regards,

-- 
  ,''`.
 : :'  : Chris Lamb
 `. `'`  la...@debian.org / chris-lamb.co.uk
   `-



Bug#829744: Add new-package-should-not-package-python2-module tag

2016-07-15 Thread Chris Lamb
[Please don't forget to CC the submitter; I did not see your
reply until checking the bug manually..]

Scott Kitterman wrote:

> Python2.7 is 'supported' through the expected stretch lifetime, so
> I don't see it being anything other than a maintainer call.

Completely agree, but I strongly think we should at least trigger
the idea of not packaging unnecessary Python 2 modules where not
necessary. I'm sure some maintainers may even think it's a requirement
right now.


Regards,

-- 
  ,''`.
 : :'  : Chris Lamb
 `. `'`  la...@debian.org / chris-lamb.co.uk
   `-



Bug#829744: Add new-package-should-not-package-python2-module tag

2016-07-05 Thread Scott Kitterman
On Wed, 06 Jul 2016 01:06:57 +0200 Chris Lamb  wrote:
> Mattias Klose wrote:
> 
> > Please only trigger this warning if no corresponding
> > python3 module is uploaded (at least until after the
> > stretch release).
> 
> Are we sure? The idea is to dissuade the Python 2 module from being
> packaged in the first place (on the principle that it is one less to
> remove later) rather than to promote that the Python 3 module is
> also packaged.
> 
> Otherwise this tag's semantics are really along the lines of "don't
> forget to package the Python 3 version!" which is already somewhat
> implicit in the ecosystem and causes us more work down the road.

If that's the case, then it's premature before the freeze. Python2.7 is 
'supported' through the expected stretch lifetime, so I don't see it being 
anything other than a maintainer call.  For the next release, it'll maybe be 
different.

Scott K



Bug#829744: Add new-package-should-not-package-python2-module tag

2016-07-05 Thread Chris Lamb
Mattias Klose wrote:

> Please only trigger this warning if no corresponding
> python3 module is uploaded (at least until after the
> stretch release).

Are we sure? The idea is to dissuade the Python 2 module from being
packaged in the first place (on the principle that it is one less to
remove later) rather than to promote that the Python 3 module is
also packaged.

Otherwise this tag's semantics are really along the lines of "don't
forget to package the Python 3 version!" which is already somewhat
implicit in the ecosystem and causes us more work down the road.


Regards,

-- 
  ,''`.
 : :'  : Chris Lamb
 `. `'`  la...@debian.org / chris-lamb.co.uk
   `-



Bug#829744: Add new-package-should-not-package-python2-module tag

2016-07-05 Thread Matthias Klose
Please only trigger this warning if no corresponding python3 module is uploaded
(at least until after the stretch release).



Bug#829744: Add new-package-should-not-package-python2-module tag

2016-07-05 Thread Chris Lamb
Source: lintian
Version: 2.5.45
Severity: wishlist
Tags: patch
X-Debbugs-CC: python-modules-t...@lists.alioth.debian.org

Hi,

Attached is the following:

  commit 51a7a2a34804af18c1a103f87c2a482372200e1b
  Author: Chris Lamb 
  Date:   Tue Jul 5 20:14:00 2016 +0200
  
  Add new-package-should-not-package-python2-module tag
  
  The 2.x series of Python is due for deprecation and will not be maintained
  past 2020 so it is recommended that Python 2 modules are not packaged
  unless necessary.
  
  Signed-off-by: Chris Lamb 
  
   checks/scripts.desc  | 13 +
   checks/scripts.pm|  7 +++
   t/tests/scripts-python2/debian/debian/control.in | 15 +++
   t/tests/scripts-python2/desc |  8 
   t/tests/scripts-python2/tags |  1 +
   5 files changed, 44 insertions(+)


Regards,

-- 
  ,''`.
 : :'  : Chris Lamb
 `. `'`  la...@debian.org / chris-lamb.co.uk
   `-
From 51a7a2a34804af18c1a103f87c2a482372200e1b Mon Sep 17 00:00:00 2001
From: Chris Lamb 
Date: Tue, 5 Jul 2016 20:14:00 +0200
Subject: [PATCH] Add new-package-should-not-package-python2-module tag

The 2.x series of Python is due for deprecation and will not be maintained
past 2020 so it is recommended that Python 2 modules are not packaged
unless necessary.

Signed-off-by: Chris Lamb 
---
 checks/scripts.desc  | 13 +
 checks/scripts.pm|  7 +++
 t/tests/scripts-python2/debian/debian/control.in | 15 +++
 t/tests/scripts-python2/desc |  8 
 t/tests/scripts-python2/tags |  1 +
 5 files changed, 44 insertions(+)
 create mode 100644 t/tests/scripts-python2/debian/debian/control.in
 create mode 100644 t/tests/scripts-python2/desc
 create mode 100644 t/tests/scripts-python2/tags

diff --git a/checks/scripts.desc b/checks/scripts.desc
index 12a642b..87a0c29 100644
--- a/checks/scripts.desc
+++ b/checks/scripts.desc
@@ -752,3 +752,16 @@ Severity: classification
 Certainty: possible
 Info: The maintainer scripts of the package one or more auto-generated
  shell snippets inserted by the listed debhelper tool.
+
+Tag: new-package-should-not-package-python2-module
+Severity: wishlist
+Certainty: certain
+Info: This package appears to be the first packaging of a new upstream
+ software package but it appears to package a module for Python 2.
+ .
+ The 2.x series of Python is due for deprecation and will not be maintained
+ past 2020 so it is recommended that Python 2 modules are not packaged unless
+ necessary.
+ .
+ This warning can be ignored if the package is not intended for Debian or
+ if it is a split of an existing Debian package.
diff --git a/checks/scripts.pm b/checks/scripts.pm
index 5959e95..de4fcd7 100644
--- a/checks/scripts.pm
+++ b/checks/scripts.pm
@@ -1103,6 +1103,13 @@ sub run {
 }
 }
 
+my @entries = $info->changelog->data;
+
+if (@entries == 1) {
+  tag 'new-package-should-not-package-python2-module', $pkg
+if $pkg =~ /^python-/
+}
+
 return;
 }
 
diff --git a/t/tests/scripts-python2/debian/debian/control.in b/t/tests/scripts-python2/debian/debian/control.in
new file mode 100644
index 000..993dee7
--- /dev/null
+++ b/t/tests/scripts-python2/debian/debian/control.in
@@ -0,0 +1,15 @@
+Source: {$source}
+Priority: extra
+Section: python
+Maintainer: {$author}
+Standards-Version: {$standards_version}
+Build-Depends: debhelper (>= 9)
+
+Package: python-{$source}
+Architecture: all
+Depends: $\{misc:Depends\}, python2.7
+Description: {$description}
+ This is a test package designed to exercise some feature or tag of
+ Lintian.  It is part of the Lintian test suite and may do very odd
+ things.  It should not be installed like a regular package.  It may
+ be an empty package.
diff --git a/t/tests/scripts-python2/desc b/t/tests/scripts-python2/desc
new file mode 100644
index 000..56dba16
--- /dev/null
+++ b/t/tests/scripts-python2/desc
@@ -0,0 +1,8 @@
+Testname: scripts-python2
+Sequence: 6000
+Version: 1.0
+Description: Check various Python 2 issues
+Skeleton: pedantic
+Options: --pedantic -I -E
+Test-For:
+ new-package-should-not-package-python2-module
diff --git a/t/tests/scripts-python2/tags b/t/tests/scripts-python2/tags
new file mode 100644
index 000..685f534
--- /dev/null
+++ b/t/tests/scripts-python2/tags
@@ -0,0 +1 @@
+I: python-scripts-python2: new-package-should-not-package-python2-module python-scripts-python2
-- 
2.8.1