[issue2280] parser module chokes on unusual characters

2008-07-11 Thread David Binger
David Binger <[EMAIL PROTECTED]> added the comment: On Jul 11, 2008, at 5:35 PM, Kuba Fast wrote: > I get no problem in 3.0b1. Should this be closed? I think so. It looks like this has been fixed. Thanks. ___ Python tracker <[EMAIL PROTECTED]>

[issue3297] Python interpreter uses Unicode surrogate pairs only before the pyc is created

2008-07-11 Thread Adam Olsen
Adam Olsen <[EMAIL PROTECTED]> added the comment: No, the configure options are wrong - we do use UTF-16 and UTF-32. Although modern UCS-4 has been restricted down to the range of UTF-32 (it used to be larger!), UCS-2 still doesn't support the supplementary planes (ie no surrogates.) If it real

[issue3297] Python interpreter uses Unicode surrogate pairs only before the pyc is created

2008-07-11 Thread Marc-Andre Lemburg
Marc-Andre Lemburg <[EMAIL PROTECTED]> added the comment: Just to clarify: Python can be built as UCS2 or UCS4 build (not UTF-16 vs. UTF-32). The conversions done from the literal escaped representation to the internal format are done using the unicode-escape and raw-unicode-escape codecs. PYC

[issue3112] implement PEP 3134 exception reporting

2008-07-11 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: Le vendredi 11 juillet 2008 à 22:18 +, Amaury Forgeot d'Arc a écrit : > I committed r64881, which invalidates your patch a bit :-| Apparently you committed in trunk rather than py3k? Could you svnmerge into py3k as well? Then it should be

[issue3297] Python interpreter uses Unicode surrogate pairs only before the pyc is created

2008-07-11 Thread Adam Olsen
Adam Olsen <[EMAIL PROTECTED]> added the comment: Simpler way to reproduce this (on linux): $ rm unicodetest.pyc $ $ python -c 'import unicodetest' Result: False Len: 2 1 Repr: u'\ud800\udd23' u'\U00010123' $ $ python -c 'import unicodetest' Result: True Len: 1 1 Repr: u'\U00010123' u'\U00010

[issue3345] Patch for CGIHTTPServer.is_cgi function documentation

2008-07-11 Thread Miki Tebeka
New submission from Miki Tebeka <[EMAIL PROTECTED]>: The current documentation is wrong and does not specify the fact that this functions sets "cgi_info" (maybe also rename the function?) -- assignee: georg.brandl components: Documentation files: CGIHTTPServer.py.diff keywords: patch mes

[issue3297] Python interpreter uses Unicode surrogate pairs only before the pyc is created

2008-07-11 Thread Ezio Melotti
Ezio Melotti <[EMAIL PROTECTED]> added the comment: On my Linux box sys.maxunicode == 1114111 and len(u'\U00010123') == 1, so it should be a UTF-32 build. On windows instead sys.maxunicode == 65535 and len(u'\U00010123') == 2, so it should be a UTF-16 build. The problem seems then related to UTF-

[issue3344] IDLE - use enumerate instead of zip(count(), ...)

2008-07-11 Thread Tal Einat
New submission from Tal Einat <[EMAIL PROTECTED]>: Just minor code cleanup. Only one instance of zip(count(), ...) in EditorWindow.py, where I also changed 'file' to 'file_name' to avoid overriding the built-in 'file' class. -- files: IDLE_EditorWindow_minor.patch keywords: patch messag

[issue1529018] Move firewall warning to "about" menu

2008-07-11 Thread Tal Einat
Tal Einat <[EMAIL PROTECTED]> added the comment: What if this message was made part of the error message which is displayed when the connection to the subprocess fails? This way only users in situations where it is likely that the warning is relevant will see it. I suggest this since the origina

[issue874900] threading module can deadlock after fork

2008-07-11 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: I am leaving for the whole next week, so anyone, feel free to commit (part of) my patch if it helps. ___ Python tracker <[EMAIL PROTECTED]> ___

[issue3112] implement PEP 3134 exception reporting

2008-07-11 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: I committed r64881, which invalidates your patch a bit :-| BTW, I don't like your comment "Can't be bothered to check all those PyFile_WriteString() calls". In general, it is not a good idea to execute python code with an exception set

[issue3342] Tracebacks are not properly indented

