pyqt6 did not work on devel. pyqt6 has been disabled for now

16 views
Skip to first unread message

Edward K. Ream

unread,
Jul 13, 2021, 6:56:42 PM7/13/21
to leo-editor
Perhaps pyqt6 never worked in devel :-)

For now, I have just disabled the imports of pyqt6, so everyone should be good.

Thomas, this may explain why merging devel into ekr-qt6-2 didn't work.  Not to worry, we'll get it all straightened out soon.

Edward

tbp1...@gmail.com

unread,
Jul 13, 2021, 7:42:32 PM7/13/21
to leo-editor
On my main project, I develop a java servlet project that runs under Tomcat.  Most of the code is actually Jython, meaning basically python 2.7.  The servlets themselves are written in java, but they instantiate my jython classes and call methods on them (and in a few cases, the jython code calls methods on Java objects).

Oracle open-sourced the jdk, but they maintained control of the javax namespace.  Parts of servlet operations depend on it, but it couldn't be used anymore for open-source projects.  The arrangement that was finally agreed to was to transfer those servlet-required parts to the jakarta namespace, which is controlled by Apache.

Now all of us servlet developers have a problem.  For Tomcat 10+ we have to use jakarta, for Tomcat pre-10, we have to use javax.  And in java you can't do conditional imports as we do with Python in Leo.  I can't tell my users to switch to v10, and I can't make them stay with v9.  What to do?

OK, compile one way for pre-v9 users and another for post-v10 ones.  Yes, but how to handle the repo, since we'll need to propagate changes to both branches.  Some people proposed binary editing of the compiled code, and apparently it can be done.  Yuck!  In C/C++, you would presumably use an IFDEF for the preprocessor.

Instead, I changed my servlet .java files into templates with replaceable namespace parameters.  My build system expects you to type the target namespace on the command line; it will use that to create the actual .java file from the template, and then build with the result of that.

It works well enough, but I wish we could do conditional imports with java!

Edward K. Ream

unread,
Jul 13, 2021, 7:49:31 PM7/13/21
to leo-editor
On Tue, Jul 13, 2021 at 6:42 PM tbp1...@gmail.com <tbp1...@gmail.com> wrote:

Now all of us servlet developers have a problem. 

I feel your pain.

50+ years ago, when I worked briefly for IBM, I was told that IBM's strict rule was that they would never break their client's code with api changes. It's still a good rule.

Edward
Reply all
Reply to author
Forward
0 new messages