Re: [Python-Dev] PEP 476: Enabling certificate validation by default!

2014-09-02 Thread Glyph Lefkowitz
On Sep 2, 2014, at 4:28 PM, Nick Coghlan wrote: > On 3 Sep 2014 09:08, "David Reid" wrote: > > > > Nick Coghlan gmail.com> writes: > > > > > Creating *new* incompatibilities between Python 2 & Python 3 is a major > > > point > > > of concern. > > > > Clearly this change should be backported t

Re: [Python-Dev] PEP 476: Enabling certificate validation by default!

2014-09-02 Thread Glyph Lefkowitz
On Sep 2, 2014, at 4:01 PM, Nick Coghlan wrote: > > On 3 Sep 2014 08:18, "Alex Gaynor" wrote: > > > > Antoine Pitrou pitrou.net> writes: > > > > > > > > And how many people are using Twisted as an HTTPS client? > > > (compared to e.g. Python's httplib, and all the third-party libraries > > >

Re: [Python-Dev] PEP 476: Enabling certificate validation by default!

2014-09-02 Thread Glyph Lefkowitz
On Aug 29, 2014, at 7:44 PM, Alex Gaynor wrote: > Disabling verification entirely externally to the program, through a CLI flag > or environment variable. I'm pretty down on this idea, the problem you hit is > that it's a pretty blunt instrument to swing, and it's almost impossible to > imagin

[Python-Dev] Language Summit Follow-Up

2014-05-28 Thread Glyph Lefkowitz
At the language summit, Alex and I volunteered to put together some recommendations on what changes could be made to Python (the language) in order to facilitate a smoother transition from Python 2 to Python 3. One of the things that motivated this was the (surprising, to us) consideration that

Re: [Python-Dev] PEP 418 is too divisive and confusing and should be postponed

2012-04-07 Thread Glyph Lefkowitz
On Apr 7, 2012, at 3:40 AM, Steven D'Aprano wrote: > In any case, NTP is not the only thing that adjusts the clock, e.g. the > operating system will adjust the time for daylight savings. Daylight savings time is not a clock adjustment, at least not in the sense this thread has mostly been talki

Re: [Python-Dev] this is why we shouldn't call it a "monotonic clock" (was: PEP 418 is too divisive and confusing and should be postponed)

2012-04-05 Thread Glyph Lefkowitz
On Apr 5, 2012, at 8:07 PM, Zooko Wilcox-O'Hearn wrote: > On Thu, Apr 5, 2012 at 7:14 PM, Greg Ewing > wrote: >> >> This is the strict mathematical meaning of the word "monotonic", but the way >> it's used in relation to OS clocks, it seems to mean rather more than that. > > Yep. As far as I

Re: [Python-Dev] Use QueryPerformanceCounter() for time.monotonic() and/or time.highres()?

2012-04-02 Thread Glyph Lefkowitz
On Apr 2, 2012, at 10:39 AM, Kristján Valur Jónsson wrote: > "no steps" is something unquantifiable. All time has steps in it. "No steps" means something very specific when referring to time APIs. As I recently explained here: . -gly

Re: [Python-Dev] Issue 13524: subprocess on Windows

2012-03-22 Thread Glyph Lefkowitz
On Mar 21, 2012, at 4:38 PM, Brad Allen wrote: > I tripped over this one trying to make one of our Python at work > Windows compatible. We had no idea that a magic 'SystemRoot' > environment variable would be required, and it was causing issues for > pyzmq. > > It might be nice to reflect the fin

Re: [Python-Dev] Playing with a new theme for the docs

2012-03-22 Thread Glyph Lefkowitz
On Mar 21, 2012, at 6:28 PM, Greg Ewing wrote: > Ned Batchelder wrote: >> Any of the tweaks people are suggesting could be applied individually using >> this technique. We could just as easily choose to make the site >> left-justified, and let the full-justification fans use custom stylesheets

Re: [Python-Dev] sharing sockets among processes on windows

2012-03-14 Thread Glyph Lefkowitz
On Mar 13, 2012, at 5:27 PM, Kristján Valur Jónsson wrote: > Hi, > I´m interested in contributing a patch to duplicate sockets between processes > on windows. > Tha api to do this is WSADuplicateSocket/WSASocket(), as already used by > dup() in the _socketmodule.c > Here´s what I have: Just in

Re: [Python-Dev] Python 3 optimizations, continued, continued again...

2012-02-01 Thread Glyph Lefkowitz
On Feb 1, 2012, at 12:46 PM, Guido van Rossum wrote: > I understand that you're hesitant to just dump your current mess, and > you want to clean it up before you show it to us. That's fine. (...) And > remember, it doesn't need to be > perfect (in fact perfectionism is probably a bad idea here).

Re: [Python-Dev] Packaging and setuptools compatibility

2012-01-24 Thread Glyph Lefkowitz
On Jan 24, 2012, at 12:54 PM, Alexis Métaireau wrote: > I'm wondering if we should support that (a way to have plugins) in the new > packaging thing, or not. If not, this mean we should come with another > solution to support this outside of packaging (may be in distribute). If yes, > then we s

Re: [Python-Dev] Fixing the XML batteries

2011-12-10 Thread Glyph Lefkowitz
On Dec 10, 2011, at 6:30 PM, Terry Reedy wrote: > A little data: the HTML5lib project lives at > https://code.google.com/p/html5lib/ > It has 4 owners and 22 other committers. > > The most recent release, html5lib 0.90 for Python, is nearly 2 years old. > Since there is a separate Python3 repos

Re: [Python-Dev] Fixing the XML batteries

2011-12-10 Thread Glyph Lefkowitz
On Dec 10, 2011, at 2:38 AM, Stefan Behnel wrote: > Note, however, that html5lib is likely way too big to add it to the stdlib, > and that BeautifulSoup lacks a parser for non-conforming HTML in Python 3, > which would be the target release series for better HTML support. So, > whatever library

Re: [Python-Dev] Maintenance burden of str.swapcase

2011-09-11 Thread Glyph Lefkowitz
On Sep 11, 2011, at 11:49 AM, Michael Foord wrote: > Does anyone *actually* use .title() for this? (And why not just use the > correct casing in the string literal...) Yes. Twisted does, in various MIME-ish places (IMAP, SIP), although not in HTTP from what I can see. I imagine other similar

Re: [Python-Dev] Maintenance burden of str.swapcase

2011-09-07 Thread Glyph Lefkowitz
On Sep 7, 2011, at 10:26 AM, Stephen J. Turnbull wrote: > How about "title"? >>> 'content-length'.title() 'Content-Length' You might say that the protocol "has" to be case-insensitive so this is a silly frill: there are definitely enough case-sensitive crappy bits of network middleware out the

Re: [Python-Dev] Python 3 optimizations continued...

2011-09-01 Thread Glyph Lefkowitz
On Sep 1, 2011, at 5:23 AM, Cesare Di Mauro wrote: > A simple solution: when tracing is enabled, the new instruction format will > never be executed (and information tracking disabled as well). Correct me if I'm wrong: doesn't this mean that no profiler will accurately be able to measure the p

Re: [Python-Dev] Ctypes and the stdlib (was Re: LZMA compression support in 3.3)

2011-08-28 Thread Glyph Lefkowitz
On Aug 28, 2011, at 7:27 PM, Guido van Rossum wrote: > In general, an existing library cannot be called > without access to its .h files -- there are probably struct and > constant definitions, platform-specific #ifdefs and #defines, and > other things in there that affect the linker-level callin

Re: [Python-Dev] PEP 402: Simplified Package Layout and Partitioning

2011-08-12 Thread Glyph Lefkowitz
On Aug 12, 2011, at 2:33 PM, P.J. Eby wrote: > At 01:09 PM 8/12/2011 -0400, Glyph Lefkowitz wrote: >> Upon further reflection, PEP 402 _will_ make dealing with namespace packages >> from this code considerably easier: we won't need to do AST analysis to look >> f

Re: [Python-Dev] PEP 402: Simplified Package Layout and Partitioning

2011-08-12 Thread Glyph Lefkowitz
On Aug 12, 2011, at 11:24 AM, P.J. Eby wrote: > That is, the above code hardocdes a variety of assumptions about the import > system that haven't been true since Python 2.3. Thanks for this feedback. I honestly did not realize how old and creaky this code had gotten. It was originally develo

Re: [Python-Dev] PEP 402: Simplified Package Layout and Partitioning

2011-08-11 Thread Glyph Lefkowitz
On Aug 11, 2011, at 11:39 AM, Barry Warsaw wrote: > On Aug 11, 2011, at 04:39 PM, Éric Araujo wrote: > >>> * XXX what is the __file__ of a "pure virtual" package? ``None``? >>> Some arbitrary string? The path of the first directory with a >>> trailing separator? No matter what we put, *some*

Re: [Python-Dev] HTMLParser and HTML5

2011-07-29 Thread Glyph Lefkowitz
On Jul 29, 2011, at 3:00 PM, Matt wrote: > I don't see any real reason to drop a decent piece of code (HTMLParser, that > is) in favor of a third party library when only relatively minor updates are > needed to bring it up to speed with the latest spec. I am not really one to throw stones here,

Re: [Python-Dev] HTMLParser and HTML5

2011-07-29 Thread Glyph Lefkowitz
On Jul 29, 2011, at 7:46 AM, Stefan Behnel wrote: > Joao S. O. Bueno, 29.07.2011 13:22: >> On Fri, Jul 29, 2011 at 1:37 AM, Stefan Behnel wrote: >>> Brett Cannon, 28.07.2011 23:49: On Thu, Jul 28, 2011 at 11:25, Matt wrote: > > - What policies are in place for keeping parity w

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

2011-07-26 Thread Glyph Lefkowitz
On Jul 26, 2011, at 6:49 PM, Antoine Pitrou wrote: > On Mon, 25 Jul 2011 15:28:47 +1000 > Nick Coghlan wrote: >> There may be some error codes that we choose to map to these generic >> errors, even if we don't give them their own exception types at this >> point (e.g. ECONSHUTDOWN could map dire

Re: [Python-Dev] The socket HOWTO

2011-06-07 Thread Glyph Lefkowitz
On Jun 5, 2011, at 3:35 PM, Martin v. Löwis wrote: > And that's all fine. I still claim that you have to *understand* > sockets in order to use it properly. By this, I mean stuff like > "what is a TCP connection? how is it established?", "how is UDP > different from TCP?", "when data arrives, what

Re: [Python-Dev] The socket HOWTO

2011-06-05 Thread Glyph Lefkowitz
On Jun 4, 2011, at 11:32 PM, Martin v. Löwis wrote: > b) telling people to use Twisted or asyncore on the server side > if they are new to sockets is bad advice. People *first* have > to understand sockets, and *then* can use these libraries > and frameworks. Those libraries aren't made to b

