Python Developer’s 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!
| Sep | OCT | Nov |
| 29 | ||
| 2019 | 2020 | 2021 |
COLLECTED BY
Formed in 2009, the Archive Team (not to be confused with the archive.org Archive-It Team) is a rogue archivist collective dedicated to saving copies of rapidly dying or deleted websites for the sake of history and digital heritage. The group is 100% composed of volunteers and interested parties, and has expanded into a large amount of related projects for saving online and digital history.
History is littered with hundreds of conflicts over the future of a community, group, location or business that were "resolved" when one of the parties stepped ahead and destroyed what was there. With the original point of contention destroyed, the debates would fall to the wayside. Archive Team believes that by duplicated condemned data, the conversation and debate can continue, as well as the richness and insight gained by keeping the materials. Our projects have ranged in size from a single volunteer downloading the data to a small-but-critical site, to over 100 volunteers stepping forward to acquire terabytes of user-created data to save for future generations.
The main site for Archive Team is at archiveteam.org and contains up to the date information on various projects, manifestos, plans and walkthroughs.
This collection contains the output of many Archive Team projects, both ongoing and completed. Thanks to the generous providing of disk space by the Internet Archive, multi-terabyte datasets can be made available, as well as in use by the Wayback Machine, providing a path back to lost websites and work.
Our collection has grown to the point of having sub-collections for the type of data we acquire. If you are seeking to browse the contents of these collections, the Wayback Machine is the best first stop. Otherwise, you are free to dig into the stacks to see what you may find.
The Archive Team Panic Downloads are full pulldowns of currently extant websites, meant to serve as emergency backups for needed sites that are in danger of closing, or which will be missed dearly if suddenly lost due to hard drive crashes or server failures.
ArchiveBot is an IRC bot designed to automate the archival of smaller websites (e.g. up to a few hundred thousand URLs). You give it a URL to start at, and it grabs all content under that URL, records it in a WARC, and then uploads that WARC to ArchiveTeam servers for eventual injection into the Internet Archive (or other archive sites).
To use ArchiveBot, drop by #archivebot on EFNet. To interact with ArchiveBot, you issue commands by typing it into the channel. Note you will need channel operator permissions in order to issue archiving jobs. The dashboard shows the sites being downloaded currently.
There is a dashboard running for the archivebot process at http://www.archivebot.com.
ArchiveBot's source code can be found at https://github.com/ArchiveTeam/ArchiveBot.
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!
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.
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.
./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
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 its blurb add
command. Please read more about blurbindocumentation.
Note
First time contributors will need to sign the Contributor Licensing Agreement (CLA) as described in the Licensing section of this guide.
Here are some links that you probably will reference frequently while contributing to Python:
| 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 |
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.
We encourage everyone to contribute to Python and that’s why we have put up this developer’s 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:
Guide for contributing to Python:
Advanced tasks and topics for once you are comfortable:
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.
Improving Python’s 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 developer’s 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:
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:
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.
configurepatchcheckautocrlf on Windows