Live data from Hacker News

We fixed f-string typos in popular Python repos

highertier.com

131–140 of 154 posts

Re: We fixed f-string typos in popular Python repos

#131
post #129
post #69

We've been one of 666 repos, and I'm not too happy of having our repo used as advertising space. Some thoughts: - I'm happy to receive fix-a-typo PRs from human users. In this case the other side demonstrated that they care by putting in a bit of manual effort, and a small PR often paves the way towards larger contributions. I also know that open source beginners get really excited about their first small contributio…

> I have never given consent to this and I have no choice to opt out. You have a public repository on GitHub. You are free to switch it to private, but otherwise this absolutely illogical. No one needs your consent to submit PRs to and highlight a public repository. This is equivalent to having a website and then getting angry about linking to it, or putting your artwork up for public viewing and then getting angry a…

> Actually, now that I think of it, it’s better comparable to someone bringing in a handheld scanner with a company name on it, scanning the artwork and then pointing out the tear.

No, it's more like somebody sending to your lab, uninvited, an impersonal inspection bot with another company's branding on it, which doesn't only disclose potential issues to you but advertises them across the whole cyberspace.

And in case of OSS this lab may be my tiny garage where me and friends tinker on stuff.

Choosing to make the results of our passion or work free for all to study and use should not come with a liability of having to deal with hordes of such bots.

Re: We fixed f-string typos in popular Python repos

#132
post #37

Earlier quoted context omitted.

You'd be surprised, people who expect python to be "smart" and "figure it out" might think that way.

As a beginner, maybe. But this is code in some of the biggest open-source Python repos in existence. Probably written by someone with a reasonable level of Python expertise.

... and yet?

Re: We fixed f-string typos in popular Python repos

#133
post #129

Earlier quoted context omitted.

> I have never given consent to this and I have no choice to opt out. You have a public repository on GitHub. You are free to switch it to private, but otherwise this absolutely illogical. No one needs your consent to submit PRs to and highlight a public repository. This is equivalent to having a website and then getting angry about linking to it, or putting your artwork up for public viewing and then getting angry a…

> Actually, now that I think of it, it’s better comparable to someone bringing in a handheld scanner with a company name on it, scanning the artwork and then pointing out the tear. No, it's more like somebody sending to your lab, uninvited, an impersonal inspection bot with another company's branding on it, which doesn't only disclose potential issues to you but advertises them across the whole cyberspace. And in cas…

Only if you establish your lab in a tent on the street and put a sign that says "for public display" on it.

> And in case of OSS this lab may be my tiny garage where me and friends tinker on stuff.

That's not OSS. OSS would be leaving the garage door open, putting your garage on Google Maps and freely allowing anyone to walk in and see what you're doing. That's OSS.

Then getting angry about it is what you and OP are doing.

Re: We fixed f-string typos in popular Python repos

#134
post #133

Earlier quoted context omitted.

> Actually, now that I think of it, it’s better comparable to someone bringing in a handheld scanner with a company name on it, scanning the artwork and then pointing out the tear. No, it's more like somebody sending to your lab, uninvited, an impersonal inspection bot with another company's branding on it, which doesn't only disclose potential issues to you but advertises them across the whole cyberspace. And in cas…

Only if you establish your lab in a tent on the street and put a sign that says "for public display" on it. > And in case of OSS this lab may be my tiny garage where me and friends tinker on stuff. That's not OSS. OSS would be leaving the garage door open, putting your garage on Google Maps and freely allowing anyone to walk in and see what you're doing. That's OSS. Then getting angry about it is what you and OP are…

> Only if you establish your lab in a tent on the street and put a sign that says "for public display" on it.

I don't get how your flawed analogy has evolved now. Care to expound?

Edit: I see your edit, thanks. Yes, if we leave garage doors open we still don't welcome these bots, sorry.

Re: We fixed f-string typos in popular Python repos

#135
post #133

Earlier quoted context omitted.

Only if you establish your lab in a tent on the street and put a sign that says "for public display" on it. > And in case of OSS this lab may be my tiny garage where me and friends tinker on stuff. That's not OSS. OSS would be leaving the garage door open, putting your garage on Google Maps and freely allowing anyone to walk in and see what you're doing. That's OSS. Then getting angry about it is what you and OP are…

> Only if you establish your lab in a tent on the street and put a sign that says "for public display" on it. I don't get how your flawed analogy has evolved now. Care to expound? Edit: I see your edit, thanks. Yes, if we leave garage doors open we still don't welcome these bots, sorry.

