967 captures
27 Nov 2017 - 24 Jan 2026
Aug SEP Oct
17
2019 2020 2021
success
fail

About this capture

COLLECTED BY

Collection: Twitter Outlinks

This is a Collection of URLs (and Outlinked URLs) extracted from a random feed of 1% of all Tweets.



TIMESTAMPS

The Wayback Machine - http://web.archive.org/web/20200917085505/https://devguide.python.org/
 

Navigation



index

next |


Python »
  Python Developer's Guide »  
|  







Python Developers Guide


This guide is a comprehensive resource for contributingtoPython  for both new and experienced contributors. It is maintained by the same community that maintains Python. We welcome your contributions to Python!

Quick Reference


Here are the basic steps needed to get set up and contribute a patch. This is meant as a checklist, once you know the basics. 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, on UNIX and Mac OS use:

./configure --with-pydebug && make -j



and on Windows use:

PCbuild\build.bat -e -d



See also more detailed instructions, how to install and build dependencies, and the platform-specific pages for UNIX, Mac OS, and Windows.


Run the tests:

./python -m test -j3



Onmost Mac OS X systems, replace ./python with ./python.exe. On Windows, use python.bat. With Python 2.7, replace test with test.regrtest.


Create a new branch where your work for the issue will go, e.g.:

git checkout -b fix-issue-12345 master



If an issue does not already exist, please create it. Trivial issues (e.g. typo fixes) do not require any issue to be created.


Once you fixed the issue, run the tests, run make patchcheck, and if everything is ok, commit.


Push the branch on your fork on GitHub and create a pull request. Include the issue number using bpo-NNNN in the pull request description. For example:

bpo-12345: Fix some bug in spam module






Note

First time contributors will need to sign the Contributor Licensing Agreement (CLA) as described in the Licensing section of this guide.



Quick Links


Here are some links that you probably will reference frequently while contributing to Python:


Issue tracker

Buildbot status

Where to Get Help

PEPs (Python Enhancement Proposals)

Git Bootcamp and Cheat Sheet



Status of Python branches

Branch Schedule Status First release End-of-life Release manager
master PEP 619 features 2021-10-04 TBD Pablo Galindo Salgado
3.9 PEP 596 bugfix 2020-10-05 TBD Łukasz Langa
3.8 PEP 569 bugfix 2019-10-14 2024-10 Łukasz Langa
3.7 PEP 537 security 2018-06-27 2023-06-27 Ned Deily
3.6 PEP 494 security 2016-12-23 2021-12-23 Ned Deily
3.5 PEP 478 security 2015-09-13 2020-09-13 Larry Hastings

The master branch is currently the future Python 3.10, and is the only branch that accepts new features. The latest release for each Python version can be found on the download page.

Status:
features:new features, bugfixes, and security fixes are accepted.
prerelease:feature fixes, bugfixes, and security fixes are accepted for the upcoming feature release.
bugfix:bugfixes and security fixes are accepted, new binaries are still released. (Also called maintenance mode or stable release)
security:only security fixes are accepted and no more binaries are released, but new source-only versions can be released
end-of-life:release cycle is frozen; no further changes can be pushed to it.

Dates in italic are scheduled and can be adjusted.

By default, the end-of-life is scheduled 5 years after the first release, but can be adjusted by the release manager of each branch. All Python 2 versions have reached end-of-life.

See also the Development Cycle page for more information about branches.


Contributing


We encourage everyone to contribute to Python and thats why we have put up this developers guide. If you still have questions after reviewing the material in this guide, then the Core Python Mentorship group is available to help guide new contributors through the process.

A number of individuals from the Python community have contributed to a series of excellent guides at Open Source Guides.

Core developers and contributors alike will find the following guides useful:


How to Contribute to Open Source

Building Welcoming Communities


Guide for contributing to Python:
New Contributors Documentarians Triagers Core Developers
Getting Started Helping with Documentation Issue Tracking How to Become a Core Developer
Where to Get Help Documenting Python Triaging an Issue Developer Log
Lifecycle of a Pull Request Style guide Helping Triage Issues Accepting Pull Requests
Running & Writing Tests reStructuredText Primer Experts Index Development Cycle
Fixing “easy” Issues (and Beyond) Translating   Core Developer Motivations and Affiliations
Following Python’s Development     Core Developers Office Hours
Git Bootcamp and Cheat Sheet      

Advanced tasks and topics for once you are comfortable:


Silence Warnings From the Test Suite

Fixing issues found by the buildbots

Coverity Scan

Helping out with reviewing open pull requests. See how to review a Pull Request.

Fixing easy Issues (and Beyond)


