Re: [Python-Dev] Dropping __init__.py requirement for subpackages

2006-04-26 Thread Donovan Baarda
surprise me if this change would introduce a slew of newbies complaining that I have /foo on my PYTHONPATH, why can't I import foo/bar/ because they're forgotten the (now) rarely required __init__.py -- Donovan Baarda ___ Python-Dev mailing list Python

[Python-Dev] Default Locale, was; Re: strftime/strptime locale funnies...

2006-04-06 Thread Donovan Baarda
On Wed, 2006-04-05 at 12:13 -0700, Brett Cannon wrote: On 4/5/06, Donovan Baarda [EMAIL PROTECTED] wrote: G'day, Just noticed on Debian (testing), Ubuntu (warty?), and RedHat (old) based systems Python's time.strptime() seems to ignore the environment's Locale and just uses C

[Python-Dev] strftime/strptime locale funnies...

2006-04-05 Thread Donovan Baarda
() analysis, but I can't seem to get non-C Locale's working at all... -- Donovan Baarda [EMAIL PROTECTED] http://minkirri.apana.org.au/~abo/ ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe

Re: [Python-Dev] Threading idea -- exposing a global thread lock

2006-03-14 Thread Donovan Baarda
/~guido/) ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/abo%40minkirri.apana.org.au -- Donovan Baarda [EMAIL PROTECTED] http

Re: [Python-Dev] Threading idea -- exposing a global thread lock

2006-03-14 Thread Donovan Baarda
. This is simpler as it avoids the separate thread, and ensures that threads pause until their debugging output is done. -- Donovan Baarda [EMAIL PROTECTED] http://minkirri.apana.org.au/~abo/ ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org

Re: [Python-Dev] bytes.from_hex()

2006-03-01 Thread Donovan Baarda
/class is acceptable (ie adding array length info etc) provided you keep to the spirit of the cast. Keep these two concepts separate and you should be right :-) -- Donovan Baarda [EMAIL PROTECTED] http://minkirri.apana.org.au/~abo/ ___ Python-Dev

Re: [Python-Dev] threadsafe patch for asynchat

2006-02-09 Thread Donovan Baarda
On Wed, 2006-02-08 at 15:14 +0100, Valentino Volonghi aka Dialtone wrote: On Wed, Feb 08, 2006 at 01:23:26PM +, Donovan Baarda wrote: I believe that Twisted does pretty much this with it's deferred stuff. It shoves slow stuff off for processing in a separate thread that re-syncs

Re: [Python-Dev] threadsafe patch for asynchat

2006-02-09 Thread Donovan Baarda
On Thu, 2006-02-09 at 13:12 +0100, Fredrik Lundh wrote: Donovan Baarda wrote: Here I think you meant that medusa didn't handle computation in separate threads instead. No, I pretty much meant what I said :-) Medusa didn't have any concept of a deferred, hence the idea of using one

Re: [Python-Dev] threadsafe patch for asynchat

2006-02-08 Thread Donovan Baarda
to process stuff. If ZEO is still using this approach I think switching to a twisted style approach would be a good idea. However, I suspect this would be a very painful refactor... -- Donovan Baarda [EMAIL PROTECTED] http://minkirri.apana.org.au/~abo

Re: [Python-Dev] syntactic support for sets

2006-02-06 Thread Donovan Baarda
On Fri, 2006-02-03 at 11:56 -0800, Josiah Carlson wrote: Donovan Baarda [EMAIL PROTECTED] wrote: [...] Nuff was a fairy... though I guess it depends on where you draw the line; should [1,2,3] be list(1,2,3)? Who is Nuff? fairynuff... :-) Along the lines of not every x line function

Re: [Python-Dev] syntactic support for sets

2006-02-06 Thread Donovan Baarda
On Fri, 2006-02-03 at 20:02 +0100, Martin v. Löwis wrote: Donovan Baarda wrote: Before set() the standard way to do them was to use dicts with None Values... to me the {1,2,3} syntax would have been a logical extension of the a set is a dict with no values, only keys mindset. I don't know

