FAQ:贡献代码

如何为 Django 贡献代码?

感谢反馈!我们已经为这个问题编写了一个详细的文档。参见:doc:Contributing to Django 1.

I submitted a bug fix several weeks ago. Why are you ignoring my contribution?

别担心:我们不会忽略你!

重要的是要明白,“工单被忽略”和“工单还没有被查看”是有区别的。 Django 的工单系统包含数百个打开的工单,对最终用户功能有不同程度的影响,Django 的开发人员必须检查并确定优先级。

另外:所有的 Django 工作都是由志愿者完成的。因此,我们花在这个框架上的总时间是有限的,它取决于我们的空闲时间,并且每周都会有所不同。如果我们很忙,我们可能无法在 Django 上花费太多的时间,尽管我们不愿如此。

确保工单在签入过程中不被挂起的最佳方法是让它所描述的问题通俗易懂,即便是对相关领域并不熟悉的人也能理解并修复问题:

  • 是否有明确的用以重现 bug 的说明? 是否触及依赖项(如Pillow),contrib 模块或特定数据库?这些说明对于不熟悉它的人是否也足够明确?
  • If there are several branches linked to the ticket, is it clear what each one does, which ones can be ignored and which matter?
  • Does the change 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 branch actually fixes it.

If your contribution is not suitable for inclusion in Django, we won't ignore it -- we'll 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.

When and how might I remind the team of a change I care about?

A polite, well-timed message in the forum/branch is one way to get attention. To determine the right time, you need to keep an eye on the schedule. If you post your message right before a release deadline, you're not likely to get the sort of attention you require.

温和的 IRC 提醒也可以发挥作用——还是如此:如果可能的话,选取一个合适的时间。 例如,在修复 bug 的冲刺期间就是一个不错的时机。

另一种增加影响力的方法是将几个相关的问题归并在一起。当某人开始审查长时间未涉及的某个领域的错误时,可能需要几分钟来回忆该代码区域的所有细节。如果你将几个小的错误修复归集到一个主题相似的组中,你就会成为一个有吸引力的目标,因为适应某个代码领域的成本可以分摊到多个问题上。

请不要私自给任何人发送电子邮件,也不要反复提出同样的问题。这种行为不会给你带来任何额外的关注,尤其不能获得解决你问题所需的关注。

But I've reminded you several times and you keep ignoring my contribution!

Seriously - we're not ignoring you. If your contribution is not suitable for inclusion in Django, we will close the ticket. For all the other tickets, we need to prioritize our efforts, which means that some tickets will be addressed before others.

确定 bug 修复优先级的标准之一是对于特定 bug 而言,可能会受到影响的人数。有可能影响许多人的 bug 一般会优先于那些边缘情况下的 bug。

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 changes, sometimes the right solution is to rebuild. If a rebuild or refactor of a particular component has been proposed or is underway, you may find that bugs affecting that component will not get as much attention. Again, this is a matter of prioritizing scarce resources. By concentrating on the rebuild, we can close all the little bugs at once, and hopefully prevent other little bugs from appearing in the future.

不管什么原因,请记住,你可能会经常碰到一个特定的 bug,但并不一定每个 Django 用户都会遇到同样的 bug。 不同的用户以不同的方式使用 Django,在不同的条件下执行代码的不同部分。 我们评估相对优先事项时,会考虑整个社区的需求,而不是优先考虑对某个特定用户的影响。 当然,这并不意味着我们认为你的问题不重要,只是在有限的可用时间内,我们总是希望让 10 个人的问题得到解决,而不是只解决 1 个人的问题。

我肯定我的工单百分之100绝对完成了,那么就能说我把这个工单认定为 ”通过批准" 了吗?

抱歉,不是这样的。在工单上得到更多的关注总是更好的事情。如果你在获得额外关注上遇到问题,那么回顾一下上面的这些问题。

Back to Top