It is recommended that the above documents be read as needed. New contributors will build understanding of the CPython workflow by reading the sections mentioned in this table. You can stop where you feel comfortable and begin contributing immediately without reading and understanding these documents all at once. If you do choose to skip around within the documentation, be aware that it is written assuming preceding documentation has been read so you may find it necessary to backtrack to fill in missing concepts and terminology.


Proposing changes to Python itself


Improving Pythons code, documentation and tests are ongoing tasks that are never going to be finished, as Python operates as part of an ever-evolving system of technology. An even more challenging ongoing task than these necessary maintenance activities is finding ways to make Python, in the form of the standard library and the language definition, an even better tool in a developers toolkit.

While these kinds of change are much rarer than those described above, they do happen and that process is also described as part of this guide:


Adding to the Stdlib

Changing the Python Language



Other Interpreter Implementations


This guide is specifically for contributing to the Python reference interpreter, also known as CPython (while most of the standard library is written in Python, the interpreter core is written in C and integrates most easily with the C and C++ ecosystems).

There are other Python implementations, each with a different focus. Like CPython, they always have more things they would like to do than they have developers to work on them. Some major examples that may be of interest are:


PyPy: A Python interpreter focused on high speed (JIT-compiled) operation on major platforms

Jython: A Python interpreter focused on good integration with the Java Virtual Machine (JVM) environment

IronPython: A Python interpreter focused on good integration with the Common Language Runtime (CLR) provided by .NET and Mono

Stackless: A Python interpreter focused on providing lightweight microthreads while remaining largely compatible with CPython specific extension modules



Key Resources




Coding style guides


PEP 7 (Style Guide for C Code)

PEP 8 (Style Guide for Python Code)






Issue tracker


Meta tracker (issue tracker for the issue tracker)

Experts Index





Buildbot status


Source code


Browse online

Snapshot of the *master* branch

Daily OS X installer





PEPs (Python Enhancement Proposals)

Where to Get Help

Developer Log



Additional Resources



Anyone can clone the sources for this guide. See Helping with the Developers Guide.


Help with 


Exploring CPythons Internals

Changing CPythons Grammar

Design of CPythons Compiler

Design of CPythons Garbage Collector






Tool support


gdb Support

Dynamic Analysis with Clang

Various tools with configuration files as found in the Misc directory

Information about editors and their configurations can be found in the wiki





python.org maintenance

Search this guide



Code of Conduct


Please note that all interactions on Python Software Foundation-supported infrastructure is covered by the PSF Code of Conduct, which includes all infrastructure used in the development of Python itself (e.g. mailing lists, issue trackers, GitHub, etc.). In general this means everyone is expected to be open, considerate, and respectful of others no matter what their position is within the project.


Full Table of Contents




1. Getting Started

1.1. Install git

1.2. Get the source code

1.3. Compile and build

1.3.1. UNIX

1.3.2. Windows



1.4. Install dependencies

1.4.1. Linux

1.4.2. macOS and OS X



1.5. Regenerate configure

1.6. Troubleshoot the build

1.6.1. Avoid recreating auto-generated files



1.7. Editors and Tools

1.8. Directory structure



2. Where to Get Help

2.1. Ask #python-dev

2.2. Zulip

2.3. Core Mentorship

2.4. Core Developers Office Hours

2.5. Mailing Lists

2.6. File a Bug



3. Lifecycle of a Pull Request

3.1. Introduction

3.2. Quick Guide

3.3. Step-by-step Guide

3.3.1. Resolving Merge Conflicts



3.4. Making Good PRs

3.5. patchcheck

3.6. Making Good Commits

3.7. Licensing

3.8. Submitting

3.9. Converting an Existing Patch from b.p.o to GitHub

3.10. Reviewing

3.10.1. How to Review a Pull Request



3.11. Leaving a Pull Request Review on GitHub

3.12. Dismissing Review from Another Core Developer

3.13. Committing/Rejecting

3.14. Crediting



4. Running & Writing Tests

4.1. Running

4.1.1. Unexpected Skips



4.2. Writing

4.3. Benchmarks



5. Increase Test Coverage

5.1. Common Gotchas

5.2. Measuring Coverage

5.2.1. Using coverage.py

5.2.2. Using test.regrtest



5.3. Filing the Issue

5.4. Measuring coverage of C code with gcov and lcov



6. Helping with Documentation

6.1. Python Documentation

6.2. Helping with documentation issues

6.3. Proofreading

6.4. Helping with the Developers Guide

6.5. Developers Guide workflow



7. Documenting Python

7.1. Introduction

7.2. Style guide

7.2.1. Use of whitespace

7.2.2. Footnotes

7.2.3. Capitalization

7.2.4. Affirmative Tone

7.2.5. Economy of Expression

7.2.6. Security Considerations (and Other Concerns)

7.2.7. Code Examples

7.2.8. Code Equivalents

7.2.9. Audience



7.3. reStructuredText Primer

