Skip to content
This repository has been archived by the owner on Mar 23, 2023. It is now read-only.

Standard libraries: guidelines for integration

Dylan Trotter edited this page Jun 29, 2017 · 2 revisions

Rather than rewrite each Python standard library specifically for Grumpy, we can borrow source code from other open source Python projects like CPython and PyPy. This document gives guidance about how to manage the integration of these kinds of libraries.

  • Prefer to copy libraries from CPython and PyPy to writing them from scratch
  • Prefer .py files from CPython to those from PyPy
  • CPython source files should come from the Python 2.7.12 release and should be put into the third_party/stdlib subdir of the Grumpy repo
  • PyPy source files should come from the default branch of the PyPy repo and should be put into the third_party/pypy subdir of the Grumpy repo
  • Grumpy does not support C extensions so libraries written this way in CPython will need to come from elsewhere
  • Ideally copied sources should be left in an unchanged state but if changes are required, they should be done in a way that produces a small diff
  • Code that does not work yet can be commented out from copied sources
  • Most CPython and PyPy standard library modules have tests and these tests should be included in the pull request for the module
Clone this wiki locally