Re: [PATCH] doc: Various fixes to makedocbook for python3.8

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] doc: Various fixes to makedocbook for python3.8

cygwin-apps mailing list
On 24.08.2020 12:02, Corinna Vinschen via Newlib wrote:

> On Aug 23 16:49, Brian Inglis wrote:
>> On 2020-08-23 13:41, Jon Turney wrote:
>>> On 23/08/2020 16:23, Ken Brown wrote:
>>>> On 8/22/2020 2:45 PM, Jon Turney wrote:
>>>>> ---
>>>>>    newlib/doc/makedocbook.py | 8 +++++---
>>>>>    1 file changed, 5 insertions(+), 3 deletions(-)
>>>>>
>>>>> diff --git a/newlib/doc/makedocbook.py b/newlib/doc/makedocbook.py
>>>>> index 92d0f279d..3fab26f1a 100755
>>>>> --- a/newlib/doc/makedocbook.py
>>>>> +++ b/newlib/doc/makedocbook.py
>>> [...]
>>>> Would it make sense to also change the shebang line so that makedocbook.py
>>>> uses python3?  Currently the build of Cygwin on Fedora uses python3, but the
>>>> build of Cygwin on Cygwin uses python2.  This is of no great importance, but a
>>>> recent IRC discussion shows that it can be confusing.
>>>
>>> Yeah, I guess that would make some sense, given that python2 is now EOL.
>>>
>>> Otoh, making it gratuitously not work with python2 seems a bit harsh.
>>>
>>> On the gripping hand, reading PEP 0394, I see it doesn't actually require that
>>> 'python' exist at all, so I guess changing the shebang as you suggest is the
>>> right thing to do.
>>
>> Is it not perhaps time to switch python from EOL python2 to python3, as there
>> are only 183 python2, 125 python27 to 199 python3, 129 python37 packages.
>
> This discussion actually belongs on cygwin-apps, not on newlib ¯\_(ツ)_/¯
>
>
> Thanks,
> Corinna
>

follow up from newlib

python2 will be dead end of 2020.
https://python3statement.org/


most of python2 and python3 packages are obsolete placeholders,
currently python3 points to python3.6 or python3.8, but I am seriously
considering to use alternatives to cover also python37 as already
done for sphinx and to prepare for the next python3.9.

python38 has already 85 packages and I am working on another dozen,
if you need some specific package, let me know.

Following the
https://www.python.org/dev/peps/pep-0394/

----------------------------------------------------------------------
Distributors may choose to set the behavior of the python command as
follows:

       -  python2,
       -  python3,
       -  not provide python command,
       -  allow python to be configurable by an end user
          or a system administrator.

----------------------------------------------------------------------

  we are currently setting python as python2=python2.7

Question before I update the three python3.x

- should I leave python as it is, or change to one of the
   other settings ?

Any preference ? For the last option I will use alternatives

Regards
Marco









Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] doc: Various fixes to makedocbook for python3.8

cygwin-apps mailing list
On 8/24/2020 6:31 AM, Marco Atzeri via Cygwin-apps wrote:

