On Wed, Sep 09, 2026 at 09:58:01AM +0200, Pavel Sanda wrote:
> On Tue, Sep 08, 2026 at 10:44:04PM +0100, José Matos wrote:
> > 1. Please take the chance and remove the comment:
> > // Check whether this is a python 2 or 3 binary.
> > 
> > This is no longer true since 2.5.x
> 
> I am happy to ditch, but I saw explicit checks on python 2 while
> going through the code yesterday, eg in Graphicsconverter.

If you maintain that p2 is gone, the graphics converter part should probably go 
as well,
does this patch makes sense?


diff --git a/src/graphics/GraphicsConverter.cpp 
b/src/graphics/GraphicsConverter.cpp
--- a/src/graphics/GraphicsConverter.cpp
+++ b/src/graphics/GraphicsConverter.cpp
@@ -137,17 +137,10 @@ Converter::Impl::Impl(Converter const & parent, FileName 
const & doc_fname,
      
      // The conversion commands are stored in a stringstream
      ostringstream script;
-     if (os::python_info()[0] == '2') {
-             build_script(doc_fname_.absFileName(),
-                          from_file.toFilesystemEncoding(),
-                          to_file_.toFilesystemEncoding(),
-                          from_format, to_format, script);
-     } else {
-             build_script(doc_fname_.absFileName(),
-                          from_file.absFileName(),
-                          to_file_.absFileName(),
-                          from_format, to_format, script);
-     }
+     build_script(doc_fname_.absFileName(),
+                  from_file.absFileName(),
+                  to_file_.absFileName(),
+                  from_format, to_format, script);
      LYXERR(Debug::GRAPHICS, "\tConversion script:"
                 "\n--------------------------------------\n"
              << script.str()
P
-- 
lyx-devel mailing list
[email protected]
https://lists.lyx.org/mailman/listinfo/lyx-devel

Reply via email to