4

To become better Python programmer I decided to start contributing Python FOSS. I would like to start by contributing to smaller modules I use myself and this raises a question.

Should I just fork the project and create a pull request with small explanation what I did and why or should I contact the author first? I am asking because these smaller projects tend to be missing any contribution advice documents or sometimes documents altogether.

  • 2
    as a side note, I will welcome your contributions to my Python projects ;) – Philippe Ombredanne Nov 15 '16 at 0:07
  • I will keep that in mind @PhilippeOmbredanne :) – Kimmo Hintikka Nov 15 '16 at 9:23
5

If your goal is to contribute something back, then I would likely use this approach:

  1. submit a ticket with a feature request or bug
  2. then mention that you intend to work on this and ask for advice
  3. if available, contact the author(s) on IRC or a mailing list to further discuss your approach
  4. work out a patch and eventually submit a pull request referencing the key points of the discussions above (and at least a #ticket number)
2

Generally speaking, no project which allows pull requests (PR) should take umbrage if you submit a PR without talking to them first. However you need to know that not all developers handle PR in the same way. Some will merge it very quickly with a "Thanks!", some others will let it sit aside for a while before deciding to do anything, and some others will tell you "Good ideas, but let me write that differently." before committing their own patches and then closing your PR as obsolete.

With this in mind, it is never a bad idea to write some code and submit a PR if you are in one of the two following cases:

  • You need this code badly and are ready to use your own version of the software / module, instead of the official one. (After all, this is the spirit of free software: make the changes you need.)

  • Writing the code will take you less time than discussing the changes you want to introduce.

In all other cases, I would recommend to follow @PhilippeOmbredanne's advice as you could feel hurt if you spend time contributing a PR and it gets ignored or never merged.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.