Re: [Python-Dev] CVE tracking

2008-11-24 Thread Terry Reedy
Mart Somermaa wrote: I created a script that parses the http://cve.mitre.org/cgi-bin/cvekey.cgi?keyword=python Python-related CVE list and classifies the CVEs as follows: * "ok" -- CVE has references to bugs.python.org * "warnings" -- CVE has references to Python SVN revisions or an issue in

Re: [Python-Dev] Summary of Python tracker Issues

2008-11-24 Thread Terry Reedy
Martin v. Löwis wrote: Jeremy Hylton wrote: I wanted to ask a policy question on the bug tracker. What are we doing with bugs filed against Python 2.4? This bug http://bugs.python.org/issue1208304 reports a fd leak in Python 2.4, which doesn't exist in the head. Since Python 2.4 is in security

Re: [Python-Dev] Python for windows.

2008-11-26 Thread Terry Reedy
Koenig, Gerald wrote: I am working For Hewlett-Packard designing PC Consumer Desktop We have been including Python since over 10 years now on our systems. I am writing this on a Pavilion that came with Python2.2. I hope you are able to continue including Python. Now I am having a small is

Re: [Python-Dev] Python for windows.

2008-11-26 Thread Terry Reedy
Mark Hammond wrote: BTW - isn't there also a "\Program Files" requirement...? The requirement as I read it is that /Program Files be the over-rideable *default*, as is normal for Windows programs. HP installed 2.2 on my machine in /Python2.2. Since HP does the installation, I presume they

Re: [Python-Dev] RELEASED Python 3.0 final

2008-12-04 Thread Terry Reedy
Georg Brandl wrote: I can't find any docs built for Python 3.0 (not 3.1a0). The Windows installation has new 3.0 doc dated Dec 3, so it was built, just not posted correctly. ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/

Re: [Python-Dev] [Python-3000] RELEASED Python 3.0 final

2008-12-04 Thread Terry Reedy
Guido van Rossum wrote: Python 3.0 (a.k.a. "Python 3000" or "Py3k") represents a major milestone in Python's history, and was nearly three years in the making. This is a new version of the language that is incompatible with the 2.x line of releases, I think this while remaining true to BDFL

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

2008-12-04 Thread Terry Reedy
Toshio Kuratomi wrote: I opened up bug http://bugs.python.org/issue4006 a while ago and it was suggested in the report that it's not a bug but a feature and so I should come here to see about getting the feature changed :-) It does you no good and (and will irritate others) to conflate 'design

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

2008-12-04 Thread Terry Reedy
Toshio Kuratomi wrote: I would think life would be ultimately easier if either the file server or the shell server automatically translated file names from jis and utf8 and back, so that the PATH on the *nix shell server is entirely utf8. This is not possible because no part of the computer k

Re: [Python-Dev] RELEASED Python 3.0 final

2008-12-04 Thread Terry Reedy
Raymond Hettinger wrote: From: "A.M. Kuchling" <[EMAIL PROTECTED]> Perhaps the statement could say something like "we do not expect most Python packages will be ported to the 3.x series until around the time 3.1 is released in X months." (where X=12? 6?) I would leave out any discussion of

Re: [Python-Dev] [Python-3000] RELEASED Python 3.0 final

2008-12-04 Thread Terry Reedy
Nick Coghlan wrote: Terry Reedy wrote: and this could give some people a mis-impression, most likely negative, as to the magnitude and nature of the change. Most of the code I am now writing would, I believe, run with 2.5 except for print(..., file=xxx). And I know that there was concern for

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

2008-12-04 Thread Terry Reedy
James Y Knight wrote: On Dec 4, 2008, at 6:39 PM, Martin v. Löwis wrote: I'm in favour of a different, fifth solution: 5) represent all environment variables in Unicode strings, including the ones that currently fail to decode. (then do the same to file names, then drop the byte-oriented

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

2008-12-07 Thread Terry Reedy
Toshio Kuratomi wrote: - If this is true, a definition of os.listdir() that would better meet programmer expectation would be: "Give me all files in a directory with the output as str type". The definition of os.listdir() would be "Give me all files in a directory with the output as bytes typ

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

2008-12-07 Thread Terry Reedy
Guido van Rossum wrote: On Sun, Dec 7, 2008 at 1:20 PM, Terry Reedy <[EMAIL PROTECTED]> wrote: Toshio Kuratomi wrote: - If this is true, a definition of os.listdir() that would better meet programmer expectation would be: "Give me all files in a directory with the output as str

Re: [Python-Dev] Nonlocal shortcut

2008-12-07 Thread Terry Reedy
Fabio Zadrozny wrote: Hi, I'm currently implementing a parser to handle Python 3.0, and one of the points I found conflicting with the grammar specification is the PEP 3104. It says that a shortcut would be added to Python 3.0 so that "nonlocal x = 0" can be written. As near as I can tell fr

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

2008-12-08 Thread Terry Reedy
Nick Coghlan wrote: Terry Reedy wrote: This to be is an argument for keeping the default the current behavior, but not for rejecting flexibility. The computing world seems to be messier than we would like and worse that I realized until this week. As you say below, people need to better

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

2008-12-08 Thread Terry Reedy
M.-A. Lemburg wrote: On Sun, Dec 7, 2008 at 3:53 PM, Terry Reedy <[EMAIL PROTECTED]> wrote: try: files = os.listdir(somedir, errors = strict) except OSError as e: log() files = os.listdir(somedir) > If that error parameter is the same as in unicode(value, errors), then this w

Re: [Python-Dev] Self in method body

2008-12-08 Thread Terry Reedy
Filip Gruszczyński wrote: There is a large discussion on python-list about Guido's article about That discussion should stay there. new self syntax, therefore I would like to use that to raise similar question: self in the body. That has also be heavily discussed, many times, there and here

Re: [Python-Dev] Trap SIGSEGV and SIGFPE

2008-12-10 Thread Terry Reedy
Benjamin Peterson wrote: On Wed, Dec 10, 2008 at 12:37 PM, Victor Stinner This will of course leave the program in an undefined state. It is very likely to crash again, emit garbage, hang, or otherwise be useless. Recover after a segfault is dangerous, but my first goal was to get the Python

Re: [Python-Dev] beginning developer: fastest way to learn how Python 3.0 works

2008-12-13 Thread Terry Reedy
Roy Lowrance wrote: Maybe this is the correct list, as my inquiry is about how to learn how the current implementation works so that I could consider how to implement new features. So, here's a modified question: If you want to learn how python works (not how to program in the python language),

Re: [Python-Dev] [Python-3000] python-3000 list is closed

2008-12-15 Thread Terry Reedy
s...@pobox.com wrote: Martin> The mailing list python-3...@python.org is now closed. All Martin> further discussion of Python 3.x takes place on Martin> python-...@python.org. Maybe set up a simple email alias reflecting python-3000 to python-dev? It is currently mirrored to news.g

Re: [Python-Dev] [ANN] Python 2.5.4 (final)

2008-12-23 Thread Terry Reedy
Martin v. Löwis wrote: For more information on Python 2.5.4, including download links for various platforms, release notes, and known issues, please see: http://www.python.org/2.5.4 http://www.python.org/download/releases/2.5.4/ ___ Python-Dev

Re: [Python-Dev] Small question about BufferedRandom spec

2009-01-05 Thread Terry Reedy
Guido van Rossum wrote: « Q: Do we want to mandate in the specification that switching between reading and writing on a read-write object implies a .flush()? Or is that an implementation convenience that users should not rely on? » Is it ok if I assume that the answer is "it is an implementatio

Re: [Python-Dev] Decoder functions accept str in py3k

2009-01-07 Thread Terry Reedy
Guido van Rossum wrote: OK, ignore my previous comment. Sounds like the inidividual codecs need to tighten their type checking though -- perhaps *that* can be fixed in 3.0.1? I really don't see why any codec used to convert between text and bytes should support its output type as input. --Guido

Re: [Python-Dev] exec documentation

2009-01-09 Thread 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 are not going away in 2.7. in 3.0 execfile is not listed in builtin functions, exec is. exec is no

Re: [Python-Dev] py3k: TypeError: object.__init__() takes no parameters

2009-01-16 Thread Terry Reedy
Nick Craig-Wood wrote: I've noticed with latest python 3.1 checkout (68631) if I have this object hierarchy with a default __init__ in the superclass to be used by the subclasses which don't necessarily need an __init__ it blows up with a TypeError. class Field(object): object is default basec

Re: [Python-Dev] py3k: TypeError: object.__init__() takes no parameters

2009-01-16 Thread Terry Reedy
Alexandre Passos wrote: On Fri, Jan 16, 2009 at 2:12 PM, Terry Reedy wrote: I do not understand. You know it is going to run the .__init__ of its one and only base class, which here is object. Because this class might be used as base of another class. Take this trivial example code (in

Re: [Python-Dev] py3k: TypeError: object.__init__() takes no parameters

2009-01-16 Thread Terry Reedy
Nick Coghlan wrote: Terry Reedy wrote: So I wonder whether the proper change might have been to remove object.__init__. That would have broken too much code, since a lot of immutable types rely on it (they only override __new__ and leave __init__ alone). In what way do they depend on the

Re: [Python-Dev] Single Sign-On for *.python.org

2009-01-18 Thread Terry Reedy
anatoly techtonik wrote: Hello, Should we open a ticket to make a single sign-on service for *.python.org sites? There are at least 3 logins there may be more, for example if we are going to make some online content edition/comment system for docs. These are: bugs.python.org wiki.python.org pyp

Re: [Python-Dev] PEP 3142: Add a "while" clause to generator expressions

2009-01-19 Thread Terry Reedy
Gerald Britton wrote: Please find below PEP 3142: Add a "while" clause to generator expressions. I'm looking for feedback and discussion. This was already discussed on python-ideas where it got negative feedback. One objection, mentioned by Mathias Panzerbock and Georg Brandl, is that it is

Re: [Python-Dev] PEP 3142: Add a "while" clause to generator expressions

2009-01-19 Thread Terry Reedy
Kristján Valur Jónsson wrote: Are you all certain that this mapping from a generator expression to a foor loop isn't just a happy coincidence? Yes, The manual *defines* the meaning of a comprehension in terms of the corresponding nested statements. "The comprehension consists of a single exp

Re: [Python-Dev] Copyright notices in modules

2009-01-20 Thread Terry Reedy
M.-A. Lemburg wrote: On 2009-01-20 00:56, Raymond Hettinger wrote: Why does numbers.py say: # Copyright 2007 Google, Inc. All Rights Reserved. # Licensed to PSF under a Contributor Agreement. Because that's where that file originated, I guess. This is part of what you have to do for thi

Re: [Python-Dev] PEP 3142: Add a "while" clause to generator expressions

2009-01-20 Thread Terry Reedy
Gerald Britton wrote: I wonder if this is a bug? It is a known glitch reported last summer. Devs decided not to fix because doing so would, in the patches tried, slow list comps significantly. Also, the documented intent and expected usage of StopIteration is this "exception StopIteratio

Re: [Python-Dev] compiling python2.5 (msys+mingw+wine) - giving up using msvcr80 assemblies for now

2009-01-20 Thread Terry Reedy
Luke Kenneth Casson Leighton wrote: this is a fairly important issue for python development interoperability - martin mentioned that releases of mingw-compiled python, if done with a non-interoperable version of msvcrt, would cause much mayhem. well, compiling python on mingw with msvcr80 _can_ b

Re: [Python-Dev] PEP 3142: Add a "while" clause to generator expressions

2009-01-20 Thread Terry Reedy
Steven D'Aprano wrote: Another argument against the PEP was that it breaks the correspondence between the generator expression and the equivalent for-loop. I had never even noticed such correspondence before, because to my eyes the most important term is the yielded expression, not the scaffo

Re: [Python-Dev] Copyright notices in modules

2009-01-20 Thread Terry Reedy
Guido van Rossum wrote: 2009/1/20 Raymond Hettinger : I'm at a loss of why the notice needs to be there at all. There's a difference between contributing a whole file and contributing a patch. Patches do not require copyright notices. Whole files do. This is not affected by later edits to the

Re: [Python-Dev] PEP 3142: Add a "while" clause to generator expressions

2009-01-21 Thread Terry Reedy
Steven D'Aprano wrote: On Wed, 21 Jan 2009 03:10:24 pm Terry Reedy wrote: Steven D'Aprano wrote: The three clauses are neither in the same order, nor are they in reverse order. They are in the same order but rotated, with the last brought around to the front to emphasize it. Did

Re: [Python-Dev] PEP 3142: Add a "while" clause to generator expressions

2009-01-21 Thread Terry Reedy
Cameron Simpson wrote: Back at uni we had to implement a small language in our compilers class and the lecturer had specified a proper generic while loop, thus: loop: suite while invariant suite endloop In Python, that is spelled while True: suite if not invariant: break

Re: [Python-Dev] Should ftplib use UTF-8 instead of latin-1 encoding?

2009-01-22 Thread Terry Reedy
Giampaolo Rodola' wrote: Hi, while attempting to port pyftpdlib [1] to Python 3 I have noticed that ftplib differs from the previous 2.x version in that it uses latin-1 to encode everything it's sent over the FTP command channel, but by reading RFC-2640 [2] it seems that UTF-8 should be preferred

Re: [Python-Dev] __del__ and tp_dealloc in the IO lib

2009-01-23 Thread Terry Reedy
Giovanni Bajo wrote: You are so very wrong, my son. CPython's implementation strategy *will* evolve. Several groups are hard at work trying to make a faster Python interpreter, and when they succeed, everyone, including you, will want to use their version (or their version may simply *be* the n

Re: [Python-Dev] PEP 374 (DVCS) now in reST

2009-01-23 Thread Terry Reedy
Brett Cannon wrote: On Fri, Jan 23, 2009 at 13:39, Paul Moore wrote: I'm not sure I'm comfortable with sitting back and waiting to quite that extent (I'm *already* biting my tongue over some of Brett's comments with which I strongly disagree), but I'd rather not have the PEP dissolve in a flam

Re: [Python-Dev] __del__ and tp_dealloc in the IO lib

2009-01-23 Thread Terry Reedy
Guido van Rossum wrote: On Fri, Jan 23, 2009 at 12:52 PM, Terry Reedy wrote: While a strong argument can be made that the remaining 2.x versions should not be changed, they do not apply to 3.x. New code and ported old code should use 'with' wherever quick closing needs to be

Re: [Python-Dev] IDLE docs at python.org/idle

2009-01-26 Thread Terry Reedy
Georg Brandl wrote: re http://bugs.python.org/issue5066 Is that documentation maintained in some way? Not currently, pretty obviously. Screenshots are 1.5.2. Windows was 95/98. Shouldn't it be merged into the main docs? If and only if updated. As noted on the issue, I am willing to hel

Re: [Python-Dev] [PSF-Board] I've got a surprise for you!

2009-01-27 Thread Terry Reedy
Steve Holden wrote: We now have zone servers in the OpenSolaris test farm, and I plan to add guest os servers in the next few weeks using ldoms (sparc) and xvm (x64). The zone servers provide whole root zones, which should be a good development environment for most projects. Check it out: http:

Re: [Python-Dev] Python 3.0.1 (io-in-c)

2009-01-28 Thread Terry Reedy
Steven Bethard wrote: On Wed, Jan 28, 2009 at 10:29 AM, "Martin v. Löwis" wrote: Notice that the determination of the specific encoding used is fairly elaborate: - if IO is to a terminal, Python tries to determine the encoding of the terminal. This is mostly relevant for Windows (which uses,

Re: [Python-Dev] Python 3.0.1

2009-01-28 Thread Terry Reedy
Michael Foord wrote: M.-A. Lemburg wrote: Why don't we just mark 3.0.x as experimental branch and keep updating/ fixing things that were not sorted out for the 3.0.0 release ?! I think that's a fair approach, given that the only way to get field testing for new open-source software is to relea

Re: [Python-Dev] Python 3.0.1

2009-01-28 Thread Terry Reedy
Stephen J. Turnbull wrote: "Martin v. Löwis" writes: > > It might also be a good idea to take the download link off the front > > page of python.org: until that happens newbies are going to keep coming > > along and downloading it "because it's the newest". By that logic, I would suggest rem

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

2009-01-29 Thread Terry Reedy
Ben North wrote: I find 'functools.partial' useful, but occasionally I'm unable to use it because it lacks a 'from the right' version. ... Would there be any interest in this? I think so. Post your patch to the tracker. Even if eventually rejected, it will be there for people to use. _

Re: [Python-Dev] pprint(iterator)

2009-01-29 Thread Terry Reedy
Ron Adam wrote: Steven D'Aprano wrote: Michael Foord wrote: Don't we have a pretty-print API - and isn't it spelled __str__ ? Not really. If it were as simple as calling str(obj), there would be no need for the pprint module. I agree. And when I want to use pprint, there are usually ad

Re: [Python-Dev] 3.0.1/3.1.0 summary

2009-01-29 Thread Terry Reedy
Brett Cannon wrote: This is my attempt to summarize what everyone has been saying so we can get this resolved. From what I can tell, most people like the idea of doing a 3.0.1 release ASAP (like "in a week or so" fast) with the stuff that should have been removed from 3.0.0 in the first place

Re: [Python-Dev] Universal newlines, and the gzip module.

2009-01-30 Thread Terry Reedy
Christopher Barker wrote: I tried to post this to the bug tracker, but my attempt to create an account failed -- do I need to be pre-approved or something? No. If you do not get a response from the above, and a retry does not work, you could email webmas...@python.org with details on what yo

Re: [Python-Dev] Python 3.0.1

2009-01-30 Thread Terry Reedy
Paul Moore wrote: Serious question: does anybody know how to get better communication from the user base? One of the nice things about Python is that the downloads are truly free -- no required 'registration'. On the other hand, there is no option to give feedback either. If PSF/devs wan

Re: [Python-Dev] python 3.0, tp_compare not used for == test?

2009-02-01 Thread Terry Reedy
Campbell Barton wrote: Hi, I have been writing a new C api that can build with both python 2.6 and 3.0 Questions about using current releases should be directed to the python-list (or comp.lang.python or gmane.comp.python.general), not python-dev, which is for development of future releases.

Re: [Python-Dev] The interpreter accepts f(**{'5':'foo'}); is this intentional?

2009-02-05 Thread Terry Reedy
Christian Heimes wrote: Nick Coghlan wrote: Generally speaking, Python namespace dictionaries (be it globals(), locals(), the __dict__ attribute of an instance or a set of keyword arguments) aren't required to enforce the use of legal identifiers (in many cases, the CPython variants don't even e

Re: [Python-Dev] inconsistent __abstractmethods__ behavior; lack of documentation

2011-08-06 Thread Terry Reedy
On 8/6/2011 8:29 AM, Guido van Rossum wrote: Do you realize that __xxx__ names can have any semantics they darn well please? That does not seem to be to be the issue Cristoff raised. If a particular __xxx__ name (or some aspect of it) is undocumented that's not a bug (not even a doc bug), it

Re: [Python-Dev] urllib bug in Python 3.2.1?

2011-08-08 Thread Terry Reedy
On 8/8/2011 4:26 PM, Victor Stinner wrote: With Python 3.1 and Python 3.2.1 it works OK, but with Python 3.2.1 the read returns an empty string (I checked it myself). http://bugs.python.org/issue12576 The bug is now fixed. Can you release a Python 3.2.2, maybe only with this fix? Any new re

Re: [Python-Dev] urllib bug in Python 3.2.1?

2011-08-09 Thread Terry Reedy
On 8/9/2011 2:02 AM, Georg Brandl wrote: Am 09.08.2011 01:35, schrieb Terry Reedy: On 8/8/2011 4:26 PM, Victor Stinner wrote: With Python 3.1 and Python 3.2.1 it works OK, but with Python 3.2.1 the read returns an empty string (I checked it myself). http://bugs.python.org/issue12576 The

Re: [Python-Dev] [PEPs] Rebooting PEP 394 (aka Support the /usr/bin/python2 symlink upstream)

2011-08-11 Thread Terry Reedy
On 8/11/2011 10:36 AM, Éric Araujo wrote: It would be interesting to have feedback from people who lived the transition to Python 2. There was no comparable transition. Python 2.0 was basically 1.6 renamed for a different distributor. I regard Python 2.2, which introduced new-style, as the b

Re: [Python-Dev] Status of the PEP 400? (deprecate codecs.StreamReader/StreamWriter)

2011-08-11 Thread Terry Reedy
On 8/11/2011 3:31 PM, Victor Stinner wrote: Le 29/07/2011 19:01, Guido van Rossum a écrit : I will add your alternative to the PEP (except if you would like to do that yourself?). If I understood correctly, you propose to: * rename codecs.open() to codecs.open_stream() * change codecs.open() to

Re: [Python-Dev] [Python-checkins] cpython (3.2): Use real word in English text (i.e. not code)

2011-08-12 Thread Terry Reedy
On 8/12/2011 1:17 PM, Éric Araujo wrote: With all due respect to the fact that you’re a native speaker and I’m not, here I disagree because I parse the sentence in this way (using parens to group things by precedence, if you want): You are right, I misparsed without considering the full contex

Re: [Python-Dev] Python 3.2.2rc1

2011-08-14 Thread Terry Reedy
On 8/14/2011 12:31 PM, "Martin v. Löwis" wrote: On behalf of the Python development team, I'm happy to announce the first release candidate of the Python 3.2.2 maintenance release (3.2.2rc1). Python 3.2.2 fixes `a regression`_ in the ``urllib.request`` module that p

Re: [Python-Dev] cpython: Add Py_RETURN_NOTIMPLEMENTED macro. Fixes #12724.

2011-08-15 Thread Terry Reedy
On 8/15/2011 9:49 AM, Barry Warsaw wrote: On Aug 15, 2011, at 05:46 AM, Raymond Hettinger wrote: I don't think that is worth it. There is some value to keeping the API consistent with the style that has been used in the past. So, I vote for Py_RETURN_NOTIMPLEMENTED. There's no real need to f

Re: [Python-Dev] [Python-checkins] cpython (3.2): #5301: add image/vnd.microsoft.icon (.ico) MIME type

2011-08-21 Thread Terry Reedy
On 8/21/2011 5:09 AM, Sandro Tosi wrote: However small the commit was, I think it still was a feature request, so I wonder if it was appropriate for the stable versions. Good catch. I can see your point: the reason I committed it also on the stable branches is that .ico are already out there

Re: [Python-Dev] [Python-checkins] cpython (3.2): #5301: add image/vnd.microsoft.icon (.ico) MIME type

2011-08-21 Thread Terry Reedy
On 8/21/2011 8:10 PM, Scott Dial wrote: On 8/21/2011 3:12 PM, Terry Reedy wrote: But it is not (a behavior bug). Every feature request 'fixes' what its proposer considers to be a design bug or something. What's the feature added? That's a semantic game. Please.

Re: [Python-Dev] FileSystemError or FilesystemError?

2011-08-23 Thread Terry Reedy
On 8/23/2011 2:46 PM, Brian Curtin wrote: I don't care all that much but I'm reminded of the .NET FileSystemWatcher class, so put me down for +0.5 on FileSystemError. For other reasons, I am at lease +.5 for FileSystemError also. -- Terry Jan Reedy __

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

2011-08-23 Thread Terry Reedy
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 "correctly" spells foreign words (résumé and th

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

2011-08-23 Thread Terry Reedy
On 8/23/2011 9:21 AM, Victor Stinner wrote: Le 23/08/2011 15:06, "Martin v. Löwis" a écrit : Well, things have to be done in order: 1. the PEP needs to be approved 2. the performance bottlenecks need to be identified 3. optimizations should be applied. I would not vote for the PEP if it slows

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

2011-08-24 Thread Terry Reedy
On 8/24/2011 4:22 AM, Stephen J. Turnbull wrote: Terry Reedy writes: > The current UCS2 Unicode string implementation, by design, quickly gives > WRONG answers for len(), iteration, indexing, and slicing if a string > contains any non-BMP (surrogate pair) Unicode characters.

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

2011-08-24 Thread Terry Reedy
On 8/24/2011 1:50 PM, "Martin v. Löwis" wrote: I'd like to point out that the improved compatibility is only a side effect, not the primary objective of the PEP. Then why does the Rationale start with "on systems only supporting UTF-16, users complain that non-BMP characters are not properly

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

2011-08-24 Thread Terry Reedy
On 8/24/2011 12:34 PM, Stephen J. Turnbull wrote: Terry Reedy writes: > Excuse me for believing the fine 3.2 manual that says > "Strings contain Unicode characters." The manual is wrong, then, subject to a pronouncement to the contrary, Please suggest a re-wording then

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

2011-08-24 Thread Terry Reedy
On 8/24/2011 1:45 PM, Victor Stinner wrote: Le 24/08/2011 02:46, Terry Reedy a écrit : I don't think that using UTF-16 with surrogate pairs is really a big problem. A lot of work has been done to hide this. For example, repr(chr(0x10)) now displays '\U0010' instead of

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

2011-08-26 Thread Terry Reedy
On 8/26/2011 5:29 AM, "Martin v. Löwis" wrote: IronPython and Jython can retain UTF-16 as their native form if that makes interop cleaner, but in doing so they need to ensure that basic operations like indexing and len work in terms of code points, not code units, if they are to conform. My i

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

2011-08-26 Thread Terry Reedy
On 8/26/2011 8:42 PM, Guido van Rossum wrote: On Fri, Aug 26, 2011 at 3:57 PM, Terry Reedy wrote: My impression is that a UFT-16 implementation, to be properly called such, must do len and [] in terms of code points, which is why Python's narrow builds are called UCS-2 and not UTF-16

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

2011-08-26 Thread Terry Reedy
On 8/26/2011 8:23 PM, Antoine Pitrou wrote: I would only agree as long as it wasn't too much worse than O(1). O(log n) might be all right, but O(n) would be unacceptable, I think. It also depends a lot on *actual* measured performance Amen. Some regard O(n*n) sorts to be, by definition, 'wor

Re: [Python-Dev] Should we move to replace re with regex?

2011-08-26 Thread Terry Reedy
On 8/26/2011 9:56 PM, Antoine Pitrou wrote: Another "interesting" question is whether it's easy to port to the PEP 393 string representation, if it gets accepted. Will the re module need porting also? -- Terry Jan Reedy ___ Python-Dev mailing list

Re: [Python-Dev] LZMA compression support in 3.3

2011-08-27 Thread Terry Reedy
On 8/27/2011 9:47 AM, Nadeem Vawda wrote: I'd like to propose the addition of a new module in Python 3.3. The 'lzma' module will provide support for compression and decompression using the LZMA algorithm, and the .xz and .lzma file formats. The matter has already been discussed on the tracker

Re: [Python-Dev] Should we move to replace re with regex?

2011-08-27 Thread Terry Reedy
On 8/27/2011 7:39 PM, Greg Ewing wrote: Nick Coghlan wrote: The next step needed is for someone to volunteer to write and champion a PEP that: Would it be feasible and desirable to modify regex so that it *is* backwards-compatible with re, with a view to making it a drop-in replacement at som

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

2011-08-27 Thread Terry Reedy
Dan, I once had the more or less the same opinion/question as you with regard to ctypes, but I now see at least 3 problems. 1) It seems hard to write it correctly. There are currently 47 open ctypes issues, with 9 being feature requests, leaving 38 behavior-related issues. Tom Heller has not b

Re: [Python-Dev] Should we move to replace re with regex?

2011-08-27 Thread Terry Reedy
On 8/27/2011 11:54 PM, Guido van Rossum wrote: If so, it would be like the decimal module, which closely tracks the IEEE decimal standard, rather than the binary float standard. Well, I would hope that for each "major" Python version (i.e. 3.2, 3.3, 3.4, ...) we would pick a specific version o

Re: [Python-Dev] Should we move to replace re with regex?

2011-08-29 Thread Terry Reedy
On 8/29/2011 9:00 AM, Barry Warsaw wrote: On Aug 27, 2011, at 07:11 PM, Martin v. Löwis wrote: A PEP should IMO only cover end-user aspects of the new re module. Code organization is typically not in the PEP. To give a specific example: you mentioned that there is (near) code duplication MRAB's

Re: [Python-Dev] issue 6721 "Locks in python standard library should be sanitized on fork"

2011-08-29 Thread Terry Reedy
On 8/29/2011 3:41 PM, Nir Aides wrote: I am not familiar with the python-dev definition for deprecation, but Possible to planned eventual removal when I used the word in the bug discussion I meant to advertize to users that they should not mix threading and forking since that mix is and will

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

2011-08-30 Thread Terry Reedy
On 8/30/2011 1:05 PM, Guido van Rossum wrote: I see. So there is potential for error there. To elaborate, with CPython it looks pretty solid, at least for functions and constants (does it do structs?). You must manually declare the name and signature of a function, and Pyrex/Cython emits C cod

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

2011-08-30 Thread Terry Reedy
On 8/30/2011 1:23 PM, stefan brunthaler wrote: (I just wanted to know if there is substantial interest so that > it eventually pays off to find and fix the remaining bugs) It is the nature of our development process that there usually can be no guarantee of acceptance of future code. The rath

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

2011-08-30 Thread Terry Reedy
On 8/30/2011 2:12 PM, Guido van Rossum wrote: On Tue, Aug 30, 2011 at 10:50 AM, stefan brunthaler wrote: Do you really need it to match a machine word? Or is, say, a 16-bit format sufficient. Hm, technically no, but practically it makes more sense, as (at least for x86 architectures) having

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

2011-08-31 Thread Terry Reedy
On 8/31/2011 1:10 PM, Guido van Rossum wrote: This is why I find the issue of Python, the language (and stdlib), as a whole "conforming to the Unicode standard" such a troublesome concept -- I think it is something that an application may claim, but the language should make much more modest clai

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

2011-09-01 Thread Terry Reedy
On 9/1/2011 11:45 AM, Guido van Rossum wrote: typewriter). Dutch does have one native use of the umlaut (though it has a different name, I forget which, maybe trema :-), You remember correctly. According to https://secure.wikimedia.org/wikipedia/en/wiki/Trema_%28diacritic%29 'trema' (Greek 'ho

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

2011-09-01 Thread Terry Reedy
On 9/1/2011 11:59 PM, Stephen J. Turnbull wrote: I believe that the deprecation of the digraphs as separate letters occurred as the telephone became widely used in Spain, and the telephone company demanded an official proclamation from whatever Ministry is responsible for culture that it was OK

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

2011-09-04 Thread Terry Reedy
On 9/4/2011 4:21 PM, Georg Brandl wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On behalf of the Python development team, I'm happy to announce the Python 3.2.2 maintenance release. To download Python 3.2 visit: http://www.python.org/download/releases/3.2/ To download 3.2.2 vis

Re: [Python-Dev] [Python-checkins] cpython (3.2): Fix PyUnicode_AsWideCharString() doc: size doesn't contain the null character

2011-09-06 Thread Terry Reedy
On 9/6/2011 11:11 AM, Tres Seaver wrote: FWIW, the RFC 20 (the ASCII spec) really really defines 'NUL' as the *name* of the \0 character, not just an "abbreviation used in tables": http://tools.ietf.org/html/rfc20#section-5.2 As I read the text, the 2 or 3 capital letter *symbols* are abb

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

2011-09-06 Thread Terry Reedy
On 9/6/2011 12:58 PM, Tres Seaver wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 09/06/2011 12:59 PM, Stephen J. Turnbull wrote: Joao S. O. Bueno writes: Removing it would mean explicitly "batteries removal". That's what we usually do with a dead battery, no? Normally one "replac

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

2011-09-08 Thread Terry Reedy
On 9/8/2011 6:15 PM, fwierzbi...@gmail.com wrote: Oops, forgot to add the link for the gory details for Java and> 2 byte unicode: http://java.sun.com/developer/technicalArticles/Intl/Supplementary/ This is dated 2004. Basically, they considered several options, tried out 4, and ended up stic

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

2011-09-09 Thread Terry Reedy
On 9/9/2011 12:12 PM, fwierzbi...@gmail.com wrote: On Thu, Sep 8, 2011 at 10:39 PM, Terry Reedy wrote: On 9/8/2011 6:15 PM, fwierzbi...@gmail.com wrote: Oops, forgot to add the link for the gory details for Java and>2 byte unicode: http://java.sun.com/developer/technicalArticles/I

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

2011-09-09 Thread Terry Reedy
are seldom more than 1000 chars. On Fri, Sep 9, 2011 at 12:58 PM, fwierzbi...@gmail.com wrote: On Fri, Sep 9, 2011 at 10:16 AM, Terry Reedy wrote: I am curious how you index by code point rather than code unit with 16-bit code units and how it compares with the method I posted. Is there anyth

Re: [Python-Dev] PEP 393: Special-casing ASCII-only strings

2011-09-15 Thread Terry Reedy
On 9/15/2011 11:50 AM, "Martin v. Löwis" wrote: To comply with the C aliasing rules, the structures would look like this: typedef struct { PyObject_HEAD Py_ssize_t length; union { void *any; Py_UCS1 *latin1; Py_UCS2 *ucs2; Py_UCS4 *ucs4; } data; Py_hash_t hash; int state; /* may include SSTATE_

Re: [Python-Dev] Inconsistent script/console behaviour

2011-09-23 Thread Terry Reedy
On 9/23/2011 7:25 PM, anatoly techtonik wrote: Currently if you work in console and define a function and then immediately call it - it will fail with SyntaxError. For example, copy paste this completely valid Python script into console: def some(): print "XXX" some() There is an issue for t

Re: [Python-Dev] range objects in 3.x

2011-09-24 Thread Terry Reedy
On 9/23/2011 10:40 PM, Guido van Rossum wrote: On Fri, Sep 23, 2011 at 7:13 PM, Steven D'Aprano wrote: I also carefully *didn't* claim that it made rounding issues disappear completely. I'll add a note clarifying that rounding still occurs and as a consequence results can be unexpected. To

Re: [Python-Dev] range objects in 3.x

2011-09-27 Thread Terry Reedy
On 9/27/2011 1:03 PM, Guido van Rossum wrote: mimicking the behavior of range() for floats is a bad idea, and that we need to come up with a name for an API that takes start/stop/count arguments instead of start/stop/step. [In the following, I use count as the number of intervals; the number o

Re: [Python-Dev] unittest missing assertNotRaises

2011-09-27 Thread Terry Reedy
On 9/27/2011 2:46 PM, Wilfred Hughes wrote: Hi folks I wasn't sure if this warranted a bug in the tracker, so I thought I'd raise it here first. unittest has assertIn, assertNotIn, assertEqual, assertNotEqual and so These all test possible specification conditions and sensible test condition

Re: [Python-Dev] cpython: PyUnicode_FromKindAndData() raises a ValueError if the kind is unknown

2011-10-03 Thread Terry Reedy
On 10/3/2011 12:23 PM, "Martin v. Löwis" wrote: Am 02.10.2011 17:46, schrieb Benjamin Peterson: On 10/02/11 01:14, victor.stinner wrote: PyUnicode_FromKindAndData() raises a ValueError if the kind is unknown Also, could I remind you that a better commit message is probably "make PyUnicod

Re: [Python-Dev] [Python-checkins] cpython: Document requierements of Unicode kinds

2011-10-05 Thread Terry Reedy
On 10/5/2011 1:43 PM, victor.stinner wrote: http://hg.python.org/cpython/rev/055174308822 changeset: 72699:055174308822 user:Victor Stinner date:Wed Oct 05 01:31:05 2011 +0200 summary: Document requierements of Unicode kinds files: Include/unicodeobject.h | 24

Re: [Python-Dev] [Python-checkins] cpython: Document requierements of Unicode kinds

2011-10-05 Thread Terry Reedy
On 10/5/2011 7:53 PM, Victor Stinner wrote: Le mercredi 5 octobre 2011 21:25:22, Terry Reedy a écrit : + - PyUnicode_1BYTE_KIND (1): + + * character type = Py_UCS1 (8 bits, unsigned) + * if ascii is 1, at least one character must be in range + U

<    15   16   17   18   19   20   21   22   23   24   >