Re: [Python-Dev] Python 3.x and bytes

2011-05-19 Thread Glyph Lefkowitz
On May 19, 2011, at 1:43 PM, Guido van Rossum wrote: > -1; the result is not a *character* but an integer. Well, really the result ought to be an octet, but I suppose adding an 'octet' type is beyond the scope of even this sprawling discussion :). > I'm personally favoring using b'a'[0] and po

Re: [Python-Dev] Linus on garbage collection

2011-05-06 Thread Glyph Lefkowitz
Apologies in advance for contributing to an obviously and increasingly off-topic thread, but this kind of FUD about GC is a pet peeve of mine. On May 6, 2011, at 10:04 AM, Neal Becker wrote: > http://gcc.gnu.org/ml/gcc/2002-08/msg00552.html Counterpoint: . Sorr

Re: [Python-Dev] Linus on garbage collection

2011-05-06 Thread Glyph Lefkowitz
On May 6, 2011, at 12:31 PM, Michael Foord wrote: > pypy and .NET choose to arbitrarily break cycles rather than leave objects > unfinalised and memory unreclaimed. Not sure what Java does. I think that's a mischaracterization of their respective collectors; "arbitrarily break cycles" implies t

Re: [Python-Dev] the role of assert in the standard library ?

2011-04-28 Thread Glyph Lefkowitz
On Apr 28, 2011, at 12:59 PM, Guido van Rossum wrote: > On Thu, Apr 28, 2011 at 12:54 AM, Tarek Ziadé wrote: >> In my opinion assert should be avoided completely anywhere else than >> in the tests. If this is a wrong statement, please let me know why :) > > I would turn that around. The assert

