Bug#943666: python3: Update Python Policy for removal of the Python 2 stack

2019-11-04 Thread Matthias Klose

On 03.11.19 14:39, Neil Williams wrote:

On Sun, 3 Nov 2019 13:45:37 +0100 Matthias Klose 
wrote:

On 03.11.19 13:10, Neil Williams wrote:

On Wed, 30 Oct 2019 16:44:24 +0100 Matthias Klose 
wrote:

On 27.10.19 17:59, Neil Williams wrote:

Package: python3
Version: 3.7.5-1
Severity: normal

As discussed on IRC and alongside the post to
debian-devel-announce, please review and include this amendment
to the Debian Python Policy to cover the removal of the Python 2
stack as outlined at https://wiki.debian.org/Python/2Removal


thanks for doing that.  I think we should make it more clear that
there will no python binary package, and no python command in
bullseye.  You adjusted the names, but are still talking about
"should" in some place.  If we end up with some remaining python 2
packages, then these must depend on python2, python2-dbg, and must
use the python2 command.



OK, I've updated MR 1 with changes along those lines.

https://salsa.debian.org/cpython-team/python3-defaults/merge_requests/1


ok, commenting here in the bug report:

+ Debian has previously supported two Python stacks, one for
Python 3> +and one for Python 2.  The goal for Debian is to
reduce this
+ to one stack, dropping the Python 2 stack and intepreter
for
+ the Bullseye release.


  https://www.python.org/dev/peps/pep-0404/;


TYPO "intepreter"


Fixed. Thanks.



@@ -91,32 +95,33 @@
  >PEP 466.


- Packages in Debian should use Python 3 if Python 3 is
- supported.  New packages should use Python 3 from the
initial
- upload, new upstream versions for existing packages should
- use Python 3 if the new upstream version supports it.
+ Packages in Debian must use Python 3. New packages must
+ use Python 3 from the initial upload, new upstream versions
+ for existing packages should must use Python 3.


TYPO "should must"
Wouldn't we disallow any Python2 package with this change?



Yes, I've changed that.

  Packages in Debian should use Python 3. New packages must
  use Python 3 from the initial upload, new upstream versions
  for existing packages must use Python 3. If Python 2 is still
  supported in Bullseye, selected packages may continue using
  Python 2 until Python 3 support is available. Please discuss
  all use of Python 2 on the debian-python mailing list before
  uploading.


- Programs should use Python 3, and should not be
packaged
- for Python 2 as well.  Python 3 should be used for the
- packaging if the packaging scripts use Python.
+ Applications must use Python 3, and should not be
packaged
+ for Python 2 as well.  If an application supports only
+ Python 2, the application will need to be removed from
+ Debian so that it does not block removal of other
Python 2
+ packages.

I think this is a bit premature. I don't agree with the py2keep tag
filed for mercurial, but maybe there will be another application
which will not exist for Python 2 for the time of the bullseye
release.


OK, replaced the paragraph.


-   
- The version of the python package must
be
- greater than or equal to 2.Y
and lower than
- 2.Y+1.
-   
-   
- The python binary package must also
ensure
- that /usr/bin/python is provided, as
a symlink to the
- current
python2.Y executable.
See
- https://www.python.org/dev/peps/pep-0394/;
->PEP 394 for details.
-   

While I would like that change, just removing it would allow pointing
the python package to python3.  This isn't seen so by everybody, so
please keep this paragraph, and maybe address this later.


Done.


@@ -475,8 +483,10 @@

  The binary package python3-doc will
always provide the documentation for the default Debian Python 3
version.
- The binary package python-doc will
always
- provide the documentation for the default Debian Python 2
version.
+ The binary package python-doc may
+ provide the documentation for the default Debian Python 2,
or
+ the default Debian Python 3 version if no Python 2 binary
+ is built.

hmm, up to now I thought to remove python-doc together with python
and python-dbg.  So build python-doc now from python3-defaults and
let it depend on python3-doc?



