Skip to content
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

pypy support #381

Closed
5 tasks
sobolevn opened this issue Jan 21, 2018 · 20 comments
Closed
5 tasks

pypy support #381

sobolevn opened this issue Jan 21, 2018 · 20 comments

Comments

@sobolevn
Copy link
Collaborator

sobolevn commented Jan 21, 2018

pypy has python3.5 support. http://doc.pypy.org/en/latest/release-v5.10.1.html

So, maybe we can try to support that?
It may give our users some performance increase.

Checklist:

  • will it work
  • does it require any changes
  • add new travis/appveyor testing targets
  • add setup.py classifier
  • update docs
@lk-geimfari
Copy link
Owner

@sobolevn Literally yesterday I thought about the same thing.

@lk-geimfari lk-geimfari added the enhancement Enhancement proposals label Jan 21, 2018
@lk-geimfari
Copy link
Owner

lk-geimfari commented Jan 21, 2018

@sobolevn So. I have tried to add support of PyPy and seems this is impossible (or almost). Here you can look at the report. As I can judge it's related to typing, possibly to mypy or typed_ast.

@sobolevn
Copy link
Collaborator Author

sobolevn commented Jan 21, 2018

Are there any resources about typing and pypy? I have not touched pypy for several years now.

@lk-geimfari
Copy link
Owner

@sobolevn I have found almost nothing about using ones together.

@sobolevn
Copy link
Collaborator Author

Well, maybe we just have to wait. Should we close this issue?

@lk-geimfari
Copy link
Owner

@sobolevn Let's will leave it opened, maybe someone can work on this issue.

@lk-geimfari lk-geimfari added the help wanted Nee help label Jan 21, 2018
@duckyou
Copy link
Contributor

duckyou commented Jan 21, 2018

@lk-geimfari Some time ago i also tested it with pypy3. It works, but mypy module not supported by pypy bcz cpython reasons like you say here #381 (comment) 0_o
We can just skip mypy module in pipfile for pypy and ignore mypy tests. 💡

@lk-geimfari
Copy link
Owner

lk-geimfari commented Jan 22, 2018

@duckyou How we can skip dependencies selectively? I mean, how we can skip mypy only on PyPY? Is there any way to remove package from Pipfile on the fly?

Something like this:

  - if [[ $TRAVIS_PYTHON_VERSION == "pypy3" ]]; then pipenv install --dev --skip mypy; fi

UPD:

We can try this: pypa/pipenv#1334 (comment)

@sobolevn
Copy link
Collaborator Author

@lk-geimfari no, that's not possible.

@duckyou
Copy link
Contributor

duckyou commented Jan 22, 2018

@lk-geimfari @sobolevn Yes, like says here pypa/pipenv#1334 (comment) we can filter deps:

mypy = {version="*", platform_python_implementation="!='PyPy'"}
# or
mypy = {version="*", markers="platform_python_implementation != 'PyPy'"}

(Other supported markers we can find here, or read PEP508 - Environment Markers)

But! Heres problem... pypy3 cant work with mypy bcz mypy have in deps typed-ast which should be compile with cpython. And if we filter mypy in pipfile and lock it, its deps not be sub-filtered 😞

If we want fix this issue we should filter mypy with typed-ast, like:

mypy = {version="*", platform_python_implementation="!='PyPy'"}
typed-ast = {version=">=1.1.0,<1.2.0", platform_python_implementation="!='PyPy'"}

If you know more canonical solution, please, share with me 😺

@lk-geimfari
Copy link
Owner

@duckyou Have you tried it? Does it work? I mean the last solution which you showed above.

@duckyou
Copy link
Contributor

duckyou commented Jan 22, 2018

@lk-geimfari yes, its work!

screenshot_2018-01-22_12-02-17
screenshot_2018-01-22_12-05-19

@lk-geimfari
Copy link
Owner

@duckyou Can you create PR, please?

@duckyou
Copy link
Contributor

duckyou commented Jan 22, 2018

@sobolevn @lk-geimfari Appveyor don't have pypy3 enviroment 😞 Need write install script... but its so necessary tests it on travis/appveyor? PyPy3 really more faster than cpython in this situation? Maybe first benchmark it?)

@lk-geimfari
Copy link
Owner

@duckyou Sure. Better to benchmark it.

@duckyou
Copy link
Contributor

duckyou commented Jan 23, 2018

💡 For speed increasing we can implement some functions with C or use Cython. But this decision excludes pypy support and maybe other exotic python implementations 🌵 Also may affect on windows supporting
missclick 😅

@duckyou duckyou closed this as completed Jan 23, 2018
@duckyou duckyou reopened this Jan 23, 2018
@lk-geimfari
Copy link
Owner

@duckyou I think that at this moments this is overhead. But if we find a really slow solution we can try to optimize ones, including using C.

@lk-geimfari
Copy link
Owner

lk-geimfari commented Jan 23, 2018

Here are too many problems with PyPy. Let's close it and come to back to it in next year 😄.

@sobolevn
Copy link
Collaborator Author

sobolevn commented Jan 23, 2018

Please, reconsider adding Cython.
It may cause too many problems within the building step.
And provide a little performance gain.

@duckyou
Copy link
Contributor

duckyou commented Jan 23, 2018

OK, les save it for dessert 😸

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

No branches or pull requests

3 participants