Skip to content

Commit bdbb1d8

Browse files
committed
remove stdlib from the website compat overveiew
1 parent be49f1d commit bdbb1d8

File tree

1 file changed

+12
-45
lines changed

1 file changed

+12
-45
lines changed

pages/compat.rst

Lines changed: 12 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -6,48 +6,17 @@
66
.. link:
77
.. description:
88
9-
PyPy implements the Python language version 2.7.18. It supports all of the core
10-
language, passing Python test suite (with minor modifications that were
11-
already accepted in the main python in newer versions). It supports most
12-
of the commonly used Python `standard library modules`_; details below.
13-
14-
PyPy3 implements the Python language version 3.7.9. It has been released,
15-
but Python is a large language and it is quite possible that a few things are missing.
16-
17-
PyPy has support for the `CPython C API`_, however there are constructs
18-
that are `not compatible`. We strongly advise use of `CFFI`_
19-
instead. CFFI come builtin with PyPy. Many libraries will require
20-
a bit of effort to work, but there are known success stories. Check out
21-
PyPy blog for updates
22-
23-
C extensions need to be recompiled for PyPy in order to work. Depending on
24-
your build system, it might work out of the box or will be slightly harder.
25-
26-
Standard library modules supported by PyPy. Note that large parts of python
27-
library are implemented in pure python, so they don't have to be listed
28-
there. Please just check if it imports. If it imports, it should work:
29-
30-
``__builtin__``, ``__pypy__``, ``_ast``, ``_cffi_backend``, ``_codecs``,
31-
``_collections``, ``_continuation``, ``_csv``, ``_file``, ``_hashlib``,
32-
``_io``, ``_locale``, ``_lsprof``, ``_md5``, ``_minimal_curses``,
33-
``_multibytecodec``, ``_multiprocessing``, ``_numpypy``, ``_pickle_support``,
34-
``_pypyjson``, ``_random``, ``_rawffi``, ``_sha``, ``_socket``, ``_sre``,
35-
``_ssl``, ``_struct``, ``_testing``, ``_warnings``, ``_weakref``, ``array``,
36-
``binascii``, ``bz2``, ``cStringIO``, ``cmath``, ``cppyy``, ``cpyext``,
37-
``crypt``, ``errno``, ``exceptions``, ``fcntl``, ``gc``, ``imp``,
38-
``itertools``, ``marshal``, ``math``, ``mmap``, ``operator``, ``parser``,
39-
``posix``, ``pwd``, ``pyexpat``, ``pypyjit``, ``select``, ``signal``,
40-
``symbol``, ``sys``, ``termios``, ``thread``, ``time``, ``token``,
41-
``unicodedata``, ``zipimport``, ``zlib``
42-
43-
Supported, and written in pure Python:
44-
45-
``cPickle``, ``ctypes``, ``datetime``, ``dbm``, ``_functools``, ``grp``,
46-
``readline``, ``resource``, ``sqlite3``, ``syslog``
47-
48-
All modules that are pure python in CPython of course work.
49-
50-
The main difference that is not going to be fixed is that PyPy does
9+
Pure python code works, but there are a few differences with object lifetime
10+
management. Modules that use the `CPython C API`_ will probably work, but will
11+
not achieve a speedup via the JIT. We encourage library authors to use `CFFI`_
12+
instead.
13+
14+
If you are looking for how to use PyPy with the scientific python ecosystem,
15+
we encourage you to use `conda`_, since they repackage common libraries like
16+
scikit-learn and SciPy for PyPy.
17+
18+
The main difference in pure-python code that is not going to be fixed is that
19+
PyPy does
5120
not support refcounting semantics. The following code won't fill the
5221
file immediately, but only after a certain period of time, when the GC
5322
does a collection and flushes the output:
@@ -116,8 +85,6 @@ A more complete list of known differences is available at `our dev site`_.
11685

11786
.. _`CPython C API`: http://docs.python.org/c-api/
11887
.. _`CFFI`: http://cffi.readthedocs.org/
119-
.. _`not compatible`: http://doc.pypy.org/en/latest/cpython_differences.html#c-api-differences
120-
.. _`standard library modules`: http://docs.python.org/library/
88+
.. _`conda`: https://conda-forge.org/blog/posts/2020-03-10-pypy/
12189
.. _`our dev site`: http://pypy.readthedocs.org/en/latest/cpython_differences.html
12290
.. _`more details here`: http://pypy.readthedocs.org/en/latest/cpython_differences.html#differences-related-to-garbage-collection-strategies
123-
.. _`List of installable top 1000 PyPI packages`: http://packages.pypy.org

0 commit comments

Comments
 (0)