Re: [Python-Dev] python and super

2011-04-14 Thread Glyph Lefkowitz
On Apr 14, 2011, at 12:59 PM, Ronald Oussoren wrote: > What would the semantics be of a super that (...) I think it's long past time that this move to python-ideas, if you don't mind. ___ Python-Dev mailing list Python-Dev@python.org http://mail.python

Re: [Python-Dev] Supporting Visual Studio 2010

2011-04-05 Thread Glyph Lefkowitz
On Apr 5, 2011, at 8:52 AM, exar...@twistedmatrix.com wrote: > On 09:58 am, mar...@v.loewis.de wrote: >>> Won't that still be an issue despite the stable ABI? Extensions on >>> Windows should be linked to the same version of MSVCRT used to compile >>> Python >> >> Not if they use the stable ABI.

Re: [Python-Dev] Policy for making changes to the AST

2011-04-04 Thread Glyph Lefkowitz
On Apr 4, 2011, at 2:00 PM, Guido van Rossum wrote: > On Mon, Apr 4, 2011 at 10:05 AM, fwierzbi...@gmail.com > wrote: >> As a re-implementor of ast.py that tries to be node for node >> compatible, I'm fine with #1 but would really like to have tests that >> will fail in test_ast.py to alert me!

Re: [Python-Dev] Differences among Emacsen

2011-03-30 Thread Glyph Lefkowitz
On Mar 30, 2011, at 2:54 PM, Barry Warsaw wrote: > On Mar 30, 2011, at 09:43 AM, Ralf Schmitt wrote: > >> Barry Warsaw writes: >>> >>> In case you missed it, there are now *three* Python modes. Tim Peters' >>> original and best (in my completely unbiased opinion ) python-mode.el >>> which is

Re: [Python-Dev] Embedded Python startup is slow

2011-03-24 Thread Glyph Lefkowitz
On Mar 24, 2011, at 4:06 AM, bruce bushby wrote: > I have previously asked this question in python-list, however I think it > belongs here. As the saying goes, this list is for development of python, not with python. So it would be appropriate to make a suggestion as to some direction for Pyt

Re: [Python-Dev] Finally switch urllib.parse to RFC3986 semantics?

2011-03-18 Thread Glyph Lefkowitz
On Mar 18, 2011, at 8:41 PM, Guido van Rossum wrote: > Really. Do they still call them URIs? :-) Well, by RFC 398*7* they're calling them IRIs instead. 'irilib', perhaps? ;-) ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/ma

Re: [Python-Dev] funky buildbot

2011-03-10 Thread Glyph Lefkowitz
On Mar 10, 2011, at 3:18 PM, Bill Janssen wrote: > It's a new Mac Mini running the latest Snow Leopard, with Python 2.6.1 > (the /usr/bin/python) and buildslave 0.8.3, using Twisted 8.2.0. I realize that Python 2.6 is pretty old too, but a _lot_ of bugfixes have gone into Twisted since 8.2. I'm

Re: [Python-Dev] Support the /usr/bin/python2 symlink upstream

2011-03-04 Thread Glyph Lefkowitz
On Fri, Mar 4, 2011 at 10:03 AM, Westley Martínez wrote: > On Fri, 2011-03-04 at 00:54 -0800, Aaron DeVore wrote: > > On Thu, Mar 3, 2011 at 11:44 PM, Kerrick Staley > wrote: > > > That way, if the sysadmin does decide to replace the installed "python" > file, he can do so without inadvertently d