7.3.1. Paragraphs

7.3.2. Inline markup

7.3.3. Lists and Quotes

7.3.4. Source Code

7.3.5. Hyperlinks

7.3.6. Sections

7.3.7. Explicit Markup

7.3.8. Directives

7.3.9. Footnotes

7.3.10. Comments

7.3.11. Source encoding

7.3.12. Gotchas



7.4. Additional Markup Constructs

7.4.1. Meta-information markup

7.4.2. Module-specific markup

7.4.3. Information units

7.4.4. Showing code examples

7.4.5. Inline markup

7.4.6. Cross-linking markup

7.4.7. Paragraph-level markup

7.4.8. Table-of-contents markup

7.4.9. Index-generating markup

7.4.10. Grammar production displays

7.4.11. Substitutions



7.5. Building the documentation

7.5.1. Using make / make.bat

7.5.2. Using sphinx-build



7.6. Translating

7.6.1. Starting a new translation

7.6.2. PEP 545 summary:

7.6.3. How to get help

7.6.4. Translation FAQ





8. Silence Warnings From the Test Suite

9. Fixing easy Issues (and Beyond)

10. Issue Tracking

10.1. Using the Issue Tracker

10.1.1. Checking if a bug already exists

10.1.2. Reporting an issue

10.1.3. Understanding the issues progress and status



10.2. Disagreement With a Resolution on the Issue Tracker

10.3. Helping Triage Issues

10.3.1. Classifying Reports

10.3.2. Reviewing Patches

10.3.3. Finding an Issue You Can Help With



10.4. Gaining the Developer Role on the Issue Tracker

10.5. The Meta Tracker



11. Triaging an Issue

11.1. Python triage team

11.2. Becoming a member of the Python triage team

11.2.1. GitHub Labels for PRs



11.3. Fields in the Issue Tracker

11.3.1. Title

11.3.2. Type

11.3.3. Stage

11.3.4. Components

11.3.5. Versions

11.3.6. Priority

11.3.7. Keywords

11.3.8. Nosy List

11.3.9. Assigned To

11.3.10. Dependencies

11.3.11. Superseder

11.3.12. Status

11.3.13. Resolution

11.3.14. Mercurial Repository



11.4. Generating Special Links in a Comment

11.5. Checklist for Triaging



12. Following Pythons Development

12.1. Mailing Lists

12.2. Zulip

12.3. IRC

12.4. Blogs

12.5. Standards of behaviour in these communication channels

12.6. Setting Expectations for Open Source Participation

12.7. Additional Repositories



13. Porting Python to a new platform

14. How to Become a Core Developer

14.1. What it Takes

14.2. What it Means

14.3. Gaining Commit Privileges

14.3.1. Mailing Lists

14.3.2. Sign a Contributor Agreement

14.3.3. Pull Request merging



14.4. Responsibilities



15. Developer Log

15.1. Procedure for Granting or Dropping Access



16. Accepting Pull Requests

16.1. Is the PR ready to be accepted?

16.1.1. Does the test suite still pass?

16.1.2. Patch checklist



16.2. Handling Others Code

16.3. Contributor Licensing Agreements

16.4. Checking if the CLA has been received

16.5. Whats New and News Entries

16.6. Working with Git

16.6.1. Active branches

16.6.2. Backporting Changes to an Older Version

16.6.3. Reverting a Merged Pull Request





17. Development Cycle

17.1. Branches

17.1.1. In-development (main) branch

17.1.2. Maintenance branches

17.1.3. Security branches

17.1.4. End-of-life branches



17.2. Stages

17.2.1. Pre-alpha

17.2.2. Alpha

17.2.3. Beta

17.2.4. Release Candidate (RC)

17.2.5. Final



17.3. Repository Administration

17.3.1. Organization Repository Policy

17.3.2. Organization Owner Policy

17.3.3. Current Owners

17.3.4. Repository Administrator Role Policy

17.3.5. Current Administrators

17.3.6. Repository Release Manager Role Policy





18. Continuous Integration

18.1. Checking results of automatic builds

18.2. Stability

18.3. Flags-dependent failures

18.4. Ordering-dependent failures

18.5. Transient failures

18.6. Custom builders



19. Adding to the Stdlib

19.1. Adding to a pre-existing module

19.2. Adding a new module

19.2.1. Acceptable Types of Modules

19.2.2. Requirements

19.2.3. Proposal Process





20. Changing the Python Language

20.1. What Qualifies

20.2. PEP Process

20.3. Suggesting new features and language changes



21. Experts Index

21.1. Stdlib

21.2. Tools

21.3. Platforms

21.4. Miscellaneous

21.5. Documentation Translations



22. gdb Support

22.1. gdb 7 and later

22.2. gdb 6 and earlier

