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

2011-07-21 Thread Glenn Linderman
On 7/21/2011 5:00 PM, Antoine Pitrou wrote: Le vendredi 22 juillet 2011 à 09:53 +1000, Nick Coghlan a écrit : On Fri, Jul 22, 2011 at 9:35 AM, Antoine Pitrou wrote: On Tue, 19 Jul 2011 23:58:55 -0400 "P.J. Eby" wrote: Anyway, to make a long story short, we came up with an alternative impleme

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

2011-07-21 Thread Glenn Linderman
On 7/21/2011 5:38 PM, Antoine Pitrou wrote: However, you can have a "x.py" file and a "x" directory *in the same base directory which is present in sys.path*, meaning sys.path can't help disambiguate in this case. Ah yes. It means there has to be one more rule for disambiguation, which Nick s

Re: [Python-Dev] 3.2.1 encoding surprise

2011-07-22 Thread Glenn Linderman
On 7/21/2011 5:44 PM, Mark Hammond wrote: On 22/07/2011 9:02 AM, Glenn Linderman wrote: Bad logic is get_configured_value! get_configured_value only looks in the global configuration file if there is a local configuration file that doesn't have the setting. It should look in the g

Re: [Python-Dev] 3.2.1 encoding surprise

2011-07-23 Thread Glenn Linderman
On 7/23/2011 5:34 AM, Vinay Sajip wrote: Glenn Linderman g.nevcal.com> writes: I aim to update the launcher downloads Real Soon Now. Has fixed my problem with not having a local py.ini file, and now is picking up python=3 from the py.ini coresident to the py.exe. Thanks, Mark &

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

2011-07-25 Thread Glenn Linderman
On 7/25/2011 3:43 AM, Antoine Pitrou wrote: On Mon, 25 Jul 2011 15:28:47 +1000 Nick Coghlan wrote: > > > If we add EINTR, I don't know if it's better to add it to > > BlockingIOError or to create a new exception (InterruptError?). > > InterruptedError seems like a reasonable candidate

Re: [Python-Dev] Convention on functions that shadow existing stdlib functions

2011-07-29 Thread Glenn Linderman
On 7/29/2011 8:18 AM, Barry Warsaw wrote: I think the devguide should document things like ... "how to ensure code works across all existing interpreter implementations", "where to find continuous integration results and how to interpret them" ... I don't think the devguide should document

Re: [Python-Dev] Python-3.0, unicode, and os.environ

2008-12-07 Thread Glenn Linderman
On approximately 12/7/2008 10:56 AM, came the following characters from the keyboard of Adam Olsen: You might receive a UTF-8 encoded file name from a malicious user, check if it contains something dangerous (like "../../../../../etc/password"), then decode it. If your decoder isn't compliant

Re: [Python-Dev] Python-3.0, unicode, and os.environ

2008-12-07 Thread Glenn Linderman
On approximately 12/7/2008 8:13 PM, came the following characters from the keyboard of Stephen J. Turnbull: Glenn Linderman writes: > But if you are interested in checking for security issues, shouldn't you > _first_ decode into some canonical form, Yes. That's all tha

Re: [Python-Dev] Python-3.0, unicode, and os.environ

2008-12-07 Thread Glenn Linderman
On approximately 12/7/2008 9:11 PM, came the following characters from the keyboard of Adam Olsen: On Sun, Dec 7, 2008 at 9:45 PM, Glenn Linderman <[EMAIL PROTECTED]> wrote: On approximately 12/7/2008 8:13 PM, came the following characters from the keyboard of Stephen J. Turnbull:

Re: [Python-Dev] Python-3.0, unicode, and os.environ

2008-12-08 Thread Glenn Linderman
On approximately 12/8/2008 12:57 AM, came the following characters from the keyboard of Stephen J. Turnbull: "Internal decoding" is (or should be) an oxymoron. Why would your software be passing around text in any format other than internal? So decoding will happen (a) on I/O, which is itself

Re: [Python-Dev] Python-3.0, unicode, and os.environ

2008-12-08 Thread Glenn Linderman
On approximately 12/8/2008 9:30 AM, came the following characters from the keyboard of [EMAIL PROTECTED]: If warnings were emitted, then files would not be silently ignored, yet the program could still be used. Yep, this is sounding useful. PS: I'd like to see a similar warning issued whe

[Python-Dev] http://bugs.python.org/issue3628

2009-01-09 Thread Glenn Linderman
I'm getting an error similar to that in http://bugs.python.org/issue3628 when I try to run python2.6 and cherrypy 3.1.1. I'm too new to see any connection between the symptom and the cure described in the above issue... I'd guess that somehow threads imply an extra parameter? It also seems th

[Python-Dev] exec documentation

2009-01-09 Thread Glenn Linderman
in 2.6 and before execfile is listed in builtin functions, and is not marked deprecated, and exec is in the simple statements, and is not marked deprecated. in 3.0 execfile is not listed in builtin functions, exec is. exec is not listed in simple statements. I guess this is an intended 3.0

Re: [Python-Dev] exec documentation

2009-01-09 Thread Glenn Linderman
On approximately 1/9/2009 3:40 PM, came the following characters from the keyboard of Terry Reedy: Glenn Linderman wrote: in 2.6 and before execfile is listed in builtin functions, and is not marked deprecated, and exec is in the simple statements, and is not marked deprecated. Because they

Re: [Python-Dev] PEP 393 Summer of Code Project

2011-08-22 Thread Glenn Linderman
On 8/22/2011 11:58 AM, Torsten Becker wrote: Hello all, I have implemented an initial version of PEP 393 -- "Flexible String Representation" as part of my Google Summer of Code project. My patch is hosted as a repository on bitbucket [1] and I created a related issue on the bug tracker [2]. I

Re: [Python-Dev] PEP 393 Summer of Code Project

2011-08-24 Thread Glenn Linderman
On 8/23/2011 5:46 PM, Terry Reedy wrote: On 8/23/2011 6:20 AM, "Martin v. Löwis" wrote: Am 23.08.2011 11:46, schrieb Xavier Morel: Mostly ascii is pretty common for western-european languages (French, for instance, is probably 90 to 95% ascii). It's also a risk in english, when the writer "co

Re: [Python-Dev] PEP 393 Summer of Code Project

2011-08-24 Thread Glenn Linderman
On 8/24/2011 1:18 AM, "Martin v. Löwis" wrote: So am I correctly reading between the lines when, after reading this thread so far, and the complete issue discussion so far, that I see a PEP 393 revision or replacement that has the following characteristics: 1) Narrow builds are dropped. PEP 393

Re: [Python-Dev] PEP 393 Summer of Code Project

2011-08-24 Thread Glenn Linderman
On 8/24/2011 9:00 AM, Stefan Behnel wrote: Nick Coghlan, 24.08.2011 15:06: On Wed, Aug 24, 2011 at 10:46 AM, Terry Reedy wrote: In utf16.py, attached to http://bugs.python.org/issue12729 I propose for consideration a prototype of different solution to the 'mostly BMP chars, few non-BMP chars'

Re: [Python-Dev] PEP 393 Summer of Code Project

2011-08-24 Thread Glenn Linderman
On 8/24/2011 12:34 PM, Guido van Rossum wrote: On Wed, Aug 24, 2011 at 11:52 AM, Glenn Linderman wrote: On 8/24/2011 9:00 AM, Stefan Behnel wrote: Nick Coghlan, 24.08.2011 15:06: On Wed, Aug 24, 2011 at 10:46 AM, Terry Reedy wrote: In utf16.py, attached to http://bugs.python.org/issue12729

Re: [Python-Dev] PEP 393 Summer of Code Project