Re: [Python-Dev] Import and unicode: part two

2011-01-20 Thread Glyph Lefkowitz
On Jan 20, 2011, at 11:46 AM, Guido van Rossum wrote: > On Thu, Jan 20, 2011 at 5:16 AM, Nick Coghlan wrote: >> On Thu, Jan 20, 2011 at 10:08 PM, Simon Cross >> wrote: >>> I'm changing my vote on this to a +1 for two reasons: >>> >>> * Initially I thought this wasn't supported by Python at all

Re: [Python-Dev] Import and unicode: part two

2011-01-19 Thread Glyph Lefkowitz
On Jan 20, 2011, at 12:19 AM, Glenn Linderman wrote: > Now if the stuff after m_ was the hex UTF-8 of "café", that could get > interesting :) (As it happens, it's the hex digest of the MD5 of the UTF-8 of café... ;-))___ Python-Dev mailing list Pytho

Re: [Python-Dev] Import and unicode: part two

2011-01-19 Thread Glyph Lefkowitz
On Jan 20, 2011, at 12:02 AM, Glenn Linderman wrote: > But for local code, having to think up an ASCII name for a module rather than > use the obvious native-language name, is just brain-burden when creating the > code. Is it really? You already had to type 'import', presumably if you can thi

Re: [Python-Dev] devguide: Point out that OS X users need to change examples to use python.exe instead of

2011-01-10 Thread Glyph Lefkowitz
On Jan 10, 2011, at 1:37 PM, Łukasz Langa wrote: > I'm using the case-sensitive variant of HFS+ since 10.4. It works, I like it > and you get ./python with it. I realize that this isn't a popularity contest for this feature, but I feel like I should pipe up here and mention that it breaks some

Re: [Python-Dev] Checking input range in time.asctime and time.ctime

2011-01-05 Thread Glyph Lefkowitz
On Jan 5, 2011, at 4:33 PM, Guido van Rossum wrote: > Shouldn't the logic be to take the current year into account? By the > time 2070 comes around, I'd expect "70" to refer to 2070, not to 1970. > In fact, I'd expect it to refer to 2070 long before 2070 comes around. > > All of which makes me t

Re: [Python-Dev] Possible optimization for LOAD_FAST ?

2011-01-03 Thread Glyph Lefkowitz
On Jan 2, 2011, at 10:18 PM, Guido van Rossum wrote: > On Sun, Jan 2, 2011 at 5:50 PM, Alex Gaynor wrote: >> No, it's singularly impossible to prove that any global load will be any >> given >> value at compile time. Any optimization based on this premise is wrong. > > True. > > My proposed

Re: [Python-Dev] len(chr(i)) = 2?

2010-11-25 Thread Glyph Lefkowitz
On Nov 24, 2010, at 10:55 PM, Stephen J. Turnbull wrote: > Greg Ewing writes: >> On 24/11/10 22:03, Stephen J. Turnbull wrote: >>> But >>> if you actually need to remember positions, or regions, to jump to >>> later or to communicate to other code that manipulates them, doing >>> this stuff the st

Re: [Python-Dev] len(chr(i)) = 2?

2010-11-25 Thread Glyph Lefkowitz
On Nov 24, 2010, at 4:03 AM, Stephen J. Turnbull wrote: > You end up proliferating types that all do the same kind of thing. Judicious > use of inheritance helps, but getting the fundamental abstraction right is > hard. Or least, Emacs hasn't found it in 20 years of trying. Emacs hasn't even

Re: [Python-Dev] len(chr(i)) = 2?

2010-11-23 Thread Glyph Lefkowitz
On Nov 23, 2010, at 9:44 PM, Stephen J. Turnbull wrote: > James Y Knight writes: > >> You put a smiley, but, in all seriousness, I think that's actually >> the right thing to do if anyone writes a new programming >> language. It is clearly the right thing if you don't have to be >> concerned with

Re: [Python-Dev] OpenSSL Voluntarily (openssl-1.0.0a)

2010-11-23 Thread Glyph Lefkowitz
On Nov 23, 2010, at 9:02 AM, Antoine Pitrou wrote: > On Tue, 23 Nov 2010 00:07:09 -0500 > Glyph Lefkowitz wrote: >> On Mon, Nov 22, 2010 at 11:13 PM, Hirokazu Yamamoto < >> ocean-c...@m2.ccsnet.ne.jp> wrote: >> >>> Hello. Does this affect python? Thank yo

Re: [Python-Dev] len(chr(i)) = 2?

2010-11-23 Thread Glyph Lefkowitz
On Nov 23, 2010, at 7:22 PM, James Y Knight wrote: > On Nov 23, 2010, at 6:49 PM, Greg Ewing wrote: >> Maybe Python should have used UTF-8 as its internal unicode >> representation. Then people who were foolish enough to assume >> one character per string item would have their programs break >> ra

Re: [Python-Dev] constant/enum type in stdlib

2010-11-23 Thread Glyph Lefkowitz
On Nov 23, 2010, at 10:01 AM, Antoine Pitrou wrote: > Well, it is easy to assign range(N) to a tuple of names when desired. I > don't think an automatically-enumerating constant generator is needed. I don't think that numerical enumerations are the only kind of constants we're talking about. O

Re: [Python-Dev] constant/enum type in stdlib

2010-11-23 Thread Glyph Lefkowitz
On Nov 23, 2010, at 10:37 AM, ben.cottr...@nominum.com wrote: > I'd prefer not to think of the number of times I've made the following > mistake: > > s = socket.socket(socket.SOCK_DGRAM, socket.AF_INET) If it's any consolation, it's fewer than the number of times I have :). (More fun, actuall

Re: [Python-Dev] OpenSSL Voluntarily (openssl-1.0.0a)

2010-11-22 Thread Glyph Lefkowitz
On Mon, Nov 22, 2010 at 11:13 PM, Hirokazu Yamamoto < ocean-c...@m2.ccsnet.ne.jp> wrote: > Hello. Does this affect python? Thank you. > > http://www.openssl.org/news/secadv_20101116.txt > No. ___ Python-Dev mailing list Python-Dev@python.org http://mail

Re: [Python-Dev] Breaking undocumented API

2010-11-16 Thread Glyph Lefkowitz
On Nov 16, 2010, at 4:49 PM, Guido van Rossum wrote: >> PEP 8 isn't nearly visible enough, either. Whatever the rule is, it needs >> to be presented with the information itself. If the rule is that things not >> documented in the library manual have no compatibility guarantees, then all >> of t

Re: [Python-Dev] Breaking undocumented API

2010-11-10 Thread Glyph Lefkowitz
On Nov 10, 2010, at 2:21 PM, James Y Knight wrote: > On the other hand, if you make the primary mechanism to indicate privateness > be a leading underscore, that's obvious to everyone. +1. One of the best features of Python is the ability to make a conscious decision to break the interface of

Re: [Python-Dev] Breaking undocumented API

2010-11-09 Thread Glyph Lefkowitz
On Nov 8, 2010, at 4:50 PM, Guido van Rossum wrote: > On Mon, Nov 8, 2010 at 3:55 PM, Glyph Lefkowitz > wrote: >> This seems like a pretty clear case of "practicality beats purity". Not >> only has nobody complained about deprecatedModuleAttribute, but there are

Re: [Python-Dev] Breaking undocumented API

2010-11-08 Thread Glyph Lefkowitz
On Nov 8, 2010, at 2:35 PM, exar...@twistedmatrix.com wrote: > On 09:57 pm, br...@python.org wrote: >> On Mon, Nov 8, 2010 at 13:45, wrote: >>> On 09:25 pm, br...@python.org wrote: On Mon, Nov 8, 2010 at 13:03, wrote: > > On 07:58 pm, br...@python.org wrote: >>> >

Re: [Python-Dev] Pickle alternative in stdlib (Was: On breaking modules into packages)

2010-11-04 Thread Glyph Lefkowitz
On Nov 4, 2010, at 12:49 PM, Guido van Rossum wrote: > What's the attack you're thinking of on marshal? It never executes any > code while unmarshalling (although it can unmarshal code objects -- > but the receiving program has to do something additionally to execute > those). These issues may h

Re: [Python-Dev] On breaking modules into packages Was: [issue10199] Move Demo/turtle under Lib/

2010-11-03 Thread Glyph Lefkowitz
On Nov 3, 2010, at 11:26 AM, Alexander Belopolsky wrote: > This may not be a problem for smart tools, but for me and a simple > editor what used to be: Maybe this is the real problem? It's 2010, we should all be far enough beyond EDLIN that our editors can jump to the definition of a Python c

Re: [Python-Dev] On breaking modules into packages Was: [issue10199] Move Demo/turtle under Lib/

2010-11-03 Thread Glyph Lefkowitz
On Nov 3, 2010, at 1:04 PM, James Y Knight wrote: > This is the strongest reason why I recommend to everyone I know that they not > use pickle for storage they'd like to keep working after upgrades [not just > of stdlib, but other 3rd party software or their own software]. :) +1. Twisted actu

Re: [Python-Dev] closing files and sockets in a timely manner in the stdlib

2010-10-30 Thread Glyph Lefkowitz
On Oct 30, 2010, at 2:39 PM, Jack Diederich wrote: > On Fri, Oct 29, 2010 at 8:35 PM, Brett Cannon wrote: >> For those of you who have not noticed, Antoine committed a patch that >> raises a ResourceWarning under a pydebug build if a file or socket is >> closed through garbage collection instead

Re: [Python-Dev] Continuing 2.x

2010-10-29 Thread Glyph Lefkowitz
On Oct 28, 2010, at 10:51 PM, Brett Cannon wrote: > I think people need to stop viewing the difference between Python 2.7 > and Python 3.2 as this crazy shift and view it from python-dev's > perspective; it should be viewed one follows from the other at this > point. You can view it as Python 3.2

Re: [Python-Dev] Support for async read/write

2010-10-20 Thread Glyph Lefkowitz
On Oct 20, 2010, at 12:31 AM, Jeffrey Yasskin wrote: > No comment on the rest of your claim, but this is a silly argument. > The standard says the same thing about at least fcntl.h, signal.h, > pthread.h, and ucontext.h, which clearly are useful. It was meant to be tongue-in-cheek :). Perhaps I

