Differences between revisions 1 and 2
Revision 1 as of 2010-12-03 06:27:32
Size: 2482
Editor: 185
Comment: Create
Revision 2 as of 2010-12-03 06:30:26
Size: 2530
Editor: 185
Comment:
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
## page was renamed from Distutils/Fixing Bugs

How to fix bugs in Distutils

To implement new features without breaking third-party tools that rely on undocumented internals, distutils has been forked under the name distutils2 and developed outside of Python’s standard library, until it is complete enough to be merged back.

While the fork lasts, bugs need to be fixed both in distutils (Python py3k, 3.1 and 2.7) and distutils2 (one branch only, but compatible with 2.4 up to 2.7). This page documents the workflow to follow for fixing bugs.

Find a bug

Reports are filed in Python’s tracker, under two keywords: distutils and distutils2. They will soon be all listed under distutils2 to make things easier.

Set up distutils2

1) Install Mercurial.

2) Get distutils2: hg clone http://bitbucket.org/tarek/distutils2

3) Optional: install older Pythons for testing.

4) Install unittest2 (pip install unittest2, hg clone http://hg.python.org/unittest2 + unittest2.pth file, wget + python setup.py install, whatever way you prefer)

Fix the bug

Ideally, the first step is to write a test that fails, thus demonstrating the bug, and then change the code to make the test pass.

Usual guidelines apply:

* http://www.python.org/dev/workflow/ * http://www.python.org/dev/faq/#how-to-test-a-patch * http://www.python.org/dev/patches/ (minus the parted related to Subversion)

Share the fix

Use one of those two possible ways:

a) Produce a diff with “hg diff -r <your last revision> -r <main repo last revision> > fix-something.diff”. Attach it to the bug report.

b) If you have one clean changeset, you can post a link to a public repository on the bug report.

Iterate

Reply to feedback about the changes, update your patch, ping the maintainers (bug tracker user names tarek and eric.araujo) as needed.

Profit

Tarek or Éric will make sure the test suite passes with all supported version, push to the main repository, and backport to distutils.

Distutils/FixingBugs (last edited 2011-07-04 15:21:33 by 193)

Unable to edit the page? See the FrontPage for instructions.