Re: [Python-Dev] Hash collision security issue (now public)

2012-01-04 Thread Andrew Bennetts
On Wed, Jan 04, 2012 at 11:55:13AM +0100, Antoine Pitrou wrote: On Wed, 4 Jan 2012 09:59:15 +0200 Maciej Fijalkowski fij...@gmail.com wrote: Is it *really* a security issue? We knew all along that dicts are O(n^2) in worst case scenario, how is this suddenly a security problem?

Re: [Python-Dev] cpython (3.2): Issue #11956: Skip test_import.test_unwritable_directory on FreeBSD when run as

2011-10-08 Thread Andrew Bennetts
Stephen J. Turnbull wrote: Andrew Bennetts writes: No, that just means you shouldn't trust *root*. Which is where a VM is a very useful tool. You can have the “as root” environment for your tests without the need to have anything important trust it. Cameron acknowledges that he

Re: [Python-Dev] cpython (3.2): Issue #11956: Skip test_import.test_unwritable_directory on FreeBSD when run as

2011-10-06 Thread Andrew Bennetts
On Fri, Oct 07, 2011 at 08:27:01AM +1100, Cameron Simpson wrote: […] | running buildbot tests as root does not reflect the experience of | non-root users. It seems some tests need to be run both ways just for | correctness testing. | | (except I'd say all, not some) No. Terry is right

Re: [Python-Dev] Comments of the PEP 3151

2011-07-25 Thread Andrew Bennetts
Ethan Furman wrote: […] or EINTRError in my order of preference. Please not that last one! ;) Why not, exactly? When EINTR happens it's frequently a surprise, but programmers new to the concept can always search the web for advice on what causes it and how to deal with it (and after

Re: [Python-Dev] PEP 11: Dropping support for ten year old systems

2010-12-06 Thread Andrew Bennetts
Martin v. Löwis wrote: [...] Ubuntu: http://en.wikipedia.org/wiki/List_of_Ubuntu_releases#Version_timeline (http://www.ubuntu.com/products/ubuntu/release-cycle seems to be down) I'd prefer something more official than Wikipedia, though. https://wiki.ubuntu.com/Releases -Andrew.

Re: [Python-Dev] doctest, unicode repr, and 2to3

2010-03-05 Thread Andrew Bennetts
Martin v. Löwis wrote: [...] Any proposal appreciated. I propose screaming “help me, I have written a test suite using nothing but string matching assertions, what is wrong with me?!” -Andrew. ___ Python-Dev mailing list Python-Dev@python.org

Re: [Python-Dev] [RELEASED] Python 2.7 alpha 2

2010-01-12 Thread Andrew Bennetts
Martin v. Löwis wrote: [...] But a hypothetical 2.8 would also give people a way to move closer to py3k without giving up on using all their 2.x-only dependencies. How so? If they use anything that is new in 2.8, they *will* need to drop support for anything before it, no??? I think

Re: [Python-Dev] [RELEASED] Python 2.7 alpha 2

2010-01-11 Thread Andrew Bennetts
Martin v. Löwis wrote: [...] I've done a fair bit of 3.x porting, and I'm firmly convinced that 2.x can do nothing: [...] Inherently, 2.8 can't improve on that. I agree that there are limitations like the ones you've listed, but I disagree with your conclusion. Maybe you assume that it's just

Re: [Python-Dev] Easy way to detect filesystem case-sensitivity?

2009-05-07 Thread Andrew Bennetts
Antoine Pitrou wrote: Robert Kern robert.kern at gmail.com writes: Since one may have more than one filesystem side-by-side, this can't be just be a system-wide boolean somewhere. One would have to query the target directory for this information. I am not aware of the existence of

Re: [Python-Dev] BZR mirror and pushing to Launchpad

2009-03-08 Thread Andrew Bennetts
R. David Murray wrote: I just posted a (tiny) patch to the tracker, and for the exercise of it I thought I would push the branch out to Launchpad as suggested in the wiki (http://wiki.python.org/moin/Bazaar). It looks like it is uploading every file in the branch instead of the delta from the

Re: [Python-Dev] BZR mirror and pushing to Launchpad

2009-03-08 Thread Andrew Bennetts
Ross Light wrote: Yes, this is the expected behavior. Bazaar will upload all of the revisions since it is not stacking off of another branch. You could try using the Launchpad or Python.org mirrors as a stacking branch, as described here:

Re: [Python-Dev] BZR mirror and pushing to Launchpad

2009-03-08 Thread Andrew Bennetts
Ross Light wrote: [...] However, my understanding is that Launchpad will not automatically stack if you are using the Python.org branch; you must use the Launchpad mirror.  If you want to stack off the Python.org branch, then I think you need to manually stack. It is true that if the source

Re: [Python-Dev] Missing operator.call

2009-02-04 Thread Andrew Bennetts
Hrvoje Niksic wrote: Is there a reason why the operator module doesn't have an operator.call function? Python 2.6 adds operator.methodcaller. So you could use operator.methodcaller('__call__'), but that's not really any better than lambda x: x(). A patch to add operator.caller(*args,

Re: [Python-Dev] Partial function application 'from the right'

2009-01-29 Thread Andrew Bennetts
Mike Klaas wrote: On 29-Jan-09, at 3:21 PM, Daniel Stutzbach wrote: [...] The meaning which numpy attributes to Ellipsis is also the meaning that mathematical notation has attached to Ellipsis for a very long time. And yet, python isn't confined to mathematical notation. *, ** are both

Re: [Python-Dev] subprocess crossplatformness and async communication

2009-01-26 Thread Andrew Bennetts
Daniel Stutzbach wrote: [...] If you really need to communicate with multiple subprocesses (which so far has not been suggested as a motivating example), then you can use select(). Not portably. select() on windows only works on sockets. -Andrew.

Re: [Python-Dev] I would like an svn account

2009-01-03 Thread Andrew Bennetts
Barry Warsaw wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Jan 3, 2009, at 11:54 AM, Ulrich Eckhardt wrote: 1. I think that a patch can not e.g. capture a moved, renamed or deleted file. Further, it can not handle e.g. things like the executable bit or similar things that

Re: [Python-Dev] extremely slow exit for program having huge (45G) dict (python 2.5.2)

2008-12-20 Thread Andrew Bennetts
s...@pobox.com wrote: Steve Unfortunately there are doubtless programs out there that do rely Steve on actions being taken at shutdown. Indeed. I believe any code which calls atexit.register. Steve Maybe os.exit() could be more widely advertised, though ... That would be

Re: [Python-Dev] [Python-checkins] r66863 - python/trunk/Modules/posixmodule.c

2008-10-10 Thread Andrew Bennetts
Martin v. Löwis wrote: [...] There is a certain prevention already that later maintenance fixes don't break the earlier ones: those fixes typically get checked into the trunk also, where the tests do exist. So the committer would find out even before the patch gets to the maintenance branch.

Re: [Python-Dev] PEP: Consolidating names and classes in the `unittest`module (updated 2008-07-15)

2008-07-16 Thread Andrew Bennetts
Nick Coghlan wrote: [...] What did you think of the check idea at the end of the email? Test assertions: check(x).almost_equal(y) check(x).is_(y) check(x).in_(y) check(x).equals(y) Test negative assertions: check(x).not_almost_equal(y) check(x).is_not(y)

Re: [Python-Dev] Unittest PEP do's and don'ts (BDFL pronouncement)

2008-07-16 Thread Andrew Bennetts
Michael Foord wrote: Raymond Hettinger wrote: [...] If some people want to proceed down the path of useful additions, I challenge them to think bigger. Give me some test methods that improve my life. Don't give me thirty ways to spell something I can already do. I assert that... the

Re: [Python-Dev] Unittest PEP do's and don'ts (BDFL pronouncement)

2008-07-16 Thread Andrew Bennetts
Ben Finney wrote: Andrew Bennetts [EMAIL PROTECTED] writes: This one is easily solved by making assertRaises return the exception it caught. That breaks one simple feature of the unittest API: that all the test methods will either raise a failure asertion, or return None. How

Re: [Python-Dev] Unittest PEP do's and don'ts (BDFL pronouncement)

2008-07-16 Thread Andrew Bennetts
Ben Finney wrote: Andrew Bennetts [EMAIL PROTECTED] writes: [...] How is returning None a feature? A test method having exactly one meaning is a feature. If it's consistent across the API, the API retains a level of simplicity. Your reply makes no sense to me. I am proposing

Re: [Python-Dev] Unittest PEP do's and don'ts (BDFL pronouncement)

2008-07-16 Thread Andrew Bennetts
Ben Finney wrote: [...] I hope that clarifies it. The name of a thing, in Python especially, is very important; in an API, even more so. If the behaviour of the function isn't matched by the name, it's a poorly chosen name, a poorly designed function, or both. It doesn't really clarify it

Re: [Python-Dev] PEP: Consolidating names and classes in the `unittest` module (updated 2008-07-15)

2008-07-15 Thread Andrew Bennetts
Ben Finney wrote: Stephen J. Turnbull [EMAIL PROTECTED] writes: Ben Finney writes: Removal of ``assert*`` names There is no overwhelming consensus on whether to remove the ``assert*`` names or the ``fail*`` names; 7 to 1 is

Re: [Python-Dev] unittest's redundant assertions: asserts vs. failIf/Unlesses

2008-07-13 Thread Andrew Bennetts
Ben Finney wrote: Guido van Rossum [EMAIL PROTECTED] writes: [...] I like using only the assertKeyword variants, removing assert_, fail*, and assertEquals. I'm the opposite. I prefer the 'fail*' variants over the 'assert*' variants, because fail tells me exactly what the function will

Re: [Python-Dev] Py3k DeprecationWarning in stdlib

2008-06-26 Thread Andrew Bennetts
Brett Cannon wrote: On Wed, Jun 25, 2008 at 6:08 AM, Andrew Bennetts [...] Should I file a bug for this? If you want, but Benjamin plans to undocument this for users along with all other test.support stuff (which I agree with). Most of the APIs in test.support were just quickly written

Re: [Python-Dev] Py3k DeprecationWarning in stdlib

2008-06-25 Thread Andrew Bennetts
Nick Coghlan wrote: [...] I forgot this had already been added to the Python regression test machinery, so it will just be a matter of updating the relevant tests to use it: That's a nice surprise! I'm glad the standard library is growing facilities like this. I think it could be

Re: [Python-Dev] PEP: Lazy module imports and post import hook

2008-01-08 Thread Andrew Bennetts
Neal Becker wrote: Christian Heimes wrote: I've attached the first public draft of my first PEP. A working patch against the py3k branch is available at http://bugs.python.org/issue1576 Christian Note also that mercurial has demandimport http://www.selenic.com/mercurial/wiki/ And

Re: [Python-Dev] Signals+Threads (PyGTK waking up 10x/sec).

2007-12-11 Thread Andrew Bennetts
Guido van Rossum wrote: On Dec 11, 2007 4:54 PM, Jan Claeys [EMAIL PROTECTED] wrote: Op vrijdag 07-12-2007 om 07:26 uur [tijdzone -0700], schreef Sean Reifschneider: I would say that this is an optimization that helps a specific set of platforms, including one that I think we really

Re: [Python-Dev] Segfault

2007-08-20 Thread Andrew Bennetts
Maciej Fijalkowski wrote: IMHO this shouldn't segfault: import thread while 1: f = open(/tmp/dupa, w) thread.start_new_thread(f.close, ()) f.close() while it does on cpython 2.5.1 , linux box. May I consider this a bug? Yes, that's a bug. Please file it at

Re: [Python-Dev] make iter() return an empty iterator?

2007-08-03 Thread Andrew Bennetts
Georg Brandl wrote: Sure, you could use ``iter(())`` or ``iter([])``, but for consistency's sake wouldn't it make sense for ``iter()`` to return an empty iterator, as ``str()`` returns an empty string etc.? I had no idea that str() or int() would do that. file() certainly doesn't! :) I

Re: [Python-Dev] os.rename on windows

2007-04-30 Thread Andrew Bennetts
Raghuram Devarakonda wrote: Hi, I have submitted a patch (http://www.python.org/sf/1704547) that allows os.rename to replace the destination file if it exists, on windows. As part of discussion in the tracker, Martin suggested that python-dev should discuss the change. Does

Re: [Python-Dev] SoC proposal: multimedia library

2007-03-26 Thread Andrew Bennetts
Lino Mastrodomenico wrote: Hello everyone, I would like to participate as a student in google Summer of Code and I'm interested in feedback on a multimedia library for Python. The library I propose should have the following features: * the capability to extract and decompress video

Re: [Python-Dev] splitext('.cshrc')

2007-03-07 Thread Andrew Bennetts
Hi Martin, Martin v. Löwis wrote: [EMAIL PROTECTED] schrieb: [...] The use-cases being discussed here would be better served by having new APIs that do particular things and don't change existing semantics, though. For example, a guess_mime_type(path) function which could examine a

Re: [Python-Dev] splitext('.cshrc')

2007-03-07 Thread Andrew Bennetts
Josiah Carlson wrote: [...] Offer a new splitext that uses X on posix and Y on win32, but causes a DeprecationWarning with pointers to the two renamed functions that are available on both platforms. For people who want the old platform-specific functionality in previous and subsequent

Re: [Python-Dev] Python and the Linux Standard Base (LSB)

2006-11-30 Thread Andrew Bennetts
On Fri, Dec 01, 2006 at 12:42:42AM +0100, Jan Claeys wrote: Op donderdag 30-11-2006 om 21:48 uur [tijdzone +], schreef Steve Holden: I think the point is that some distros (Debian is the one that springs to mind most readily, but I'm not a distro archivist) require a separate install

Re: [Python-Dev] Dynamic module namspaces

2006-07-17 Thread Andrew Bennetts
On Sun, Jul 16, 2006 at 11:52:48PM -0700, Josiah Carlson wrote: Andrew Bennetts [EMAIL PROTECTED] wrote: [...] Have you seen the demandload hack that Mercurial uses? You can find it here: http://selenic.com/repo/hg?f=cb4715847a81;file=mercurial/demandload.py You can see

Re: [Python-Dev] Dynamic module namspaces

2006-07-16 Thread Andrew Bennetts
On Sat, Jul 15, 2006 at 03:38:04PM -0300, Johan Dahlin wrote: In an effort to reduce the memory usage used by GTK+ applications written in python I've recently added a feature that allows attributes to be lazy loaded in a module namespace. The gtk python module contains quite a few

Re: [Python-Dev] Source control tools

2006-06-18 Thread Andrew Bennetts
On Thu, Jun 15, 2006 at 10:33:49PM +0200, Alexander Schremmer wrote: On Thu, 15 Jun 2006 19:00:09 +0200, Jan Claeys wrote: Op di, 13-06-2006 te 10:27 +0200, schreef Alexander Schremmer: Bazaar-NG seems to reach limits already when working on it's own code/repository. Canonical uses

Re: [Python-Dev] need info for externally maintained modules PEP

2006-04-09 Thread Andrew Bennetts
On Sun, Apr 09, 2006 at 02:48:47PM -0400, Phillip J. Eby wrote: At 07:56 PM 4/9/2006 +0200, Martin v. Löwis wrote: [...] -1. These aren't external libraries; they are part of Python. They *were* external libraries. Also, many OS vendors nonetheless split the standard library into different

Re: [Python-Dev] buildbot vs. Windows

2006-02-21 Thread Andrew Bennetts
Martin v. Löwis wrote: [EMAIL PROTECTED] wrote: [...] So for multiplying this by 8, I would have to create 48 lines of Apache configuration, and use 24 TCP ports. This can be done, but it would take some time to implement. And who is going to look at the 24 pages? This last point is the

Re: [Python-Dev] threadsafe patch for asynchat

2006-02-08 Thread Andrew Bennetts
Donovan Baarda wrote: On Wed, 2006-02-08 at 02:33 -0500, Steve Holden wrote: Martin v. Löwis wrote: Tim Peters wrote: [...] What is the reason that people want to use threads when they can have poll/select-style message processing? Why does Zope require threads? IOW, why would

Re: [Python-Dev] str with base

2006-01-17 Thread Andrew Bennetts
On Tue, Jan 17, 2006 at 09:23:29AM -0500, Jason Orendorff wrote: It seems dumb to support *parsing* integers in weird bases, but not *formatting* them in weird bases. Not a big deal, but if you're going to give me a toy, at least give me the whole toy! The %b idea is a little disappointing

Re: [Python-Dev] str with base

2006-01-17 Thread Andrew Bennetts
Guido van Rossum wrote: [...] I'd propose bin() to stay in line with the short abbreviated names. [...] The binary type should have a 0b prefix. It seems odd to me to add both a builtin *and* new syntax for something that's occasionally handy, but only occasionally. If we're going to

Re: [Python-Dev] str with base

2006-01-16 Thread Andrew Bennetts
On Mon, Jan 16, 2006 at 07:44:44PM -0800, Alex Martelli wrote: Is it finally time in Python 2.5 to allow the obvious use of, say, str(5,2) to give '101', My reaction having read this far was huh?. It took some time (several seconds) before it occurred to me what you wanted str(5,2) to mean,

Re: [Python-Dev] str with base

2006-01-16 Thread Andrew Bennetts
On Mon, Jan 16, 2006 at 11:54:05PM -0500, Raymond Hettinger wrote: [...] That suggests that it would be better to simply add an int method: x.convert_to_base(7) This seems clear and simple to me. I like it. I strongly suspect the bright beginners Alex is interested in would have no

Re: [Python-Dev] str with base

2006-01-16 Thread Andrew Bennetts
On Mon, Jan 16, 2006 at 09:28:10PM -0800, Bob Ippolito wrote: On Jan 16, 2006, at 9:12 PM, Andrew Bennetts wrote: [...] x.convert_to_base(7) This seems clear and simple to me. I like it. I strongly suspect the bright beginners Alex is interested in would have no trouble using

Re: [Python-Dev] building a module catalogue with buildbot

2006-01-11 Thread Andrew Bennetts
On Thu, Jan 12, 2006 at 07:19:08AM +0100, Martin v. Löwis wrote: Fredrik Lundh wrote: My initial thought was that we could ask alpha testers to run this script on their alpha builds, and report back, but it just struck me that the buildbot already builds stuff on a couple of interesting

Re: [Python-Dev] buildbot

2006-01-10 Thread Andrew Bennetts
On Tue, Jan 10, 2006 at 09:15:56AM +0100, Martin v. Löwis wrote: [...] I know I could limit the Twisted webserver to localhost using firewalling/iptables (and I will need to if there is no other option); just having it generate static pages would have been more convenient. For this part at

Re: [Python-Dev] Directory for packages maintained outside the core (was Re: ElementTree - Why not part of the core?)

2005-12-12 Thread Andrew Bennetts
On Mon, Dec 12, 2005 at 01:32:31PM +, Michael Hoffman wrote: [Hye-Shik Chang] I think contrib is somewhat conventional for the purpose. [Steve Holden] Indeed, but conventionally *all* code in the Python core is contributed, and I think we need a name that differentiates

Re: [Python-Dev] removing nested tuple function parameters

2005-09-17 Thread Andrew Bennetts
On Sat, Sep 17, 2005 at 06:20:08PM -0700, Brett Cannon wrote: Is anyone truly attached to nested tuple function parameters; ``def fxn((a,b)): print a,b``? At one of the PyCon sprints Guido seemed okay with just having them removed when Jeremy asked about ditching them thanks to the pain they