Re: [Python-Dev] Support for async read/write

2010-10-20 Thread Glyph Lefkowitz
On Oct 19, 2010, at 9:55 PM, exar...@twistedmatrix.com wrote: >> Not only is the performance usually worse than expected, the behavior of >> aio_* functions require all kinds of subtle and mysterious coordination with >> signal handling, which I'm not entirely sure Python would even be able to

Re: [Python-Dev] Support for async read/write

2010-10-19 Thread Glyph Lefkowitz
On Oct 19, 2010, at 8:09 PM, James Y Knight wrote: > There's a difference. > > os._exit is useful. os.open is useful. aio_* are *not* useful. For anything. > If there's anything you think you want to use them for, you're wrong. It > either won't work properly or it will worse performing than t

Re: [Python-Dev] Supporting raw bytes data in urllib.parse.* (was Re: Polymorphic best practices)

2010-09-19 Thread Glyph Lefkowitz
On Sep 18, 2010, at 10:18 PM, Steve Holden wrote: >> I could probably be persuaded to merge the APIs, but the email6 >> precedent suggests to me that separating the APIs better reflects the >> mental model we're trying to encourage in programmers manipulating >> text (i.e. the difference between t

Re: [Python-Dev] Polymorphic best practices [was: (Not) delaying the 3.2 release]