2011-08-24 Thread Glenn Linderman
On 8/24/2011 7:29 PM, Guido van Rossum wrote: (Hey, I feel a QOTW coming. "Standards? We don't need no stinkin' standards."http://en.wikipedia.org/wiki/Stinking_badges :-) Which deserves an appropriate, follow-on, misquote: Guido says the Unicode standard stinks. ˚͜˚ <- and a Unicode smiley

Re: [Python-Dev] PEP 393 Summer of Code Project

2011-08-31 Thread Glenn Linderman
On 8/30/2011 11:03 PM, Stephen J. Turnbull wrote: Guido van Rossum writes: > On Tue, Aug 30, 2011 at 7:55 PM, Stephen J. Turnbull wrote: > > For starters, one that doesn't ever return lone surrogates, but rather > > interprets surrogate pairs as Unicode code points as in UTF-16. (T

Re: [Python-Dev] PEP 393 Summer of Code Project

2011-08-31 Thread Glenn Linderman
On 8/31/2011 10:12 AM, Guido van Rossum wrote: On Wed, Aug 31, 2011 at 1:09 AM, Glenn Linderman wrote: So from reading all this discussion, I think this point is rather a key one... and it has been made repeatedly in different ways: Arrays are not suitable for manipulating Unicode character

Re: [Python-Dev] PEP 393 Summer of Code Project

2011-08-31 Thread Glenn Linderman
On 8/31/2011 11:56 AM, Guido van Rossum wrote: On Wed, Aug 31, 2011 at 11:51 AM, Glenn Linderman mailto:v%2bpyt...@g.nevcal.com>> wrote: On 8/31/2011 10:12 AM, Guido van Rossum wrote: On Wed, Aug 31, 2011 at 1:09 AM, Glenn Linderman <mailto:v+pyt...@g.nevcal.com> wr

Re: [Python-Dev] PEP 393 Summer of Code Project

2011-08-31 Thread Glenn Linderman
On 8/31/2011 10:20 AM, Guido van Rossum wrote: On Wed, Aug 31, 2011 at 1:09 AM, Glenn Linderman wrote: The str type itself can presently be used to process other character encodings: if they are fixed width< 32-bit elements those encodings might be considered Unicode encodings, but there

Re: [Python-Dev] PEP 393 Summer of Code Project

2011-08-31 Thread Glenn Linderman
On 8/31/2011 5:21 AM, Stephen J. Turnbull wrote: Glenn Linderman writes: > From comments Guido has made, he is not interested in changing the > efficiency or access methods of the str type to raise the level of > support of Unicode to the composed character, or graphem

Re: [Python-Dev] PEP 393 Summer of Code Project

2011-08-31 Thread Glenn Linderman
On 8/31/2011 10:10 AM, Guido van Rossum wrote: On Tue, Aug 30, 2011 at 11:03 PM, Stephen J. Turnbull wrote: [me] > That sounds like a contradiction -- it wouldn't be a UTF-16 array if > you couldn't tell that it was using UTF-16. Well, that's why I wrote "intended to be suggestive". Th

Re: [Python-Dev] PEP 393 Summer of Code Project

2011-08-31 Thread Glenn Linderman
On 8/31/2011 5:58 PM, Neil Hodgson wrote: Glenn Linderman: That said, regexp, or some sort of cursor on a string, might be a workable solution. Will it have adequate performance? Perhaps, at least for some applications. Will it be as conceptually simple as indexing an array of graphemes

Re: [Python-Dev] PEP 393 Summer of Code Project

2011-09-01 Thread Glenn Linderman
On 9/1/2011 2:15 AM, Stephen J. Turnbull wrote: Glenn Linderman writes: > How many different iterators into the same text would be concurrently > needed by an application? And why? A WYSIWYG editor for structured text (TeX, HTML) might want two (at least), one for the "sou

Re: [Python-Dev] PEP 393 Summer of Code Project

2011-09-01 Thread Glenn Linderman
On 9/1/2011 12:59 AM, Stephen J. Turnbull wrote: Glenn Linderman writes: > We can either artificially constrain ourselves to minor tweaks of > the legal conforming bytestreams, It's not artificial. Having the internal representation be the same as a standard encoding is very

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

2012-01-05 Thread Glenn Linderman
On 1/5/2012 9:34 AM, Maciej Fijalkowski wrote: Also consider that new 2.6.x would go as a security fix to old ubuntu, but all other packages won't, because they'll not contain security fixes. Just so you know Why should CPython by constrained by broken policies of Ubuntu? If the other package

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

2012-01-05 Thread Glenn Linderman
On 1/5/2012 11:49 AM, Tres Seaver wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 01/05/2012 02:14 PM, Glenn Linderman wrote: 1) the security problem is not in CPython, but rather in web servers that use dict inappropriately. Most webapp vulnerabilities are due to their use of

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

2012-01-05 Thread Glenn Linderman
On 1/5/2012 5:52 PM, Steven D'Aprano wrote: At some point, presuming that there is no speed penalty, the behaviour will surely become not just enabled by default but mandatory. Python has never promised that hashes must be predictable or consistent, so apart from backwards compatibility conce

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

2012-01-06 Thread Glenn Linderman
On 1/5/2012 4:10 PM, Nick Coghlan wrote: On Fri, Jan 6, 2012 at 8:15 AM, Serhiy Storchaka wrote: 05.01.12 21:14, Glenn Linderman написав(ла): So, fixing the vulnerable packages could be a sufficient response, rather than changing the hash function. How to fix? Each of those above allocates

Re: [Python-Dev] Status of the fix for the hash collision vulnerability

