Live data from Hacker News

I fixed a bug in Python

nedbatchelder.com

21–27 of 27 posts

Re: I fixed a bug in Python

#21
post #2

link bait. actual title: i fixed an obscure bug in the cpython tokenizer.

I apologize for the "link bait." I didn't intend it as such, I was actually making fun of my "accomplishment," having contributed a tiny patch that fixed an obscure problem. I can see how it reads very differently on Hacker News...

Screw it— you have nothing to apologize for. It is because of people like you— fixing bugs big an small— that Python is a viable for big projects.

And to the dude who put it on his resume— good move. This helps a ton when someone is screening resumes.

Re: I fixed a bug in Python

#22
I wonder if PyPy has a similar bug - since PyPy can do a much better job at sandboxing Python programs, it might be especially important how it handles tokenization of those programs.

Re: I fixed a bug in Python

#23
post #10

This is great! It's so hard to find bugs in software tools because the conventional wisdom is that "it's never a bug in the compiler." Interesting that you had to create two patches for python 2.x and 3.x. (Frustrating, no?) Seems like you were able to get this submitted and fixed fairly quickly; the Python guys seem like a welcoming group. Has anyone else had experience contributing to this particular project?

FWIW, In my experience, the Python community has consistently been full of high-quality, very welcoming people. I don't understand why different parts of the open source world vary in such things, but they do seem to (in my limited experience) and the Python world is consistently awesome.

Your mileage may vary, of course...

(and, also fwiw, ned batchelder has a reputation for exemplifying that spirit – just trying to give credit where it's due.)

Re: I fixed a bug in Python

#24
post #2

link bait. actual title: i fixed an obscure bug in the cpython tokenizer.

I apologize for the "link bait." I didn't intend it as such, I was actually making fun of my "accomplishment," having contributed a tiny patch that fixed an obscure problem. I can see how it reads very differently on Hacker News...

Don't be silly. I have 2 super-trivial patches in the Linux kernel tree (one to fix an array-indexing bug, and another to blacklist a feature on a piece of broken hardware). They're simple patches, but I'm nonetheless really happy to have contributed to such a giant project. You shouldn't apologize for feeling the same and wanting to post to HN about it!

Re: I fixed a bug in Python

#25

Earlier quoted context omitted.

Completely guessing here, but it might be a tool thing. For example it's roughly what happens when I merge your code with git and then push it to subversion with git-svn.

What you describe is a probable scenario, but I think the real reason is in the patch process. Contributions in python don't appear to happen pull request style ("here's my repo with my changes, please merge that in"), but rather through submitting patches ("here's a .patch file with my changes, please apply that to tip"). So what happens isn't that someone with write access merges in changes (which, unless tools get…

Contributions to hg are working the same but the author isn't changed, so this is presumably some policy specific to CPython.

Re: I fixed a bug in Python

#26
post #20

Earlier quoted context omitted.

What you describe is a probable scenario, but I think the real reason is in the patch process. Contributions in python don't appear to happen pull request style ("here's my repo with my changes, please merge that in"), but rather through submitting patches ("here's a .patch file with my changes, please apply that to tip"). So what happens isn't that someone with write access merges in changes (which, unless tools get…

In git the patch process is the same but the original author is retained. Git stores the author separately from the committer. Does anyone know if hg has a similar author vs committer distinction? If so, perhaps the tool is displaying committers by default?

Looking into it today, it seems what a patch looks like depends on the tool. Git by default (using a command like git format-patch) adds a From: header value that contains the original author. Mercurial (using a command like hg export) includes the original author, but it shows up in commented lines.

However, looking at the devguide (http://docs.python.org/devguide/patch.html), they tell you to run hg diff, which creates a barebones patch file with no author metadata.

Re: I fixed a bug in Python

#27
post #10

This is great! It's so hard to find bugs in software tools because the conventional wisdom is that "it's never a bug in the compiler." Interesting that you had to create two patches for python 2.x and 3.x. (Frustrating, no?) Seems like you were able to get this submitted and fixed fairly quickly; the Python guys seem like a welcoming group. Has anyone else had experience contributing to this particular project?

I contributed a tiny fix for a bug in Tkinter, Python's built in GUI module. There's a contributor form to sign before your first contribution can be accepted, but everyone was friendly, and it was committed quickly once I'd returned the form.
Post reply on HN