Skip to content

Fix for antl4 import error in Python>=3.12 - #21

Open
Esat-Karakaya wants to merge 2 commits into
loodos:masterfrom
Esat-Karakaya:master
Open

Fix for antl4 import error in Python>=3.12#21
Esat-Karakaya wants to merge 2 commits into
loodos:masterfrom
Esat-Karakaya:master

Conversation

@Esat-Karakaya

@Esat-Karakaya Esat-Karakaya commented Jan 16, 2026

Copy link
Copy Markdown

Antlr4 imports typing.io to use TextIO which already exists in the typing module. typing.io was removed in python 3.12 and this caused zemberek-python to not work on modern python runtimes. This pull request allows zemberek-python to import antlr4 in modern python without issues.

It also fixes a small bug where 0012 would not be converted to "sıfır sıfır on iki"

Added compatibility shim to use antlr4 for python>=3.12
@Esat-Karakaya

Copy link
Copy Markdown
Author

this PR is a fix for this issue: #17 (Python son sürümde çalışmıyor)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant