Re: Interesting discovery from automatic tools (python code)

2022-08-11 Thread José Matos
On Thu, 2022-08-11 at 20:29 +0200, Pavel Sanda wrote: > > I did not use the exceptions to understand the failure reasons. > > The issue with the except is that it is a catch all option and so > > the > > exception could be caused by faulty assumptions from us in the > > initial > > code. > > My un

Re: Interesting discovery from automatic tools (python code)

2022-08-11 Thread Pavel Sanda
On Thu, Aug 11, 2022 at 05:55:47PM +0100, José Matos wrote: > On Thu, 2022-08-11 at 17:07 +0200, Pavel Sanda wrote: > > It seems that subprocess.check_call is raising exception instead of > > returning non-zero, > > so I gave it except block. > > What type of exception did you get? convert-im6.q1

Re: Interesting discovery from automatic tools (python code)

2022-08-11 Thread José Matos
On Thu, 2022-08-11 at 17:07 +0200, Pavel Sanda wrote: > It seems that subprocess.check_call is raising exception instead of > returning non-zero, > so I gave it except block. What type of exception did you get? I did not use the exceptions to understand the failure reasons. The issue with the exc

Re: Interesting discovery from automatic tools (python code)

2022-08-11 Thread Pavel Sanda
On Sun, Jul 31, 2022 at 11:41:02AM +0100, José Matos wrote: > On Sun, 2022-07-31 at 11:16 +0200, Pavel Sanda wrote: > > Sure, whatever you need :) > > The patch is in. > > > > Pavel > > First attempt. :-) Hi Jose, attached is my take on it. It seems that subprocess.check_call is raising except

Re: Interesting discovery from automatic tools (python code)

2022-08-01 Thread Kornel Benko
Am Mon, 01 Aug 2022 11:22:12 +0100 schrieb José Matos : > On Mon, 2022-08-01 at 09:42 +0200, Kornel Benko wrote: > > I see an unimportant difference only in configure.log. > > Actually this is important because it tells me that the new test was > applied. Honestly I have not added further debug

Re: Interesting discovery from automatic tools (python code)

2022-08-01 Thread José Matos
On Mon, 2022-08-01 at 09:42 +0200, Kornel Benko wrote: > I see an unimportant difference only in configure.log. Actually this is important because it tells me that the new test was applied. Honestly I have not added further debug that is why we are not seeing it here, that can be done for now the

Re: Interesting discovery from automatic tools (python code)

2022-08-01 Thread Stephan Witt
Am 01.08.2022 um 09:05 schrieb José Matos : > > On Sun, 2022-07-31 at 23:33 +0200, Stephan Witt wrote: >> With Python 3.8.13 on macOS there is no difference in configure.log >> before and after change c041925261. >> >> Stephan > > Thank you, this is good in the sense that what worked before stil

Re: Interesting discovery from automatic tools (python code)

2022-08-01 Thread Kornel Benko
Am Sun, 31 Jul 2022 11:41:02 +0100 schrieb José Matos : > On Sun, 2022-07-31 at 11:16 +0200, Pavel Sanda wrote: > > Sure, whatever you need :) > > The patch is in. > > > > Pavel > > First attempt. :-) > > The code is straightforward, on my system it works in both python2 and > python3. FWIW t

Re: Interesting discovery from automatic tools (python code)

2022-08-01 Thread José Matos
On Sun, 2022-07-31 at 23:33 +0200, Stephan Witt wrote: > With Python 3.8.13 on macOS there is no difference in configure.log > before and after change c041925261. > > Stephan Thank you, this is good in the sense that what worked before still works now. This is important for some reason. :-) For

Re: Interesting discovery from automatic tools (python code)

2022-07-31 Thread Stephan Witt
Am 31.07.2022 um 12:41 schrieb José Matos : > > On Sun, 2022-07-31 at 11:16 +0200, Pavel Sanda wrote: >> Sure, whatever you need :) >> The patch is in. >> >> Pavel > > First attempt. :-) > > The code is straightforward, on my system it works in both python2 and > python3. FWIW the only differen

Re: Interesting discovery from automatic tools (python code)

2022-07-31 Thread José Matos
On Sun, 2022-07-31 at 20:30 +0200, Pavel Sanda wrote: > Will take little time, hopefully tomorrow. P No problem. :-) -- José Abílio -- lyx-devel mailing list lyx-devel@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-devel

Re: Interesting discovery from automatic tools (python code)

2022-07-31 Thread José Matos
On Sun, 2022-07-31 at 20:09 +0200, Pavel Sanda wrote: > It's in. Pavel Thank you. :-) -- José Abílio -- lyx-devel mailing list lyx-devel@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-devel

Re: Interesting discovery from automatic tools (python code)