2008-07-11 Thread Brett Cannon
Brett Cannon <[EMAIL PROTECTED]> added the comment: Thanks for fixing this and renaming the function, Amaury! On Fri, Jul 11, 2008 at 2:46 PM, Amaury Forgeot d'Arc <[EMAIL PROTECTED]> wrote: > > Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: > > Corrected as r64881. > > -- >

[issue3342] Tracebacks are not properly indented

2008-07-11 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: Corrected as r64881. -- resolution: -> fixed status: open -> closed ___ Python tracker <[EMAIL PROTECTED]> ___

[issue3343] Py_DisplaySourceLine is not documented

2008-07-11 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: r64881: Py_DisplaySourceLine is renamed to _Py_DisplaySourceLine -- resolution: -> fixed status: open -> closed ___ Python tracker <[EMAIL PROTECTED]>

[issue2280] parser module chokes on unusual characters

2008-07-11 Thread Kuba Fast
Kuba Fast <[EMAIL PROTECTED]> added the comment: I get no problem in 3.0b1. Should this be closed? >>> parser.suite('"\u1234"') -- nosy: +kfast ___ Python tracker <[EMAIL PROTECTED]> ___

[issue3317] duplicate lines in zipfile.py

2008-07-11 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: Committed as 64880. -- status: open -> closed ___ Python tracker <[EMAIL PROTECTED]> ___ ___

[issue2275] urllib2 header capitalization

2008-07-11 Thread John J Lee
John J Lee <[EMAIL PROTECTED]> added the comment: Just to quickly note that by "providing case-insensitive lookup" I don't necessarily mean via .headers. But it's you who's providing the patch, so I'll wait for your next suggestion rather than discuss how I might change the code. __

[issue2275] urllib2 header capitalization

2008-07-11 Thread John J Lee
John J Lee <[EMAIL PROTECTED]> added the comment: > > * The patch to the docs seems to muddy the waters even further (than the > > current slightly murky state) about whether and why .headers is to be > > preferred over the methods, or vice-versa. I think .headers should > > remain undocumented,

[issue2275] urllib2 header capitalization

2008-07-11 Thread John J Lee
John J Lee <[EMAIL PROTECTED]> added the comment: There already is a test for the breakage, but the patch changes the expected output to match the new return value of .header_items(): -[('Foo-bar', 'baz'), ('Spam-eggs', 'blah')] +[('Foo-Bar', 'baz'), ('Spam-Eggs', 'blah')] Code that pre

[issue3112] implement PEP 3134 exception reporting

2008-07-11 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: Le vendredi 11 juillet 2008 à 12:12 +, Amaury Forgeot d'Arc a écrit : > I think there is a problem when the source file cannot be opened (a .pyc > without its .py): the four spaces are printed, but not the line, and the > following level i

[issue3288] float.as_integer_ratio method is not documented

2008-07-11 Thread Raymond Hettinger
Changes by Raymond Hettinger <[EMAIL PROTECTED]>: -- assignee: georg.brandl -> rhettinger nosy: +rhettinger ___ Python tracker <[EMAIL PROTECTED]> ___ _

[issue1519638] Unmatched Group issue - workaround

2008-07-11 Thread Brandon Mintern
Brandon Mintern <[EMAIL PROTECTED]> added the comment: Looking at your code example, that solution seems quite obvious now, and I wouldn't even call it a "workaround". Thanks for figuring this out. Now if I could only remember what code I was using that for... ___

[issue3342] Tracebacks are not properly indented

2008-07-11 Thread Brett Cannon
Changes by Brett Cannon <[EMAIL PROTECTED]>: -- assignee: -> brett.cannon ___ Python tracker <[EMAIL PROTECTED]> ___ ___ Python-bugs-li

[issue3342] Tracebacks are not properly indented

2008-07-11 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: This is why I added an explicit "indent" parameter to Py_DisplaySourceLine. ___ Python tracker <[EMAIL PROTECTED]> ___ __

[issue3343] Py_DisplaySourceLine is not documented

2008-07-11 Thread Brett Cannon
Brett Cannon <[EMAIL PROTECTED]> added the comment: The function should be made private as it is not expected to be called by anyone else but the core. -- assignee: -> brett.cannon nosy: +brett.cannon ___ Python tracker <[EMAIL PROTECTED]>

[issue3342] Tracebacks are not properly indented

2008-07-11 Thread Brett Cannon
Brett Cannon <[EMAIL PROTECTED]> added the comment: I really hate how touchy the indentation output is for warnings/tracebacks. ___ Python tracker <[EMAIL PROTECTED]> ___ __

[issue3342] Tracebacks are not properly indented

2008-07-11 Thread Brett Cannon
Changes by Brett Cannon <[EMAIL PROTECTED]>: -- nosy: +brett.cannon ___ Python tracker <[EMAIL PROTECTED]> ___ ___ Python-bugs-list mail

[issue3339] dummy_thread LockType.acquire() always returns None, should be True or False

2008-07-11 Thread Brett Cannon
Changes by Brett Cannon <[EMAIL PROTECTED]>: -- assignee: -> brett.cannon nosy: +brett.cannon ___ Python tracker <[EMAIL PROTECTED]> ___ __

[issue1580] Use shorter float repr when possible

2008-07-11 Thread Tim Peters
Tim Peters <[EMAIL PROTECTED]> added the comment: About (2**52-1)*2.**(-1074): same outcome under Cygwin 2.5.1, which is presumably based on David Gay's "perfect rounding" code. Cool ;-) Under the native Windows 2.5.1: >>> x = (2**52-1)*2.**(-1074) >>> x 2.2250738585072009e-308 >>> y = eval(r

[issue2054] add ftp-tls support to ftplib - RFC 4217

2008-07-11 Thread Lukasz Szybalski
Lukasz Szybalski <[EMAIL PROTECTED]> added the comment: Is the ftp-tls able to use certificate to connect to ftps server? I currently need to connect to state's ftps server which requires certificate to be present when authenticating. Is that option available? What is the current status of this

[issue1580] Use shorter float repr when possible

2008-07-11 Thread Mark Dickinson
Mark Dickinson <[EMAIL PROTECTED]> added the comment: Mildly off-topic: it seems that currently eval(repr(x)) == x isn't always true, anyway. On OS X 10.5.4/Intel, I get: >>> x = (2**52-1)*2.**(-1074) >>> x 2.2250738585072009e-308 >>> y = eval(repr(x)) >>> y 2.2250738585072014e-308 >>> x == y

[issue1779233] PyThreadState_SetAsyncExc and the main thread

2008-07-11 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: Two things may prevent the exception from being seen: - First, the async exception is not immediate; it is checked every 100 bytecodes (=sys.getcheckinterval()). When testing from the interactive prompt, try something like "for x in ran

[issue874900] threading module can deadlock after fork

2008-07-11 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: I agree. My attempt to describe the behaviour of fork+threads in a platform-independent test is another issue. Just one more thing: looking at Module/posixmodule.c, os.fork1() calls PyOS_AfterFork() in both parent and child processes. I

[issue874900] threading module can deadlock after fork

2008-07-11 Thread Jesse Noller
Jesse Noller <[EMAIL PROTECTED]> added the comment: I can confirm that this seems to clear up the test_multiprocessing hangs on my mac, I ran make test in a loop almost all day yesterday without hangs. I would really suggest we get this in, minus the new test_threading tests for now.

[issue3343] Py_DisplaySourceLine is not documented

2008-07-11 Thread Amaury Forgeot d'Arc
New submission from Amaury Forgeot d'Arc <[EMAIL PROTECTED]>: This new function is not documented at all. And I find the error handling not consistent: when filename is NULL, -1 is returned, but no exception is set. IMO the return code should be as follow: - return 1 if a line was printed - retu

[issue3112] implement PEP 3134 exception reporting

2008-07-11 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: I think there is a problem when the source file cannot be opened (a .pyc without its .py): the four spaces are printed, but not the line, and the following level is not properly indented. See issue3342 for a competing patch that correct

[issue3342] Tracebacks are not properly indented

2008-07-11 Thread Amaury Forgeot d'Arc
New submission from Amaury Forgeot d'Arc <[EMAIL PROTECTED]>: r62555 has the unfortunate effect that source lines are no more indented in tracebacks, as in: Traceback (most recent call last): File "", line 1, in File "C:\python\trunk\lib\re.py", line 150, in sub return _compile(pattern, 0).

[issue3333] Need -3 warning for exec statement becoming a function

2008-07-11 Thread Raymond Hettinger
Changes by Raymond Hettinger <[EMAIL PROTECTED]>: -- resolution: -> invalid status: open -> closed ___ Python tracker <[EMAIL PROTECTED]> ___ _

[issue2823] "Report bug" links

2008-07-11 Thread anatoly techtonik
anatoly techtonik <[EMAIL PROTECTED]> added the comment: Filed a proposal for online documentation editing tool. http://bugs.python.org/issue3341 ___ Python tracker <[EMAIL PROTECTED]> ___

[issue3341] "Suggest a change" link

2008-07-11 Thread anatoly techtonik
New submission from anatoly techtonik <[EMAIL PROTECTED]>: It would be convenient to have "Suggest a change" link in the bottom of documentation pages to allow people propose fixes and additions. This can be a simple feedback form with an optional "patch" field that submits mail to a list or si

[issue3340] optparse print_usage(),.. methods are not documented

2008-07-11 Thread anatoly techtonik
New submission from anatoly techtonik <[EMAIL PROTECTED]>: optparse API documentation is incomplete. It doesn't mention at least some useful functions such as print_usage(), get_usage(), get/print_version() present in optparse.py docstrings. -- assignee: georg.brandl components: Document

[issue3008] Let bin/oct/hex show floats

2008-07-11 Thread Mark Dickinson
Mark Dickinson <[EMAIL PROTECTED]> added the comment: Minor modifications to the previous patch, mostly to the docs. Setting priority to critical, since this really needs to go in before the next beta if it's going to get into 2.6/3.0. -- priority: -> critical Added file: http://bugs

[issue1519638] Unmatched Group issue - workaround

2008-07-11 Thread Gerard
Gerard <[EMAIL PROTECTED]> added the comment: Hi All, I found a workaround for the re.sub method so it does not raise an exception but returns and empty string when backref-ing an empty group. This is the nutshell: When doing a search and replace with sub, replace the group represented as opti

[issue3339] dummy_thread LockType.acquire() always returns None, should be True or False

2008-07-11 Thread Andrii V. Mishkovskyi
Andrii V. Mishkovskyi <[EMAIL PROTECTED]> added the comment: Seems like inconsistency to me, this simple patch should fix it. -- keywords: +patch nosy: +mishok13 Added file: http://bugs.python.org/file10875/issue3339.diff ___ Python tracker <[EMAIL PR

[issue3339] dummy_thread LockType.acquire() always returns None, should be True or False

2008-07-11 Thread Henk Punt
New submission from Henk Punt <[EMAIL PROTECTED]>: Class LockType always seems to be returning None if waitflag is not specified. If you look up the documentation for the non dummy lock in lib ref 15.3.1 , none of the possible results should be ‘None’, in fact it would always return True, except

[issue3317] duplicate lines in zipfile.py

2008-07-11 Thread Martin v. Löwis
Martin v. Löwis <[EMAIL PROTECTED]> added the comment: Amaury, as Alan is fine with these changes, feel free to apply them. -- assignee: loewis -> amaury.forgeotdarc resolution: -> accepted ___ Python tracker <[EMAIL PROTECTED]>

[issue3300] urllib.quote and unquote - Unicode issues

2008-07-11 Thread Matt Giuca
Matt Giuca <[EMAIL PROTECTED]> added the comment: Since I got a complaint that my last reply was too long, I'll summarize it. It's a bug report, not a feature request. I can't get a simple web app to be properly Unicode-aware in Python 3, which worked fine in Python 2. This cannot be put off un

[issue2275] urllib2 header capitalization

2008-07-11 Thread Hans-Peter Jansen
Hans-Peter Jansen <[EMAIL PROTECTED]> added the comment: Facundo, first of all: *really* nice work, thanks a lot. While I don't fully understand the issues raised lately here, especially what broke (user code). I can see, that it completely solves my original problem, which is great. While re

[issue3300] urllib.quote and unquote - Unicode issues

2008-07-11 Thread Matt Giuca
Matt Giuca <[EMAIL PROTECTED]> added the comment: > 3.0b1 has been released, so no new features can be added to 3.0. While my proposal is no doubt going to cause a lot of code breakage, I hardly consider it a "new feature". This is very definitely a bug. As I understand it, the point of a code f