[Idle-dev] How does one offer patches?

Tal Einat taleinat at gmail.com
Mon Oct 11 02:19:16 CEST 2010

Bruce Sherwood wrote:
> Please forgive me for my ignorance, but how does one offer patches to
> IDLE? At http://vpython.org/vidle/patch.diff is a patch from the
> idlelib installed with Windows Python3.1.2 to vidle, where vidle
> incorporates the work done in the 2009 GSoC by Guilherme Polo, updated
> for Python 3. For details, see my posts of Sept. 14.
> I have several questions:
> 1) Is the idlelib shipped with Windows Python 3.1.2 the right base to
> diff against?
> 2) If not, against what base should I make the diff?
> 3) Is one diff for all of idlelib okay, or does one submit separate
> diff files for each file?
> 4) How/where do I formally offer this diff? I've never done this before.
> I should add that just today I remade the diff at
> http://vpython.org/vidle/patch.diff because I discovered that I'd
> missed an important correction Guilherme had made. The error is
> present in the Python 3.1.2 idlelib. In IOBinding.py one should delete
> this statement:
>     self.text.see("insert")
> Unless this statement is deleted, when you open a long file the first
> line is not seen; it's above the edit display. This can be pretty
> confusing.

Since IDLE is part of the Python stdlib, patches (and bugs and
features requests) should be posted on the Python bug tracker at
bugs.python.org. For major patches such as this, a mention on the
idle-dev mailing list is also helpful to get things moving along.

A patch should contain all relevant changes to all relevant files.
Ideally, a patch should encapsulate a single set of changes, and after
applying it everything should still work as expected. If several
unrelated changes have been made in VIDLE, it might be better to post
a patch for each change separately to make testing and reviewing
simpler. This can take a bit of work though, and it's better to post
one big patch than to post nothing at all.

Patches should preferably be based on a recent SVN revision. The more
recent the better, but next point is more important...

Patches should only be posted after having been well tested in order
to avoid frustrating the reviewers. From my experience, posting a
patch and later mentioning small fixes and edge-cases will often cause
a patch not to be accepted, because nobody will want to review it.
Posting a patch and requesting help in fixing a few last problems is
okay, of course, as long as you've recognized the problems and mention
them in advance.

I hope this helps! I'm itching to get Guilhereme's changes in!

- Tal Einat

More information about the IDLE-dev mailing list