Hello! Just installed the package and found a minor issue you may want to address.
Issue
powerbi_ontology fails to import on Python 3.11 (and any version below 3.12) with:
File powerbi_ontology/dax_parser.py, line 180
name=f"{measure_name}_Switch_{case_value.replace('\"', '').replace(' ', '_')}",
^
SyntaxError: f-string expression part cannot include a backslash
Backslashes inside f-string expressions were only allowed starting in Python 3.12 (PEP 701). Since no python_requires >= 3.12 is specified, the package installs on older versions but immediately crashes on import.
Steps to Reproduce
pip install powerbi-ontology-extractor
python -c "from powerbi_ontology import PowerBIExtractor"
Environment
- Python 3.11.x
- pbi-ontology-extractor 0.1.5
- macOS
Suggested Fix
- Extract the
.replace() calls into a variable before the f-string in dax_parser.py line 180.
- Alternatively, add python_requires=">=3.12" to the package metadata if 3.12+ is intentional.
Hello! Just installed the package and found a minor issue you may want to address.
Issue
powerbi_ontologyfails to import on Python 3.11 (and any version below 3.12) with:Backslashes inside f-string expressions were only allowed starting in Python 3.12 (PEP 701). Since no python_requires >= 3.12 is specified, the package installs on older versions but immediately crashes on import.
Steps to Reproduce
pip install powerbi-ontology-extractor python -c "from powerbi_ontology import PowerBIExtractor"Environment
Suggested Fix
.replace()calls into a variable before the f-string indax_parser.pyline 180.