This is an automated email from the ASF dual-hosted git repository.

baunsgaard pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/systemds.git

commit d0a6accaba55df906994899a8c7bb794f04ca8e9
Author: Carlos Muniz Cuza <[email protected]>
AuthorDate: Wed Feb 1 20:17:47 2023 +0100

    [SYSTEMDS-3494] Python 3.9 support
    
    This commit fix a parser conflict for python 3.9, where the generator
    package was containing a python file that conflicts with 3.9+ python,
    called parser.py.
---
 src/main/python/generator/__init__.py                  | 2 +-
 src/main/python/generator/{parser.py => dml_parser.py} | 0
 src/main/python/generator/generator.py                 | 4 ++--
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/main/python/generator/__init__.py 
b/src/main/python/generator/__init__.py
index b11c92782c..06bcc9930c 100644
--- a/src/main/python/generator/__init__.py
+++ b/src/main/python/generator/__init__.py
@@ -24,7 +24,7 @@ from generator.generator import (
     PythonAPIFunctionGenerator,
     PythonAPIDocumentationGenerator
 )
-from generator.parser import FunctionParser
+from generator.dml_parser import FunctionParser
 
 __all__ = [
     PythonAPIFileGenerator,
diff --git a/src/main/python/generator/parser.py 
b/src/main/python/generator/dml_parser.py
similarity index 100%
rename from src/main/python/generator/parser.py
rename to src/main/python/generator/dml_parser.py
diff --git a/src/main/python/generator/generator.py 
b/src/main/python/generator/generator.py
index ffc2c2dc8d..12aa185310 100644
--- a/src/main/python/generator/generator.py
+++ b/src/main/python/generator/generator.py
@@ -24,7 +24,7 @@ import os
 import re
 import sys
 import traceback
-from parser import FunctionParser
+from dml_parser import FunctionParser
 from typing import List, Tuple
 
 
@@ -74,7 +74,7 @@ class PythonAPIFileGenerator(object):
         with open(target_file, "w") as new_script:
             new_script.write(self.licence)
             new_script.write(self.generated_by)
-            new_script.write((self.generated_from + dml_file + "\n").replace(
+            new_script.write((self.generated_from + dml_file.replace("\\", 
"/") + "\n").replace(
                 "../", "").replace("src/main/python/generator/", ""))
             new_script.write(self.imports)
             new_script.write(file_content)

Reply via email to