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:
setup.py classifier@sobolevn Literally yesterday I thought about the same thing.
@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.
Are there any resources about typing and pypy? I have not touched pypy for several years now.
@sobolevn I have found almost nothing about using ones together.
Well, maybe we just have to wait. Should we close this issue?
@sobolevn Let's will leave it opened, maybe someone can work on this issue.
@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 https://github.com/lk-geimfari/mimesis/issues/381#issuecomment-359244973 0_o
We can just skip mypy module in pipfile for pypy and ignore mypy tests. :bulb:
@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: https://github.com/pypa/pipenv/issues/1334#issuecomment-359313432
@lk-geimfari no, that's not possible.
@lk-geimfari @sobolevn Yes, like says here https://github.com/pypa/pipenv/issues/1334#issuecomment-359313432 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 馃樅
@duckyou Have you tried it? Does it work? I mean the last solution which you showed above.
@lk-geimfari yes, its work!


@duckyou Can you create PR, please?
@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?)
@duckyou Sure. Better to benchmark it.
馃挕 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 :sweat_smile:
@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.
Here are too many problems with PyPy. Let's close it and come to back to it in next year :smile:.
Please, reconsider adding Cython.
It may cause too many problems within the building step.
And provide a little performance gain.
OK, les save it for dessert 馃樃