2012-01-13 Thread Glenn Linderman
On 1/13/2012 5:35 PM, Victor Stinner wrote: - Glenn Linderman proposes to fix the vulnerability by adding a new "safe" dict type (only accepting string keys). His proof-of-concept (SafeDict.py) uses a secret of 64 random bits and uses it to compute the hash of a key. We could

Re: [Python-Dev] Hashing proposal: change only string-only dicts

2012-01-18 Thread Glenn Linderman
On 1/18/2012 9:52 AM, "Martin v. Löwis" wrote: I've been seriously considering implementing a balanced tree inside the dict (again for string-only dicts, as ordering can't be guaranteed otherwise). However, this would be a lot of code for a security fix. It*would* solve the issue for good, thoug

Re: [Python-Dev] Counting collisions for the win

2012-01-19 Thread Glenn Linderman
On 1/19/2012 8:54 PM, Carl Meyer wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi Victor, On 01/19/2012 05:48 PM, Victor Stinner wrote: [snip] Using a randomized hash may also break (indirectly) real applications because the application output is also somehow "randomized". For example,

Re: [Python-Dev] Counting collisions for the win

2012-01-23 Thread Glenn Linderman
On 1/23/2012 12:53 AM, Frank Sievertsen wrote: What if we use a second (randomized) hash-function in case there are many collisions in ONE lookup. This hash-function is used only for collision resolution and is not cached. So this sounds like SafeDict, but putting it under the covers and aut

Re: [Python-Dev] Counting collisions for the win

2012-01-23 Thread Glenn Linderman
On 1/23/2012 10:58 AM, Frank Sievertsen wrote: On 23.01.2012 19:25, Glenn Linderman wrote: So this sounds like SafeDict, but putting it under the covers and automatically converting from dict to SafeDict after a collision threshold has been reached. Let's call it fallback-dict. and

Re: [Python-Dev] [issue13703] Hash collision security issue

