-
-
Notifications
You must be signed in to change notification settings - Fork 54
still doesn't build on pypy3 7.0 #111
Comments
(Same error with pypy3 7.1.1) |
@glyph if you read my comment there are a lot of changes that would need to be made for typed_ast to work on PyPy (the changes in the comment are just the beginning). Deleting the |
@ethanhs ah, I see. If it’s not worthwhile to have a tracking issue open for pypy compatibility, please feel free to close this; I was just trying to catalogue the failures I encountered trying to get pypy to work for a production codebase. |
Thanks, let’s close this then. |
All code is updated to use black formatting. https://github.com/psf/black A pyproject.toml file is added with configuration for the black tool. Note that skip-string-normalization is enabled; this allows pyvcd code to continue using single-quoted strings instead of black's default of double-quoted strings. The Makefile's 'lint' and 'format' targets are updated to use black. N.B. there is an issue with installing/running black with pypy3, so instead of including it in requirements.txt, it is installed conditionally in .travis.yml. psf/black#727 python/typed_ast#111
They are conditional on cpython because currently neither tool can be installed in a pypy environment. psf/black#727 python/typed_ast#111
* Add type stubs for read APIs * Add type stubs for write APIs * Add type stubs for validation APIs * Add type stubs for schema APIs * Add block_reader, remove file_reader from read pyi Add the block_reader and its partner Block to the type stub for the read module. On the way, remove file_reader because it's not in the exported public API, and it has an ambiguous (or at least complicated) type for its __iter__, next, and __next__ methods; their return value types depend upon the concrete subclass. * Add a py.typed sentinel file for mypy support As laid out in [0], a specially-named py.typed file is needed to get mypy support for distributed packages. [0]: https://github.com/python/mypy/blob/92e3f396b03c69c1d8abc249632bfd2db02350d0/docs/source/installed_packages.rst#making-pep-561-compatible-packages * Obey flake8 regarding comment spacing * Include type stubs and sentinel file in distribution * Add mypy to automated tests * Skip running mypy on Python 2 * Only install mypy on Python 3+ * Don't run mypy on pypy because it can't be installed See python/typed_ast#111 for more. * Fix multiline inline python command * some day i will learn to bash
So we can automatically fix many formatting issues. https://black.readthedocs.io/ Drop pypy3 testing due to python/typed_ast#111
Update for those subscribed here, re:
typed_ast support in PyPy was implemented by @isidentical, see comment here:
PyPy 3.8 is on the horizon, but still likely several months (or more) away. |
It seems that while type comment parsing is implemented, language feature versioning perhaps is not? |
feature_version is on the list of todos, and will probably get implemented
before the release.
…On Fri, Jul 2, 2021, 3:31 AM Ethan Smith ***@***.***> wrote:
It seems that while type comment parsing is implemented, language feature
versioning perhaps is not?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#111 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ALJKHQJNULWO7N234YBYNB3TVUCHXANCNFSM4HNQ5SQQ>
.
|
PyPy might give 2-4x speedup on pure-Python scripts and save memory by default (as if slots were used in CPython). This enabled Kubernetes operators in CPU-/RAM-tight environments without special improvements and optimizations from Kopf's side. PyPy was unofficially supported and tested manually from time to time. With this change, let's make it official and automated. MyPy is excluded from test-time dependencies: one of MyPy's sub-dependency ("typed-ast") fails at being installed (python/typed_ast#111). However, PyPy is not used for linting/type-checking, only CPython is. Therefore, MyPy is not needed for PyPy. Signed-off-by: Sergey Vasilyev <[email protected]>
PyPy might give 2-4x speedup on pure-Python scripts and save memory by default (as if slots were used in CPython). This enabled Kubernetes operators in CPU-/RAM-tight environments without special improvements and optimizations from Kopf's side. PyPy was unofficially supported and tested manually from time to time. With this change, let's make it official and automated. MyPy is excluded from test-time dependencies: one of MyPy's sub-dependency ("typed-ast") fails at being installed (python/typed_ast#111). However, PyPy is not used for linting/type-checking, only CPython is. Therefore, MyPy is not needed for PyPy. Signed-off-by: Sergey Vasilyev <[email protected]>
PyPy might give [2-5x speedup](https://speed.pypy.org/) and [2-3x less memory consumption](https://dev.nextthought.com/blog/2018/08/cpython-vs-pypy-memory-usage.html) on pure-Python scripts — compared to equivalent CPython 3.7. This enables Kubernetes operators in CPU-/RAM-tight environments without special improvements and optimizations from Kopf's side. PyPy was unofficially supported and tested manually from time to time. With this change, let's make it official and automated. Some implementation nuances: MyPy is excluded from test-time dependencies: one of MyPy's sub-dependency ("typed-ast") fails at being installed (python/typed_ast#111). However, PyPy is not used for linting/type-checking, only CPython is. Therefore, MyPy is not needed for PyPy. There are some slowdowns in CI: +2m30s mins for OS-/pip-dependencies — since no wheels are usually available for PyPy. And slower tests: 2m40s vs. 1m50s in CPython — my assumption is because JIT is not very useful for non-repetitive code fragments of tests (but should be faster at runtime; no proofs, though). Coverage for PyPy is disabled completely — it makes it disastrously slow (13m vs. 3m). The internet hints it is because tracing is not compatible with JIT (old articles from 2013-2015). Signed-off-by: Sergey Vasilyev <[email protected]>
PyPy might give [2-5x speedup](https://speed.pypy.org/) and [2-3x less memory consumption](https://dev.nextthought.com/blog/2018/08/cpython-vs-pypy-memory-usage.html) on pure-Python scripts — compared to equivalent CPython 3.7. This enables Kubernetes operators in CPU-/RAM-tight environments without special improvements and optimizations from Kopf's side. PyPy was unofficially supported and tested manually from time to time. With this change, let's make it official and automated. Some implementation nuances: MyPy is excluded from test-time dependencies: one of MyPy's sub-dependency ("typed-ast") fails at being installed (python/typed_ast#111). However, PyPy is not used for linting/type-checking, only CPython is. Therefore, MyPy is not needed for PyPy. There are some slowdowns in CI: +2m30s mins for OS-/pip-dependencies — since no wheels are usually available for PyPy. And slower tests: 2m40s vs. 1m50s in CPython — my assumption is because JIT is not very useful for non-repetitive code fragments of tests (but should be faster at runtime; no proofs, though). Coverage for PyPy is disabled completely — it makes it disastrously slow (13m vs. 3m). The internet hints it is because tracing is not compatible with JIT (old articles from 2013-2015). Signed-off-by: Sergey Vasilyev <[email protected]> Signed-off-by: Anthony Nash <[email protected]>
following up from #97:
It looks like the inclusion of
codecs.h
was intended to be removed based on discussion on the previous issue?The text was updated successfully, but these errors were encountered: