-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove python2 compat codes, introduce dataclasses and type hints for bin/update-tables.py
#58
Remove python2 compat codes, introduce dataclasses and type hints for bin/update-tables.py
#58
Conversation
This pull request introduces 1 alert when merging 53b0dd1 into 4d45480 - view on LGTM.com new alerts:
|
Thanks for this work. Can I please turn your attention to the use-jinja branch? It is mostly completed and simplifies this script a great deal by using jinja2 templates. https://github.com/jquast/wcwidth/compare/use-jinja The jinja2 branch is to start generating C code and improve performance of this library. If you are interested in helping with that effort, I have been looking for a co-maintainer, your work is good, are you interested? |
Yes. Templates can be more readable than code generator. I haven't used jinja2 before, so let me read its documents first.
I agree, C code will be good. Which should we use, Python/C API or Cython? Python/C API has some disadvantages (for example, reference counting), and there is a WIP replacement named hpy, which may be better.
It's my pleasure. 😉 |
Thanks for your help, access granted I hope to polish up Please forgive me if I take the transition to C a bit slow, because this library is downloaded a lot I want to be sure the installation process very forgiving, to fallback to pure python if no compiler is present, to try to provide binary wheels for top platforms & versions and to do platform testing |
I think the algorithm will be implimented in C, and either Python/C API or cython is only for wrapping the C code in a Python extension module. AFAIK, mypyc doesn't support pypy. At least, it haven't been tested on pypy, and mypy doesn't distribute any mypyc-compiled wheels for pypy on pypi.org either (There's only Cython does support pypy (via pypy's cpyext). And cython has a pure python mode (but I haven't used it before, I'm not sure if we can make both cython and mypy's type checker happy). Futher more, if one day cython supports HPy backend, we can get more performance improvement on pypy (and graalpython, and some others). |
No description provided.