-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Support PyPy (easy) #727
Comments
We should also add validation that this works as part of our CI pipeline. |
I was going to give this a shot but it seems travis does not yet have pypy 3.6 available. |
Azure Pipelines are planning on adding PyPy: microsoft/azure-pipelines-tasks#8514. (See #731 for adding Azure Pipelines with CPython to this repo.) |
I was actually targeting my PyPy sprint contributions in Dusseldorf with this in mind so I'm happy it works for you :) To be fully frank, not everything works on PyPy yet, the asyncio parts are failing in particular. |
Just as an FYI: I tried configuring this on Travis (see https://github.com/alexchamberlain/black/blob/pypy3/.travis.yml#L36). |
if you drop |
An update with pypy3.6 v7.2.0:
Wouldn't it be possible to install black without typed-ast on PyPy ? With |
For the record, the PR which introduced the |
I want to support PyPy but this is going to be a tough sell. PyPy3 is 3.6Well, PyPy3 is now targeting 3.6, working on 3.7. The functionality to parse Python 2 code into an AST on Python 3 was only added in Python 3.8.0. So @zsol is right that we could drop this dependency on Python 3.8 but that doesn't solve the problem for PyPy. We need a Python 2 ASTSadly, we need to be able to convert Python 2 code into AST form to do the sanity checks that Black is doing by default. This found many many bugs and is one of the reasons Black is being trusted by its users even though it's so young of a project. We need a fast Python 2 ASTThe reason we chose typed-ast over pure Python parsers on PyPI is that it's written in C and thus pretty fast. This is important because the sanity check is not really core functionality of Black. Sometimes I ponder if |
What about installing |
Please take a look. Works in my case: #1172 |
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
It works with pypy again: psf/black#727
It works with pypy again: psf/black#727
It works with pypy again: psf/black#727
* Update dependencies * Extract method to get chapter title * Remove spurious commas * Upgrade black and format It works with pypy again: psf/black#727 * Add model for cahpter display * Move ChapterIdSchema to id_schemas * Add schema for ChapterDisplay * Add methods for finding chapters for display * 'Refactored by Sourcery' (#176) Co-authored-by: Sourcery AI <> * Add route for chapter display * Remove Theia settings * Add title to ChapterDisplay * Add title to ChapterDisplay schema * Add intertext to line display * Get intertext from database * Add is_single_stage to ChapterDisplay Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
Please consider adding PyPy Trove classifiers, because apparently
black
works fine! At least on the recent PyPy (I tested PyPy3.6 v7.0 on macOS). I used version 18.9b0 ofblack
. See https://pypy.org/download.htmlThe text was updated successfully, but these errors were encountered: