[Idle-dev] How does one offer patches?

Tal Einat taleinat at gmail.com
Mon Oct 11 12:01:07 CEST 2010


Bruce Sherwood wrote:
> Thanks much, Tal. There has already been extensive testing of VIDLE.
> Guilherme's GSoC version was distributed under the name of VIDLE with
> VPython 2.6 or 2.7 during the past year with no hint of problems. As
> part of getting VPython to work with Python 3 I manually applied
> Guilherme's patches to the Python 3 idlelib to make a Python 3 VIDLE
> and the diff patch. I've been using Python 3 with VPython and VIDLE
> for several weeks on Windows with no problems, and I've used VIDLE a
> little on a Mac. However, I don't do anything fancy with VIDLE, so I
> have no way of knowing whether there could be problems with some
> features I don't use.
>
> Again, I'm ignorant: How/where do I get "a recent SVN revision"? Would
> it be any different from C:\Python3.1\Lib\idlelib? (I have Python3.1.2
> installed.)

Generally this is the best way to generate a patch for submission:

1) install an SVN client (on Windows I recommend TortoiseSVN)
2) checkout the Lib\idlelib directory from the Python subversion repository:
http://svn.python.org/projects/python/branches/py3k/Lib/idlelib
(I wrote that by hand, hopefully it is correct, otherwise use
TortoiseSVN's repository browser to get the right path.)
3) apply your changes (remember to "svn add" new files, and "svn
delete" removed files!)
4) create a patch (TortoiseSVN has a "create patch" option)

For your change, it might be better to:
1) don't check out the latest revision; instead, check out the
revision for 3.1.2 (check which revision the 3.1.2 tag was created, by
browsing the repository)
2) copy your changes
3) "svn update" to the latest revision, so you can locally merge in
the latest updates to IDLE
4) now create a patch and send it

> I don't feel competent to provide individual patches that are
> feature-specific, because I haven't studied IDLE in any great depth
> but rather concentrated just on getting Guilherme's work into the
> latest Python 3 idlelib. But if I'm told how to get something more
> recent than C:\Python3.1\Lib\idlelib I can produce a diff patch
> against it, as one large diff.

That would be fine, then. Try to describe all of the changes in the
description you write when submitting the patch, though.

> A detail: Guilherme produced a "Revert" plugin, and the corresponding
> file doesn't show up in the diff. How would I offer the new file?

If you use SVN to generate the patch, "svn add" the file(s) before
creating the patch.

> Bruce Sherwood

Good luck!

- Tal Einat


More information about the IDLE-dev mailing list