2010-09-16 Thread Glyph Lefkowitz
On Sep 16, 2010, at 7:34 PM, Barry Warsaw wrote: > On Sep 16, 2010, at 06:11 PM, Glyph Lefkowitz wrote: > >> That may be a handy way to deal with some grotty internal >> implementation details, but having a 'decode()' method is broken. The >> thing I care ab

Re: [Python-Dev] Polymorphic best practices [was: (Not) delaying the 3.2 release]

2010-09-16 Thread Glyph Lefkowitz
On Sep 16, 2010, at 4:51 PM, R. David Murray wrote: > Given a message, there are many times you want to serialize it as text > (for example, for presentation in a UI). You could provide alternate > serialization methods to get text out on demandbut then what if > someone wants to push that te

Re: [Python-Dev] Garbage announcement printed on interpreter shutdown

2010-09-10 Thread Glyph Lefkowitz
On Sep 10, 2010, at 5:10 PM, Amaury Forgeot d'Arc wrote: > 2010/9/10 Fred Drake : >> On Fri, Sep 10, 2010 at 4:32 PM, Georg Brandl wrote: >>> IMO this runs contrary to the decision we made when DeprecationWarnings were >>> made silent by default: it spews messages not only at developers, but als

Re: [Python-Dev] Internal counter to debug leaking file descriptors

2010-08-31 Thread Glyph Lefkowitz
On Aug 31, 2010, at 10:03 AM, Guido van Rossum wrote: > On Linux you can look somewhere in /proc, but I don't know that it > would help you find where a file was opened. "/dev/fd" is actually a somewhat portable way of getting this information. I don't think it's part of a standard, but on Lin

Re: [Python-Dev] 'hasattr' is broken by design

2010-08-24 Thread Glyph Lefkowitz
On Aug 24, 2010, at 8:31 AM, Benjamin Peterson wrote: > 2010/8/24 Hrvoje Niksic : >> The __length_hint__ lookup expects either no exception or AttributeError, >> and will propagate others. I'm not sure if this is a bug. On the one hand, >> throwing anything except AttributeError from __getattr_

Re: [Python-Dev] Fixing #7175: a standard location for Python config files

2010-08-12 Thread Glyph Lefkowitz
On Aug 12, 2010, at 6:30 AM, Tim Golden wrote: > I don't care how many stats we're doing You might not, but I certainly do. And I can guarantee you that the authors of command-line tools that have to start up in under ten seconds, for example 'bzr', care too.

Re: [Python-Dev] PEP 376 proposed changes for basic plugins support

2010-08-03 Thread Glyph Lefkowitz
On Aug 3, 2010, at 4:28 AM, M.-A. Lemburg wrote: > I don't think that's a problem: the SQLite database would be a cache > like e.g. a font cache or TCSH command cache, not a replacement of > the meta files stored in directories. > > Such a database would solve many things at once: faster access

Re: [Python-Dev] PEP 376 proposed changes for basic plugins support

2010-08-02 Thread Glyph Lefkowitz
On Aug 2, 2010, at 9:53 AM, exar...@twistedmatrix.com wrote: > On 01:27 pm, m...@egenix.com wrote: >> exar...@twistedmatrix.com wrote: >>> On 12:21 pm, m...@egenix.com wrote: See Zope for an example of how well this simply mechanism works out in practice: it simply scans the "Prod

Re: [Python-Dev] proto-pep: plugin proposal (for unittest)

2010-08-01 Thread Glyph Lefkowitz
On Aug 1, 2010, at 3:52 PM, Ronald Oussoren wrote: > > On 1 Aug, 2010, at 17:22, Éric Araujo wrote: > >>> Speaking of which... Your documentation says it's named ~/unittest.cfg, >>> could you make this a file in the user base (that is, the prefix where >>> 'setup.py install --user' will install

Re: [Python-Dev] Python signal processing question