2012-01-26 Thread Glenn Linderman
On 1/26/2012 10:25 PM, Gregory P. Smith wrote: (and on top of all of this I believe we're all settled on having per interpreter hash randomization_as well_ in 3.3; but this AVL tree approach is one nice option for a backport to fix the major vulnerability) If the tree code cures the problem, t

Re: [Python-Dev] [issue13703] Hash collision security issue

2012-01-27 Thread Glenn Linderman
On 1/26/2012 10:47 PM, Glenn Linderman wrote: On 1/26/2012 10:25 PM, Gregory P. Smith wrote: (and on top of all of this I believe we're all settled on having per interpreter hash randomization_as well_ in 3.3; but this AVL tree approach is one nice option for a backport to fix the

Re: [Python-Dev] [issue13703] Hash collision security issue

2012-01-27 Thread Glenn Linderman
On 1/27/2012 11:39 AM, mar...@v.loewis.de wrote: Another issue occurs to me: when a hash with colliding keys (one that has been attacked, and has trees) has a non-string key added, isn't the flattening process likely to have extremely poor performance? Correct. Thanks for the clarificatio

Re: [Python-Dev] PEP 409 update [was: PEP 409 - final?]

2012-02-02 Thread Glenn Linderman
On 2/2/2012 2:10 PM, Ethan Furman wrote: * Use /Ellipsis/ as the default value (the /.../ singleton). Accepted. There are no other possible values; it cannot be raised as it is not an acception; it has the connotation of 'fill in the rest...' as in /__cause__/ is not set, look in /__cont

Re: [Python-Dev] PEP: New timestamp formats

2012-02-02 Thread Glenn Linderman
On 2/2/2012 6:28 AM, Antoine Pitrou wrote: On Thu, 2 Feb 2012 15:09:41 +0100 Victor Stinner wrote: Why int? That doesn't seem to bring anything. It helps to deprecate/replace os.stat_float_times(), which may be used for backward compatibility (with Python 2.2 ? :-)). I must admit I don't und

Re: [Python-Dev] PEP: New timestamp formats

2012-02-02 Thread Glenn Linderman
On 2/2/2012 3:38 PM, Nick Coghlan wrote: On Fri, Feb 3, 2012 at 8:37 AM, Glenn Linderman wrote: > Sorry to bring this up, but the PEP should probably consider another option: > Introducing a precedent following os.stat_decimal_times(). Like > os.stat_float_times, it would decide t

Re: [Python-Dev] requirements for moving __import__ over to importlib?

2012-02-09 Thread Glenn Linderman
On 2/9/2012 11:53 AM, Mike Meyer wrote: On Thu, 9 Feb 2012 14:19:59 -0500 Brett Cannon wrote: On Thu, Feb 9, 2012 at 13:43, PJ Eby wrote: Again, the goal is fast startup of command-line tools that only use a small subset of the overall framework; doing disk access for lazy imports goes agains

Re: [Python-Dev] Status of PEP 397 - Python launcher for Windows

2012-02-18 Thread Glenn Linderman
On 2/17/2012 9:24 PM, Mark Hammond wrote: I've been using the implementation for a number of months now and I find it incredibly useful. +1 ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscri

Re: [Python-Dev] hash randomization in 3.3

2012-02-21 Thread Glenn Linderman
On 2/21/2012 11:58 AM, Benjamin Peterson wrote: 2012/2/21 Antoine Pitrou: Hello, Shouldn't it be enabled by default in 3.3? Should you be able to disable it? Yes, absolutely. ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org

Re: [Python-Dev] Docs of weak stdlib modules should encourage exploration of 3rd-party alternatives

2012-03-12 Thread Glenn Linderman
On 3/12/2012 8:48 PM, C. Titus Brown wrote: I feel like there's a middle ground where stable, long-term go-to modules could be mentioned, though. I don't spend a lot of time browsing PyPI, but I suspect almost everyone spends a certain amount of time in the Python docs (which is a testimony to t

Re: [Python-Dev] Docs of weak stdlib modules should encourage exploration of 3rd-party alternatives

2012-03-13 Thread Glenn Linderman
On 3/13/2012 6:31 AM, Paul Moore wrote: It can be very hard to separate the good from the indifferent (or even bad) when browsing PyPI. I've found some very good packages recently which I'd never have known about without some random comment on a mailing list. +1 However, I'm not keen on havin

Re: [Python-Dev] 2012 Language Summit Report

2012-03-14 Thread Glenn Linderman
On 3/14/2012 8:57 AM, Terry Reedy wrote: On 3/14/2012 10:12 AM, Brian Curtin wrote: As with last year, I've put together a summary of the Python Language Summit which took place last week at PyCon 2012. This was compiled from my notes as well as those of Eric Snow and Senthil Kumaran, and I thin

Re: [Python-Dev] Python install layout and the PATH on win32

2012-03-16 Thread Glenn Linderman
On 3/16/2012 9:22 AM, Lindberg, Van wrote: On 3/16/2012 10:53 AM, Paul Moore wrote: > The only way I can read this to make sense is that you somehow > consider the Python installation as part of your development > environment (you mentioned source control earlier in the thread - > surely you

Re: [Python-Dev] Python install layout and the PATH on win32

2012-03-16 Thread Glenn Linderman
On 3/16/2012 6:25 PM, Carl Meyer wrote: Hi Mark, On 03/16/2012 05:53 PM, Mark Hammond wrote: * All executables and scripts go into the root of the Python install. This directory is largely empty now - it is mainly a container for other directories. This would solve the problem of needing 2 dir

Re: [Python-Dev] PEP 405 (built-in virtualenv) status

2012-03-19 Thread Glenn Linderman
On 3/19/2012 2:26 AM, Kristján Valur Jónsson wrote: Hi Carl. I'm very interested in this work. At CCP we work heavily with virtual environments. Except that we don't use virtualenv because it is just a pain in the neck. We like to be able to run virtual python environments of various types as

Re: [Python-Dev] regarding HTML mail

2012-03-19 Thread Glenn Linderman
On 3/19/2012 11:52 AM, Jesse Noller wrote: I'd like to discuss top-posting. Somewhere else, please. Oh, that was your point :) ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://m

Re: [Python-Dev] Python install layout and the PATH on win32

2012-03-20 Thread Glenn Linderman
On 3/20/2012 11:50 AM, Merlijn van Deen wrote: As this is being considered an 'incompatible change' on the bug tracker item [1] in any case, I'd like to mention that this might also be a convenient moment to re-think the default install location. After all, software is supposed to be installed in

Re: [Python-Dev] Python install layout and the PATH on win32

2012-03-20 Thread Glenn Linderman
On 3/20/2012 4:25 PM, Mark Hammond wrote: I think it does. Consider I've installed Python as a "system install". Now I want to install some other package - ideally that installer will request elevation - all well and good - the .py files are installed. However, next time I want to run Python,

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

2012-03-22 Thread Glenn Linderman
On 3/22/2012 10:02 AM, Steven D'Aprano wrote: As they say, the 99% who are lousy designers give the rest a bad name. *wink* :) My first impression of this page: http://www.python.org/~gbrandl/build/html/index.html was that the grey side-bar gives the page a somber, perhaps even dreary, l

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

2012-03-24 Thread Glenn Linderman
On 3/24/2012 5:41 PM, Ben Finney wrote: It's madness to expect web designers to hobble the flexibility of a web page to cater preferentially for one minority over others. But largely, the 99% that makes the rest of them look bad, do, in fact, do exactly that.

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

2012-03-25 Thread Glenn Linderman
On 3/24/2012 11:34 PM, Georg Brandl wrote: I've also added a little questionable gimmick to the sidebar (when you collapse it and expand it again, the content is shown at your current scroll location). It would be educational to see how you pulled that trick! I will look if I get time. However

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

2012-03-26 Thread Glenn Linderman
On 3/26/2012 10:19 AM, R. David Murray wrote: Like Philip, I have*one* window. My window manager (ratpoison) is more like 'screen' for X: you*can* split the window up, but it is*much* more useful to have only one window visible at a time, most of the time. I'm amazed at the number of people

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

2012-03-26 Thread Glenn Linderman
On 3/26/2012 10:58 AM, Ethan Furman wrote: Glenn Linderman wrote: On 3/26/2012 10:19 AM, R. David Murray wrote: Like Philip, I have *one* window. My window manager (ratpoison) is more like 'screen' for X: you *can* split the window up, but it is *much* more useful to have only

Re: [Python-Dev] Python install layout and the PATH on win32 (Rationale part 1: Regularizing the layout)

2012-03-26 Thread Glenn Linderman
On 3/26/2012 12:27 PM, PJ Eby wrote: On Mon, Mar 26, 2012 at 12:58 PM, Carl Meyer > wrote: No disagreement here. I think virtualenv's sweet spot is as a convenient tool for development environments (used in virtualenvwrapper fashion, where the file struct

Re: [Python-Dev] Python install layout and the PATH on win32 (Rationale part 1: Regularizing the layout)

2012-03-26 Thread Glenn Linderman
On 3/26/2012 1:21 PM, Glenn Linderman wrote: Hmm. And here's something else that might be missing: integration of the launcher with .py files that are actually ZIP archives... where does it find the #! line? (probably it can't, currently -- I couldn't figure out how to make it

Re: [Python-Dev] Integrating the PEP 397 launcher

2012-03-29 Thread Glenn Linderman
On 3/29/2012 3:50 PM, Brian Curtin wrote: On Thu, Mar 29, 2012 at 17:45, Benjamin Peterson wrote: > 2012/3/29 Brian Curtin: >> After talking with Martin and several others during the language >> summit and elsewhere around PyCon, PEP 397 should be accepted. I don't >> remember who, but som

Re: [Python-Dev] an alternative to embedding policy in PEP 418

2012-04-02 Thread Glenn Linderman
On 4/2/2012 4:37 AM, Victor Stinner wrote: The API looks much more complex than the API proposed in PEP 418 just to get the time. You have to call a function to get a function, and then call the function, instead of just calling a function directly. Instead of returning an object with a now() me

Re: [Python-Dev] an alternative to embedding policy in PEP 418

2012-04-02 Thread Glenn Linderman
On 4/2/2012 2:40 PM, Nick Coghlan wrote: On Tue, Apr 3, 2012 at 3:44 AM, Glenn Linderman wrote: > One thing I don't like about the idea of fallback being buried under some > API is that the efficiency of that API on each call must be less than the > efficiency of directly cal

Re: [Python-Dev] an alternative to embedding policy in PEP 418

2012-04-06 Thread Glenn Linderman
On 4/6/2012 4:11 PM, Cameron Simpson wrote: Another alternative is the public lists-of-clocks. After watching this thread with amusement and frustration, amusement because it is so big, and so many people have so many different opinions, frustration, because it seems that few of the clocks th

Re: [Python-Dev] path joining on Windows and imp.cache_from_source()

2012-04-21 Thread Glenn Linderman
On 4/21/2012 8:53 PM, Brett Cannon wrote: imp.cache_from_source() (and thus also imp.source_from_cache()) has special semantics compared to how os.path.join() works. For instance, if you look at test_imp you will notice it tries to use the same path separator as is the farthest right in the pat

Re: [Python-Dev] sys.implementation

2012-04-27 Thread Glenn Linderman
On 4/27/2012 12:34 AM, Eric Snow wrote: On Thu, Apr 26, 2012 at 8:31 AM, Barry Warsaw wrote: It's somewhat of a corner case, but I think a PEP couldn't hurt. The rationale section would be useful, at least. http://mail.python.org/pipermail/python-ideas/2012-April/014954.html The idea of

Re: [Python-Dev] sys.implementation

2012-04-27 Thread Glenn Linderman
On 4/27/2012 11:49 AM, R. David Murray wrote: On Fri, 27 Apr 2012 10:40:43 -0700, Glenn Linderman wrote: On 4/27/2012 12:34 AM, Eric Snow wrote: On Thu, Apr 26, 2012 at 8:31 AM, Barry Warsaw wrote: It's somewhat of a corner case, but I think a PEP couldn't hurt. The rationa

Re: [Python-Dev] package imports, sys.path and os.chdir()

2012-04-27 Thread Glenn Linderman
On 4/27/2012 1:00 PM, Brett Cannon wrote: I'm personally in favour of changing the insertion of '' to sys.path to inserting the cwd when the interpreter is launched. +1 ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/li

Re: [Python-Dev] CRLF line endings

2012-05-03 Thread Glenn Linderman
On 5/3/2012 2:00 PM, mar...@v.loewis.de wrote: I think that .bat files strictly *have* to have CRLF line endings. Nope. Both .bat and .cmd work fine with LF only in Win7 (and IIRC, in XP as well, but I just tested Win7) ___ Python-Dev mailing list P

Re: [Python-Dev] PEP 405 (pyvenv) and system Python upgrades

2012-05-04 Thread Glenn Linderman
On 5/4/2012 8:48 PM, Terry Reedy wrote: CPython is developed, tested, packaged, distributed, and installed as one unit. It is intended to be run as one package. If something caches a copy of python.exe, it seems to me that it should check and update as needed. Could venv check the file date of

Re: [Python-Dev] PEP 405 (pyvenv) and system Python upgrades

2012-05-04 Thread Glenn Linderman
On 5/4/2012 9:39 PM, Terry Reedy wrote: The gist of my response is that the venv 'tail' should way the python 'dog' as little as possbile. Yes, that was exactly my thought too. But I'm not sure the technology permits, with Windows not having exec. On the other hand, one might speculate abo

Re: [Python-Dev] sys.implementation

2012-05-12 Thread Glenn Linderman
On 5/12/2012 10:50 AM, Eric Snow wrote: given a normal (dict-based) object you can use vars() to turn it into a dict: >>> data = SomeClass(a=1, b=2, c=3) >>> ns = vars(data) >>> ns['a'] 1 >>> ns['b'] 2 >>> ns['c'] 3 I'll grant that it doesn't work for some objects (like named tuples)

Re: [Python-Dev] Optimize Unicode strings in Python 3.3

2012-05-29 Thread Glenn Linderman
On 5/29/2012 3:51 PM, Nick Coghlan wrote: On Wed, May 30, 2012 at 8:44 AM, Victor Stinner wrote: I also compared str%args and str.format() with Python 2.7 (byte strings), 3.2 (UTF-16 or UCS-4) and 3.3 (PEP 393): Python 3.3 is as fast as Python 2.7 and sometimes faster! (Whereras Python 3.2 is

Re: [Python-Dev] PEP 423 : naming conventions and recipes related to packaging

2012-06-28 Thread Glenn Linderman
On 6/28/2012 9:36 AM, Ethan Furman wrote: When I search PyPI I ignore anything with djange, zope, etc., as I have zero interest in pulling in a bunch of unrelated packages that I don't need. If some of these pieces are truly stand-alone it would be nice if they were presented that way. +1 P

Re: [Python-Dev] Should urlencode() sort the query parameters (if they come from a dict)?

2012-08-18 Thread Glenn Linderman
On 8/18/2012 11:47 AM, MRAB wrote: I vote -0. The issue can also be addressed with a small and simple helper function that wraps urlparse and compares the query parameter. Or you cann urlencode() with `sorted(qs.items)` instead of `qs` in the application. Hm. That's actually a good point. Se

Re: [Python-Dev] [RELEASED] Python 3.3.0

2012-09-29 Thread Glenn Linderman
On Sat, Sep 29, 2012 at 5:18 AM, Georg Brandl wrote: In total, almost 500 API items are new or improved in Python 3.3. For a more extensive list of changes in 3.3.0, see http://docs.python.org/3.3/whatsnew/3.3.html Reading this to see if I missed anything while downloading the new releas

Re: [Python-Dev] Improve error message "UnboundLocalError: local variable referenced before assignment"

2012-11-12 Thread Glenn Linderman
On 11/12/2012 7:30 AM, Jan Matějek wrote: I believe the "human problem" here is that the one tends to gloss over "local variable VARNAME", because it describes VARNAME and you already think you know what that is, so you don't stop to think about it. The following would be better in this rega

Re: [Python-Dev] Accept just PEP-0426

2012-11-20 Thread Glenn Linderman
On 11/20/2012 12:46 PM, PJ Eby wrote: On Tue, Nov 20, 2012 at 11:49 AM, Vinay Sajip > wrote: Also: what happens when a requirement is for setuptools (>= X.Y), but the distribute fork hasn't kept pace, and so only supports setuptools at a lower

Re: [Python-Dev] Accept just PEP-0426

2012-11-20 Thread Glenn Linderman
On 11/20/2012 1:48 PM, PJ Eby wrote: (We've been over this before, the last time this discussion came up on the Distutils-SIG for a previous Metadata PEP a year or two back, but here goes) Thanks. I wasn't over there. Makes it clear that clarifying PEPs to reflect discussions is a good id

Re: [Python-Dev] Proposing "Argument Clinic", a new way of specifying arguments to builtins for CPython

2012-12-03 Thread Glenn Linderman
On 12/3/2012 3:42 PM, Gregory P. Smith wrote: All the core devs I've asked said "given all that, I'd prefer the hairy preprocessor macros". But by the end of the conversation they'd changed their minds to prefer the custom DSL. Maybe I'll make a believer out of you too--read on

Re: [Python-Dev] Draft PEP for time zone support.

2012-12-12 Thread Glenn Linderman
On 12/12/2012 5:36 PM, Brian Curtin wrote: >> C:\ProgramData\Python ^ That. Is not the path that the link below is talking about, though. > > > Making a new top-level directory without asking is obnoxious. See http://stackoverflow.com/questions/9518890/what-is-the-significanc

Re: [Python-Dev] Draft PEP for time zone support.

2012-12-12 Thread Glenn Linderman
On 12/12/2012 6:10 PM, Janzert wrote: On 12/12/2012 8:43 PM, Glenn Linderman wrote: On 12/12/2012 5:36 PM, Brian Curtin wrote: >> C:\ProgramData\Python ^ That. Is not the path that the link below is talking about, though. It actually does; it is rather confusing

Re: [Python-Dev] Draft PEP for time zone support.

2012-12-13 Thread Glenn Linderman
On 12/12/2012 11:32 PM, Janzert wrote: On 12/13/2012 1:39 AM, Glenn Linderman wrote: On 12/12/2012 6:10 PM, Janzert wrote: On 12/12/2012 8:43 PM, Glenn Linderman wrote: On 12/12/2012 5:36 PM, Brian Curtin wrote: >> C:\ProgramData\Python ^ That. Is not the path that th

Re: [Python-Dev] Posting frequent spurious changes in bugtracker

2013-01-03 Thread Glenn Linderman
On 1/3/2013 12:13 PM, Brett Cannon wrote: It is a form so technically nothing is being done incorrectly in changing values based on what you submit, whether you view them stale or not. Well, it sounds like a pretty shaky technology foundation, if simultaneous updates of a shared data reposito

Re: [Python-Dev] Posting frequent spurious changes in bugtracker

2013-01-03 Thread Glenn Linderman
On 1/3/2013 2:43 PM, Brett Cannon wrote: On Thu, Jan 3, 2013 at 4:06 PM, Glenn Linderman <mailto:v+pyt...@g.nevcal.com>> wrote: On 1/3/2013 12:13 PM, Brett Cannon wrote: It is a form so technically nothing is being done incorrectly in changing values based on what y

Re: [Python-Dev] PEP 433: Add cloexec argument to functions creating file descriptors

2013-01-13 Thread Glenn Linderman
On 1/13/2013 5:49 AM, Nick Coghlan wrote: I agree it makes it obvious what the right default behaviour should be: flag every FD as sensitive by default, and pass an argument to say "sensitive=False" when you want to disable Python's automatic protections. "sensitive" is a bad name... because th

<    2   3   4   5   6   7