Actually, that's a good catch. I was mixing up the defaults package
with the general advice on python3 migration to not remove
python-foo-doc just to rename it to python3-foo-doc.

Removing the defaults package python-doc seems right to me. I've
updated that paragraph.


I committed your last change without any modifications.



Bug#943666: python3: Update Python Policy for removal of the Python 2 stack

2019-11-03 Thread Neil Williams
On Sun, 3 Nov 2019 13:45:37 +0100 Matthias Klose 
wrote:
> On 03.11.19 13:10, Neil Williams wrote:
> > On Wed, 30 Oct 2019 16:44:24 +0100 Matthias Klose 
> > wrote:
> >> On 27.10.19 17:59, Neil Williams wrote:
> >>> Package: python3
> >>> Version: 3.7.5-1
> >>> Severity: normal
> >>>
> >>> As discussed on IRC and alongside the post to
> >>> debian-devel-announce, please review and include this amendment
> >>> to the Debian Python Policy to cover the removal of the Python 2
> >>> stack as outlined at https://wiki.debian.org/Python/2Removal
> >>
> >> thanks for doing that.  I think we should make it more clear that
> >> there will no python binary package, and no python command in
> >> bullseye.  You adjusted the names, but are still talking about
> >> "should" in some place.  If we end up with some remaining python 2
> >> packages, then these must depend on python2, python2-dbg, and must
> >> use the python2 command.
> >>
> > 
> > OK, I've updated MR 1 with changes along those lines.
> > 
> > https://salsa.debian.org/cpython-team/python3-defaults/merge_requests/1
> 
> ok, commenting here in the bug report:
> 
> +   Debian has previously supported two Python stacks, one for
> Python 3> + and one for Python 2.  The goal for Debian is to
> reduce this
> +   to one stack, dropping the Python 2 stack and intepreter
> for
> +   the Bullseye release.
>   
>   
> https://www.python.org/dev/peps/pep-0404/;
> 
> 
> TYPO "intepreter"

Fixed. Thanks.


> @@ -91,32 +95,33 @@
> >PEP 466.
>   
>   
> -   Packages in Debian should use Python 3 if Python 3 is
> -   supported.  New packages should use Python 3 from the
> initial
> -   upload, new upstream versions for existing packages should
> -   use Python 3 if the new upstream version supports it.
> +   Packages in Debian must use Python 3. New packages must
> +   use Python 3 from the initial upload, new upstream versions
> +   for existing packages should must use Python 3.
>   
> 
> TYPO "should must"
> Wouldn't we disallow any Python2 package with this change?


Yes, I've changed that.

  Packages in Debian should use Python 3. New packages must
  use Python 3 from the initial upload, new upstream versions
  for existing packages must use Python 3. If Python 2 is still
  supported in Bullseye, selected packages may continue using
  Python 2 until Python 3 support is available. Please discuss
  all use of Python 2 on the debian-python mailing list before
  uploading.

> -   Programs should use Python 3, and should not be
> packaged
> -   for Python 2 as well.  Python 3 should be used for the
> -   packaging if the packaging scripts use Python.
> +   Applications must use Python 3, and should not be
> packaged
> +   for Python 2 as well.  If an application supports only
> +   Python 2, the application will need to be removed from
> +   Debian so that it does not block removal of other
> Python 2
> +   packages.
> 
> I think this is a bit premature. I don't agree with the py2keep tag
> filed for mercurial, but maybe there will be another application
> which will not exist for Python 2 for the time of the bullseye
> release.

OK, replaced the paragraph.

> - 
> -   The version of the python package must
> be
> -   greater than or equal to 2.Y
> and lower than
> -   2.Y+1.
> - 
> - 
> -   The python binary package must also
> ensure
> -   that /usr/bin/python is provided, as
> a symlink to the
> -   current
> python2.Y executable.
> See
> -   https://www.python.org/dev/peps/pep-0394/;
> ->PEP 394 for details.
> - 
> 
> While I would like that change, just removing it would allow pointing
> the python package to python3.  This isn't seen so by everybody, so
> please keep this paragraph, and maybe address this later.

