[issue12747] Move devguide into cpython repo

2011-08-13 Thread Nick Coghlan
Nick Coghlan added the comment: I'd say the main reason the dev guide is in a separate repo is the historical one (i.e. Brett was working on it as a separate repo prior to the hg migration and we never merged it). However, the version independent nature of the material is the main argument a

[issue11866] race condition in threading._newname()

2011-08-13 Thread Peter Saveliev
Peter Saveliev added the comment: counter.next() is a C routine and it is atomic from Python's point of view — if I understand right. The test shows that original threading.py leads to a (rare) race here, while with counter object there is no race condition. -- _

[issue11866] race condition in threading._newname()

2011-08-13 Thread Raymond Hettinger
Raymond Hettinger added the comment: I think the patch is correct. FWIW, my style is to prebind the next method, making the counter completely self-contained (like a closure): +_counter = itertools.count().next def _newname(template="Thread-%d"): global _counter -_counter = _counter

[issue12746] normalization is affected by unicode width

2011-08-13 Thread Ezio Melotti
Changes by Ezio Melotti : -- components: +Unicode nosy: +ezio.melotti ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubsc

[issue2857] Add "java modified utf-8" codec

2011-08-13 Thread STINNER Victor
STINNER Victor added the comment: > Python does have other "weird" encodings like bz2 or rot13. No, it has no more such weird encodings. -- ___ Python tracker ___ __

[issue12731] python lib re uses obsolete sense of \w in full violation of UTS#18 RL1.2a

2011-08-13 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +haypo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.

[issue11513] chained exception/incorrect exception from tarfile.open on a non-existent file

2011-08-13 Thread Roundup Robot
Roundup Robot added the comment: New changeset 843cd43206b4 by Georg Brandl in branch '3.2': Fix #11513: wrong exception handling for the case that GzipFile itself raises an IOError. http://hg.python.org/cpython/rev/843cd43206b4 -- nosy: +python-dev ___

[issue11513] chained exception/incorrect exception from tarfile.open on a non-existent file

2011-08-13 Thread Georg Brandl
Georg Brandl added the comment: Fixed in 3.2/default. 2.7 has even more primitive error handling; should the gzopen() be adapted to the 3.x case? -- nosy: +georg.brandl ___ Python tracker ___

[issue10799] Improve webbrowser (.open) doc and behavior

2011-08-13 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +ezio.melotti ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.py

[issue12737] str.title() is overzealous by upcasing combining marks inappropriately

2011-08-13 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +haypo, loewis stage: -> needs patch versions: +Python 3.3 ___ Python tracker ___ ___ Python-bug

[issue12746] normalization is affected by unicode width

2011-08-13 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +haypo, lemburg ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mai

[issue12646] zlib.Decompress.decompress/flush do not raise any exceptions when given truncated input streams

2011-08-13 Thread Roundup Robot
Roundup Robot added the comment: New changeset bb6c2d5c811d by Nadeem Vawda in branch 'default': Issue #12646: Add an 'eof' attribute to zlib.Decompress. http://hg.python.org/cpython/rev/bb6c2d5c811d -- nosy: +python-dev ___ Python tracker

[issue12669] test_curses skipped on buildbots

2011-08-13 Thread Roundup Robot
Roundup Robot added the comment: New changeset 4358909ee221 by Nadeem Vawda in branch 'default': Issue #12669: Fix test_curses so that it can run on the buildbots. http://hg.python.org/cpython/rev/4358909ee221 -- nosy: +python-dev ___ Python tracker

[issue12646] zlib.Decompress.decompress/flush do not raise any exceptions when given truncated input streams

2011-08-13 Thread Roundup Robot
Roundup Robot added the comment: New changeset 65d61ed991d9 by Nadeem Vawda in branch 'default': Fix incorrect comment in zlib.Decompress.flush(). http://hg.python.org/cpython/rev/65d61ed991d9 -- ___ Python tracker

[issue12723] Provide an API in tkSimpleDialog for defining custom validation functions

2011-08-13 Thread R. David Murray
R. David Murray added the comment: A bit of both, I think. The current function is actually 'getvalue' and is responsible for retrieving the value, validating its type, and converting to that type (the current ones do both in the same operation). It feels to me like a cleaner interface to d

[issue12646] zlib.Decompress.decompress/flush do not raise any exceptions when given truncated input streams

2011-08-13 Thread Nadeem Vawda
Changes by Nadeem Vawda : -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed type: behavior -> feature request ___ Python tracker ___ _

[issue12729] Python lib re cannot handle Unicode properly due to narrow/wide bug

2011-08-13 Thread R. David Murray
R. David Murray added the comment: Tom, note that nobody is arguing that what you are requesting is a bad thing :) As far as I know, Matthew is the only one currently working on the regex support in Python. (Other developers will commit small fixes if someone proposes a patch, but no one tha

[issue12740] Add struct.Struct.nmemb

2011-08-13 Thread R. David Murray
R. David Murray added the comment: As a new feature, this could only go into 3.3. -- nosy: +r.david.murray versions: -Python 3.2 ___ Python tracker ___

[issue12740] Add struct.Struct.nmemb

2011-08-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: I had never heard of "nmemb". "nmembers" would be less cryptic. The patch needs a "versionadded" directive in the docs. -- nosy: +pitrou ___ Python tracker ___

[issue12745] Python2 or Python3 page

2011-08-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: It is a wiki page, so you can edit it yourself (you probably need to register, though). If you think your modifications would be too drastic, perhaps you want to launch a discussion on the python-dev mailing-list about that page and its current contents. ---

[issue12740] Add struct.Struct.nmemb

2011-08-13 Thread Georg Brandl
Georg Brandl added the comment: While we're at it, let's add str.pbrk() ;) -- nosy: +georg.brandl ___ Python tracker ___ ___ Python-b

[issue12744] inefficient pickling of long integers on 64-bit builds

2011-08-13 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +alexandre.vassalotti ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http

[issue9552] ssl build under Windows always rebuilds OpenSSL

2011-08-13 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- resolution: -> fixed stage: -> committed/rejected status: open -> closed ___ Python tracker ___ ___ Py

[issue12740] Add struct.Struct.nmemb

2011-08-13 Thread Raymond Hettinger
Raymond Hettinger added the comment: How about __len__()? -- nosy: +rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing li

[issue12731] python lib re uses obsolete sense of \w in full violation of UTS#18 RL1.2a

2011-08-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: > However, because the \w&c issues are bigger, Java addressed the tr18 RL1.2a > issues differently, this time by creating a new compilation flag called > UNICODE_CHARACTER_CLASSES (with corresponding embedded "(?U)" regex flag.) > > Truth be told, even Perl has

[issue12740] Add struct.Struct.nmemb

2011-08-13 Thread Meador Inge
Meador Inge added the comment: The functionality part of the patch looks reasonable. However, the pseudo-randomization in the unit tests seems like a bad idea. Say someone is adding a new feature X. Runs the unit tests to find one of them failing. Then runs them again to investigate and t

[issue12744] inefficient pickling of long integers on 64-bit builds

2011-08-13 Thread Roundup Robot
Roundup Robot added the comment: New changeset 8e824e09924a by Antoine Pitrou in branch 'default': Issue #12744: Fix inefficient representation of integers http://hg.python.org/cpython/rev/8e824e09924a -- nosy: +python-dev ___ Python tracker

[issue12744] inefficient pickling of long integers on 64-bit builds

2011-08-13 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed ___ Python tracker ___ __

[issue11241] ctypes: subclassing an already subclassed ArrayType generates AttributeError

2011-08-13 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: Yes, the patch looks good! -- resolution: -> accepted ___ Python tracker ___ ___ Python-bugs

[issue12659] Add tests for packaging.tests.support

2011-08-13 Thread Francisco Martín Brugué
Francisco Martín Brugué added the comment: I've started with test for “fake_dec” and “TempdirManager”. Please let me know if that in the line you want. Thanks in advance Francis -- keywords: +patch nosy: +francismb Added file: http://bugs.python.org/file22895/issue12659_v1.patch ___

[issue12747] Move devguide into cpython repo

2011-08-13 Thread Eric Snow
Eric Snow added the comment: That's fine. The discussion had moved away from the devguide, so I figured it would be worth following up. You guys have made some good points. -- resolution: -> rejected status: open -> closed ___ Python tracker

[issue12729] Python lib re cannot handle Unicode properly due to narrow/wide bug

2011-08-13 Thread Tom Christiansen
Tom Christiansen added the comment: David Murray wrote: > Tom, note that nobody is arguing that what you are requesting is a bad > thing :) There looked to be minor some resistance, based on absolute backwards compatibility even if wrong, regarding changing anything *at all* in re, even thing

[issue12729] Python lib re cannot handle Unicode properly due to narrow/wide bug

2011-08-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Here's why I say that Python uses UTF-16 not UCS-2 on its narrow builds. > Perhaps someone could tell me why the Python documentation says it uses > UCS-2 on a narrow build. There's a disagreement on that point between several developers. See an example sub-

[issue12729] Python lib re cannot handle Unicode properly due to narrow/wide bug

2011-08-13 Thread Matthew Barnett
Matthew Barnett added the comment: There are occasions when you want to do string slicing, often of the form: pos = my_str.index(x) endpos = my_str.index(y) substring = my_str[pos : endpos] To me that suggests that if UTF-8 is used then it may be worth profiling to see whether caching the las

[issue12729] Python lib re cannot handle Unicode properly due to narrow/wide bug

2011-08-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: > There are occasions when you want to do string slicing, often of the form: > > pos = my_str.index(x) > endpos = my_str.index(y) > substring = my_str[pos : endpos] > > To me that suggests that if UTF-8 is used then it may be worth > profiling to see whether c

[issue12740] Add struct.Struct.nmemb

2011-08-13 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- assignee: -> rhettinger priority: normal -> low ___ Python tracker ___ ___ Python-bugs-list mailing

[issue12744] inefficient pickling of long integers on 64-bit builds

2011-08-13 Thread Raymond Hettinger
Raymond Hettinger added the comment: Nice. -- nosy: +rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue12729] Python lib re cannot handle Unicode properly due to narrow/wide bug

2011-08-13 Thread Tom Christiansen
Tom Christiansen added the comment: Matthew Barnett wrote on Sat, 13 Aug 2011 20:57:40 -: > There are occasions when you want to do string slicing, often of the form: > pos = my_str.index(x) > endpos = my_str.index(y) > substring = my_str[pos : endpos] Me, I would probably give

[issue12729] Python lib re cannot handle Unicode properly due to narrow/wide bug

2011-08-13 Thread Tom Christiansen
Tom Christiansen added the comment: Antoine Pitrou wrote on Sat, 13 Aug 2011 21:09:52 -: > And/or a lookup table giving the byte offset of, say, every 16th > character. It gives you a O(1) lookup with a relatively reasonable > constant cost (you have to scan for less than 16 characters

[issue12729] Python lib re cannot handle Unicode properly due to narrow/wide bug

2011-08-13 Thread Matthew Barnett
Matthew Barnett added the comment: You're right about starting the second search from where the first finished. Caching the position would be an advantage there. The memory cost of extra pointers wouldn't be so bad if UTF-8 took less space than the current format. Regex isn't used as much as

[issue12729] Python lib re cannot handle Unicode properly due to narrow/wide bug

2011-08-13 Thread Tom Christiansen
Tom Christiansen added the comment: >> Here's why I say that Python uses UTF-16 not UCS-2 on its narrow builds. >> Perhaps someone could tell me why the Python documentation says it uses >> UCS-2 on a narrow build. > There's a disagreement on that point between several developers. > See an exa

[issue12725] Docs: Odd phrase "floating seconds" in socket.html

2011-08-13 Thread Ben Hayden
Ben Hayden added the comment: I made the suggested second change - both in the docs & the socketmodule.c file. If there's a different way to patch documentation, someone let me know. :D -- keywords: +patch nosy: +beardedp Added file: http://bugs.python.org/file22896/issue12725.patch _

[issue12748] IDLE halts on osx when copy and paste

2011-08-13 Thread hy
New submission from hy : The IDLE halts on os x when copy and paste I tried in 10.6.8 and 10.7 Now I could only use IDLE in Windows in VMware -- assignee: ronaldoussoren components: IDLE, Macintosh messages: 142046 nosy: hoyeung, ronaldoussoren priority: normal severity: normal status: o

[issue12729] Python lib re cannot handle Unicode properly due to narrow/wide bug

2011-08-13 Thread Ezio Melotti
Ezio Melotti added the comment: > It is simply a design error to pretend that the number of characters > is the number of code units instead of code points. A terrible and > ugly one, but it does not mean you are UCS-2. If you are referring to the value returned by len(unicode_string), it is t

[issue12748] IDLE halts on osx when copy and paste

2011-08-13 Thread Ezio Melotti
Ezio Melotti added the comment: Can you specify what version of Python are you using, how do you copy/paste (e.g. ctrl+c/v, from the menu), and if it halts regardless of what you copy/paste? -- nosy: +ezio.melotti ___ Python tracker

[issue12725] Docs: Odd phrase "floating seconds" in socket.html

2011-08-13 Thread Roundup Robot
Roundup Robot added the comment: New changeset dfe6f0a603d2 by Ezio Melotti in branch '2.7': #12725: fix working. Patch by Ben Hayden. http://hg.python.org/cpython/rev/dfe6f0a603d2 New changeset ab3432a81c26 by Ezio Melotti in branch '3.2': #12725: fix working. Patch by Ben Hayden. http://hg.py

[issue12725] Docs: Odd phrase "floating seconds" in socket.html

2011-08-13 Thread Ezio Melotti
Ezio Melotti added the comment: Fixed, thanks for the report and the patch! -- nosy: +ezio.melotti resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed ___ Python tracker _

[issue12748] IDLE halts on osx when copy and paste

2011-08-13 Thread hy
hy added the comment: I use the latest python 2.7.2 binary in a freshly installed os x I use command c and command v, and also use the menu. Also, it halts when I cut. No matter what I cut, copy and paste, it halts. It happens both in the shell and editor. I have to remind myself not to use cop

[issue12748] IDLE halts on osx when copy and paste

2011-08-13 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +kbk, ned.deily ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.

[issue12741] Add function similar to shutil.move that does not overwrite

2011-08-13 Thread David Townshend
David Townshend added the comment: A bit of research has shown that the proposed implementation will not work either, so my next suggestion is something along the lines of def move2(src, dst): try: os.link(src, dst) except OSError as err: # handle error appropriately, r

[issue12729] Python lib re cannot handle Unicode properly due to narrow/wide bug

2011-08-13 Thread Tom Christiansen
Tom Christiansen added the comment: Ezio Melotti added the comment: >> It is simply a design error to pretend that the number of characters >> is the number of code units instead of code points. A terrible and >> ugly one, but it does not mean you are UCS-2. > If you are referring to the val