Problem
morpc/frictionless/gpkg.py:264 puts a backslash inside an f-string expression:
name=f"{baseName}-{re.sub(r'\W+', '-', layerName).lower()}",
Python 3.12 allows this (PEP 701). Python 3.10 and 3.11 reject it, so any import of morpc.frictionless fails with:
File ".../morpc/frictionless/gpkg.py", line 264
name=f"{baseName}-{re.sub(r'\W+', '-', layerName).lower()}",
SyntaxError: f-string expression part cannot include a backslash
pyproject.toml says requires-python = ">=3.10", so this breaks versions the package claims to support.
Impact
This breaks downstream packages too. In morpc-census CI, the Python 3.11 job fails 164 of 337 tests because of this import error, while the 3.12 job passes (failing run).
Suggested fix
Move the re.sub call out of the f-string:
safeLayerName = re.sub(r'\W+', '-', layerName).lower()
...
name=f"{baseName}-{safeLayerName}",
A search of morpc/ turned up no other backslash inside an f-string expression. Adding Python 3.10/3.11 to the CI test matrix would catch this kind of problem next time.
Problem
morpc/frictionless/gpkg.py:264puts a backslash inside an f-string expression:Python 3.12 allows this (PEP 701). Python 3.10 and 3.11 reject it, so any import of
morpc.frictionlessfails with:pyproject.tomlsaysrequires-python = ">=3.10", so this breaks versions the package claims to support.Impact
This breaks downstream packages too. In
morpc-censusCI, the Python 3.11 job fails 164 of 337 tests because of this import error, while the 3.12 job passes (failing run).Suggested fix
Move the
re.subcall out of the f-string:A search of
morpc/turned up no other backslash inside an f-string expression. Adding Python 3.10/3.11 to the CI test matrix would catch this kind of problem next time.