Done.

> @@ -475,8 +483,10 @@
>   
> The binary package python3-doc will
> always provide the documentation for the default Debian Python 3
> version.
> -   The binary package python-doc will
> always
> -   provide the documentation for the default Debian Python 2
> version.
> +   The binary package python-doc may
> +   provide the documentation for the default Debian Python 2,
> or
> +   the default Debian Python 3 version if no Python 2 binary
> +   is built.
> 
> hmm, up to now I thought to remove python-doc together with python
> and python-dbg.  So build python-doc now from python3-defaults and
> let it depend on python3-doc?


Actually, that's a good catch. I was mixing up the defaults package
with the general advice on python3 migration to not remove
python-foo-doc just to rename it to python3-foo-doc.

Removing the defaults package python-doc seems right to me. I've
updated that paragraph.

-- 


Neil Williams
=
http://www.linux.codehelp.co.uk/



pgpqpyMlAUwOa.pgp

Bug#943666: python3: Update Python Policy for removal of the Python 2 stack

2019-11-03 Thread Matthias Klose

On 03.11.19 13:10, Neil Williams wrote:

On Wed, 30 Oct 2019 16:44:24 +0100 Matthias Klose  wrote:

On 27.10.19 17:59, Neil Williams wrote:

Package: python3
Version: 3.7.5-1
Severity: normal

As discussed on IRC and alongside the post to debian-devel-announce, please
review and include this amendment to the Debian Python Policy to cover
the removal of the Python 2 stack as outlined at 
https://wiki.debian.org/Python/2Removal


thanks for doing that.  I think we should make it more clear that there will no
python binary package, and no python command in bullseye.  You adjusted the
names, but are still talking about "should" in some place.  If we end up with
some remaining python 2 packages, then these must depend on python2,
python2-dbg, and must use the python2 command.



OK, I've updated MR 1 with changes along those lines.

https://salsa.debian.org/cpython-team/python3-defaults/merge_requests/1


ok, commenting here in the bug report:

diff --git a/debian/python-policy.dbk b/debian/python-policy.dbk
index 
42051b3b20804d02b42195a61aaf5736a8c3f8dc..bc2708426848f651998618723f95447e11635254 
100644

--- a/debian/python-policy.dbk
+++ b/debian/python-policy.dbk
@@ -75,12 +79,12 @@

   
 
-  On the move to Python 3
+  Completing the move to Python 3

- Debian currently supports two Python stacks, one for Python 3
- and one for Python 2.  The long term goal for Debian is to
- reduce this to one stack, dropping the Python 2 stack at some
- time.
+ Debian has previously supported two Python stacks, one for Python 3
+ and one for Python 2.  The goal for Debian is to reduce this
+ to one stack, dropping the Python 2 stack and intepreter for
+ the Bullseye release.


  https://www.python.org/dev/peps/pep-0404/;


TYPO "intepreter"

@@ -91,32 +95,33 @@
  >PEP 466.


- Packages in Debian should use Python 3 if Python 3 is
- supported.  New packages should use Python 3 from the initial
- upload, new upstream versions for existing packages should
- use Python 3 if the new upstream version supports it.
+ Packages in Debian must use Python 3. New packages must
+ use Python 3 from the initial upload, new upstream versions
+ for existing packages should must use Python 3.


TYPO "should must"
Wouldn't we disallow any Python2 package with this change?


  

- Programs should use Python 3, and should not be packaged
- for Python 2 as well.  Python 3 should be used for the
- packaging if the packaging scripts use Python.
+ Applications must use Python 3, and should not be packaged
+ for Python 2 as well.  If an application supports only
+ Python 2, the application will need to be removed from
+ Debian so that it does not block removal of other Python 2
+ packages.

