[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 '''#coding:GBK
print hi('%s')
''' % a

You didn't, hence the code you pass to exec has no declared source encoding.

> why exec choose to use utf-8 not GBK?

exec always choses UTF-8 when exec'ing Unicode strings. The source
encoding of the file that has the exec statement must be irrelevant:
the string being exec'ed may have been received from a different source
file.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 guess.

--
nosy: +asksol

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 primitive that 
works well for example in the unittests, without trying too hard to over design 
it in terms of failure modes.

Anyway, I´ll get my act together.  Same with RWLock, that is almost ready

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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)

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 calls 
_PyUnicode_InitGlobals() at the beginning of Py_Initialize().


I don't like the fact that even more clutter is added to Py_Main(). Perhaps
Py_Initialize() could be moved up or the Unicode functions could be moved
down.

--
Added file: http://bugs.python.org/file19351/unicode_init_globals2.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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.
Whether this is an acceptable solution I don't know.. it's just my proposal. 
The attached queue_example.py script illustrates what I mean.

Regards,
VT

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 attempt at reducing the frequency of these errors, 
but it is ultimately useless, since the three modules internally rely on their 
various globals remaining valid.

Issue #812369 may be a possible solution to this problem, or perhaps even an 
explicit list of essential modules that are nulled out only after all other 
modules have been destroyed.

--
messages: 119505
nosy: ncoghlan
priority: normal
severity: normal
status: open
title: tempfile.TemporaryDirectory may throw errors at shutdown

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 2.6/3.1.

(2) Interaction between the readline and curses modules: 2.6/3.1 still
allow readline+ncurses with curses+ncursesw. To be on the safe side,
2.7/3.2 enforce all ncurses or all ncursesw.


(1) implies that if your readline module is linked against ncurses in 3.1,
you should find that libreadline is also linked against ncurses.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 attempts to allow the __del__ method to work at shutdown 
though, since it isn't actually achieving anything (I wanted a record of it in 
the main repository, which is why I kept it for the initial checkin).

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 just wrote which illustrates the problem.

--
nosy: +lars.gustaebel
Added file: http://bugs.python.org/file19352/tarfile-extract-directory-test.diff

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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.

The actual coercion-to-str technique I used standardises the type consistency 
check for the attributes and also returns a callable that handles the necessary 
coercion of any results. The parsed/split result objects gain encode/decode 
methods to allow that all to be handled polymorphically (although I think the 
decode methods may actually be redundant in practice).

There's a deliberate loophole in the type consistency checking to allow the 
empty string to be type-neutral. Without that, the scheme='' default argument 
to urlsplit and urlparse becomes painful (as do the urljoin shortcuts for base 
or url being the empty string).

Implementing this was night and day when compared to the initial attempt that 
tried to actually manipulate bytes input as bytes. With that patch, it took me 
multiple runs of the test suite to get everything working. This time, the only 
things I had to fix were typos and bugs in the additional test suite 
enhancements. The actual code logic for the type coercions worked first time.

--
Added file: http://bugs.python.org/file19353/issue9873_coercion_to_str.diff

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 each other.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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)

--
resolution:  -> rejected
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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.

--
assignee: ncoghlan -> 
keywords: +easy

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 extensions with LDFLAGS environment variable 
passed twice to compiler (distutils uses LDSHARED, which now contains 
$(LDFLAGS), and uses LDFLAGS).
  This problem concerns Python 3.2.

Example for 3.2:
x86_64-pc-linux-gnu-gcc -pthread -shared ${LDFLAGS_from_CPython} 
${LDFLAGS_from_current_environment} ${LDFLAGS_from_current_environment}  
${CFLAGS} ${object_files} -L/usr/lib64 -lpython3.2mu -o ${extension_module}

--
nosy: +Arfrever

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 the expected behaviour to me.
Especially if Python was packaged was someone else and you don't want
the user to manually set LDFLAGS each time they run a setup.py.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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.

--
components:  -Windows
nosy: +eric.araujo
versions: +Python 3.2

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 buttons. So, it would seem to be a bug 
that for two types of dialogs, the buttons aren't displayed correctly and 
rather reflect an old-style button.

I'm not sure if this is on the Python or Tcl side of the problem, but I really 
have no way of testing the Tcl/Tk implementation of these dialogs.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 not consistent 
with the rest.  If you could look into the Python code and make suggestions or 
maybe a patch, it would help gpolo fix this.

--
components: +Windows

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 
  File "test.py", line 1
print a
  ^
SyntaxError: invalid syntax

--
components: Interpreter Core
messages: 119527
nosy: alex
priority: normal
severity: normal
status: open
title: SyntaxError: no binding for nonlocal doesn't contain a useful traceback
versions: Python 3.1

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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/file19355/argvb.py

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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, the Chooser class in tkColorChooser, and the 
various dialog classes in tkFileDialog all subclass Dialog, which is defined in 
tkCommonDialog.

Since the dialogs in tkFileDialog have the right buttons, there's probably 
nothing wrong with the Dialog superclass. However, Chooser and Message both 
define their own command variables (tk_chooseColor and tk_messageBox, 
respectively) that are then passed to a Frame's tk.call method.

So, when I get an extra minute I'll go in and see what might be going on with 
tk_chooseColor and tk_messageBox.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 provide it results in error messages that point to the 
"wrong" line(*).  So my guess is that the person who implemented this code just 
didn't get around to dealing with that localization issue.

It would appear from svn log like the person in question is Jeremy Hylton, so 
I'm adding him as nosy.

(*) I put wrong in quotes because it's not wrong from the point of view of the 
code generating the error, because that code is looking at blocks, not lines.  
But it's wrong from the point of view of the user reading the message

--
nosy: +jhylton, r.david.murray

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 get one close to the problem code.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 private, I for one use it 
in several places even though I clearly know the name starts with an 
underscore, it's just that reimplementing it in my code seems 
counter-productive, would be very nice if '_get_kwargs' became 'get_kwargs' in 
some future release.

Thanks for considering it!

--
assignee: d...@python
components: Documentation, Library (Lib)
messages: 119539
nosy: bethard, d...@python, dsuch
priority: normal
severity: normal
status: open
title: Can argparse._AttributeHolder._get_kwargs become a public API?
type: feature request

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 compiled propertly, byte strings are not (they get compiled as UTF-8, when 
they should get compiled in the locale encoding)
C. prefix source with encoding declaration, as proposed in msg85882. Both 
Unicode strings and byte strings get compiled correctly, but line numbers in 
tracebacks are wrong.

Given that it's not possible to fix this without breaking something else, and 
given that it's fixed in Python 3, I propose to declare this as "won't fix" for 
Python 2.7.

In any case, the bug is certainly not in compile(), which is behaving exactly 
as specified, so I revert the title change.

--
title: compile(): IDLE shell gives different len() of unicode strings compared 
to Python shell -> IDLE shell gives different len() of unicode strings compared 
to Python shell

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com