[issue1542677] IDLE shell gives different len() of unicode strings compared to Python shell

2010-10-24 Thread Martin v . Löwis
Martin v. Löwis added the comment: For 2.7, I don't think it's possible to really fix this. I see the following options: A. current status. Byte strings are compiled correctly, Unicode strings are not. B. compile source as a Unicode string, as proposed in msg85886. Unicode strings are compile

[issue1542677] compile(): IDLE shell gives different len() of unicode strings compared to Python shell

2010-10-24 Thread Martin v . Löwis
Martin v. Löwis added the comment: As indicated in msg59954, it works fine on 3.x, so removing these versions. -- versions: -Python 3.1, Python 3.2 ___ Python tracker ___ ___

[issue10190] Can argparse._AttributeHolder._get_kwargs become a public API?

2010-10-24 Thread Dariusz Suchojad
New submission from Dariusz Suchojad : Hello, I was wondering if it were possible for the argparse._AttributeHolder._get_kwargs to become a part of the public API. Using this method is a very convenient way to get a hold of the arguments provided by the user and it would be shame to keep it p

[issue7761] telnetlib Telnet.interact fails on Windows but not Linux

2010-10-24 Thread Jack Diederich
Jack Diederich added the comment: Thanks David, do you want to apply? Looks good to me. -- ___ Python tracker ___ ___ Python-bugs-lis

[issue10189] SyntaxError: no binding for nonlocal doesn't contain a useful traceback

2010-10-24 Thread R. David Murray
R. David Murray added the comment: I figured it was something like that, from looking at the code. I wonder if it would be worthwhile to return the line info that is known (which I think is the start of the block containing the problematic symbol). In a complex program that would at least ge

[issue3196] Option in pydoc to show docs from private methods

2010-10-24 Thread R. David Murray
Changes by R. David Murray : -- status: open -> languishing ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http

[issue10189] SyntaxError: no binding for nonlocal doesn't contain a useful traceback

2010-10-24 Thread Benjamin Peterson
Benjamin Peterson added the comment: Technically, it's because the syntax errors come from a latter part of the compiling phase when the origin of names isn't known. Fixing this would involve attaching line numbers and offsets to names somehow. -- nosy: +benjamin.peterson ___

[issue1610654] cgi.py multipart/form-data

2010-10-24 Thread R. David Murray
R. David Murray added the comment: I don't think it was appropriate to close this issue. -- nosy: +r.david.murray -BreamoreBoy resolution: wont fix -> stage: unit test needed -> patch review status: closed -> open versions: +Python 3.2 -Python 2.7, Python 3.1 _

[issue10189] SyntaxError: no binding for nonlocal doesn't contain a useful traceback

2010-10-24 Thread R. David Murray
R. David Murray added the comment: Hmm. Just to clarify, the commit message on the code in question specifically said that the implementation of nonlocal was not complete with that commit, and Jeremy wasn't the only one working on it. So this detail may have simply been overlooked. ---

[issue10189] SyntaxError: no binding for nonlocal doesn't contain a useful traceback

2010-10-24 Thread R. David Murray
R. David Murray added the comment: There are a number of such symbol resolution error messages for nonlocal that don't provide location information in symtable.c. I'm not very experienced with hacking the C code, but a naive addition of location information based on similar calls that do pro

[issue10161] unittest: use ascii() instead of repr() to display values on error

2010-10-24 Thread Michael Foord
Michael Foord added the comment: Although this is still a real issue for other users of unittest. If I get time to think about it properly I may reopen. -- ___ Python tracker _

[issue1542677] compile(): IDLE shell gives different len() of unicode strings compared to Python shell

2010-10-24 Thread Éric Araujo
Changes by Éric Araujo : -- components: +Unicode nosy: +eric.araujo, lemburg, loewis ___ Python tracker ___ ___ Python-bugs-list mai

[issue10161] unittest: use ascii() instead of repr() to display values on error

