dr-leo / PyHyphen

Other
10 stars 5 forks source link

Python 3.9 compatibility fix #4

Closed robinwhittleton closed 3 years ago

robinwhittleton commented 3 years ago

In Python 3.9, node.getchildren() was removed. We can replace the same functionality with list(node) instead (sesrch for getchildren in https://docs.python.org/3.9/whatsnew/3.9.html). I’m not a Python expert, but this seems to work and now passes the unit tests in tox, which I’ve updated to include Python 3.9.

I’ve also pointed the freedesktop.org URL to the https protocol; the server is just redirecting anyway, so this should be slightly faster.

I’ve tested this locally and it works fine, both creating the pyhyphen directory and downloading the appropriate dictionaries, and hyphenating the file I threw at it without problems.

dr-leo commented 3 years ago

Awsome! Thanks for these fixes.

dr-leo commented 3 years ago

I should add that prior to the next release there is still some work to do. So any further contributions are more than welcome.