22.3. Updating auto-load-safe-path to allow test_gdb to run



23. Exploring CPythons Internals

23.1. CPython Source Code Layout

23.2. Additional References



24. Changing CPythons Grammar

24.1. Abstract

24.2. Checklist



25. Design of CPythons Compiler

25.1. Abstract

25.2. Parsing

25.3. Abstract Syntax Trees (AST)

25.4. Memory Management

25.5. Parse Tree to AST

25.6. Control Flow Graphs

25.7. AST to CFG to Bytecode

25.8. Introducing New Bytecode

25.9. Code Objects

25.10. Important Files

25.11. Known Compiler-related Experiments

25.12. References



26. Design of CPythons Garbage Collector

26.1. Abstract

26.2. Memory layout and object structure

26.3. Identifying reference cycles

26.3.1. Why moving unreachable objects is better



26.4. Destroying unreachable objects

26.5. Optimization: generations

26.5.1. Collecting the oldest generation



26.6. Optimization: reusing fields to save memory

26.7. Optimization: delay tracking containers



27. Updating standard library extension modules

28. Coverity Scan

28.1. Access to analysis reports

28.2. Building and uploading analysis

28.3. Known limitations

28.3.1. False positives

28.3.2. Intentionally



28.4. Modeling

28.5. Workflow

28.5.1. False positive and intentional issues

28.5.2. Positive issues



28.6. Contact



29. Dynamic Analysis with Clang

29.1. What is Clang?

29.2. What are Sanitizers?

29.3. Clang/LLVM Setup

29.3.1. Download, Build and Install



29.4. Python Build Setup

29.4.1. Building Python

29.4.2. Blacklisting (Ignoring) Findings





30. Running a buildbot worker

30.1. Preparing for buildbot worker setup

30.2. Setting up the buildbot worker

30.2.1. Conventional always-on machines

30.2.2. Latent workers



30.3. Buildbot worker operation

30.4. Required Ports

30.5. Required Resources

30.6. Security Considerations



31. Core Developer Motivations and Affiliations

31.1. Published entries

31.2. Goals of this page

31.3. Limitations on scope



32. Git Bootcamp and Cheat Sheet

32.1. Forking CPython GitHub Repository

32.2. Cloning a Forked CPython Repository

32.3. Listing the Remote Repositories

32.4. Setting Up Your Name and Email Address

32.5. Enabling autocrlf on Windows

32.6. Creating and Switching Branches

32.7. Deleting Branches

32.8. Staging and Committing Files

32.9. Reverting Changes

32.10. Stashing Changes

32.11. Committing Changes

32.12. Pushing Changes

32.13. Creating a Pull Request

32.14. Syncing with Upstream

32.15. Applying a Patch from Mercurial to Git

32.16. Downloading Others Patches

32.17. Accepting and Merging a Pull Request

32.18. Backporting Merged Changes

32.19. Editing a Pull Request Prior to Merging



33. Appendix: Topics

33.1. Basics for contributors

33.2. Core developers

33.3. Development workflow for contributors

33.4. Documenting Python and style guide

33.5. Issue tracking and triaging

33.6. Language development in depth

33.7. Testing and continuous integration






 




Table of Contents



Python Developers Guide

Quick Reference

Quick Links

Status of Python branches

Contributing

Proposing changes to Python itself

Other Interpreter Implementations

Key Resources

Additional Resources

Code of Conduct

Full Table of Contents



Sections



1. Getting Started

2. Where to Get Help

3. Lifecycle of a Pull Request

4. Running & Writing Tests

5. Increase Test Coverage

6. Helping with Documentation

7. Documenting Python

8. Silence Warnings From the Test Suite

9. Fixing easy Issues (and Beyond)

10. Issue Tracking

11. Triaging an Issue

12. Following Pythons Development

13. Porting Python to a new platform

14. How to Become a Core Developer

15. Developer Log

16. Accepting Pull Requests

17. Development Cycle

18. Continuous Integration

19. Adding to the Stdlib

20. Changing the Python Language

21. Experts Index

22. gdb Support

23. Exploring CPythons Internals

24. Changing CPythons Grammar

25. Design of CPythons Compiler

26. Design of CPythons Garbage Collector

27. Updating standard library extension modules

28. Coverity Scan

29. Dynamic Analysis with Clang

30. Running a buildbot worker

31. Core Developer Motivations and Affiliations

32. Git Bootcamp and Cheat Sheet

33. Appendix: Topics

Next topic


1. Getting Started

This Page



Show Source  







Navigation



index

next |


Python »
  Python Developer's Guide »  
|  



© Copyright 2011-2020, Python Software Foundation.  
The Python Software Foundation is a non-profit corporation. Please donate.
 
Last updated on Sep 16, 2020.  Found a bug?
 Created using Sphinx 1.8.5.