Re: [Python-Dev] Possible patch for functools partial - Interested?
On Thu, May 13, 2010 at 13:30, Steven D'Aprano wrote:
> I'd support an immutable dict. partial objects already impose a
> significant (~ 30%) performance penalty:
>
from timeit import Timer
min(Timer('f(5)', 'f = lambda x: x').repeat())
> 0.93580079078674316
min(Timer('p(5)', 'from functools import partial; p = partial(lambda
> x: x)').repeat())
> 1.2715129852294922
>
> No need to make that worse if that can be avoided.
I've made a new patch, in which the keywords attribute is a read-only
proxy of the dictionary. I've used your benchmark, and I haven't found
any significant difference in execution times.
The patch is in the tracker (http://bugs.python.org/issue8699) and
Rietveld (http://codereview.appspot.com/1179044).
Daniel Urban
___
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
[Python-Dev] Python Web Developer @ Meebo (Perm in Mountain View, CA.)
Hello All, Meebo is looking for a bright, fun, dedicated software engineer who's interested in supporting a growing revenue team, loves a good challenge, and wants to learn about how advertising operations works from the inside out. In this role, you will be responsible for implementing and maintaining critical tools that support the ongoing adops infrastructure, ranging from content acquisition to ad inventory management. As a developer on the ads team, you'll be exposed to many business functions and you'll support and develop tools and systems to streamline the entire process. Our team is fun, friendly, and willing to work really hard to meet our goals. We love a great user experience, internal and external. *Responsibilities:* - Work with ads team to create and maintain mission critical support tools - Work closely with Sales and Marketing teams to elicit feedback from partners - Design and implement partner facing tools - Participate in product meetings to determine necessary systems - Scale and optimize with a growing revenue stream - Interface with both server and client side teams to leverage existing tools *What you will need:* - 3-5+ years of software engineering experience in Linux/Unix - BS, MS in Computer Science (or equivalent) - Strong expertise in Python, Perl, php, or other scripting languages - Knowledge of Django, PIG a plus - Database experience a plus - Ability to work with technical and non-technical teams, in an extremely fast-paced environment - Strong UI design sense with the ability to adapt, take critical feedback, and execute quickly on tasks *Big pluses:* - Experience working with large scale systems - Experience working with ad ops industry tools such as: Doubleclick, Atlas, 24/7, Salesforce, Dart Sales Manager, Solbright, Operative If at all interested OR know someone who might be interested please reply here [email protected]. Thanks, Kiko Griffin [email protected] ___ Python-Dev mailing list [email protected] http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Python Web Developer @ Meebo (Perm in Mountain View, CA.)
On 5/13/2010 7:26 PM, Kiko Griffin wrote: Dear Kiko - The python-dev mailing list and the gmane.comp.python.devel mirror are for development of Python and CPython. Job announcements are considered off-topic spam and constitute a dis-promotion for your firm. Please do not repeat. Please redirect your efforts to the python.org job board where you can post such announcements. http://www.python.org/community/jobs/ ___ Python-Dev mailing list [email protected] http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
[Python-Dev] robots exclusion file on the buildbot pages?
Hello, The buildbots are sometimes subject to a flood of "svn exception" errors. It has been conjectured that these errors are caused by Web crawlers pressing "force build" buttons without filling any of the fields (of course, the fact that we get such ugly errors in the buildbot results, rather than a clean error message when pressing the button, is a buildbot bug in itself). Couldn't we simply exclude all crawlers from the buildbot Web pages? Regards Antoine. ___ Python-Dev mailing list [email protected] http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] robots exclusion file on the buildbot pages?
On 05:48 pm, [email protected] wrote: Hello, The buildbots are sometimes subject to a flood of "svn exception" errors. It has been conjectured that these errors are caused by Web crawlers pressing "force build" buttons without filling any of the fields (of course, the fact that we get such ugly errors in the buildbot results, rather than a clean error message when pressing the button, is a buildbot bug in itself). Couldn't we simply exclude all crawlers from the buildbot Web pages? Most (all?) legitimate crawlers won't submit forms. Do you think there's a non-form link to the force build URL (which _will_ accept a GET request to mean the same thing as a POST)? One thing I have noticed is that spammers find these forms and submit them with garbage. We can probably suppose that such people are going to ignore a robots.txt file. Jean-Paul ___ Python-Dev mailing list [email protected] http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] robots exclusion file on the buildbot pages?
On Sat, 15 May 2010 17:57:28 - [email protected] wrote: > > One thing I have noticed is that spammers find these forms and submit > them with garbage. We can probably suppose that such people are going > to ignore a robots.txt file. So we could "just" fix the buggy buildbot code. Not that I want to do it myself :S ___ Python-Dev mailing list [email protected] http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] robots exclusion file on the buildbot pages?
On Sat, May 15, 2010 at 12:07 PM, Antoine Pitrou wrote: > On Sat, 15 May 2010 17:57:28 - > [email protected] wrote: >> >> One thing I have noticed is that spammers find these forms and submit >> them with garbage. We can probably suppose that such people are going >> to ignore a robots.txt file. > > So we could "just" fix the buggy buildbot code. > Not that I want to do it myself :S > I can help modify buildbot if you want, but I suppose I need a specification what precisely is a bug here. Not accepting forms with garbage? By default buildbot "force build" does not require forms to be filled and that's on purpose. ___ Python-Dev mailing list [email protected] http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] robots exclusion file on the buildbot pages?
Hi, > I can help modify buildbot if you want, but I suppose I need a > specification what precisely is a bug here. Not accepting forms with > garbage? By default buildbot "force build" does not require forms to > be filled and that's on purpose. Well, the "fix" would be to forbid an empty "Branch to build" since it doesn't point to anything buildable (even worse, the fact that the branch then ends up as None rather than an empty string produces an exception in buildbot code). I'm not sure what the process to get the fix in would be, but it probably involves discussing it with Martin :) Regards Antoine. ___ Python-Dev mailing list [email protected] http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] robots exclusion file on the buildbot pages?
> The buildbots are sometimes subject to a flood of "svn exception" > errors. It has been conjectured that these errors are caused by Web > crawlers pressing "force build" buttons without filling any of the > fields (of course, the fact that we get such ugly errors in the > buildbot results, rather than a clean error message when pressing > the button, is a buildbot bug in itself). Couldn't we simply exclude all > crawlers from the buildbot Web pages? Hmm. Before doing any modifications, I'd rather have a definite analysis on this. Are you absolutely certain that, when that happened, the individual builds that caused this svn exception where actually triggered over the web, rather than by checkin? When it happens next, please report exact date and time, and the build log URL. Due to log rotation, it would then be necessary to investigate that in a timely manner. Without any reference to the specific case, I'd guess that a flood of svn exceptions is caused due to an svn outage, which in turn might be caused when a build is triggered while the daily Apache restart happens (i.e. around 6:30 UTC+2). That said: /dev/buildbot has been disallowed for all robots for quite some time now: http://www.python.org/robots.txt There is really no point robots crawling the build logs, as they don't contain much useful information for a search engine. Regards, Martin ___ Python-Dev mailing list [email protected] http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] robots exclusion file on the buildbot pages?
On Sat, 15 May 2010 21:49:07 +0200 "Martin v. Löwis" wrote: > > Hmm. Before doing any modifications, I'd rather have a definite analysis > on this. Are you absolutely certain that, when that happened, the > individual builds that caused this svn exception where actually > triggered over the web, rather than by checkin? How can I be "absolutely certain"? As I said, it's a conjecture, and the suggested fix is just that: a suggestion. > When it happens next, please report exact date and time, and the build > log URL. Due to log rotation, it would then be necessary to investigate > that in a timely manner. Please take a look at http://www.python.org/dev/buildbot/trunk/. There are still a bunch of violet buildbots there. For example: http://www.python.org/dev/buildbot/builders/sparc%20Ubuntu%20trunk/builds/175 http://www.python.org/dev/buildbot/builders/sparc%20Ubuntu%20trunk/builds/176 Regards Antoine. ___ Python-Dev mailing list [email protected] http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] robots exclusion file on the buildbot pages?
For us at least no branch specified builds the default branch (trunk) and does not end up with exception in buildbot code. How about specifying the default branch in config file? On Sat, May 15, 2010 at 1:55 PM, Antoine Pitrou wrote: > On Sat, 15 May 2010 21:49:07 +0200 > "Martin v. Löwis" wrote: >> >> Hmm. Before doing any modifications, I'd rather have a definite analysis >> on this. Are you absolutely certain that, when that happened, the >> individual builds that caused this svn exception where actually >> triggered over the web, rather than by checkin? > > How can I be "absolutely certain"? As I said, it's a conjecture, and > the suggested fix is just that: a suggestion. > >> When it happens next, please report exact date and time, and the build >> log URL. Due to log rotation, it would then be necessary to investigate >> that in a timely manner. > > Please take a look at http://www.python.org/dev/buildbot/trunk/. There > are still a bunch of violet buildbots there. > For example: > http://www.python.org/dev/buildbot/builders/sparc%20Ubuntu%20trunk/builds/175 > http://www.python.org/dev/buildbot/builders/sparc%20Ubuntu%20trunk/builds/176 > > Regards > > Antoine. > ___ > Python-Dev mailing list > [email protected] > http://mail.python.org/mailman/listinfo/python-dev > Unsubscribe: > http://mail.python.org/mailman/options/python-dev/fijall%40gmail.com > ___ Python-Dev mailing list [email protected] http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] robots exclusion file on the buildbot pages?
Antoine Pitrou wrote: > The buildbots are sometimes subject to a flood of "svn exception" > errors. It has been conjectured that these errors are caused by Web > crawlers pressing "force build" buttons without filling any of the > fields (of course, the fact that we get such ugly errors in the > buildbot results, rather than a clean error message when pressing > the button, is a buildbot bug in itself). Couldn't we simply exclude all > crawlers from the buildbot Web pages? I caused a few of those myself yesterday updating my PPC buildbots. Apologies! Bill ___ Python-Dev mailing list [email protected] http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] robots exclusion file on the buildbot pages?
Maciej Fijalkowski wrote: > On Sat, May 15, 2010 at 12:07 PM, Antoine Pitrou wrote: > > On Sat, 15 May 2010 17:57:28 - > > [email protected] wrote: > >> > >> One thing I have noticed is that spammers find these forms and submit > >> them with garbage. We can probably suppose that such people are going > >> to ignore a robots.txt file. > > > > So we could "just" fix the buggy buildbot code. > > Not that I want to do it myself :S > > > > I can help modify buildbot if you want, but I suppose I need a > specification what precisely is a bug here. Not accepting forms with > garbage? By default buildbot "force build" does not require forms to > be filled and that's on purpose. I'd find it useful if the "branch" field was a choice pull-down listing valid branches, rather than a plain text field, and if the "revision" field always defaulted to "HEAD". Seems to me that since the form is coming from the buildmaster, that should be possible. Bill ___ Python-Dev mailing list [email protected] http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
[Python-Dev] buildbot svn exceptions again...
parc-leopard-1 (and most of the other builders) are failing the svn checkout with the following error: svn: PROPFIND of '/projects/python/trunk': Could not resolve hostname `svn.python.org': Temporary failure in name resolution (http://svn.python.org) When I log into that machine as "buildbot" and do the svn checkout manually using the following command /usr/bin/svn checkout --non-interactive --no-auth-cache --revision HEAD http://svn.python.org/projects/python/trunk build it works fine. Bill ___ Python-Dev mailing list [email protected] http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] robots exclusion file on the buildbot pages?
On Sat, 15 May 2010 13:03:59 PDT Bill Janssen wrote: > I'd find it useful if the "branch" field was a choice pull-down listing > valid branches, rather than a plain text field, and if the "revision" > field always defaulted to "HEAD". Seems to me that since the form is > coming from the buildmaster, that should be possible. Actually, I think that it does already default to HEAD if you leave it empty. Regards Antoine. ___ Python-Dev mailing list [email protected] http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] robots exclusion file on the buildbot pages?
>> Hmm. Before doing any modifications, I'd rather have a definite analysis >> on this. Are you absolutely certain that, when that happened, the >> individual builds that caused this svn exception where actually >> triggered over the web, rather than by checkin? > > How can I be "absolutely certain"? In the example you gave, the build log says "The web-page 'force build' button was pressed by '': " So ISTM that it's indeed certain that the build was triggered over the web, rather than by a checkin. > http://www.python.org/dev/buildbot/builders/sparc%20Ubuntu%20trunk/builds/175 AFAICT from the twistd logs, the user agent triggering this build was "Mozilla/4.7 [ja] (Win98; I)". It still may have been a bot; it was using a GET request, even though the form asks for a POST. The IP address points to some Japanese dialup network (reverse lookup reports address.dy.bbexcite.jp.) The bot probably has malicious intent: it has been using about 10 different user-agent strings, on various parts of the site. I have now blackholed this IP address (although it stopped contacting python.org around 8 hours ago, anyway). If desired, we could password-protect the "force build" forms. If that is to be done, some help from a buildbot expert on what to change specifically would be appreciated. Regards, Martin ___ Python-Dev mailing list [email protected] http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] robots exclusion file on the buildbot pages?
> I caused a few of those myself yesterday updating my PPC buildbots. > > Apologies! No need to apologize! these are not the ones Antoine is talking about. By convention, filling out the "Your name" field in a web build is recommended, so people know that this was an intentional build. I usually also fill out a reason. Regards, Martin ___ Python-Dev mailing list [email protected] http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] robots exclusion file on the buildbot pages?
> I'd find it useful if the "branch" field was a choice pull-down listing > valid branches, rather than a plain text field, and if the "revision" > field always defaulted to "HEAD". Seems to me that since the form is > coming from the buildmaster, that should be possible. Unfortunately, these forms are deeply hidden in the buildbot code. So I'd rather avoid editing them, or else upgrading to the next buildbot version becomes even more tedious. Regards, Martin ___ Python-Dev mailing list [email protected] http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] buildbot svn exceptions again...
Bill Janssen wrote: > parc-leopard-1 (and most of the other builders) are failing the svn > checkout with the following error: > > svn: PROPFIND of '/projects/python/trunk': Could not resolve hostname > `svn.python.org': Temporary failure in name resolution > (http://svn.python.org) > > When I log into that machine as "buildbot" and do the svn checkout > manually using the following command > > /usr/bin/svn checkout --non-interactive --no-auth-cache --revision > HEAD http://svn.python.org/projects/python/trunk build > > it works fine. That's a common OSX problem/bug. Processes occasionally lose the ability to resolve host names. Various theories float around what's causing this (most commonly, people expect that a "controlling terminal" must be present); my theory is this: There is a Mach port in the system that lets a process talk to the local resolver (lookupd, or whatever Apple's naming infrastructure is called today). For some reason, this port gets closed in a "background" process, perhaps because the parent process closed it when you logged out. Or the Kerberos credentials expired, or some such... In short, if some OS X expert could shed some light on this, it would be appreciated. It would then be good to add this to the wiki. See also http://buildbot.net/trac/wiki/UsingLaunchd http://developer.apple.com/mac/library/technotes/tn2005/tn2083.html Regards, Martin ___ Python-Dev mailing list [email protected] http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] robots exclusion file on the buildbot pages?
On 08:32 pm, [email protected] wrote: I'd find it useful if the "branch" field was a choice pull-down listing valid branches, rather than a plain text field, and if the "revision" field always defaulted to "HEAD". Seems to me that since the form is coming from the buildmaster, that should be possible. Unfortunately, these forms are deeply hidden in the buildbot code. So I'd rather avoid editing them, or else upgrading to the next buildbot version becomes even more tedious. Someone sufficiently interested in this feature could work with buildbot upstream to get the feature added to an upcoming release, though (obviously). Jean-Paul ___ Python-Dev mailing list [email protected] http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
[Python-Dev] frozendict (was: Possible patch for functools partial...)
> > > So I'm thinking either we make an > > immutable/hashable dict while we're at it, or store the keyword > > arguments as a tuple (which guarantees immutability), and only > > convert them back to a dict when you want to call the partial object > > (simpler, slower). > > I'd support an immutable dict. [...] I've set out to implement a frozendict (like frozenset) for use to store functools.keywords' attribute, and quickly realized I didn't think of an obvious flaw in that idea. A frozenset will only accept hashable members, but a frozendict can't afford this luxury for its values. I'm not sure how should I go about handling that, if at all. Should I implement a frozendict which will remain unhashable but support equality testing like a regular dict? A frozendict that is only hashable if all its values are hashable, like a tuple? Is the whole notion of a frozendict worthy, given this limitation? I'd be happy to hear python-dev's guidance on this. Cheers, - Yaniv ___ Python-Dev mailing list [email protected] http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