Re: [Python-Dev] syntactic support for sets

2006-02-06 Thread Donovan Baarda
On Mon, 2006-02-06 at 15:36 +0100, Ronald Oussoren wrote: On Monday, February 06, 2006, at 03:12PM, Donovan Baarda [EMAIL PROTECTED] wrote: On Fri, 2006-02-03 at 20:02 +0100, Martin v. Löwis wrote: Donovan Baarda wrote: Before set() the standard way to do them was to use dicts

Re: [Python-Dev] Octal literals

2006-02-03 Thread Donovan Baarda
use int(LITERAL,base=RADIX). For me, binary is far more useful than octal, so I'd be happy to let octal languish as legacy support, but I definitely want 0b10110101. -- Donovan Baarda [EMAIL PROTECTED] http://minkirri.apana.org.au/~abo/ ___ Python-Dev

Re: [Python-Dev] syntactic support for sets

2006-02-03 Thread Donovan Baarda
} is a set, f{1,2,3} is a frozen set... For Python 3000 you could extend this approach to lists and dicts; [1,2,3] is a list, f[1,2,3] is a frozen list or tuple, {1:'a',2:'b'} is a dict, f{1:'a',2:'b'} is a frozen dict which can be used as a key in other dicts... etc. -- Donovan Baarda [EMAIL

Re: [Python-Dev] syntactic support for sets

2006-02-03 Thread Donovan Baarda
On Fri, 2006-02-03 at 12:04 +, Donovan Baarda wrote: On Wed, 2006-02-01 at 13:55 -0500, Greg Wilson wrote: [...] Personally I'd like this. currently the set(...) syntax makes sets feel tacked on compared to tuples, lists, dicts, and strings which have nice built in syntax support. Many

Re: [Python-Dev] syntactic support for sets

2006-02-03 Thread Donovan Baarda
, or any of the other data structure-defining modules in the standard library into syntax. Nuff was a fairy... though I guess it depends on where you draw the line; should [1,2,3] be list(1,2,3)? -- Donovan Baarda [EMAIL PROTECTED] http://minkirri.apana.org.au/~abo

Re: [Python-Dev] str with base

2006-01-18 Thread Donovan Baarda
of supporting arbitrary bases. I don't think we need to support arbitrary bases, but if we did I would vote for .precision to mean .base for %d... ie; %3.3d % 5 == 12 I think supporting arbitrary bases for floats is way overkill and not worth considering. -- Donovan Baarda [EMAIL PROTECTED] http

Re: [Python-Dev] str with base

2006-01-17 Thread Donovan Baarda
silly :-) -- Donovan Baarda [EMAIL PROTECTED] http://minkirri.apana.org.au/~abo/ ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive

Re: [Python-Dev] [Python-checkins] commit of r41880 - python/trunk/Python/Python-ast.c

2006-01-03 Thread Donovan Baarda
in CVS/SVN and the problems they create. It does however mean that a fresh CVS/SVN checkout does have additional build requirements above and beyond building from a source distribution. -- Donovan Baarda [EMAIL PROTECTED] http://minkirri.apana.org.au/~abo

Re: [Python-Dev] [Doc-SIG] that library reference, again

2005-12-30 Thread Donovan Baarda
popularity among the developers and users. ...and if the LaTeX guys don't mind fixing bugs instead of applying patches and are handling the load... the status quo is fine by me, I'm happy not to do documentation :-) -- Donovan Baarda [EMAIL PROTECTED] http://minkirri.apana.org.au/~abo

Re: [Python-Dev] When do sets shrink?