2010-07-21 Thread Glyph Lefkowitz
On Jul 22, 2010, at 12:00 AM, Stephen J. Turnbull wrote: > My understanding of OSError is that the OS is saying "sorry, what you > tried to do is perfectly reasonable under some circumstances, but you > can't do that now." ENOMEM, EPERM, ENOENT etc fit this model. > > RuntimeError OTOH is basica

Re: [Python-Dev] What to do with languishing patches?

2010-07-18 Thread Glyph Lefkowitz
On Jul 18, 2010, at 1:46 PM, Alexander Belopolsky wrote: > We already have "posponed" and "remind" resolutions, but these are > exclusive of "accepted". I think there should be a clear way to mark > the issue "accepted and would be applied if X.Y was out already." > Chances are one of the resol

Re: [Python-Dev] avoiding accidental shadowing of top-level libraries by the main module

2010-07-13 Thread Glyph Lefkowitz
On Jul 13, 2010, at 5:02 PM, Nick Coghlan wrote: > My concerns aren't about a module reimporting itself directly, they're > about the case where a utility module is invoked as __main__ but is > also imported normally somewhere else in a program (e.g. pdb is > invoked as a top-level debugger, but i

Re: [Python-Dev] [Idle-dev] Removing IDLE from the standard library

2010-07-12 Thread Glyph Lefkowitz
On Jul 12, 2010, at 5:47 PM, Fred Drake wrote: > On Mon, Jul 12, 2010 at 5:42 PM, Michael Foord > wrote: >> I'm sure Brett will love this idea, but if it was impossible to reimport the >> script being executed as __main__ with a different name it would solve these >> problems. > > Indeed! And

Re: [Python-Dev] [Idle-dev] Removing IDLE from the standard library

2010-07-12 Thread Glyph Lefkowitz
On Jul 12, 2010, at 11:36 AM, Reid Kleckner wrote: > (Somwhat off-topic): Another pain point students had was accidentally > shadowing stdlib modules, like random. Renaming the file didn't solve > the problem either, because it left behind .pycs, which I had to help > them delete. I feel your

Re: [Python-Dev] Removing IDLE from the standard library

2010-07-12 Thread Glyph Lefkowitz
On Jul 12, 2010, at 4:34 AM, Éric Araujo wrote: >> Plus, is a useful resource >> for core developers with only a little bit of free time to do a >> review. > > Title: “Review Tickets, By Order You Should Review Them In” > I haven’t found a description of

Re: [Python-Dev] Removing IDLE from the standard library

2010-07-11 Thread Glyph Lefkowitz
On Jul 11, 2010, at 5:33 PM, Georg Brandl wrote: > Honestly, how would you feel as a committer to have scores of issues assigned > to you -- as a consequence of speedy triage -- knowing that you have to invest > potentially hours of volunteer time into them, while the person doing the > triaging i

Re: [Python-Dev] Removing IDLE from the standard library

2010-07-11 Thread Glyph Lefkowitz
On Jul 11, 2010, at 3:19 PM, Martin v. Löwis wrote: > Unfortunately, it's often not clear what the submitter wants: does she > want to help, or want to get help? For a bug report, I often post a > message "can you provide a patch?", but sometimes, it isn't that clear. Perhaps this is the one area

Re: [Python-Dev] Removing IDLE from the standard library

2010-07-11 Thread Glyph Lefkowitz
On Jul 11, 2010, at 2:37 PM, Martin v. Löwis wrote: >> Initially (five years ago!) I tried to overcome these issues by >> improving IDLE, solving problems and adding a few key features. >> Without going into details, suffice to say that IDLE hasn't improved >> much since 2005 despite my efforts.

Re: [Python-Dev] [Idle-dev] Removing IDLE from the standard library

2010-07-11 Thread Glyph Lefkowitz
On Jul 11, 2010, at 10:22 AM, Tal Einat wrote: > Most of the responses up to this point have been strongly against my > proposal. The main reason given is that it is nice to have a graphical > IDE supported out-of-the-box with almost any Python installation. This > is especially important for nov

Re: [Python-Dev] Licensing // PSF // Motion of non-confidence

2010-07-06 Thread Glyph Lefkowitz
On Jul 6, 2010, at 8:09 AM, Steven D'Aprano wrote: > You've never used Apple's much-missed Hypertalk, have you? :) on mailingListMessage get the message put it into aMessage if the thread of aMessage contains license wankery put aMessage into the trash

Re: [Python-Dev] Can Python implementations reject semantically invalid expressions?

2010-07-01 Thread Glyph Lefkowitz
On Jul 2, 2010, at 12:28 AM, Steven D'Aprano wrote: > This question was inspired by something asked on #python today. Consider > it a hypothetical, not a serious proposal. > > We know that many semantic errors in Python lead to runtime errors, e.g. > 1 + "1". If an implementation rejected them

Re: [Python-Dev] thoughts on the bytes/string discussion

2010-06-25 Thread Glyph Lefkowitz
On Jun 25, 2010, at 5:02 PM, Guido van Rossum wrote: > But you'd still have to validate it, right? You wouldn't want to go on > using what you thought was wrapped UTF-8 if it wasn't actually valid > UTF-8 (or you'd be worse off than in Python 2). So you're really just > worried about space consum

Re: [Python-Dev] thoughts on the bytes/string discussion

