Quick Reference¶
Here are the basic steps needed to get set up and open a pull request.
This is meant as a checklist and cheat-sheet, not a comprehensive guide. For complete instructions please see the setup guide.
Install and set up Git and other dependencies (see the Git Setup page for detailed information).
Fork the CPython repository to your GitHub account and get the source code using:
git clone https://github.com/<your_username>/cpython cd cpython
Build Python:
./configure --config-cache --with-pydebug && make -j $(nproc)
./configure --config-cache --with-pydebug && make -j8
PCbuild\build.bat -e -d
See also more detailed instructions, how to install and build dependencies, and the platform-specific pages for Unix, macOS, and Windows.
-
./python -m test -j3
./python.exe -m test -j8
Note
Most macOS systems use
./python.exein order to avoid filename conflicts with thePythondirectory..\python.bat -m test -j3
Create a new branch where your work for the issue will go, for example:
git checkout -b fix-issue-12345 main
If an issue does not already exist, please create it. Trivial issues (for example, typos) do not require an issue.
Push the branch on your fork on GitHub and create a pull request. Include the issue number using
gh-NNNNNNin the pull request title. For example:gh-12345: Fix some bug in spam module
Add a News entry into the
Misc/NEWS.d/directory as individual file. The news entry can be created by using blurb-it, or the blurb tool and itsblurb addcommand. Please read more aboutblurbin its repository.
Note
First time contributors will need to sign the Contributor Licensing Agreement (CLA) as described in the Licensing section of this guide.