> On 24.08.2020 12:02, Corinna Vinschen via Newlib wrote:
>> On Aug 23 16:49, Brian Inglis wrote:
>>> On 2020-08-23 13:41, Jon Turney wrote:
>>>> On 23/08/2020 16:23, Ken Brown wrote:
>>>>> On 8/22/2020 2:45 PM, Jon Turney wrote:
>>>>>> ---
>>>>>>    newlib/doc/makedocbook.py | 8 +++++---
>>>>>>    1 file changed, 5 insertions(+), 3 deletions(-)
>>>>>>
>>>>>> diff --git a/newlib/doc/makedocbook.py b/newlib/doc/makedocbook.py
>>>>>> index 92d0f279d..3fab26f1a 100755
>>>>>> --- a/newlib/doc/makedocbook.py
>>>>>> +++ b/newlib/doc/makedocbook.py
>>>> [...]
>>>>> Would it make sense to also change the shebang line so that makedocbook.py
>>>>> uses python3?  Currently the build of Cygwin on Fedora uses python3, but the
>>>>> build of Cygwin on Cygwin uses python2.  This is of no great importance, but a
>>>>> recent IRC discussion shows that it can be confusing.
>>>>
>>>> Yeah, I guess that would make some sense, given that python2 is now EOL.
>>>>
>>>> Otoh, making it gratuitously not work with python2 seems a bit harsh.
>>>>
>>>> On the gripping hand, reading PEP 0394, I see it doesn't actually require that
>>>> 'python' exist at all, so I guess changing the shebang as you suggest is the
>>>> right thing to do.
>>>
>>> Is it not perhaps time to switch python from EOL python2 to python3, as there
>>> are only 183 python2, 125 python27 to 199 python3, 129 python37 packages.
>>
>> This discussion actually belongs on cygwin-apps, not on newlib ¯\_(ツ)_/¯
>>
>>
>> Thanks,
>> Corinna
>>
>
> follow up from newlib
>
> python2 will be dead end of 2020.
> https://python3statement.org/
>
>
> most of python2 and python3 packages are obsolete placeholders,
> currently python3 points to python3.6 or python3.8, but I am seriously
> considering to use alternatives to cover also python37 as already
> done for sphinx and to prepare for the next python3.9.
>
> python38 has already 85 packages and I am working on another dozen,
> if you need some specific package, let me know.
>
> Following the
> https://www.python.org/dev/peps/pep-0394/
>
> ----------------------------------------------------------------------
> Distributors may choose to set the behavior of the python command as follows:
>
>        -  python2,
>        -  python3,
>        -  not provide python command,
>        -  allow python to be configurable by an end user
>           or a system administrator.
>
> ----------------------------------------------------------------------
>
>   we are currently setting python as python2=python2.7
>
> Question before I update the three python3.x
>
> - should I leave python as it is, or change to one of the
>    other settings ?
>
> Any preference ? For the last option I will use alternatives

I think it's time to make python point to python3.  I suggest setting

   /usr/bin/python -> python3

and then using alternatives to make /usr/bin/python3 resolve to a python3.x.exe.

Ken
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] doc: Various fixes to makedocbook for python3.8

Corinna Vinschen-2
In reply to this post by cygwin-apps mailing list
On Aug 24 12:31, Marco Atzeri via Cygwin-apps wrote:

> On 24.08.2020 12:02, Corinna Vinschen via Newlib wrote:
> > On Aug 23 16:49, Brian Inglis wrote:
> > > On 2020-08-23 13:41, Jon Turney wrote:
> > > > On 23/08/2020 16:23, Ken Brown wrote:
> > > > > On 8/22/2020 2:45 PM, Jon Turney wrote:
> > > > > > ---
> > > > > >    newlib/doc/makedocbook.py | 8 +++++---
> > > > > >    1 file changed, 5 insertions(+), 3 deletions(-)
> > > > > >
> > > > > > diff --git a/newlib/doc/makedocbook.py b/newlib/doc/makedocbook.py
> > > > > > index 92d0f279d..3fab26f1a 100755
> > > > > > --- a/newlib/doc/makedocbook.py
> > > > > > +++ b/newlib/doc/makedocbook.py
> > > > [...]
> > > > > Would it make sense to also change the shebang line so that makedocbook.py
> > > > > uses python3?  Currently the build of Cygwin on Fedora uses python3, but the
> > > > > build of Cygwin on Cygwin uses python2.  This is of no great importance, but a
> > > > > recent IRC discussion shows that it can be confusing.
> > > >
> > > > Yeah, I guess that would make some sense, given that python2 is now EOL.
> > > >
> > > > Otoh, making it gratuitously not work with python2 seems a bit harsh.
> > > >
> > > > On the gripping hand, reading PEP 0394, I see it doesn't actually require that
> > > > 'python' exist at all, so I guess changing the shebang as you suggest is the
> > > > right thing to do.
> > >
> > > Is it not perhaps time to switch python from EOL python2 to python3, as there
> > > are only 183 python2, 125 python27 to 199 python3, 129 python37 packages.
> >
> > This discussion actually belongs on cygwin-apps, not on newlib ¯\_(ツ)_/¯
> >
> >
> > Thanks,
> > Corinna
> >
>
> follow up from newlib
>
> python2 will be dead end of 2020.
> https://python3statement.org/
>
>
> most of python2 and python3 packages are obsolete placeholders,
> currently python3 points to python3.6 or python3.8, but I am seriously
> considering to use alternatives to cover also python37 as already
> done for sphinx and to prepare for the next python3.9.
>
> python38 has already 85 packages and I am working on another dozen,
> if you need some specific package, let me know.
>
> Following the
> https://www.python.org/dev/peps/pep-0394/
>
> ----------------------------------------------------------------------
> Distributors may choose to set the behavior of the python command as
> follows:
>
>       -  python2,
>       -  python3,
>       -  not provide python command,
>       -  allow python to be configurable by an end user
>          or a system administrator.
>
> ----------------------------------------------------------------------
>
>  we are currently setting python as python2=python2.7
>
> Question before I update the three python3.x
>
> - should I leave python as it is, or change to one of the
>   other settings ?
>
> Any preference ? For the last option I will use alternatives

It should default to python3.  Fedora performs this via an extra package
python-unversioned-command, containing just a symlink /usr/bin/python ->
./python3 as well as a man page symlink /usr/share/man/man1/python.1.gz
-> ./python3.1.gz.  We could just do the same, no?


Corinna
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] doc: Various fixes to makedocbook for python3.8

Jon TURNEY
In reply to this post by cygwin-apps mailing list
On 24/08/2020 13:58, Ken Brown via Cygwin-apps wrote:
> On 8/24/2020 6:31 AM, Marco Atzeri via Cygwin-apps wrote:
>>
>> Any preference ? For the last option I will use alternatives

> It should default to python3.  Fedora performs this via an extra package
> python-unversioned-command, containing just a symlink /usr/bin/python ->
> ./python3 as well as a man page symlink /usr/share/man/man1/python.1.gz
> -> ./python3.1.gz.  We could just do the same, no?

Seems like a good idea.

>
> I think it's time to make python point to python3.  I suggest setting
>
>    /usr/bin/python -> python3

But we'd also need to audit that all packages that containing python
scripts either:

- use a shebang which names python and work with python3
- use a shebang which explicitly names python2 or python3

Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] doc: Various fixes to makedocbook for python3.8

cygwin-apps mailing list
On 8/25/2020 11:50 AM, Jon Turney wrote:

> On 24/08/2020 13:58, Ken Brown via Cygwin-apps wrote:
>> On 8/24/2020 6:31 AM, Marco Atzeri via Cygwin-apps wrote:
>>>
>>> Any preference ? For the last option I will use alternatives
>
>> It should default to python3.  Fedora performs this via an extra package
>> python-unversioned-command, containing just a symlink /usr/bin/python ->
>> ./python3 as well as a man page symlink /usr/share/man/man1/python.1.gz
>> -> ./python3.1.gz.  We could just do the same, no?
>
> Seems like a good idea.
>
>>
>> I think it's time to make python point to python3.  I suggest setting
>>
>>    /usr/bin/python -> python3
>
> But we'd also need to audit that all packages that containing python scripts
> either:
>
> - use a shebang which names python and work with python3
> - use a shebang which explicitly names python2 or python3

We could start with a HEADSUP to maintainers asking them to check their python
scripts whose shebangs name python.  For those scripts whose maintainers don't
respond, we could simply change the scripts to name python2.

Do you have any idea roughly how many scripts we're talking about?

Ken