2005-12-29 Thread Donovan Baarda
for this use-case... (don't empty, but fill with None... ugh!). My gut feeling is this heuristic will cause more pain than it would gain... -- Donovan Baarda [EMAIL PROTECTED] http://minkirri.apana.org.au/~abo/ ___ Python-Dev mailing list Python-Dev

Re: [Python-Dev] urlparse brokenness

2005-11-24 Thread Donovan Baarda
and unparsing user:[EMAIL PROTECTED]:port netloc's. Feel free to use/add/ignore it... http://minkirri.apana.org.au/~abo/projects/osVFS/netlocparse.py -- Donovan Baarda [EMAIL PROTECTED] http://minkirri.apana.org.au/~abo/ ___ Python-Dev mailing list

Re: [Python-Dev] (no subject)

2005-11-24 Thread Donovan Baarda
... -- Donovan Baarda [EMAIL PROTECTED] http://minkirri.apana.org.au/~abo/ ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Re: [Python-Dev] Event loops, PyOS_InputHook, and Tkinter

2005-11-10 Thread Donovan Baarda
, including Tkinter and wxWidgets, as well as it's own. It has been heavily re-factored many times, so if you want to see the current Python state of the art way of doing this, I'd be having a look at what they are doing. -- Donovan Baarda [EMAIL PROTECTED] http://minkirri.apana.org.au/~abo

Re: [Python-Dev] Pythonic concurrency

2005-10-10 Thread Donovan Baarda
be spent on inter-process messaging. -- Donovan Baarda [EMAIL PROTECTED] ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail

Re: [Python-Dev] Pythonic concurrency

2005-10-10 Thread Donovan Baarda
the programmer who bothered to grock async is more likely to get it right. -- Donovan Baarda [EMAIL PROTECTED] ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman

Re: [Python-Dev] Pythonic concurrency

2005-10-10 Thread Donovan Baarda
it was run on hardware fast enough to trigger that nasty race condition :-) -- Donovan Baarda [EMAIL PROTECTED] ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman

Re: [Python-Dev] reference counting in Py3K

2005-09-07 Thread Donovan Baarda
... -- Donovan Baardahttp://minkirri.apana.org.au/~abo/ ___ Python-Dev mailing list Python-Dev@python.org http

Re: [Python-Dev] 51 Million calls to _PyUnicodeUCS2_IsLinebreak() (???)