2022-07-31 Thread Pavel Sanda
On Sun, Jul 31, 2022 at 11:41:02AM +0100, José Matos wrote: > Please test it. Will take little time, hopefully tomorrow. P -- lyx-devel mailing list lyx-devel@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-devel

Re: Interesting discovery from automatic tools (python code)

2022-07-31 Thread Pavel Sanda
On Sun, Jul 31, 2022 at 06:37:29PM +0100, José Matos wrote: > On Sun, 2022-07-31 at 11:16 +0200, Pavel Sanda wrote: > > On Sun, Jul 31, 2022 at 07:15:29AM +0100, José Matos wrote: > > > Now in the context of the pyupgrade fixes this is applied to top > > > /lib > > > scripts. I need this before wor

Re: Interesting discovery from automatic tools (python code)

2022-07-31 Thread José Matos
On Sun, 2022-07-31 at 11:16 +0200, Pavel Sanda wrote: > On Sun, Jul 31, 2022 at 07:15:29AM +0100, José Matos wrote: > > Now in the context of the pyupgrade fixes this is applied to top > > /lib > > scripts. I need this before working on configure.py. > > Sure, whatever you need :) > The patch is i

Re: Interesting discovery from automatic tools (python code)

2022-07-31 Thread José Matos
On Sun, 2022-07-31 at 07:15 +0100, José Matos wrote: > In order to keep some sanity Python does not allow to stack > prefixes, like > >  fur"\begin_layout {layout}" Actually thinking a bit and researching a little more this is wrong: https://docs.python.org/3/reference/lexical_analysis.html#strin

Re: Interesting discovery from automatic tools (python code)

2022-07-31 Thread José Matos
On Sun, 2022-07-31 at 11:16 +0200, Pavel Sanda wrote: > Sure, whatever you need :) > The patch is in. > > Pavel First attempt. :-) The code is straightforward, on my system it works in both python2 and python3. FWIW the only difference is: --- configure2.log 2022-07-31 11:32:45.733253492 +

Re: Interesting discovery from automatic tools (python code)

2022-07-31 Thread Pavel Sanda
On Sun, Jul 31, 2022 at 07:15:29AM +0100, José Matos wrote: > Now in the context of the pyupgrade fixes this is applied to top /lib > scripts. I need this before working on configure.py. Sure, whatever you need :) The patch is in. Pavel -- lyx-devel mailing list lyx-devel@lists.lyx.org http://li

Re: Interesting discovery from automatic tools (python code)

2022-07-30 Thread José Matos
On Sun, 2022-07-31 at 00:44 +0200, Pavel Sanda wrote: > Good. This one applies, so it's in now. > Now that I have you on hotline, any chance to have a look at the > configure patch we discussed in March? :) > (Was: LyX 2.4.0 (IM policy.xml ban on eps/pdf conversions)) > > Pavel That was the next

Re: Interesting discovery from automatic tools (python code)

2022-07-30 Thread Pavel Sanda
On Sat, Jul 30, 2022 at 05:49:05PM +0100, José Matos wrote: > In any case the code after this patch is more correct, and that is > always a good thing. Good. This one applies, so it's in now. Now that I have you on hotline, any chance to have a look at the configure patch we discussed in March? :)

Re: Interesting discovery from automatic tools (python code)

2022-07-30 Thread José Matos
On Sat, 2022-07-30 at 14:22 +0200, Pavel Sanda wrote: > On Sat, Jul 30, 2022 at 12:31:57PM +0100, José Matos wrote: > > I think that this should be applied. > > I wanted to commit for you, but this is what I get when trying to > apply the patch: Oops, I took the patch in the wrong directory. I t

Re: Interesting discovery from automatic tools (python code)

2022-07-30 Thread José Matos
On Sat, 2022-07-30 at 14:22 +0200, Pavel Sanda wrote: > I wanted to commit for you, but this is what I get when trying to > apply the patch: Thank you. I will look into this why is this failing. -- José Abílio -- lyx-devel mailing list lyx-devel@lists.lyx.org http://lists.lyx.org/mailman/listi

Re: Interesting discovery from automatic tools (python code)

2022-07-30 Thread Pavel Sanda
On Sat, Jul 30, 2022 at 12:31:57PM +0100, José Matos wrote: > I think that this should be applied. I wanted to commit for you, but this is what I get when trying to apply the patch: patching file lib/lyx2lyx/lyx2lyx_tools.py patching file lib/lyx2lyx/lyx_0_12.py patching file lib/lyx2lyx/lyx_1_2.

Interesting discovery from automatic tools (python code)

2022-07-30 Thread José Matos
Yesterday I found a tool to upgrade the python code to new versions. https://github.com/asottile/pyupgrade This is interesting in itself. :-) First because it allows to upgrade the code to a given version, such as it is I have applied in a way that it is compatible with python 2.7 that we suppor