In an open-source project with hundreds of contributors around the world, it’s
important to manage communication efficiently so that work doesn’t get
duplicated and contributors can be as effective as possible.

Hence, our policy is for contributors to “claim” tickets in order to let other
developers know that a particular bug or feature is being worked on.

If you have identified a contribution you want to make and you’re capable of
fixing it (as measured by your coding ability, knowledge of Django internals
and time availability), claim it by following these steps:

If a ticket for this issue doesn’t exist yet, create one in our
ticket tracker.

If a ticket for this issue already exists, make sure nobody else has
claimed it. To do this, look at the “Owned by” section of the ticket.
If it’s assigned to “nobody,” then it’s available to be claimed.
Otherwise, somebody else may be working on this ticket. Either find another
bug/feature to work on, or contact the developer working on the ticket to
offer your help. If a ticket has been assigned for weeks or months without
any activity, it’s probably safe to reassign it to yourself.

Log into your account, if you haven’t already, by clicking “GitHub Login”
or “DjangoProject Login” in the upper left of the ticket page.

Claim the ticket by clicking the “assign to myself” radio button under
“Action” near the bottom of the page, then click “Submit changes.”

Примечание

The Django software foundation requests that anyone contributing more than
a trivial patch to Django sign and submit a Contributor License
Agreement, this ensures that the Django Software Foundation has clear
license to all contributions allowing for a clear license for all users.

Once you’ve claimed a ticket, you have a responsibility to work on that ticket
in a reasonably timely fashion. If you don’t have time to work on it, either
unclaim it or don’t claim it in the first place!

If there’s no sign of progress on a particular claimed ticket for a week or
two, another developer may ask you to relinquish the ticket claim so that it’s
no longer monopolized and somebody else can claim it.

If you’ve claimed a ticket and it’s taking a long time (days or weeks) to code,
keep everybody updated by posting comments on the ticket. If you don’t provide
regular updates, and you don’t respond to a request for a progress report,
your claim on the ticket may be revoked.

Of course, going through the steps of claiming tickets is overkill in some
cases.

In the case of small changes, such as typos in the documentation or
small bugs that will only take a few minutes to fix, you don’t need to jump
through the hoops of claiming tickets. Just submit your patch and be done with
it.

Of course, it is always acceptable, regardless whether someone has claimed it
or not, to submit patches to a ticket if you happen to have a patch ready.

Make sure that any contribution you do fulfills at least the following
requirements:

The code required to fix a problem or add a feature is an essential part
of a patch, but it is not the only part. A good patch should also include a
regression test to validate the behavior that has been
fixed and to prevent the problem from arising again. Also, if some tickets
are relevant to the code that you’ve written, mention the ticket numbers in
some comments in the test so that one can easily trace back the relevant
discussions after your patch gets committed, and the tickets get closed.

If the code associated with a patch adds a new feature, or modifies
behavior of an existing feature, the patch should also contain
documentation.

Check the “Has patch” box on the ticket and make sure the “Needs
documentation”, “Needs tests”, and “Patch needs improvement” boxes aren’t
checked. This makes the ticket appear in the “Patches needing review” queue
on the Development dashboard.

If a feature has been improved or modified in a backwards-incompatible way,
the old feature or behavior will be deprecated.

Sometimes Django will include a backport of a Python library that’s not
included in a version of Python that Django currently supports. When Django
no longer needs to support the older version of Python that doesn’t include
the library, the library will be deprecated in Django.

As the deprecation policy describes,
the first release of Django that deprecates a feature (A.B) should raise a
RemovedInDjangoXXWarning (where XX is the Django version where the feature
will be removed) when the deprecated feature is invoked. Assuming we have good
test coverage, these warnings are converted to errors when running the
test suite with warnings enabled:
python-Wallruntests.py. Thus, when adding a RemovedInDjangoXXWarning
you need to eliminate or silence any warnings generated when running the tests.

The first step is to remove any use of the deprecated behavior by Django itself.
Next you can silence warnings in tests that actually test the deprecated
behavior by using the ignore_warnings decorator, either at the test or class
level:

Use this checklist to review a pull request. If you are reviewing a pull
request that is not your own and it passes all the criteria below, please set
the “Triage Stage” on the corresponding Trac ticket to “Ready for checkin”.
If you’ve left comments for improvement on the pull request, please tick the
appropriate flags on the Trac ticket based on the results of your review:
“Patch needs improvement”, “Needs documentation”, and/or “Needs tests”. As time
and interest permits, core developers do final reviews of “Ready for checkin”
tickets and will either commit the patch or bump it back to “Accepted” if
further works need to be done. If you’re looking to become a core developer,
doing thorough reviews of patches is a great way to earn trust.

Looking for a patch to review? Check out the “Patches needing review” section
of the Django Development Dashboard.
Looking to get your patch reviewed? Ensure the Trac flags on the ticket are
set so that the ticket appears in that queue.