enthought / enthought/traits

Support PyPy?

Open
#1,568 0 comments 0 reactions 0 assignees View on GitHub
component: build type: enhancement
Dominant language
Python
Stars
462
Forks
90
PR merge metrics
No merged PRs in 30d

Description

I was rather surprised to discover that it's possible to at least install Traits on PyPy, that basic operations work, and that at least some of the test suite passes.

We don't have any strong need to support PyPy right now, but it might be interesting to establish just how much work supporting PyPy would entail.

```python
(pypy-testing) mdickinson@mirzakhani traits % python
Python 3.7.9 (7e6e2bb30ac5fbdbd443619cae28c51d5c162a02, Sep 03 2021, 06:59:13)
[PyPy 7.3.3-beta0 with GCC 4.2.1 Compatible Apple LLVM 11.0.3 (clang-1103.0.32.62)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
And now for something completely different: ``snow, snow! :-)''
>>>> import traits
>>>> from traits.api import *
>>>> class A(HasTraits):
.... foo = Int()
.... @observe("foo")
.... def _report_foo_change(self, event):
.... print("foo changed: ", event)
....
>>>> a = A()
>>>> a.foo = 34
foo changed: TraitChangeEvent(object=<__main__.A object at 0x00007f96e0bcc9f8>, name='foo', old=0, new=34)
```

Related: https://doc.pypy.org/en/latest/faq.html#do-c-extension-modules-work-with-pypy

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.