Fresh from the Python’s den: PyPy turns 7.1, Facebook open-sources Python Test Runner

Fresh from the Python’s den: PyPy turns 7.1, Facebook open-sources Python Test Runner

Python interpreter and CPython replacement PyPy has been released in version 7.1, which should give you a speed boost, by no longer converting strings to unicode internally. Instead, it now uses UTF-8 for representation.

Speaking of speed, long operations with an operand fitting into an int should need less computing time after the update. Register allocation in the JIT uses better heuristics now and d_type and d_name members of builtin descriptors get correctly initialised which should protect you from nasty segmentation errors.

The PyPy team also improved the ability to use the buffer protocol with ctype structures and arrays and updated the CFFI backend (C Foreign Function Interface) to version 1.12.2. Additions to the __pypy__ documentation are meant to help those looking into using the special features contained within that module. Details can be found in the project’s changelog.

PyPy 7.1 comes with interpreters for Python 2.7 and 3.6, though the latter is still in beta at this point.

Facebook fires starting gun for Python Test Runner

Social networking platform Facebook’s development team has again contributed to the open source community by making their test runner for Python ptr freely available. The use cases the engineers see are in “running Python test suites, optionally performing static type analysis, formatting and linting code, or checking and enforcing code coverage requirements”.

In case you wonder how the tool is different from other runners, ptr is mainly supposed to “allow developers to test multiple projects/modules in one Python environment through the use of a single test virtual environment”.
It crawls repositories to find Python projects that have unit tests already defined in their setup files. The tool then parses those to the ptr configuration and creates a python virtual environment in which it runs ATONCE test suites in parallel. Failed tests will be written to stdout.