2005-08-24 Thread Donovan Baarda
huristic or two like if len(string) len(data)/8: copy data; else: reference data would go a long way towards avoiding that. In my limited playing around with manipulating of strings and benchmarking stuff, the biggest overhead is nearly always the copys. -- Donovan Baarda [EMAIL PROTECTED

Re: [Python-Dev] Fwd: Distributed RCS

2005-08-15 Thread Donovan Baarda
to a distributed RCS for my own branches because it would make it easier for others to share them. I think this probably is the best solution; it gives a reliable(?) centralised RCS for the trunk, but allows distributed development. -- Donovan Baarda [EMAIL PROTECTED

Re: [Python-Dev] PEP: Migrating the Python CVS to Subversion

2005-08-08 Thread Donovan Baarda
and merged when it is complete. -- Donovan Baarda [EMAIL PROTECTED] ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail

Re: [Python-Dev] PEP: Migrating the Python CVS to Subversion

2005-08-08 Thread Donovan Baarda
On Mon, 2005-08-08 at 17:51, Trent Mick wrote: [...] [Donovan Baarda wrote] On Mon, 2005-08-08 at 15:49, Trent Mick wrote: [...] You want to do checkins of code in a consisten state. Some large changes take a couple of days to write. During which one may have to do a couple minor things

Re: [Python-Dev] Syscall Proxying in Python

2005-08-02 Thread Donovan Baarda
On Tue, 2005-08-02 at 11:59, Gabriel Becedillas wrote: Donovan Baarda wrote: [...] Wow... you guys sure did it the hard way. If you had done it at the Python level, you would have had a much easier time of both implementing and updating it. [...] Hi, thanks for your reply. The problem I

Re: [Python-Dev] PEP: Migrating the Python CVS to Subversion

2005-08-01 Thread Donovan Baarda
undone by that. For a definition of properly, see; http://prcs.sourceforge.net/merge.html This is why I don't bother migrating any existing CVS projects to SVN; the benefits don't yet outweigh the pain of migrating. For new projects sure, SVN is a better choice than CVS. -- Donovan Baarda

Re: [Python-Dev] Adding the 'path' module (was Re: Some RFE for review)

2005-06-27 Thread Donovan Baarda
goodies in a stat). -- Donovan Baarda [EMAIL PROTECTED] ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Re: [Python-Dev] Recommend accepting PEP 312 -- Simple Implicit Lambda

2005-06-18 Thread Donovan Baarda
and contributing noise. -- Donovan Baarda ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Re: [Python-Dev] Re: switch statement

2005-04-25 Thread Donovan Baarda
benefits belong in implementation optimisations, not new bad syntax. -- Donovan Baarda [EMAIL PROTECTED] http://minkirri.apana.org.au/~abo/ ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe

Re: [Python-Dev] Re: switch statement

2005-04-25 Thread Donovan Baarda
On Mon, 2005-04-25 at 21:21 -0400, Brian Beck wrote: Donovan Baarda wrote: Agreed. I don't find any switch syntaxes better than if/elif/else. Speed benefits belong in implementation optimisations, not new bad syntax. I posted this 'switch' recipe to the Cookbook this morning, it saves

Re: [Python-Dev] Draft PEP to make file objects support non-blocking mode.

2005-03-21 Thread Donovan Baarda
On Mon, 2005-03-21 at 17:32 +1200, Greg Ewing wrote: On 18 March 2005, Donovan Baarda said: Many Python library methods and classes like select.select(), os.popen2(), and subprocess.Popen() return and/or operate on builtin file objects. However even simple applications of these methods

Re: [Python-Dev] Draft PEP to make file objects support non-blocking mode.

2005-03-21 Thread Donovan Baarda
On Tue, 2005-03-22 at 12:49 +1200, Greg Ewing wrote: Donovan Baarda wrote: Consider the following. This is pretty much the only way you can use popen2 reliably without knowing specific behaviours of the executed command; ... fcntl.fcntl(child_in, fcntl.F_SETFL, flags

Re: [Python-Dev] Draft PEP to make file objects support non-blocking mode.

2005-03-20 Thread Donovan Baarda
-blocking mode would have to use read/write instead of fread/fwrite. However, I don't think this is required. I know this PEP is kinda insignificant and minor. It doesn't save much, but it doesn't change much, and makes things a bit cleaner. -- Donovan Baarda [EMAIL PROTECTED] http

Re: No new features (was Re: [Python-Dev] Re: [Python-checkins]python/dist/src/Modules ossaudiodev.c, 1.35, 1.36)

2005-03-09 Thread Donovan Baarda
bug that needs fixing. Donovan Baardahttp://minkirri.apana.org.au/~abo/ ___ Python-Dev mailing list Python

Re: [Python-Dev] Re: No new features

2005-03-09 Thread Donovan Baarda
G'day again, From: Michael Hudson [EMAIL PROTECTED] Donovan Baarda [EMAIL PROTECTED] writes: Just my 2c; I don't mind new features in minor releases, provided they meet the following two criteria; 1) Don't break the old API! The new features must be pure extensions

Re: [Python-Dev] builtin_id() returns negative numbers

2005-02-18 Thread Donovan Baarda
:-) Donovan Baardahttp://minkirri.apana.org.au/~abo/ ___ Python-Dev mailing list Python-Dev@python.org http

Re: [Python-Dev] license issues with profiler.py and md5.h/md5c.c

2005-02-18 Thread Donovan Baarda
From: Martin v. Löwis [EMAIL PROTECTED] Donovan Baarda wrote: This patch keeps the current md5c.c, md5module.c files and adds the following; _hashopenssl.c, hashes.py, md5.py, sha.py. [...] If all we wanted to do was fix the md5 module If we want to fix the licensing issues with the md5

Re: [Python-Dev] license issues with profiler.py and md5.h/md5c.c

2005-02-17 Thread Donovan Baarda
, including the one I didn't code :-) -- Donovan Baarda [EMAIL PROTECTED] http://minkirri.apana.org.au/~abo/ ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options

[Python-Dev] Re: OpenSSL sha module / license issues with md5.h/md5c.c

2005-02-13 Thread Donovan Baarda
level EVP interface? The reason I ask is it would be pretty trivial to modify md5module.c to use the openssl API for any digest, and would be less risk than fresh-coding one. -- Donovan Baarda [EMAIL PROTECTED] http://minkirri.apana.org.au/~abo

Re: [Python-Dev] license issues with profiler.py and md5.h/md5c.c

2005-02-12 Thread Donovan Baarda
that openssl internally uses md5, so this way we wont link against two different md5sum implementations. Donovan Baardahttp://minkirri.apana.org.au/~abo

Re: [Python-Dev] license issues with profiler.py and md5.h/md5c.c

2005-02-10 Thread Donovan Baarda
be to including the source in Python sources. FWIW, I also have an md4sum module and md4c.c implementation that I'm happy to contribute to Python (done for pysysnc). -- Donovan Baarda [EMAIL PROTECTED] http://minkirri.apana.org.au/~abo/ ___ Python-Dev mailing

Re: [Python-Dev] license issues with profiler.py and md5.h/md5c.c

2005-02-10 Thread Donovan Baarda
On Thu, 2005-02-10 at 21:30 -0500, Bob Ippolito wrote: On Feb 10, 2005, at 9:15 PM, Donovan Baarda wrote: On Tue, 2005-02-08 at 11:52 -0800, Gregory P. Smith wrote: [...] One possible alternative would be to bring in something like PyOpenSSL http://pyopenssl.sourceforge.net/ and just

Re: [Python-Dev] license issues with profiler.py and md5.h/md5c.c

2005-02-10 Thread Donovan Baarda
On Thu, 2005-02-10 at 23:13 -0500, Bob Ippolito wrote: On Feb 10, 2005, at 9:50 PM, Donovan Baarda wrote: On Thu, 2005-02-10 at 21:30 -0500, Bob Ippolito wrote: [...] Only problem with this, is pyopenssl doesn't yet include any mdX or sha modules. My bad, how about M2Crypto http

Re: Moving towards Python 3.0 (was Re: [Python-Dev] Speed up function calls)

2005-01-31 Thread Donovan Baarda
On Tue, 2005-02-01 at 10:30 +1100, Donovan Baarda wrote: On Mon, 2005-01-31 at 15:16 -0500, Nathan Binkert wrote: Wouldn't it be nicer to have a facility that let you send messages between processes and manage concurrency properly instead? You'll need [...] A quick google search revealed

Re: [Python-Dev] Strange segfault in Python threads and linux kernel 2.6

2005-01-26 Thread Donovan Baarda
On Wed, 2005-01-26 at 01:53 +1100, Anthony Baxter wrote: On Wednesday 26 January 2005 01:01, Donovan Baarda wrote: In this case it turns out to be don't do exec() in a thread, because what you exec can have all it's signals masked. That turns out to be a hell of a lot of things; popen

Re: [Python-Dev] Strange segfault in Python threads and linux kernel 2.6

2005-01-20 Thread Donovan Baarda
On Thu, 2005-01-20 at 14:12 +, Michael Hudson wrote: Donovan Baarda [EMAIL PROTECTED] writes: On Wed, 2005-01-19 at 13:37 +, Michael Hudson wrote: Donovan Baarda [EMAIL PROTECTED] writes: [...] The main oddness about python threads (before 2.3) is that they run with all signals

Re: [Python-Dev] Strange segfault in Python threads and linux kernel 2.6

2005-01-19 Thread Donovan Baarda
On Wed, 2005-01-19 at 13:37 +, Michael Hudson wrote: Donovan Baarda [EMAIL PROTECTED] writes: [...] You've left out a very important piece of information: which version of Python you are using. I'm guessing 2.3.4. Can you try 2.4? Debian Python2.3 (2.3.4-18), Debian kernel-image-2.6.8-1

[Python-Dev] Strange segfault in Python threads and linux kernel 2.6

2005-01-18 Thread Donovan Baarda
submit a new bug report? Is there any other way I can help resolve this? BTW, built in file objects really could use better non-blocking support... I've got a half-drafted PEP for it... anyone interested in it? -- Donovan Baarda [EMAIL PROTECTED] http://minkirri.apana.org.au/~abo/ test-fop.py