Re: Distutils Will Be Gone From The Standard Library In Python 3.12

2023-06-17 Thread Edward K. Ream
On Sat, Jun 17, 2023 at 2:51 PM Thomas Passin  wrote:

> I don't know if Leo uses distutils in any way, but it won't be in the
> standard library  any more.  It has
> been absorbed into *setuptools*, so its features aren't really gone, but
> how to use them will change.


Thanks for the update. Afaik, Leo does not use distutils. setup.py uses
setuptools.

Edward

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/CAMF8tS07rDvoTfxSAWy7HD4YZB5Grv0qSxH8yRnpJ24exoNsgQ%40mail.gmail.com.


Distutils Will Be Gone From The Standard Library In Python 3.12

2023-06-17 Thread Thomas Passin
I don't know if Leo uses distutils in any way, but it won't be in the 
standard library  any more.  It has been 
absorbed into *setuptools*, so its features aren't really gone, but how to 
use them will change.

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/6fca2b5d-90e4-45f9-b59c-b3d976095068n%40googlegroups.com.


Re: PR #3389 (in devel) concludes work on handling options

2023-06-17 Thread Edward K. Ream
On Sat, Jun 17, 2023 at 1:13 AM Viktor Ransmayr 
wrote:


I tested the 'leo-editor:devel' branch again in a Fedora 37 VM.
>
> Running Leo's unit tests reports one error:
>

Thanks for this report. I have modified the unit test so it fails on my
machine. I'll fix this issue next.

Edward

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/CAMF8tS327gc%2B0J9pDM1_YGp8HENst0zaJfLkhDddw4%3DLy%2BT6xg%40mail.gmail.com.


Re: Open new window

2023-06-17 Thread Thomas Passin
On Saturday, June 17, 2023 at 2:16:13 PM UTC-4 Thomas Passin wrote:

I've attached an image file illustrating this (this example was provided by 
@wangzhaohe).


I meant to write "this asciidoc markup  was provided by @wangzhaohe".

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/72575759-77ae-42dc-b418-620a0d849982n%40googlegroups.com.


Re: PR #3390 (more options work) merged into devel

2023-06-17 Thread Edward K. Ream
On Sat, Jun 17, 2023 at 10:29 AM Thomas Passin  wrote:

FAILED
leo/unittests/core/test_leoImport.py::TestLeoImport::test_recursive_import
- AssertionError: 'path: ekr-mypy2/mypy' != 'path: mypy'
== 1 failed, 851 passed, 1 skipped, 1 warning in 14.21s ==

Not a surprise since it's looking for a specific directory on @ekr's
> machine.
>

Well, this failure surprised me :-) The test calls only
RecursiveImportController.minimize_headline, and this method does only
string (path) computations. The method does not test whether the path
exists.

However, changing 'ekr-mypy2' to 'non-existent-directory' does in fact fail
on my machine.  I'm on it.

Edward

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/CAMF8tS3iViqY4fd-_4jkusZKaNzhiyS5Biy5hS7O%3DRMe%2BzUJxQ%40mail.gmail.com.


Re: PR #3390 (more options work) merged into devel

2023-06-17 Thread Thomas Passin
Run from the leo-editor directory:
py -m pytest

[snip]
leo\unittests\core\test_leoImport.py:106: AssertionError
 warnings summary 
leo\plugins\leo_babel\tests\lib_test.py:118
  C:\Tom\git\leo-editor\leo\plugins\leo_babel\tests\lib_test.py:118: 
PytestCollectionWarning: cannot collect test class 'TestCmdr' because it 
has a __init__ constructor (from: leo/plugins/leo_babel/tests/lib_test.py)
class TestCmdr:

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
 short test summary info =
FAILED 
leo/unittests/core/test_leoImport.py::TestLeoImport::test_recursive_import 
- AssertionError: 'path: ekr-mypy2/mypy' != 'path: mypy'
== 1 failed, 851 passed, 1 skipped, 1 warning in 14.21s ==

Not a surprise since it's looking for a specific directory on @ekr's 
machine.

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/d985d11d-2499-4b4b-bf01-d07ee0151fcbn%40googlegroups.com.


Re: PR #3390 (more options work) merged into devel

2023-06-17 Thread Edward K. Ream
On Saturday, June 17, 2023 at 9:44:55 AM UTC-5 Edward K. Ream wrote:

>...the new unit tests found more errors in two hours than in the previous 
four days. 

The test of LM.scanOptions knows nothing about scanOptions. The test is 
valid however code works.

In other words, this test should have been added 20 years ago!