2010-06-25 Thread Glyph Lefkowitz
On Jun 24, 2010, at 4:59 PM, Guido van Rossum wrote: > Regarding the proposal of a String ABC, I hope this isn't going to > become a backdoor to reintroduce the Python 2 madness of allowing > equivalency between text and bytes for *some* strings of bytes and not > others. For my part, what I wan

Re: [Python-Dev] email package status in 3.X

2010-06-23 Thread Glyph Lefkowitz
On Jun 23, 2010, at 8:17 AM, Steve Holden wrote: > Guido van Rossum wrote: >> On Tue, Jun 22, 2010 at 9:37 AM, Tres Seaver wrote: >>> Any "turdiness" (which I am *not* arguing for) is a natural consequence >>> of the kinds of backward incompatibilities which were *not* ruled out >>> for Python 3

Re: [Python-Dev] bytes / unicode

2010-06-23 Thread Glyph Lefkowitz
On Jun 22, 2010, at 8:57 PM, Robert Collins wrote: > bzr has a cache of decoded strings in it precisely because decode is > slow. We accept slowness encoding to the users locale because thats > typically much less data to examine than we've examined while > generating the commit/diff/whatever. We

Re: [Python-Dev] bytes / unicode

2010-06-22 Thread Glyph Lefkowitz
On Jun 22, 2010, at 7:23 PM, Ian Bicking wrote: > This is a place where bytes+encoding might also have some benefit. XML is > someplace where you might load a bunch of data but only touch a little bit of > it, and the amount of data is frequently large enough that the efficiencies > are impor

Re: [Python-Dev] bytes / unicode

2010-06-22 Thread Glyph Lefkowitz
On Jun 22, 2010, at 2:07 PM, James Y Knight wrote: > Yeah. This is a real issue I have with the direction Python3 went: it pushes > you into decoding everything to unicode early, even when you don't care -- > all you really wanted to do is pass it from one API to another, with some > well-defi

Re: [Python-Dev] bytes / unicode

2010-06-22 Thread Glyph Lefkowitz
On Jun 22, 2010, at 12:53 PM, Guido van Rossum wrote: > On Mon, Jun 21, 2010 at 11:47 PM, Raymond Hettinger > wrote: >> >> On Jun 21, 2010, at 10:31 PM, Glyph Lefkowitz wrote: >> >> This is a common pain-point for porting software to 3.x - you had a >> stri

Re: [Python-Dev] bytes / unicode

2010-06-22 Thread Glyph Lefkowitz
On Jun 21, 2010, at 10:58 PM, Stephen J. Turnbull wrote: > The RFC says that URIs are text, and therefore they can (and IMO > should) be operated on as text in the stdlib. No, *blue* is the best color for a shed. Oops, wait, let me try that again. While I broadly agree with this statement, it

Re: [Python-Dev] bytes / unicode

2010-06-21 Thread Glyph Lefkowitz
On Jun 21, 2010, at 2:17 PM, P.J. Eby wrote: > One issue I remember from my "enterprise" days is some of the Asian-language > developers at NTT/Verio explaining to me that unicode doesn't actually solve > certain issues -- that there are use cases where you really *do* need "bytes > plus encodi

Re: [Python-Dev] #Python3 ! ? (was Python Library Support in 3.x)

2010-06-19 Thread Glyph Lefkowitz
On Jun 19, 2010, at 5:39 PM, geremy condra wrote: > Bottom line, what I'd really like to do is kick them all off of #python, but > practically I see very little that can be done to rectify the situation at > this > point. Here's something you can do: port libraries to python 3 and make the ecosy

Re: [Python-Dev] #Python3 ! ? (was Python Library Support in 3.x)

2010-06-19 Thread Glyph Lefkowitz
On Jun 19, 2010, at 5:02 PM, Terry Reedy wrote: > HoweverI have very little experience with IRC and consequently have little > idea what getting a permanent, owned, channel like #python entails. Hence the > '?' that follows. > > What do others think? Sure, this is a good idea. Technically spe

Re: [Python-Dev] PEP 3148 ready for pronouncement

2010-05-26 Thread Glyph Lefkowitz
On May 26, 2010, at 4:55 AM, Brian Quinlan wrote: > I said exactly the opposite of what I meant: futures don't need a reference > to the invoker. Indeed they don't, and they really shouldn't have one. If I wrote that they did, then it was an error. ... and that appears to be it! Thank you f

Re: [Python-Dev] PEP 3148 ready for pronouncement

2010-05-26 Thread Glyph Lefkowitz
On May 26, 2010, at 3:37 AM, Paul Moore wrote: > On 26 May 2010 08:11, Lennart Regebro wrote: >> On Wed, May 26, 2010 at 06:22, Nick Coghlan wrote: >>> - download a futures module from PyPI and live with the additional >>> dependency >> >> Why would that be a problem? > > That has been hashed

Re: [Python-Dev] PEP 3148 ready for pronouncement

2010-05-26 Thread Glyph Lefkowitz
On May 24, 2010, at 5:36 AM, Brian Quinlan wrote: > On May 24, 2010, at 5:16 AM, Glyph Lefkowitz wrote: >> On May 23, 2010, at 2:37 AM, Brian Quinlan wrote: >>> On May 23, 2010, at 2:44 PM, Glyph Lefkowitz wrote: > ProcessPoolExecutor has the same serialization perils

  1   2   >