2016-01-03 18:56:22 +08:00
|
|
|
======================
|
2008-08-24 06:25:40 +08:00
|
|
|
FAQ: Contributing code
|
|
|
|
======================
|
|
|
|
|
2021-04-15 02:23:21 +08:00
|
|
|
.. _new-contributors-faq:
|
|
|
|
|
2008-08-24 06:25:40 +08:00
|
|
|
How can I get started contributing code to Django?
|
2016-01-03 18:56:22 +08:00
|
|
|
==================================================
|
2008-08-24 06:25:40 +08:00
|
|
|
|
|
|
|
Thanks for asking! We've written an entire document devoted to this question.
|
2011-05-29 20:47:30 +08:00
|
|
|
It's titled :doc:`Contributing to Django </internals/contributing/index>`.
|
2008-08-24 06:25:40 +08:00
|
|
|
|
|
|
|
I submitted a bug fix in the ticket system several weeks ago. Why are you ignoring my patch?
|
2016-01-03 18:56:22 +08:00
|
|
|
============================================================================================
|
2008-08-24 06:25:40 +08:00
|
|
|
|
|
|
|
Don't worry: We're not ignoring you!
|
|
|
|
|
|
|
|
It's important to understand there is a difference between "a ticket is being
|
|
|
|
ignored" and "a ticket has not been attended to yet." Django's ticket system
|
|
|
|
contains hundreds of open tickets, of various degrees of impact on end-user
|
|
|
|
functionality, and Django's developers have to review and prioritize.
|
|
|
|
|
|
|
|
On top of that: the people who work on Django are all volunteers. As a result,
|
|
|
|
the amount of time that we have to work on the framework is limited and will
|
|
|
|
vary from week to week depending on our spare time. If we're busy, we may not
|
|
|
|
be able to spend as much time on Django as we might want.
|
|
|
|
|
2009-01-24 20:07:26 +08:00
|
|
|
The best way to make sure tickets do not get hung up on the way to checkin is
|
|
|
|
to make it dead easy, even for someone who may not be intimately familiar with
|
|
|
|
that area of the code, to understand the problem and verify the fix:
|
|
|
|
|
2011-10-14 08:12:01 +08:00
|
|
|
* Are there clear instructions on how to reproduce the bug? If this
|
2014-03-21 22:54:53 +08:00
|
|
|
touches a dependency (such as Pillow), a contrib module, or a specific
|
2011-10-14 08:12:01 +08:00
|
|
|
database, are those instructions clear enough even for someone not
|
|
|
|
familiar with it?
|
2009-01-24 20:07:26 +08:00
|
|
|
|
2011-10-14 08:12:01 +08:00
|
|
|
* If there are several patches attached to the ticket, is it clear what
|
|
|
|
each one does, which ones can be ignored and which matter?
|
2009-01-24 20:07:26 +08:00
|
|
|
|
2011-10-14 08:12:01 +08:00
|
|
|
* Does the patch include a unit test? If not, is there a very clear
|
|
|
|
explanation why not? A test expresses succinctly what the problem is,
|
|
|
|
and shows that the patch actually fixes it.
|
2009-01-24 20:07:26 +08:00
|
|
|
|
|
|
|
If your patch stands no chance of inclusion in Django, we won't ignore it --
|
|
|
|
we'll just close the ticket. So if your ticket is still open, it doesn't mean
|
|
|
|
we're ignoring you; it just means we haven't had time to look at it yet.
|
|
|
|
|
2016-11-26 03:03:11 +08:00
|
|
|
When and how might I remind the team of a patch I care about?
|
|
|
|
=============================================================
|
2009-01-24 20:07:26 +08:00
|
|
|
|
|
|
|
A polite, well-timed message to the mailing list is one way to get attention.
|
|
|
|
To determine the right time, you need to keep an eye on the schedule. If you
|
2016-11-26 03:03:11 +08:00
|
|
|
post your message right before a release deadline, you're not likely to get the
|
|
|
|
sort of attention you require.
|
2009-01-24 20:07:26 +08:00
|
|
|
|
|
|
|
Gentle IRC reminders can also work -- again, strategically timed if possible.
|
|
|
|
During a bug sprint would be a very good time, for example.
|
|
|
|
|
|
|
|
Another way to get traction is to pull several related tickets together. When
|
2023-04-05 16:31:40 +08:00
|
|
|
someone sits down to review a bug in an area they haven't touched for
|
2009-01-24 20:07:26 +08:00
|
|
|
a while, it can take a few minutes to remember all the fine details of how
|
|
|
|
that area of code works. If you collect several minor bug fixes together into
|
|
|
|
a similarly themed group, you make an attractive target, as the cost of coming
|
|
|
|
up to speed on an area of code can be spread over multiple tickets.
|
|
|
|
|
2016-11-26 03:03:11 +08:00
|
|
|
Please refrain from emailing anyone personally or repeatedly raising the same
|
2023-04-05 16:31:40 +08:00
|
|
|
issue over and over again. This sort of behavior will not gain you any
|
|
|
|
additional attention -- certainly not the attention that you need in order to
|
|
|
|
get your issue addressed.
|
2009-01-24 20:07:26 +08:00
|
|
|
|
|
|
|
But I've reminded you several times and you keep ignoring my patch!
|
2016-01-03 18:56:22 +08:00
|
|
|
===================================================================
|
2009-01-24 20:07:26 +08:00
|
|
|
|
|
|
|
Seriously - we're not ignoring you. If your patch stands no chance of
|
|
|
|
inclusion in Django, we'll close the ticket. For all the other tickets, we
|
|
|
|
need to prioritize our efforts, which means that some tickets will be
|
|
|
|
addressed before others.
|
|
|
|
|
|
|
|
One of the criteria that is used to prioritize bug fixes is the number of
|
|
|
|
people that will likely be affected by a given bug. Bugs that have the
|
|
|
|
potential to affect many people will generally get priority over those that
|
|
|
|
are edge cases.
|
|
|
|
|
2021-04-15 02:23:21 +08:00
|
|
|
Another reason that a bug might be ignored for a while is if the bug is a
|
|
|
|
symptom of a larger problem. While we can spend time writing, testing and
|
|
|
|
applying lots of little patches, sometimes the right solution is to rebuild. If
|
|
|
|
a rebuild or refactor of a particular component has been proposed or is
|
2009-01-24 20:07:26 +08:00
|
|
|
underway, you may find that bugs affecting that component will not get as much
|
2019-06-17 22:54:55 +08:00
|
|
|
attention. Again, this is a matter of prioritizing scarce resources. By
|
2009-01-24 20:07:26 +08:00
|
|
|
concentrating on the rebuild, we can close all the little bugs at once, and
|
|
|
|
hopefully prevent other little bugs from appearing in the future.
|
|
|
|
|
|
|
|
Whatever the reason, please keep in mind that while you may hit a particular
|
|
|
|
bug regularly, it doesn't necessarily follow that every single Django user
|
|
|
|
will hit the same bug. Different users use Django in different ways, stressing
|
|
|
|
different parts of the code under different conditions. When we evaluate the
|
|
|
|
relative priorities, we are generally trying to consider the needs of the
|
2019-06-17 22:54:55 +08:00
|
|
|
entire community, instead of prioritizing the impact on one particular user.
|
|
|
|
This doesn't mean that we think your problem is unimportant -- just that in the
|
|
|
|
limited time we have available, we will always err on the side of making 10
|
|
|
|
people happy rather than making a single person happy.
|
2021-04-15 02:23:21 +08:00
|
|
|
|
|
|
|
I'm sure my ticket is absolutely 100% perfect, can I mark it as "Ready For Checkin" myself?
|
|
|
|
===========================================================================================
|
|
|
|
|
|
|
|
Sorry, no. It's always better to get another set of eyes on a ticket. If
|
|
|
|
you're having trouble getting that second set of eyes, see questions above.
|