Re: [Python-Dev] PEP 3146: Merge Unladen Swallow into CPython

2010-01-22 Thread Tony Nelson
On 10-01-22 02:53:21, Collin Winter wrote: > On Thu, Jan 21, 2010 at 11:37 PM, Glyph Lefkowitz > wrote: > > > > On Jan 21, 2010, at 6:48 PM, Collin Winter wrote: ... > > There's been a recent thread on our mailing list about a patch that > > dramatically reduces the memory footprint of multiproce

Re: [Python-Dev] PEP 376 : Changing the .egg-info structure

2009-05-15 Thread Tony Nelson
At 13:52 -0400 05/15/2009, P.J. Eby wrote: >At 08:32 AM 5/15/2009 +0200, Jeroen Ruigrok van der Werven wrote: >>Agreed. Within FreeBSD's ports the installed package registration >>gets a MD5 hash per file recorded. Size is less interesting though, >>since essentially this information is encapsulate

Re: [Python-Dev] PEP 383: Non-decodable Bytes in System C haracter Interfaces

2009-04-27 Thread Tony Nelson
At 16:09 + 04/27/2009, Antoine Pitrou wrote: >Stephen J. Turnbull xemacs.org> writes: >> >> I hate to break it to you, but most stages of mail processing have >> very little to do with SMTP. In particular, processing MIME >> attachments often requires dealing with file names. > >AFAIK, the fi

Re: [Python-Dev] PEP 383: Non-decodable Bytes in System Character Interfaces

2009-04-27 Thread Tony Nelson
At 23:39 -0700 04/26/2009, Glenn Linderman wrote: >On approximately 4/25/2009 5:35 AM, came the following characters from >the keyboard of Martin v. Löwis: >>> Because the encoding is not reliably reversible. >> >> Why do you say that? The encoding is completely reversible >> (unless we disagree on

Re: [Python-Dev] #!/usr/bin/env python --> python3 where applicable

2009-04-18 Thread Tony Nelson
At 20:51 -0700 04/18/2009, Steven Bethard wrote: >On Sat, Apr 18, 2009 at 8:14 PM, Benjamin Peterson >wrote: >> 2009/4/18 Nick Coghlan : >>> I see a few options: >>> 1. Abandon the "python" name for the 3.x series and commit to calling it >>> "python3" now and forever (i.e. actually make the decis

Re: [Python-Dev] Needing help to change the grammar

2009-04-12 Thread Tony Nelson
At 16:30 -0400 04/12/2009, Terry Reedy wrote: ... > Source in .pyb (python-brazil) is parsed with with your new parser, ... In case anyone ever does this again, I suggest that the extension be the language and optionally country code: .py_pt or .py_pt_BR -- _

Re: [Python-Dev] [Email-SIG] Dropping bytes "support" in json

2009-04-09 Thread Tony Nelson
At 22:26 -0400 04/09/2009, Barry Warsaw wrote: >There are really two ways to look at an email message. It's either an >unstructured blob of bytes, or it's a structured tree of objects. >Those objects have headers and payload. The payload can be of any >type, though I think it generally breaks do

Re: [Python-Dev] [Email-SIG] Dropping bytes "support" in json

2009-04-09 Thread Tony Nelson
At 22:38 -0400 04/09/2009, Barry Warsaw wrote: ... >So, what I'm really asking is this. Let's say you agree that there >are use cases for accessing a header value as either the raw encoded >bytes or the decoded unicode. What should this return: > > >>> message['Subject'] > >The raw bytes or the

Re: [Python-Dev] BLOBs in Pg (was: email package Bytes vs Unicode)

2009-04-09 Thread Tony Nelson
At 21:24 +0400 04/09/2009, Oleg Broytmann wrote: >On Thu, Apr 09, 2009 at 01:14:21PM -0400, Tony Nelson wrote: >> I use MySQL, but sort of intend to learn PostgreSQL. I didn't know that >> PostgreSQL has no real support for BLOBs. > > I think it has - BYTEA data typ

Re: [Python-Dev] email package Bytes vs Unicode (was Re: Dropping bytes "support" in json)

2009-04-09 Thread Tony Nelson
(email-sig dropped, as I didn't see Steve Holden's message there) At 12:20 -0400 04/09/2009, Steve Holden wrote: >Tony Nelson wrote: ... >> If you need the data from the message, by all means extract it and store it >> in whatever form is useful to the purpose of the d

[Python-Dev] email package Bytes vs Unicode (was Re: Dropping bytes "support" in json)

2009-04-09 Thread Tony Nelson
(email-sig added) At 08:07 -0400 04/09/2009, Steve Holden wrote: >Barry Warsaw wrote: ... >> This is an interesting question, and something I'm struggling with for >> the email package for 3.x. It turns out to be pretty convenient to have >> both a bytes and a string API, both for input and outp

Re: [Python-Dev] Integrate BeautifulSoup into stdlib?

2009-03-04 Thread Tony Nelson
At 2:56 PM + 3/4/09, Chris Withers wrote: >Vaibhav Mallya wrote: >> We do have HTMLParser, but that doesn't handle malformed pages well, and >> just isn't as nice as BeautifulSoup. > >Interesting, given that BeautifulSoup is built on HTMLParser ;-) In BeautifulSoup >= 3.1, yes. Before that (<

Re: [Python-Dev] Bug in SimpleHTTPRequestHandler.send_head?

2008-09-05 Thread Tony Nelson
At 1:19 PM +0100 9/5/08, Michael Foord wrote: >Hello Kim, > >Thanks for your post. The source code control used for Python is Subversion. > >Patches submitted to this list will unfortunately get lost. Please post >the bug report along with your comments and patch to the Python bug tracker: > >http:

Re: [Python-Dev] bsddb alternative (was Re: [issue3769] Deprecate bsddb for removal in 3.0)

2008-09-04 Thread Tony Nelson
At 7:37 AM -0700 9/4/08, C. Titus Brown wrote: >On Thu, Sep 04, 2008 at 10:29:10AM -0400, Tony Nelson wrote: ... >-> Shipping an application to end users is a different problem. Such packages >-> should include a private copy of Python as well as of any dependent >-> librari

Re: [Python-Dev] bsddb alternative (was Re: [issue3769] Deprecate bsddb for removal in 3.0)

2008-09-04 Thread Tony Nelson
At 6:10 AM -0500 9/4/08, [EMAIL PROTECTED] wrote: >>> Related but tangential question that we were discussing on the >>> pygr[0] mailing list -- what is the "official" word on a scalable >>> object store in Python? We've been using bsddb, but is there an >>> alternative? And what

Re: [Python-Dev] Further PEP 8 compliance issues in threading and multiprocessing

2008-09-01 Thread Tony Nelson
At 1:04 PM +1200 9/2/08, Greg Ewing wrote: >Antoine Pitrou wrote: > >> I don't see a problem for trivial functional wrappers to classes to be >> capitalized like classes. > >The problem is that the capitalization makes you >think it's a class, suggesting you can do things >with it that you actually

Re: [Python-Dev] Another Proposal: Run GC less often

2008-06-21 Thread Tony Nelson
At 11:28 PM +0200 6/21/08, none wrote: >Instead of collecting objects after a fixed number of allocations (700) ... I've seen this asserted several times in this thread: that GC is done every fixed number of allocations. This is not correct. GC is done when the surplus of allocations less deal

Re: [Python-Dev] Assignment to None

2008-06-09 Thread Tony Nelson
At 4:46 PM +0100 6/9/08, Michael Foord wrote: >Alex Martelli wrote: >> The problem is more general: what if a member (of some external >> object we're proxying one way or another) is named print (in Python < >> 3), or class, or...? To allow foo.print or bar.class would require >> pretty big chang

Re: [Python-Dev] Copying cgi.parse_qs() to the urllib.parse module

2008-05-12 Thread Tony Nelson
At 11:56 PM -0400 5/10/08, Fred Drake wrote: >On May 10, 2008, at 11:49 PM, Guido van Rossum wrote: >> Works for me. The other thing I always use from cgi is escape() -- >> will that be available somewhere else too? > > >xml.sax.saxutils.escape() would be an appropriate replacement, though >the loc

Re: [Python-Dev] Encoding detection in the standard library?

2008-04-21 Thread Tony Nelson
At 1:14 PM -0400 4/21/08, David Wolever wrote: >On 21-Apr-08, at 12:44 PM, [EMAIL PROTECTED] wrote: >> >> David> Is there some sort of text encoding detection module is the >> David> standard library? And, if not, is there any reason not >> to add >> David> one? >> No, there's not. I

Re: [Python-Dev] fixing tests on windows

2008-04-03 Thread Tony Nelson
At 3:52 PM -0600 4/3/08, Steven Bethard wrote: >On Thu, Apr 3, 2008 at 3:09 PM, Terry Reedy <[EMAIL PROTECTED]> wrote: ... >Or were you suggesting that there is some programmatic way for the >test suite to create directories that disallow the Search Service, >etc.? I'd think that files and direct

Re: [Python-Dev] Syntax suggestion for imports

2008-01-03 Thread Tony Nelson
At 3:20 PM +0100 1/3/08, Christian Heimes wrote: >Raymond Hettinger wrote: >> How about a new, simpler syntax: ... >> * import readline or emptymodule > >The syntax idea has a nice ring to it, except for the last idea. As >others have already said, the name emptymodule is too magic. > >The readlin

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

2007-12-08 Thread Tony Nelson
At 11:17 AM +0100 12/8/07, Johan Dahlin wrote: >Guido van Rossum wrote: >> Adam, perhaps at some point (Monday?) we could get together on >> #python-dev and interact in real time on this issue. Probably even >> better on the phone. This offer is open to anyone who is serious about >> getting this r

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

2007-12-08 Thread Tony Nelson
At 2:01 AM -0800 12/8/07, Guido van Rossum wrote: ... >I'm curious -- is there anyone here who understands why [Py]GTK is >using signals anyway? It's not like writing robust signal handling >code in C is at all easy or obvious. If instead of a signal a file >descriptor could be used, all problems

Re: [Python-Dev] Removing the GIL (Me, not you!)

2007-09-14 Thread Tony Nelson
At 3:30 PM -0400 9/14/07, Jean-Paul Calderone wrote: >On Fri, 14 Sep 2007 14:13:47 -0500, Justin Tulloss <[EMAIL PROTECTED]> wrote: >>Your idea can be combined with the maxint/2 initial refcount for >>> non-disposable objects, which should about eliminate thread-count updates >>> for them. >>> -- >

Re: [Python-Dev] Removing the GIL (Me, not you!)

2007-09-14 Thread Tony Nelson
At 1:51 AM -0500 9/14/07, Justin Tulloss wrote: >On 9/14/07, Adam Olsen <[EMAIL PROTECTED]> wrote: > >> Could be worth a try. A first step might be to just implement >> the atomic refcounting, and run that single-threaded to see >> if it has terribly bad effects on perform

Re: [Python-Dev] Adventures with x64, VS7 and VS8 on Windows

2007-05-29 Thread Tony Nelson
At 1:14 PM + 5/29/07, Kristján Valur Jónsson wrote: >> -Original Message- >> >> Microsoft's command line cannot cope with two pathnames that must be >> quoted, so if the command path itself must be quoted, then no argument >> to >> the command can be quoted. There are tricky hacks that

Re: [Python-Dev] Adventures with x64, VS7 and VS8 on Windows

2007-05-26 Thread Tony Nelson
At 12:20 PM + 5/26/07, Kristján Valur Jónsson wrote: >> -Original Message- >> From: Alexey Borzenkov [mailto:[EMAIL PROTECTED] >> Sent: Wednesday, May 23, 2007 20:36 >> To: Kristján Valur Jónsson >> Cc: Martin v. Löwis; Mark Hammond; [EMAIL PROTECTED]; python- >> [EMAIL PROTECTED] >> Su

Re: [Python-Dev] Official version support statement

2007-05-11 Thread Tony Nelson
At 12:58 AM +0200 5/12/07, Martin v. Löwis wrote: >> "The Python Software Foundation officially supports the current >> stable major release of Python. By "supports" we mean that the PSF >> will produce bug fix releases of this version, currently Python 2.5. >> We may release patches for earlier v

Re: [Python-Dev] datetime module enhancements

2007-03-11 Thread Tony Nelson
At 5:45 PM +1300 3/11/07, Greg Ewing wrote: >Jon Ribbens wrote: > >> What do you feel "next Tuesday plus 12 hours" means? ;-) > >I would say it's meaningless. My feeling is that subtracting >two dates should give an integer number of days, and that is >all you should be allowed to add to a date. A

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

2007-03-08 Thread Tony Nelson
At 2:16 PM -0500 3/8/07, Phillip J. Eby wrote: >At 11:53 AM 3/8/2007 +0100, Martin v. Löwis wrote: >>That assumes there is a need for the old functionality. I really don't >>see it (pje claimed he needed it once, but I remain unconvinced, not >>having seen an actual fragment where the old behavior

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

2006-12-23 Thread Tony Nelson
At 8:42 PM +0100 12/2/06, Martin v. Löwis wrote: >Jan Claeys schrieb: >> Like I said, it's possible to split Python without making things >> complicated for newbies. > >You may have that said, but I don't believe its truth. For example, >most distributions won't include Tkinter in the "standard" Py

Re: [Python-Dev] Polling with Pending Calls?

2006-12-04 Thread Tony Nelson
At 12:48 PM -0500 12/4/06, Tony Nelson wrote: >I think I have a need to handle *nix signals through polling in a library. >It looks like chaining Pending Calls is almost the way to do it, but I see >that doing so would make the interpreter edgy. ... Bah. Sorry to have put noise on

Re: [Python-Dev] Polling with Pending Calls?

2006-12-04 Thread Tony Nelson
At 6:07 PM + 12/4/06, Gustavo Carneiro wrote: >This patch may interest you: >http://www.python.org/sf/1564547 > >Not sure it completely solves your case, but it's at least close to >your problem. I don't think that patch is useful in this case. This case is n

[Python-Dev] Polling with Pending Calls?

2006-12-04 Thread Tony Nelson
I think I have a need to handle *nix signals through polling in a library. It looks like chaining Pending Calls is almost the way to do it, but I see that doing so would make the interpreter edgy. The RPM library takes (steals) the signal handling away from its client application. It has good rea

[Python-Dev] 2.4.4 fix: Socketmodule Ctl-C patch

2006-10-03 Thread Tony Nelson
I've put a patch for 2.4.4 of the Socketmodule Ctl-C patch for 2.5, at the old closed bug . It passes "make EXTRAOPS-=unetwork test". Should I try to put this into the wiki at Python24Fixes? I haven't used the wiki before. -- __

Re: [Python-Dev] Testing Socket Timeouts patch 1519025

2006-07-30 Thread Tony Nelson
At 12:58 AM -0400 7/31/06, Tony Nelson wrote: >At 12:39 AM -0400 7/31/06, Tony Nelson wrote: > >>popen('"E:\Documents and Settings\Tony Nelson\My >>Documents\Python\pydev\trunk\PCBuild\python.exe" -c "import >>sys;sys.version_info"') >

Re: [Python-Dev] Testing Socket Timeouts patch 1519025

2006-07-30 Thread Tony Nelson
At 12:39 AM -0400 7/31/06, Tony Nelson wrote: >popen('"E:\Documents and Settings\Tony Nelson\My >Documents\Python\pydev\trunk\PCBuild\python.exe" -c "import >sys;sys.version_info"') Ehh, I must admit that I retyped that. Obviously what I ty

Re: [Python-Dev] Testing Socket Timeouts patch 1519025

2006-07-30 Thread Tony Nelson
At 4:34 AM +0200 7/31/06, Martin v. Löwis wrote: >Tony Nelson schrieb: >>Hmm. Well, it would make the test possible on MSWindows as well as on >>OS's implementing alarm(2). If I figure out how to build Python on >>MSWindows, I might give it a try. I tried to get MSVC 7

Re: [Python-Dev] Testing Socket Timeouts patch 1519025

2006-07-30 Thread Tony Nelson
At 7:23 PM -0400 7/30/06, Tony Nelson wrote: ... >...I tried to get MSVC 7.1 via the .Net SDK, but it >installed VS 8 instead, so I'm not quite sure how to proceed. ... David Murmann suggested off-list that I'd probably installed the 2.0 .Net SDK, and that I should install

Re: [Python-Dev] Testing Socket Timeouts patch 1519025

2006-07-30 Thread Tony Nelson
At 11:42 PM +0200 7/30/06, Martin v. Löwis wrote: >Tony Nelson schrieb: >>> You can use GenerateConsoleCtrlEvent to send Ctrl-C to all processes >>> that share the console of the calling process. >[...] >> Martin, your advice is usually spot-on, but I don't alwa

Re: [Python-Dev] Testing Socket Timeouts patch 1519025

2006-07-30 Thread Tony Nelson
At 9:42 AM +0200 7/30/06, Martin v. Löwis wrote: >Tony Nelson schrieb: >> Hmm, OK, darn, thanks. MSWindows does allow users to press Ctl-C to send a >> KeyboardInterrupt, so it's just too bad if I can't find a way to test it >> from a script. > >You can use Ge

Re: [Python-Dev] Testing Socket Timeouts patch 1519025

2006-07-29 Thread Tony Nelson
At 2:38 PM -0700 7/29/06, Josiah Carlson wrote: >Tony Nelson <[EMAIL PROTECTED]> wrote: >> >> I'm trying to write a test for my Socket Timeouts patch [1], which fixes >> signal handling (notably Ctl-C == SIGINT == KeyboarInterrupt) on socket >> operations us

[Python-Dev] Testing Socket Timeouts patch 1519025

2006-07-29 Thread Tony Nelson
I'm trying to write a test for my Socket Timeouts patch [1], which fixes signal handling (notably Ctl-C == SIGINT == KeyboarInterrupt) on socket operations using a timeout. I don't see a portable way to send a signal, and asking the test runner to press Ctl-C is a non-starter. A "real" signal is

[Python-Dev] Socket Timeouts patch 1519025

2006-07-23 Thread Tony Nelson
I request a review of my patch (1519025) to get socket timeouts to work properly with errors and signals. I don't expect this patch would make it into 2.5, but perhaps it could be in 2.5.1, as it fixes a long-standing bug. I know that people are busy with getting 2.5 out the door, but it would be

Re: [Python-Dev] Unicode charmap decoders slow

2005-10-17 Thread Tony Nelson
At 11:56 AM +0200 10/16/05, Martin v. Löwis wrote: >Tony Nelson wrote: >> BTW, Martin, if you care to, would you explain to me how a Trie would be >> used for charmap encoding? I know a couple of approaches, but I don't know >> how to do it fast. (I've never act

Re: [Python-Dev] Unicode charmap decoders slow

2005-10-15 Thread Tony Nelson
I have put up a new, packaged version of my fast charmap module at . Hopefully it is packaged properly and works properly (it works on my FC3 Python 2.3.4 system). This version is over 5 times faster than the base codec according to Hye-Shik Chang's benchmar

Re: [Python-Dev] Unicode charmap decoders slow

2005-10-13 Thread Tony Nelson
here's still a tiny bit of debugging print statements in it. >At 8:36 AM +0200 10/5/05, Martin v. Löwis wrote: >>Tony Nelson wrote: > ... >>> Encoding can be made fast using a simple hash table with external chaining. >>> There are max 256 codepoints to encode

Re: [Python-Dev] Unicode charmap decoders slow

2005-10-06 Thread Tony Nelson
At 8:36 AM +0200 10/5/05, Martin v. Löwis wrote: >Tony Nelson wrote: ... >> Encoding can be made fast using a simple hash table with external chaining. >> There are max 256 codepoints to encode, and they will normally be well >> distributed in their lower 8 bits. Hash on

Re: [Python-Dev] Unicode charmap decoders slow

2005-10-04 Thread Tony Nelson
[Recipient list not trimmed, as my replies must be vetted by a moderator, which seems to delay them. :] At 11:48 PM +0200 10/4/05, Walter Dörwald wrote: >Am 04.10.2005 um 21:50 schrieb Martin v. Löwis: > >> Walter Dörwald wrote: >> >>> For charmap decoding we might be able to use an array (e.g. a

Re: [Python-Dev] Unicode charmap decoders slow

2005-10-04 Thread Tony Nelson
At 9:37 AM +0200 10/4/05, Walter Dörwald wrote: >Am 04.10.2005 um 04:25 schrieb [EMAIL PROTECTED]: > >>As the OP suggests, decoding with a codec like mac-roman or iso8859-1 is >>very slow compared to encoding or decoding with utf-8. Here I'm working >>with 53k of data instead of 53 megs. (Note: thi

[Python-Dev] Unicode charmap decoders slow

2005-10-03 Thread Tony Nelson
Is there a faster way to transcode from 8-bit chars (charmaps) to utf-8 than going through unicode()? I'm writing a small card-file program. As a test, I use a 53 MB MBox file, in mac-roman encoding. My program reads and parses the file into messages in about 3 to 5 seconds (Wow! Go Python!), but