2010-10-24 Thread STINNER Victor
STINNER Victor added the comment: Closed with r85829: patch test_pep277 instead of unittest. -- resolution: -> fixed status: open -> closed ___ Python tracker ___ _

[issue10171] Ugly buttons in some Tkinter objects in Windows

2010-10-24 Thread Rafe Kettler
Rafe Kettler added the comment: I haven't had a chance to look too deeply into the source, but it appears (at least in Python 2.7) that the problem has something to do with the commands that the classes in tkMessageBox and tkColorChooser pass to tk.call(). The Message class in tkMessageBox, t

[issue8761] PyUnicode_CompareWithASCIIString name is not mangled (UCS2, UCS4)

2010-10-24 Thread STINNER Victor
STINNER Victor added the comment: Fixed by r85827. -- resolution: accepted -> fixed status: open -> closed ___ Python tracker ___ ___

[issue8776] Bytes version of sys.argv

2010-10-24 Thread STINNER Victor
STINNER Victor added the comment: Prototype (in Python) of argvb.py. Try it with: ./python -i argvb.py. It's not possible to create sys.argvb in Python in a module loaded by Py_Initialize(), because sys.argv is created after Py_Initialize(). -- Added file: http://bugs.python.org/file1

[issue10189] SyntaxError: no binding for nonlocal doesn't contain a useful traceback

2010-10-24 Thread Alex
New submission from Alex : Given the code: def f(): def g(): nonlocal a a = 3 Running it produces: a...@alex-laptop:/tmp$ python3.1 test.py SyntaxError: no binding for nonlocal 'a' found Compared to a different SyntaxError: a...@alex-laptop:/tmp$ python3.1 test.py Fil

[issue10171] Ugly buttons in some Tkinter objects in Windows

2010-10-24 Thread Éric Araujo
Éric Araujo added the comment: Thanks, I tested the file dialog example and it does not respect my theme either. Re-adding the Windows component. I suspect the bug is in Python. Like you said, Tcl/Tk and Tkinter do have the ability to use new shiny buttons, it’s just two modules that are no

[issue10184] tarfile touches directories twice

2010-10-24 Thread Martin v . Löwis
Martin v. Löwis added the comment: I see. Here is an updated version that makes the touch operations optional. -- assignee: ghaering -> lars.gustaebel nosy: -ghaering Added file: http://bugs.python.org/file19354/tarfile2.diff ___ Python tracker

[issue10002] Installer doesn't install on Windows Server 2008 DataCenter R2

2010-10-24 Thread R. David Murray
Changes by R. David Murray : -- nosy: -r.david.murray ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://m

[issue10013] fix `./libpython2.6.so: undefined re ference to `_PyParser_Grammar´` in parallel builds

2010-10-24 Thread Éric Araujo
Changes by Éric Araujo : -- nosy: +eric.araujo versions: +Python 2.7 -Python 2.6 ___ Python tracker ___ ___ Python-bugs-list mailing l

[issue10019] json.dumps with indent = 0 not adding newlines

2010-10-24 Thread Éric Araujo
Changes by Éric Araujo : -- nosy: +eric.araujo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue10171] Ugly buttons in some Tkinter objects in Windows

2010-10-24 Thread Rafe Kettler
Rafe Kettler added the comment: If you were to create a FileDialog, you should see proper buttons (at least I do in Windows): import tkFileDialog tkFileDialog.askopenfile() I think that this goes more along the lines of a bug, because I know that Tkinter has the ability to properly show butt

[issue10171] Ugly buttons in some Tkinter objects in Windows

2010-10-24 Thread Éric Araujo
Éric Araujo added the comment: In my GTK desktop environment, your two examples produce windows that don’t respect my theme. Can you give me an example that uses correct buttons for you so that I can see what I should expect? I’m not sure this is a bug or a feature request. -- compo

[issue10002] Installer doesn't install on Windows Server 2008 DataCenter R2

2010-10-24 Thread Brian Curtin
Changes by Brian Curtin : -- type: crash -> behavior ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mai

[issue10188] tempfile.TemporaryDirectory may throw errors at shutdown

2010-10-24 Thread Éric Araujo
Changes by Éric Araujo : -- nosy: +eric.araujo versions: +Python 3.2 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscr

[issue10006] non-Pythonic fate of __abstractmethods__

2010-10-24 Thread Éric Araujo
Changes by Éric Araujo : -- versions: +Python 3.2 -Python 2.6 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: h

[issue10002] Installer doesn't install on Windows Server 2008 DataCenter R2

2010-10-24 Thread Éric Araujo
Changes by Éric Araujo : -- nosy: +eric.araujo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue10000] mark more tests as CPython specific

2010-10-24 Thread Éric Araujo
Changes by Éric Araujo : -- components: +Tests nosy: +eric.araujo stage: -> needs patch type: -> behavior versions: +Python 2.7, Python 3.1, Python 3.2 ___ Python tracker ___ _

[issue7696] Improve Memoryview/Buffer documentation

2010-10-24 Thread Benjamin Peterson
Benjamin Peterson added the comment: Let's close then. -- nosy: +benjamin.peterson resolution: -> fixed status: open -> closed ___ Python tracker ___ ___

[issue7696] Improve Memoryview/Buffer documentation

2010-10-24 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Antoine, is there more that remains to be done on this, or can it be closed? I don't know really. I have done what I thought necessary on memoryview/buffer maintenance, and I don't really want to go any further. -- __

[issue9437] can't build extensions with non-default ldflags (e.g. -m32)

2010-10-24 Thread Antoine Pitrou
Antoine Pitrou added the comment: > These changes cause some regressions: > - distutils builds third-party extensions with LDFLAGS, which were > used to build CPython. (This is more important regression.) > This problem concerns Python 2.7 and 3.2. Well, is this a problem? This sounds like th

[issue9437] can't build extensions with non-default ldflags (e.g. -m32)

2010-10-24 Thread Arfrever Frehtes Taifersar Arahesis
Arfrever Frehtes Taifersar Arahesis added the comment: These changes cause some regressions: - distutils builds third-party extensions with LDFLAGS, which were used to build CPython. (This is more important regression.) This problem concerns Python 2.7 and 3.2. - distutils builds third-party

[issue9517] Make test.script_helper more comprehensive, and use it in the test suite

2010-10-24 Thread Nick Coghlan
Nick Coghlan added the comment: I still think this is a good idea, I'm just not actively working on it. It might make a good project for someone wanting to get to know the process of working on CPython without having to deal with anything that is particularly tricky to understand. --

[issue5251] contextlib.nested inconsistent with, well, nested with statements due exceptions raised in __enter__

2010-10-24 Thread Nick Coghlan
Nick Coghlan added the comment: R.I.P contextlib.nested (it is gone in 3.2 following the deprecation in 3.1). The issue is obscure enough that I don't see much value in updating the documentation for the versions that still contain it in deprecated form. -- resolution: -> out of date

[issue2690] Precompute range length

2010-10-24 Thread Nick Coghlan
Nick Coghlan added the comment: I'd still like to have another look at this before beta 1, but can't promise I'll get to it. Unassigning in case someone else has some roundtuits to spare over the next few weeks. -- assignee: ncoghlan -> ___ Python

[issue10049] Add a "no-op" (null) context manager to contextlib

2010-10-24 Thread Nick Coghlan
Nick Coghlan added the comment: I find Raymond's perspective persuasive in this case. Feel free to post either the original idea or my later variant as an ASPN cookbook recipe. (you could actually combine the two, and use NullContext as an implementation detail of an optional_cm() function)

[issue9873] urllib.parse: Allow bytes in some APIs that use string literals internally

2010-10-24 Thread Nick Coghlan
Nick Coghlan added the comment: Unless I hear some reasonable objections within the next week or so, I'm going to document and commit the ascii-strict coercion approach for beta 1. The difference in code clarity is such that I'm not even going to try to benchmark the two approaches against ea

[issue9873] urllib.parse: Allow bytes in some APIs that use string literals internally

2010-10-24 Thread Nick Coghlan
Nick Coghlan added the comment: Attached a second version of the patch. Notable features: - uses a coercion-to-str-and-back strategy (using ascii-strict) - a significantly more comprehensive pass through the urlparse test suite. I'm happy that the test suite mods are complete with this pass. T

[issue6407] multiprocessing Pool should allow custom task queue

2010-10-24 Thread Matthew Leon Grinshpun
Matthew Leon Grinshpun added the comment: I should be able to do this in November. For the moment I'm a bit busy. -- ___ Python tracker ___ __

[issue10184] tarfile touches directories twice

2010-10-24 Thread Lars Gustäbel
Lars Gustäbel added the comment: The patch goes a bit too far. Though it solves this particular problem with the way TarFile.extractall() works, it breaks TarFile.extract(). Running the testsuite does not expose this, simply because there's no testcase :-( Please see the attached testcase I j

[issue5178] Add context manager for temporary directory

2010-10-24 Thread Nick Coghlan
Changes by Nick Coghlan : -- resolution: -> accepted status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list U

[issue5178] Add context manager for temporary directory

2010-10-24 Thread Nick Coghlan
Nick Coghlan added the comment: Committed (with enhanced tests and a few fixes) in r85818 And credit where it's due to test___all__ for picking up a typo in my adjustment to tempfile.__all__ :) I created issue #10188 to track the shutdown problem. I'm considering taking out the code that att

[issue9408] curses: Link against libncursesw instead of libncurses

2010-10-24 Thread Stefan Krah
Stefan Krah added the comment: Hmm, I understood that your ldd lines implied that things don't work as intended in 3.1, hence the explanation. Perhaps this wasn't the case. :) -- ___ Python tracker

[issue10188] tempfile.TemporaryDirectory may throw errors at shutdown

2010-10-24 Thread Nick Coghlan
Nick Coghlan added the comment: Cleanup of sys and __builtin__ is already delayed - this particular issue could be fixed by delaying cleanup of a few more modules, along with the proposed change to GC invocation in issue #1545463. -- ___ Python tra

[issue9408] curses: Link against libncursesw instead of libncurses

2010-10-24 Thread Stefan Krah
Stefan Krah added the comment: There are two issues here: (1) If libreadline is already linked against ncurses, there is no way that the readline module should be linked against ncursesw. This was the direct cause of the FreeBSD segfault, so this configuration is also prohibited in

[issue10188] tempfile.TemporaryDirectory may throw errors at shutdown

2010-10-24 Thread Nick Coghlan
New submission from Nick Coghlan : During interpreter shutdown, modules can become unusable as module globals are set to None. This is a problem for tempfile.TemporaryDirectory, as it needs working os, os.path and stat modules in order to clean up the filesystem. The class makes a valiant atte

[issue8037] multiprocessing.Queue's put() not atomic thread wise

2010-10-24 Thread Vilnis Termanis
Vilnis Termanis added the comment: The idea is to pickle the object immediately (i.e. when added) instead of when requested (dequeued). This means that any operations (even deletion) performed on the original object do not make changes to the item in the queue, before it has been dequeued. Wh

[issue10156] Initialization of globals in unicodeobject.c

2010-10-24 Thread Stefan Krah
Stefan Krah added the comment: > why should _PyUnicode_Init() try to call _PyUnicode_InitGlobals() again? For the embedding scenario (when only Py_Initialize() is called) I wanted to preserve the old behavior of _PyUnicode_Init(). But this is not really enough. I wrote a new patch that also c

[issue8202] sys.argv[0] and python -m package

2010-10-24 Thread Nick Coghlan
Changes by Nick Coghlan : -- status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.

[issue5178] Add context manager for temporary directory

2010-10-24 Thread Nick Coghlan
Changes by Nick Coghlan : -- assignee: -> ncoghlan ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.

[issue5573] multiprocessing Pipe poll() and recv() semantics.

2010-10-24 Thread Ask Solem
Ask Solem added the comment: I don't know about the socket internals, but I find the behavior acceptable. It may not be feasible to change it now anyway, as there may be people already depending on it (e.g. not handling errors occurring at poll) -- ___

[issue7474] multiprocessing.managers.SyncManager managed object creation fails when started outside of invoked file

2010-10-24 Thread Ask Solem
Ask Solem added the comment: I can't seem to reproduce this on trunk... -- nosy: +asksol ___ Python tracker ___ ___ Python-bugs-list m

[issue8777] Add threading.Barrier

2010-10-24 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: Hi, I had forgotten about this. I went back to the drawing board and had almost completed a new version. Looking at the Java barrier shows how one can go overboard with stuff. My though with the barrier is to provide a simple synchronization primitiv

[issue6407] multiprocessing Pool should allow custom task queue

2010-10-24 Thread Ask Solem
Ask Solem added the comment: Matthew, would you be willing to write tests + documentation for this? -- ___ Python tracker ___ ___ Pyth

[issue7200] multiprocessing deadlock on Mac OS X when queue collected before process terminates

2010-10-24 Thread Ask Solem
Ask Solem added the comment: Queue uses multiprocessing.util.Finalize, which uses weakrefs to track when the object is out of scope, so this is actually expected behavior. IMHO it is not a very good approach, but changing the API to use explicit close methods is a little late at this point, I

[issue4999] multiprocessing.Queue does not order objects

2010-10-24 Thread Georg Brandl
Georg Brandl added the comment: Are you sure this needs to be a warning? We try to use them very sparingly. (Also note the 3-space indent for reStructuredText markup.) -- nosy: +georg.brandl ___ Python tracker __

[issue8037] multiprocessing.Queue's put() not atomic thread wise

2010-10-24 Thread Ask Solem
Ask Solem added the comment: aha, no. I see now you use connection.send_bytes instead. Then I can't think of any issues with this patch, but I don't know why it was done this way in the first place. -- ___ Python tracker

[issue8037] multiprocessing.Queue's put() not atomic thread wise

2010-10-24 Thread Ask Solem
Ask Solem added the comment: AFAICS the object will be pickled twice with this patch. See Modules/_multiprocessing/connection.h: connection_send_obj. -- nosy: +asksol ___ Python tracker

[issue4999] multiprocessing.Queue does not order objects

2010-10-24 Thread Ask Solem
Ask Solem added the comment: Updated doc patch -- nosy: +asksol Added file: http://bugs.python.org/file19350/issue-4999.diff ___ Python tracker ___ __

[issue10187] exec encode unicode to utf-8 str automatically in GBK environment

2010-10-24 Thread wjm251
wjm251 added the comment: Got that , thank you -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.

[issue10187] exec encode unicode to utf-8 str automatically in GBK environment

2010-10-24 Thread Martin v . Löwis
Martin v. Löwis added the comment: > oh,you mentioned the PEP 263 > but I already set a header like this,you can see the attached test.py > #coding=GBK You have that in test.py, but not in the string you are giving to exec. This is really a separate source code. So you could have written exec

[issue10187] exec encode unicode to utf-8 str automatically in GBK environment

2010-10-24 Thread wjm251
wjm251 added the comment: oh,you mentioned the PEP 263 but I already set a header like this,you can see the attached test.py #coding=GBK why exec choose to use utf-8 not GBK? GBK is a valid Chinese character set in python26 -- ___ Python tracker <