I think this is a bit premature. I don't agree with the py2keep tag filed for 
mercurial, but maybe there will be another application which will not exist for 
Python 2 for the time of the bullseye release.



  
  

- Python libraries, if they support Python 3, should be always
- packaged for Python 3. If an application supports only Python
- 2, the Python libraries for that application should also be
- packaged for Python 2.
+ Python libraries need to support Python 3 and new versions
+ must be packaged for Python 3. Existing Python 2 libraries
+ must not be dropped before the last reverse dependency is
+ removed. New Python 2 libraries must not be introduced.

  
  

- Existing Python 2 libraries should not be dropped before
- the last reverse dependency is removed.
+ Python 3 should be used for the packaging if the
+ packaging scripts use Python.

  

@@ -131,9 +136,10 @@
  At any given time, the binary package python3
  will represent the current default Debian Python 3 version; the
  binary package python will represent the
- current default Debian Python 2 version. As far as is reasonable,
- Python 3 and Python 2 should be treated as separate runtime
- systems with minimal interdependencies.
+ current default Debian Python 2 version, for as long as it
+ exists. As far as is reasonable, Python 3 and Python 2 should
+ be treated as separate runtime systems with minimal
+ interdependencies.


  In some cases, Python policy explicitly references Python helper
@@ -251,25 +257,26 @@
  3.Y+1.


- At any time, the python binary package must
+ The 

Bug#943666: python3: Update Python Policy for removal of the Python 2 stack

2019-11-03 Thread Neil Williams
On Wed, 30 Oct 2019 16:44:24 +0100 Matthias Klose  wrote:
> On 27.10.19 17:59, Neil Williams wrote:
> > Package: python3
> > Version: 3.7.5-1
> > Severity: normal
> > 
> > As discussed on IRC and alongside the post to debian-devel-announce, please
> > review and include this amendment to the Debian Python Policy to cover
> > the removal of the Python 2 stack as outlined at 
> > https://wiki.debian.org/Python/2Removal
> 
> thanks for doing that.  I think we should make it more clear that there will 
> no 
> python binary package, and no python command in bullseye.  You adjusted the 
> names, but are still talking about "should" in some place.  If we end up with 
> some remaining python 2 packages, then these must depend on python2, 
> python2-dbg, and must use the python2 command.
> 

OK, I've updated MR 1 with changes along those lines.

https://salsa.debian.org/cpython-team/python3-defaults/merge_requests/1

-- 


Neil Williams
=
http://www.linux.codehelp.co.uk/



pgpEvpgUMi9qP.pgp
Description: OpenPGP digital signature


Bug#943666: python3: Update Python Policy for removal of the Python 2 stack

2019-10-30 Thread Matthias Klose

On 27.10.19 17:59, Neil Williams wrote:

Package: python3
Version: 3.7.5-1
Severity: normal

As discussed on IRC and alongside the post to debian-devel-announce, please
review and include this amendment to the Debian Python Policy to cover
the removal of the Python 2 stack as outlined at 
https://wiki.debian.org/Python/2Removal


thanks for doing that.  I think we should make it more clear that there will no 
python binary package, and no python command in bullseye.  You adjusted the 
names, but are still talking about "should" in some place.  If we end up with 
some remaining python 2 packages, then these must depend on python2, 
python2-dbg, and must use the python2 command.




Bug#943666: python3: Update Python Policy for removal of the Python 2 stack

2019-10-27 Thread Neil Williams
Package: python3
Version: 3.7.5-1
Severity: normal

As discussed on IRC and alongside the post to debian-devel-announce, please
review and include this amendment to the Debian Python Policy to cover
the removal of the Python 2 stack as outlined at 
https://wiki.debian.org/Python/2Removal

https://salsa.debian.org/codehelp/python3-defaults/commit/9b1dabbdc7105486e8a2132a100066e4c225a874

Thanks.