Edward

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/22467543-28c3-4fe2-85b9-5288560fcd52n%40googlegroups.com.


Re: PR #3390 (more options work) merged into devel

2023-06-17 Thread Edward K. Ream
On Saturday, June 17, 2023 at 9:36:25 AM UTC-5 Edward K. Ream wrote:

I've merged this branch early for several reasons


I prefer speed over agonizing :-) I want devel to contain the latest code 
so we can all test it. 

The devel branch should be safe enough: the new unit tests found more 
errors in two hours than in the previous four days. 

Any remaining problems will be fixed in a *small* PR.

Edward

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/67637131-e44b-4ff2-a94f-348190069e53n%40googlegroups.com.


PR #3390 (more options work) merged into devel

2023-06-17 Thread Edward K. Ream
The devel branch now contains PR #3390 
, the latest work on 
Leo's options code.

I've merged this branch early for several reasons:

- Thomas has signed off on the code.
- Because of the reorg, the diffs in the PR are almost useless.
- New unit tests cover all the code.
- We should all test the code asap.

Edward

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/d39448a5-d584-4b25-8d6a-cf5db35f3fc1n%40googlegroups.com.


Re: Open new window

2023-06-17 Thread Thomas Passin
Yes, but just how depends on what you mean.  For example, you can open a Qt 
window that displays MatPlotLib or Qt graphics.  Or, if within Leo you run 
some MatPlotLib code, the pyplot.plot() command will open a window to 
display the plots.  You can also run code for a system like Bokeh or 
Holoview that opens a browser window to display the graphics.  If you can 
create SVG for the output, you can display the graphics in the browser. 

Or if you can write the graphics data to an image file, you can view it 
with the viewrendered3 plugin.

I could be more specific if you would be more specific about what you want 
to do.

On Saturday, June 17, 2023 at 12:06:52 AM UTC-4 ran...@gmail.com wrote:

> Can I write a script in Leo, which will create a new window in which I can 
> display some graphics ?

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/f1e3e6b0-1d1e-4892-b412-b4a8c5eb0c8fn%40googlegroups.com.


My apologies for a missing unit test

2023-06-17 Thread Edward K. Ream
I've wasted considerable time, especially Thomas's time, by failing to 
create a unit test for LM.scanOptions. I'll create this test next.

I don't have an explanation for this brain spike. A new unit test would 
have save me lots of time.

Again, I apologize to all who have been following the recent work on 
LM.scanOptions.

Edward

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/ad36bd0a-260f-40c9-a50a-235136f1d56cn%40googlegroups.com.


Re: PR #3389 (in devel) concludes work on handling options

2023-06-17 Thread Viktor Ransmayr
Hello Edward,

Edward K. Ream schrieb am Freitag, 16. Juni 2023 um 23:37:42 UTC+2:

PR #3389  defines four 
simple helper functions in leoGlobals.py.

Imo these four functions do more than the entire argparse module. They are 
simpler, easier and more flexible.

Thanks again to Thomas for his careful reading of the code.


I tested the 'leo-editor:devel' branch again in a Fedora 37 VM.

Running Leo's unit tests reports one error:

::

(Leo) [user@fedora-leo-study-vm Leo]$ 
(Leo) [user@fedora-leo-study-vm Leo]$ cd leo-editor/leo
(Leo) [user@fedora-leo-study-vm leo]$ python -m unittest















..F.

s...
.
(python:1804): Gdk-CRITICAL **: 08:03:14.903: gdk_atom_intern: 
assertion 'atom_name != NULL' failed

(python:1804): Gdk-CRITICAL **: 08:03:14.903: gdk_atom_intern: 
assertion 'atom_name != NULL' failed

.s..
cursesGui2.py: Tk module required for clipboard 
handling.
s.
==
FAIL: test_recursive_import 
(unittests.core.test_leoImport.TestLeoImport.test_recursive_import)
--
Traceback (most recent call last):
  File 
"/home/user/PyVE/GitHub/Leo/leo-editor/leo/unittests/core/test_leoImport.py", 
line 106, in test_recursive_import
self.assertEqual(root.h, expected)
AssertionError: 'path: ekr-mypy2/mypy' != 'path: mypy'
- path: ekr-mypy2/mypy
+ path: mypy


--
Ran 851 tests in 5.954s

FAILED (failures=1, skipped=3)
(Leo) [user@fedora-leo-study-vm leo]$ 

 With kind regards,

Viktor

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/6d2f6741-05ef-43ab-b9ea-95e681668fb9n%40googlegroups.com.