But that is not up to you to decide in the case of OSS.

Public websites get crawled and indexed hundreds of times per day and sometimes linked to even with criticism. Would you not say this is the same concept?

Re: We fixed f-string typos in popular Python repos

#136
post #129

Earlier quoted context omitted.

> I have never given consent to this and I have no choice to opt out. You have a public repository on GitHub. You are free to switch it to private, but otherwise this absolutely illogical. No one needs your consent to submit PRs to and highlight a public repository. This is equivalent to having a website and then getting angry about linking to it, or putting your artwork up for public viewing and then getting angry a…

> Actually, now that I think of it, it’s better comparable to someone bringing in a handheld scanner with a company name on it, scanning the artwork and then pointing out the tear. No, it's more like somebody sending to your lab, uninvited, an impersonal inspection bot with another company's branding on it, which doesn't only disclose potential issues to you but advertises them across the whole cyberspace. And in cas…

> No, it's more like somebody sending to your lab, uninvited, an impersonal inspection bot with another company's branding on it, which doesn't only disclose potential issues to you but advertises them across the whole cyberspace.

GitHub isn't your lab. It's Microsoft's lab. (They just rent out space free of charge.)

Re: We fixed f-string typos in popular Python repos

#137

> > We may be looking too deep into this but it seems like many developers think when string concatenation occurs it’s enough to declare the first string as an f-string and the other strings are turned into f-strings by osmosis. It doesn’t. We’re not suggesting this is the case for all developers that accidentally did this error, but interesting nonetheless. I highly doubt that people believed that f-strings worked t…

I wonder if an autoformatter like black is at play here.

Black doesn't change the semantics of code.

Re: We fixed f-string typos in popular Python repos

#138

Earlier quoted context omitted.

> Indeed, if "{value} is bad" can be automatically f-stringed by an external program automatically --- then why can't Python do this automatically -- so we can get rid of the f-string type as a required explicit declaration? Because it would break existing strings containing braces, such as those used with `str.format`, or string.Template, or literal Jinja templates, ...

Yes, my use case was "I always use F-strings" so these other breakages could not occur, by definition. I suppose it's not that much of a problem to run a program to preprocess source and add in the F But.. Python has a history of introducing new features that break old ones. That seems to me a balance between backward compatibility and future goodness. the "from future import auto-fstring" construct could do it... An…

> Yes, my use case was "I always use F-strings" so these other breakages could not occur, by definition.

Unless you're using any dependency at all, including the standard library.

> But.. Python has a history of introducing new features that break old ones.

It doesn't tho.

> That seems to me a balance between backward compatibility and future goodness.

That assumes "everything is an fstring" is considered "future goodness", which I'm not sure is a widely shared view.

> the "from future import auto-fstring" construct could do it...

That seems unlikely as the __future__ pseudo-package has generally been used to opt into hopefully future behaviour.

Given the Python 3 experience, somehow, I don't see "let's make all string literals into fstrings" happen any time soon, but hey feel free to create a PEP proposing that.

Alternatively, create your own import hook which does this swap before handing the module off of to the compiler.

Re: We fixed f-string typos in popular Python repos

#139
post #69

We've been one of 666 repos, and I'm not too happy of having our repo used as advertising space. Some thoughts: - I'm happy to receive fix-a-typo PRs from human users. In this case the other side demonstrated that they care by putting in a bit of manual effort, and a small PR often paves the way towards larger contributions. I also know that open source beginners get really excited about their first small contributio…

It's your repo and your choice. You can reject the PR.

Your repo is public so you can't prevent people and bots from looking into it and having opinions on it (even public ones).

Re: We fixed f-string typos in popular Python repos

#140
post #68
post #61

Earlier quoted context omitted.

We've blocked the bot after their script malfunctioned and they opened a second issue with exactly the same text ( https://github.com/mitmproxy/mitmproxy/issues/5286 ).

klyrs was right about the reply from me (a dev behdind Code Review Doctor) being dismissive in the issue. I apologise for that. FWIW my reaction was classic "expectations not meeting reality": weeks of work to do (what I thought) was a mutually beneficial helpful thing. I was naively not expecting non-positive responses and was ill prepared when you raised valid concerns I had not considered. Again, I am working on t…

No good deed goes unpunished.
Post reply on HN