[issue11073] threading.Thread documentation can be improved

2011-01-31 Thread R. David Murray

R. David Murray  added the comment:

I still don't understand.  I haven't used threading much, but I don't believe 
I've ever used a static method with it.

--

___
Python tracker 

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



[issue11076] Iterable argparse Namespace

2011-01-31 Thread Virgil Dupras

New submission from Virgil Dupras :

Currently, there is no (documented) way to easily extract arguments in an 
argparse Namespace as a dictionary. This way, it would me easy to interface a 
function taking a lot of kwargs like this:

>>> args = parser.parse_args()
>>> my_function(**dict(args))

There's "_get_kwargs()" but it's a private undocumented method. I guess that 
making it public would be problematic because of the namespace pollution that 
would occur. That's why I'm proposing to make it iterable.

If it isn't rejected, I'd gladly work on the required patch.

--
components: Library (Lib)
keywords: easy
messages: 127582
nosy: vdupras
priority: normal
severity: normal
status: open
title: Iterable argparse Namespace
type: feature request
versions: Python 3.3

___
Python tracker 

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



[issue11073] threading.Thread documentation can be improved

2011-01-31 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

Roy, it's not clear what you're after.  What is it that you think is special 
about the way the target is called?

--
nosy: +rhettinger

___
Python tracker 

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



[issue11061] Verify command option before parsing config file

2011-01-31 Thread Sebastien Douche

Sebastien Douche  added the comment:

Oups sorry Eric. I created the report very quickly after a discussion with 
Tarek. If you type a wrong command like "python -m distutils2:run wrong", 
disutils2 still parses the setup.cfg. How resolve this? Don't know, maybe a 
migration to optparse.

Anyway, close the bug if you think it's irrevelant.

--

___
Python tracker 

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



[issue11075] Turtle crash with IDLE on Mac OS X 10.6

2011-01-31 Thread Ned Deily

Ned Deily  added the comment:

Since IDLE and the turtle modules both use Tkinter and thus are both Tcl/Tk 
applications, it wouldn't be surprising if you had problems trying to run a 
program using the IDLE module from within IDLE.  However, I find I can 
successfully run at least one of the supplied Turtle demos from IDLE 2.7.1 and 
IDLE 2.6:

  cd /Applications/Python 2.7/Extras/Demo/turtle
  idle2.7 tdemo_paint.py # or idle2.6

and with either of the two IDLE variants (32-bit -> Tk 8.4, 64-/32-bit -> Tk 
8.5).  Can you supply a simple script to demonstrate the problem you see?

Keep in mind that, at the moment, neither of the standard python.org 2.7.1 
installers support using ActiveState Tk 8.5.9.  The 32-bit-only installer will 
use ActiveState Tk 8.4, if installed, otherwise use the Apple-supplied Tk 
8.4.19(?) in 10.6.  Python 2.7.1 was released before a 64-bit capable version 
of ActiveState Tk 8.5 was available so, as released, it will only link to the 
Apple-supplied Cocoa Tk 8.5.7 in 10.6 and that version has proven to be very 
unreliable when used with IDLE.  You should be able to build from source a 
Python 2.7.1 that will link to ActiveState 8.5.9 if it is present during the 
build but beware that there are a number of issues both major and minor that 
have been recently fixed in Python (and are in the current release-2.7 
maintenance branch that should appear as a 2.7.2 release in the future) as well 
as a few issues in Cocoa Tk itself which should be fixed in an upcoming release 
of ActiveState Tk 8.5.

--
assignee: ronaldoussoren -> ned.deily
nosy: +ned.deily

___
Python tracker 

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



[issue11075] Turtle crash with IDLE on Mac OS X 10.6

2011-01-31 Thread Ned Deily

Ned Deily  added the comment:

er, "trying to run a program using the turtle module from within IDLE"

--

___
Python tracker 

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



[issue11071] What's New review comments

2011-01-31 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

Do yourself a favor and don't become a PEP 8 nut ;-)

The primary purpose of the example in whatsnew is to teach, demonstrate, and 
explain.  Any PEP 8 considerations take a back seat to that purpose (even PEP 8 
itself admonishes the reader with the famous foolish consistency quotation).

The purpose behind the usual space conventions for keyword arguments is to 
allow them to be visually grouped when more than one is used on a line.  In the 
case of the argparse example, the important parameters are being listed one per 
line along with an explanatory comment.  In my judgement, the example is more 
readable with the spacing as it allows the eye to easily pick-out the argument 
list.  

Am sorry, but it is not really open for debate.  Whatsnew is a single-author 
document reflecting an enormous amount of my time culling changes, crafting 
expository text, and creating strong examples.  As such, it is going to very 
much reflect my style and judgement.

--

___
Python tracker 

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



[issue11076] Iterable argparse Namespace

2011-01-31 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

+1 for making the object readily convertible to a dictionary.  That would also 
serve to make it more introspectable without losing the simplicity of the 
current design.

--
nosy: +rhettinger

___
Python tracker 

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



[issue10891] Tweak sorting howto to eliminate redundancy

2011-01-31 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

You can put in the backslashes before the two periods, but not the other 
changes.  I want the method names to continue to be spelled-out in full so that 
it is more clear what they are referring to.  Even in spoken English, I 
typically say "list sort" or "sort method of the builtin list type".  This 
helps distinguish it from the sorted() builtin.

--
assignee: rhettinger -> eric.araujo

___
Python tracker 

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



[issue11071] What's New review comments

2011-01-31 Thread Georg Brandl

Georg Brandl  added the comment:

I agree with Raymond: whoever puts in 95% of work for a single document should 
have artistic license over the style.

I also don't complain if people use a different indentation style in module 
docs they write (but I reserve the right to use mine if I edit these docs).

It is very nice having standards, but well, I hope you know about the hobgoblin 
:)

And particularly about keyword arg spacing, I found that it very much depends 
on the manner of arguments you're dealing with.  For dict()-style functions 
with lots of kwargs, it can really be much easier on the eyes to use space 
around the '=', or even use this style:

foo = dict(
some_key= some_value,
some_longer_key = some_other_value,
)

even if PEP 8 doesn't approve of that either.

--

___
Python tracker 

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



[issue3080] Full unicode import system

2011-01-31 Thread STINNER Victor

STINNER Victor  added the comment:

As explained in issue #10828: Python 3.2 doesn't support non-ASCII module names 
on Windows because module names are encoded to UTF-8 instead of the filesystem 
encoding (the ANSI code page).

--

___
Python tracker 

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



[issue11016] Add S_ISDOOR to the stat module

2011-01-31 Thread Jesús Cea Avión

Jesús Cea Avión  added the comment:

Martin, I guess "stat" deprecation could require a few years and it would be an 
extra incompatibility burden between 2.7 and 3.x.

Beside the symbolic constants, why would you see "stat" deprecated?.

--

___
Python tracker 

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



[issue8973] Inconsistent docstrings in struct module

2011-01-31 Thread SilentGhost

SilentGhost  added the comment:

r81947 introduced this issue:

>>> from struct import *
>>> pack_into
Traceback (most recent call last):
  File "", line 1, in 
pack_into
NameError: name 'pack_into' is not defined

struct.__all__ has a duplicate entry and misses pack_into.

Patch is attached, test passes. Seems quite innocent to me, could it make into 
3.2, George?

--
nosy: +SilentGhost, georg.brandl
status: closed -> open
Added file: http://bugs.python.org/file20625/struct.py.diff

___
Python tracker 

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



[issue11071] What's New review comments

2011-01-31 Thread STINNER Victor

STINNER Victor  added the comment:

"Python’s import mechanism can now load modules installed in directories with 
non-ASCII characters in the path name: import møøse.bites"

møøse is not a module *path*, but a module *name*... This example doesn't work 
on Windows: see #3080. Module paths is the sys.path list. An use case is Python 
installed in the user directory with diacritics in the user name (eg. Python 
installed in C:\Users\Amélie\...).

"The biggest news for Python 3.2 is that the email package and nntplib modules 
now work correctly with the bytes/text model in Python 3."

You can also include mailbox in this list.

--
nosy: +haypo

___
Python tracker 

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



[issue11071] What's New review comments

2011-01-31 Thread STINNER Victor

STINNER Victor  added the comment:

Should we add imports in all examples? Eg. add import math in:

>>> repr(math.pi)
'3.141592653589793'
>>> str(math.pi)
'3.141592653589793'

At least, accumulate should be replaced by itertools.accumulate in the 
following example:

>>> list(accumulate(8, 2, 50))
[8, 10, 60]

Because it looks like accumulate() is a builtin function.

Some other examples without the module name: "tally = Counter(dogs=5, cat=3)", 
"d = OrderedDict...", "d = deque('simsalabim')", "all_polls_closed = 
Barrier(len(sites))", ...

I prefer to have the module name in examples because it is easy to test them: 
just copy/paste in an interpreter. It's even more easier if there is the import 
statement :-)

--

___
Python tracker 

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



[issue11071] What's New review comments

2011-01-31 Thread STINNER Victor

STINNER Victor  added the comment:

The import in the following example is wrong :

>>> import datetime
>>> datetime.now(timezone.utc)
...

It should be replaced by: from datetime import datetime, timezone.

--

___
Python tracker 

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



[issue11073] threading.Thread documentation can be improved

2011-01-31 Thread Roy Smith

Roy Smith  added the comment:

Here's the code I ended up writing:

class Foo():
   def __init__(self):
   self.thread = Thread(target=Foo.runner, args=[self])
   self.thread.start()

   @staticmethod
   def runner(self):
  # blah, blah, blah

It was not immediately clear from the documentation if my runner() method 
should be declared static or not.  In retrospect, it must be (since this can be 
used with target functions which are not class methods at all), but it took a 
bit of thought to get from what the documentation said (i.e. 'callable object 
to be invoked by the run() method') to that conclusion.  

It seems to me the documentation could be a bit more explicit that your target 
does not get called as a method of some object.  Changing the text to read, 
"static function or other callable object" would remove any such confusion.

It could be that some of my confusion is due to my previously working with a 
C++ threading package where the thread runner functions *were* class methods.  
Still, it seems like the potential for other people to be similarly confused 
exists and a little tweaking of the documentation text would help.

--

___
Python tracker 

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



[issue11071] What's New review comments

2011-01-31 Thread Vinay Sajip

Vinay Sajip  added the comment:

Nick, thanks for highlighting the logging changes. In addition to what you 
mentioned, there's still more, at least some of which deserves to get into 
"what's new" :-)

1. QueueHandler and QueueListener classes were added to help with logging in 
multiprocessing applications.
2. Logger got a getChild(suffix) method which returns a child logger with the 
given suffix.
3. An optional stack_info parameter to logging calls provides complete stack 
information (not just the parts unwound during exception handling).
4. Logger got a hasHandlers() method which returns True if any handlers are 
available for the logger (including those in ancestor loggers).
5. The LoggerAdapter implementation was changed to improve its usability, 
during which its public API gained the isEnabledFor(),   getEffectiveLevel(), 
hasHandlers() and setLevel() methods.
6. HTTPHandler gained secure and credentials keyword arguments for use with SSL 
and sites needing authentication.
7. StreamHandler now has a terminator attribute (defaults to '\n' for backward 
compatibility) but can now be set on a per-handler basis.
8. SysLogHandler gained a socktype keyword argument which defaults to 
SOCK_DGRAM but can accept SOCK_STREAM for use with newer syslog daemons which 
can listen using TCP.
9. basicConfig() also takes an optional style argument (default '%', also 
accepts '{' or '$').
10. SMTPHandler takes optional "secure" kwarg for use with TLS.
11. SysLogHandler now treats Unicode as per RFC 5424.

Er ... that's it for now.

--

___
Python tracker 

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



[issue11071] What's New review comments

2011-01-31 Thread STINNER Victor

STINNER Victor  added the comment:

ABCMeta should be replaced by abc.ABCMeta, or other "abc." prefixes should be 
removed.

class Temperature(metaclass=ABCMeta):
@abc.abstractclassmethod
def from_fahrenheit(self, t):
...
@abc.abstractclassmethod
def from_celsius(self, t):
...

I don't know/understand the "->" syntax:

>>> print(byte_stream.getvalue())
b'G3805  showroom   Main chassis' ->
b'X7899  warehouse  Reserve cog ' ->
b'L6988  receiving  Primary sprocket'

If you would like to split record by record, use something like:

>>> x=byte_stream.getvalue()
>>> [x[index:index+REC_LEN] for index in range(0,len(x),REC_LEN)]
[b'G3805  showroom   Main chassis', b'X7899  warehouse  Reserve cog ', 
b'L6988  receiving  Primary sprocket']

--

$ ./python 
Python 3.2rc2+ (py3k:88277, Jan 31 2011, 14:24:09) 
>>> from ast import literalrequest
ImportError: cannot import name literalrequest

--

>>> import shutil, pprint
...
>>> f = make_archive(...)

It's shutil.make_archive(), not make_archive() here.

>>> shutil.register_archive_format(  # register a new archive 
>>> format
name = 'xz',
function = 'xz.compress',
extra_args = [('level', 8)],
description = 'xz compression'
)

The function have to be callable: a str is not callable.

--

___
Python tracker 

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



[issue11073] threading.Thread documentation can be improved

2011-01-31 Thread Brian Curtin

Brian Curtin  added the comment:

> It was not immediately clear from the documentation if my runner() method 
> should be declared static or not.

The doc doesn't mention static methods at all, and my uses and others that I've 
seen have never used static methods.

--
nosy: +brian.curtin

___
Python tracker 

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



[issue11073] threading.Thread documentation can be improved

2011-01-31 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

You don't have to use any staticmethod here (actually, staticmethod is an 
anti-pattern in Python). Just write:

class Foo():
   def __init__(self):
   self.thread = Thread(target=self.runner)
   self.thread.start()

   def runner(self):
  # blah, blah, blah

--
nosy: +pitrou
resolution:  -> works for me
status: open -> closed

___
Python tracker 

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



[issue11071] What's New review comments

2011-01-31 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

Thanks Victor.

--

___
Python tracker 

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



[issue11071] What's New review comments

2011-01-31 Thread Alexander Belopolsky

Alexander Belopolsky  added the comment:

Please consider mentioning that several modules can now be called with -m: 
pickle, pickletools and tkinter.

--
nosy: +belopolsky

___
Python tracker 

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



[issue11077] Tkinter is not thread safe. This is a bug.

2011-01-31 Thread Scott M

New submission from Scott M :

The more I look at GUI support in Python, the more I realize that the lack of 
basic thread safety in GUI support is simply a bug. I know Java's Swing has the 
same thread limitation, but that doesn't make it right. Xlib is thread safe. 
The Windows SDK is thread safe. Python is supposed to be the language that's 
easy to use, and there is nothing easy about teaching new programmers that they 
have to mess with queues and timers just to get a basic set of displays 
running, just because when threads are in use.

I'm in the position of teaching folk with little-to-no programming experience, 
how to script simple applications in Python. The modules they have to use are 
inherently threaded, and delivery hunks of data from multiple sources to them. 
The most natural instinct is to put up some graphs and other widgits to display 
the data, and all of it is completely trivial right up until I have to explain 
that drawing a line isn't canvas.line(from, to), but becomes an exercise in 
Queue.Queue and theRoot.after(n, myself), before you even get to learn about 
widgits. Threading is supposed to simplify problems, not add to them. Having to 
hack around with special timers and polling, just to get some simple graphs up, 
is plain unpythonic.

Please consider this a bug, a glaring misfeature, in a language that is 
otherwise a very reasonable choice to get technical but non-programmerish 
people into toolmaking self-sufficiency.

--
components: Tkinter
messages: 127604
nosy: PythonInTheGrass
priority: normal
severity: normal
status: open
title: Tkinter is not thread safe. This is a bug.
type: behavior
versions: Python 2.7

___
Python tracker 

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



[issue8275] callback function on win64 results in bad behavior. mem corruption?

2011-01-31 Thread stan mihai

stan mihai  added the comment:

attached patch with tests

I have no experience with python development so the tests will actually need a 
more detailed review. Also I only checked it on win64.

--
Added file: http://bugs.python.org/file20626/ctypes_win64_tests.diff

___
Python tracker 

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



[issue8973] Inconsistent docstrings in struct module

2011-01-31 Thread Alexander Belopolsky

Alexander Belopolsky  added the comment:

The proposed patch looks fine to me, but it is attached to the wrong issue.  It 
belongs to #8973 or better yet to follow RC2 rules pedantically, it should be 
posted in a separate issue.

This is important, because this issue is limited to docstrings and may be 
considered documentation only, but the proposed parch affects behavior.  Still 
I would be +1 on applying it.

--

___
Python tracker 

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



[issue8973] Inconsistent docstrings in struct module

2011-01-31 Thread Alexander Belopolsky

Alexander Belopolsky  added the comment:

Wait, #8973 *is* this issue.  But r81947 is clearly not about docstrings.  We 
definitely need a saparate issue.  This is too confusing.

--

___
Python tracker 

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



[issue11078] Have test___all__ check for duplicates

2011-01-31 Thread R. David Murray

New submission from R. David Murray :

Inspired by what happened in issue 8973, I offer the attached patch for 
test__all__ to have it check the __all__ list for duplicates.  Interestingly, 
the first failure is not in struct, but in os.  Obviously the patch can't be 
applied until the test succeeds, so I'll be coming back to this later.  Figured 
I'd post the test patch in case anyone else wants to play with fixing things 
before I get to it.

--
components: Tests
files: check_all_for_duplicates.patch
keywords: patch
messages: 127608
nosy: SilentGhost, pitrou, r.david.murray
priority: normal
severity: normal
stage: needs patch
status: open
title: Have test___all__ check for duplicates
type: feature request
versions: Python 3.3
Added file: http://bugs.python.org/file20627/check_all_for_duplicates.patch

___
Python tracker 

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



[issue8973] Inconsistent docstrings in struct module

2011-01-31 Thread Alexander Belopolsky

Changes by Alexander Belopolsky :


--
Removed message: http://bugs.python.org/msg127607

___
Python tracker 

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



[issue8973] Inconsistent docstrings in struct module

2011-01-31 Thread Alexander Belopolsky

Alexander Belopolsky  added the comment:

Wait, #8973 *is* this issue.  But r81947 is clearly not only about docstrings.  
We definitely need a separate issue.  This is too confusing.

--

___
Python tracker 

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



[issue6792] Distutils-based installer does not detect 64bit versions of Python

2011-01-31 Thread Jérôme Radix

Changes by Jérôme Radix :


--
nosy: +Jérôme Radix

___
Python tracker 

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



[issue1252236] Simplying Tkinter's event loop

2011-01-31 Thread Alexander Belopolsky

Changes by Alexander Belopolsky :


--
nosy: +PythonInTheGrass -BreamoreBoy
resolution: wont fix -> 
status: closed -> open

___
Python tracker 

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



[issue11077] Tkinter is not thread safe

2011-01-31 Thread Brian Curtin

Changes by Brian Curtin :


--
title: Tkinter is not thread safe. This is a bug. -> Tkinter is not thread safe

___
Python tracker 

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



[issue8275] callback function on win64 results in bad behavior. mem corruption?

2011-01-31 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Patch verified to work under Linux and win32. It looks good, except for tab 
characters in the Modules/_ctypes/_ctypes_test.c (indentation of C files should 
use 4 spaces); that's a detail that we can fix ourselves.

--
assignee: theller -> 

___
Python tracker 

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



[issue11077] Tkinter is not thread safe

2011-01-31 Thread Alexander Belopolsky

Alexander Belopolsky  added the comment:

One possible solution was presented in issue1252236: move tkinter event loop 
into Python main loop.  However, to consider this report a bug, we need an 
example code that shows the behavior that you consider incorrect.  Even then, 
it is likely that fixing the behavior won't be possible without introducing new 
features.  I am reclassifying this as a feature request.

--
nosy: +belopolsky
stage:  -> unit test needed
type: behavior -> feature request
versions: +Python 3.3 -Python 2.7

___
Python tracker 

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



[issue11079] Make OS X entry in Applications like that in Windows

2011-01-31 Thread Raymond Hettinger

New submission from Raymond Hettinger :

In Applications, the 3.2 entry includes:
* Python Launcher
* IDLE
* Update Shell.Profile Command
* Extras directory

The latter should be dropped (most of the tools only make sense from the 
command-line) and should be replaced by a link to the docs:

file:///Library/Frameworks/Python.framework/Versions/3.2/Resources/English.lproj/Documentation/index.html

This setup better matches what we offer in Windows and it makes the docs more 
accessible.

The Windows setup also includes an uninstall option.  It would be nice if OS X 
did the same, but I don't know if that is the way of the Mac.

--
assignee: ned.deily
components: Build
messages: 127612
nosy: ned.deily, rhettinger, ronaldoussoren
priority: normal
severity: normal
status: open
title: Make OS X entry in Applications like that in Windows
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



[issue11078] Have test___all__ check for duplicates

2011-01-31 Thread Alexander Belopolsky

Alexander Belopolsky  added the comment:

+1.  This is a fairly common mistake.  Usually benign, but as issue 8973 shows, 
may highlight a visible error.

--
nosy: +belopolsky

___
Python tracker 

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



[issue10360] _weakrefset.WeakSet.__contains__ should not propagate TypeErrors

2011-01-31 Thread Tres Seaver

Tres Seaver  added the comment:

georg.brandl (2010-12-03 10:20):

> Don't worry, it will be ported.

When?  Why would it *not* be merged to the 2.7 and 3.1 branches at the
time the bug is closed?  Delaying the port only increases the chance
that the fix will fall between the cracks.

In particular, I would like confirmation that the fix *will* be ported
before 2.7.2 is released:  this bug causes the 2.7 Zope buildbots
to fail, which means they are disabled until the fix is released.

--

___
Python tracker 

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



[issue10360] _weakrefset.WeakSet.__contains__ should not propagate TypeErrors

2011-01-31 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Let's reopen until then.

--
assignee: pitrou -> 
resolution: fixed -> accepted
stage:  -> committed/rejected
status: closed -> open
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



[issue11023] pep 227 missing text

2011-01-31 Thread Éric Araujo

Éric Araujo  added the comment:

The “Documentation” component is used for bugs found in files under the Doc 
directory of a CPython checkout or source tarball.  PEPs are tracked in their 
own repository and are not part of the CPython distribution.  They are not part 
of the docs.  Hope this clarifies things.

--

___
Python tracker 

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



[issue11061] Verify command option before parsing config file

2011-01-31 Thread Éric Araujo

Éric Araujo  added the comment:

Well, the setup.cfg could register a command named “wrong”, so d2 really has to 
parse all config files before rejecting a command.

--

___
Python tracker 

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



[issue6792] Distutils-based installer does not detect 64bit versions of Python

2011-01-31 Thread Jérôme Radix

Jérôme Radix  added the comment:

Could you please change the priority of this Issue to 'High' as this problem is 
a big annoyance for all Windows 64bits users which is a rather large niche of 
users (a niche getting larger and larger everyday), don't you think ?

--

___
Python tracker 

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



[issue11080] Win32Serial.read coding error for non-blocking read

2011-01-31 Thread Terry M. Topka

New submission from Terry M. Topka :

Attempting to read a fixed amount of data when the serial port is configured 
for non-blocking reads (i.e. self.timeout == 0) will occasionally throw an 
invalid memory access exception, due to an error in the following code:

### pyserial-2.5-rc2 serialWin32.py Line 219
if self.timeout == 0:
n = min(comstat.cbInQue, size)
if n > 0:
buf = ctypes.create_string_buffer(n)
rc = win32.DWORD()
err = win32.ReadFile(self.hComPort, buf, size, 
ctypes.byref(rc), ctypes.byref(self._overlappedRead))

The buffer length passed to win32.ReadFile should be 'n', not 'size'. This may 
not have been noticed since it is timing dependent: only if additional input is 
enqueued inbetween accessing the input queue length and the ReadFile call will 
the inappropriate invalid memory access exception be raised when 'size' is 
greater than 'n'.

--
components: Extension Modules, Windows
files: serialwin32.py
messages: 127619
nosy: tmtopka
priority: normal
severity: normal
status: open
title: Win32Serial.read coding error for non-blocking read
type: crash
versions: 3rd party, Python 2.6
Added file: http://bugs.python.org/file20628/serialwin32.py

___
Python tracker 

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



[issue11080] Win32Serial.read coding error for non-blocking read

2011-01-31 Thread Brian Curtin

Brian Curtin  added the comment:

You should contact pyserial.

--
nosy: +brian.curtin
resolution:  -> invalid
stage:  -> committed/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



[issue11078] Have test___all__ check for duplicates

2011-01-31 Thread SilentGhost

SilentGhost  added the comment:

At the moment test fails only for os module on windows. 

These are the offending names: putenv, spawnv, spawnve

The reason is that __all__ is extended with ntpath.__all__ and then again in 
the body of os.py (I'm not entirely sure how this could be fixed elegantly).

--

___
Python tracker 

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



[issue8998] add crypto routines to stdlib

2011-01-31 Thread Jesús Cea Avión

Changes by Jesús Cea Avión :


--
versions: +Python 3.3 -Python 3.2

___
Python tracker 

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



[issue11078] Have test___all__ check for duplicates

2011-01-31 Thread R. David Murray

R. David Murray  added the comment:

Well, the test stops testing after the first failure.  Perhaps another 
enhancement request would be to make test__all__ a parameterized test so that 
it tests all modules even if one or more fail.

On linux, the dups are putenv and unsetenv.  And yes, deeper investigation of 
why os.py is adding them is required to fix this :)

--

___
Python tracker 

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



[issue11078] Have test___all__ check for duplicates

2011-01-31 Thread Alexander Belopolsky

Alexander Belopolsky  added the comment:

On Mon, Jan 31, 2011 at 12:09 PM, R. David Murray
 wrote:
..
> On linux, the dups are putenv and unsetenv.  And yes, deeper investigation of 
> why
> os.py is adding them is required to fix this :)

Too bad __all__ cannot be specified as a set.

--

___
Python tracker 

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



[issue11078] Have test___all__ check for duplicates

2011-01-31 Thread R. David Murray

R. David Murray  added the comment:

Well, checking if the token is there before adding it would certainly be a fix, 
but I think it would be worth understanding why it gets added if it is already 
there, because instead perhaps it is possible to simply remove the adding code 
from os.py.  Removing code is nice.

--

___
Python tracker 

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



[issue11081] from struct import * misses pack_into

2011-01-31 Thread SilentGhost

New submission from SilentGhost :

the following issue was introduced in r81947:

>>> from struct import *
>>> pack_into
Traceback (most recent call last):
  File "", line 1, in 
pack_into
NameError: name 'pack_into' is not defined

struct.__all__ has a duplicate entry for "unpack" and misses "pack_into".

Patch is attached, test passes. Seems quite innocent to me, could it make into 
3.2, George?

Related: #8973 and #11078

--
components: Library (Lib)
files: struct.py.diff
keywords: easy, patch
messages: 127625
nosy: SilentGhost, belopolsky, georg.brandl, mark.dickinson
priority: normal
severity: normal
status: open
title: from struct import * misses pack_into
type: behavior
versions: Python 3.3
Added file: http://bugs.python.org/file20629/struct.py.diff

___
Python tracker 

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



[issue8973] Inconsistent docstrings in struct module

2011-01-31 Thread SilentGhost

SilentGhost  added the comment:

new issue #11081 was created for struct.__all__ fix

--
status: open -> closed

___
Python tracker 

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



[issue6792] Distutils-based installer does not detect 64bit versions of Python

2011-01-31 Thread R. David Murray

R. David Murray  added the comment:

I'll leave priority setting to tarek, but it doesn't look to me like raising 
the priority is going to make any difference, since it doesn't sound from 
reading the ticket like anyone has found a solution yet (other than offering 
64bit installers).

--
nosy: +r.david.murray
stage:  -> needs patch
versions: +Python 3.3 -Python 3.2

___
Python tracker 

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



[issue11081] from struct import * misses pack_into

2011-01-31 Thread Alexander Belopolsky

Alexander Belopolsky  added the comment:

I would say if anything can go in after rc2 at all, this should be accepted.  
George?

I ran a few sanity checks with the patch applied:

>>> set(struct.__all__) - set(dir(struct))
set()
>>> set(dir(struct)) - set(struct.__all__)
{'_clearcache', '__all__', '__builtins__', '__file__', '__package__', 
'__cached__', '__name__', '__doc__'}
>>> len(set(struct.__all__)) == len(struct.__all__)
True

LGTM.  Maybe one of the tests above can be converted to a unit test.

--
assignee:  -> georg.brandl
versions: +Python 3.2 -Python 3.3

___
Python tracker 

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



[issue11068] Python 2.7.1 Idle traceback on OS X (10.6.6)

2011-01-31 Thread R. David Murray

R. David Murray  added the comment:

FYI, a python traceback is not a segfault.  Nor is it a 'crash' in the sense we 
use in this tracker.

The warning has been added to the download page, though there is discussion 
about whether or not it should be more prominent.

--
nosy: +r.david.murray
resolution:  -> invalid
stage:  -> committed/rejected
status: open -> closed
type: crash -> behavior

___
Python tracker 

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



[issue6792] Distutils-based installer does not detect 64bit versions of Python

2011-01-31 Thread Tarek Ziadé

Tarek Ziadé  added the comment:

Yeah I agree. Until we get a solution + patch the priority here does not really 
matter.

--

___
Python tracker 

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



[issue11078] Have test___all__ check for duplicates

2011-01-31 Thread Alexander Belopolsky

Changes by Alexander Belopolsky :


--
dependencies: +from struct import * misses pack_into

___
Python tracker 

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



[issue11081] from struct import * misses pack_into

2011-01-31 Thread Alexander Belopolsky

Changes by Alexander Belopolsky :


--
stage:  -> commit review

___
Python tracker 

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



[issue11068] Python 2.7.1 Idle traceback on OS X (10.6.6)

2011-01-31 Thread David Meier

David Meier  added the comment:

Sorry that what I had pasted in does not show a segfault, however if you run it 
as `idle` (i.e. no `(idle&)) the command line reports a generic "Segmentation 
fault" with no traceback.  So, yes, it is a segmentation fault - but I figured 
it was more useful if you had the traceback when running it that way.  Whether 
or not the two are related I do not know.

--

___
Python tracker 

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



[issue8176] Interpreter crash with "double free or corruption" message

2011-01-31 Thread Alexander Belopolsky

Changes by Alexander Belopolsky :


Removed file: http://bugs.python.org/file16584/unnamed

___
Python tracker 

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



[issue8176] Interpreter crash with "double free or corruption" message

2011-01-31 Thread Alexander Belopolsky

Changes by Alexander Belopolsky :


Removed file: http://bugs.python.org/file16615/unnamed

___
Python tracker 

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



[issue8176] Interpreter crash with "double free or corruption" message

2011-01-31 Thread Alexander Belopolsky

Alexander Belopolsky  added the comment:

It looks like the bug cannot be reproduced anymore.  Since it was discovered 
using a python instance with third-party extension modules, it may not even be 
a python bug to begin with.

--
assignee:  -> belopolsky
nosy: +belopolsky -Alexander.Belopolsky
resolution:  -> works for me
stage:  -> committed/rejected
status: open -> pending

___
Python tracker 

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



[issue7358] cPickle crash on failed assertion

2011-01-31 Thread Alexander Belopolsky

Alexander Belopolsky  added the comment:

Ryan,

Do you still have the setup that can reproduce this error?  If so, can you try 
running it with pickle rather than cPickle?  If it works with pickle, please 
see if you can reproduce the error by unpickling the result of pickle and 
repickling it with cPickle.  This may allow you to create a self-contained 
script that you can post together with a pickle file.

--
nosy: +belopolsky

___
Python tracker 

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



[issue9197] Crash when importer an extension after Py_Initialize, Py_Finalize and Py_Initialize

2011-01-31 Thread Alexander Belopolsky

Changes by Alexander Belopolsky :


Removed file: http://bugs.python.org/file17899/unnamed

___
Python tracker 

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



[issue7358] cPickle crash on failed assertion

2011-01-31 Thread STINNER Victor

Changes by STINNER Victor :


--
nosy: +haypo

___
Python tracker 

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



[issue9197] Crash when importing an extension after Py_Initialize, Py_Finalize and Py_Initialize

2011-01-31 Thread Alexander Belopolsky

Alexander Belopolsky  added the comment:

Amaury,

Can you post your Linux code reproducing the issue?  I would like to take a 
look, but don't want to dig through an XCode project.

--
assignee:  -> belopolsky
nosy: +belopolsky
title: Crash when importer an extension after Py_Initialize, Py_Finalize and 
Py_Initialize -> Crash when importing an extension after Py_Initialize, 
Py_Finalize and Py_Initialize

___
Python tracker 

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



[issue8176] Interpreter crash with "double free or corruption" message

2011-01-31 Thread STINNER Victor

STINNER Victor  added the comment:

If you are still able to reproduce the bug, you may try the following module to 
get a backtrace: https://github.com/haypo/faulthandler/

--
status: pending -> open

___
Python tracker 

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



[issue8176] Interpreter crash with "double free or corruption" message

2011-01-31 Thread Alexander Belopolsky

Alexander Belopolsky  added the comment:

Victor,

I was thinking about pointing the OP to your faulthandler module, but decided 
not to because in the failing thread python has already finished execution and 
most of finalization.  It is very unlikely that faulthandler will be helpful in 
this scenario.

--

___
Python tracker 

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



[issue7358] cStringIO not 64-bit safe

2011-01-31 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

The issue looks quite clear: cStringIO.write() asserts that the required 
storage size is less than INT_MAX. Therefore, in all likelihood, the pickle 
dump is simply larger than 2GB.

Now, the cStringIO structures seem 64-bit safe, so the comparison to INT_MAX 
seems useless. Also, in non-debug builds, the assert is skipped but the 
Py_ssize_t values are first cast to int before being saved into a Py_ssize_t 
struct member! Which would lead to data corruption and/or crashes.

The INT_MAX asserts were added in r42382 which also made cStringIO internals 
64-bit safe. Martin, do you remember why you did this?

The asserts don't even protect against the following crash:

$ ./python -c "from cStringIO import StringIO; b=b'x'*(2**31+1); s=StringIO(); 
s.write(b)"
Erreur de segmentation

gdb shows the following stack excerpt:

#0  0x7724e8c2 in memcpy () from /lib64/libc.so.6
#1  0x76b47a46 in O_cwrite (self=, 
c=0x7fff76b44054 'x' ..., 
l=-2147483647) at /home/antoine/cpython/27/Modules/cStringIO.c:415


Now, onto the problem of reproducing, here's another interesting thing: while 
some internal structures of cStringIO are 64-bit safe, the Python-facing API 
isn't:

>>> from cStringIO import StringIO
>>> b = b"x" * (2**32+1)
>>> s = StringIO()
>>> s.write(b)
>>> s.tell()
1

(the module doesn't use Py_SSIZE_T_CLEAN)

--
nosy: +loewis, pitrou
title: cPickle crash on failed assertion -> cStringIO not 64-bit safe
versions: +Python 2.7

___
Python tracker 

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



[issue11077] Tkinter is not thread safe (and that's... bad)

2011-01-31 Thread Scott M

Scott M  added the comment:

I don't have an opinion on 1252236. I'm not certain it would help.

I have an extension that runs a bunch of (alien) threads into Python code. The 
threads deliver information for all sorts of real world events, asynchronously. 
Multiple threads are used, because people occasionally want to do blocking 
operations in these alien threads, but still want to be able to handle other 
incoming information at full speed, with the other threads.

If any of these threads attempts to update a Tkinter widgit - and this is the 
first thing I tried to do - then tkinter will except or crash in some horrible 
way, sooner or later. 

The attached .py (in Python 2.7.1) does it without any extensions. Click on 
Launch quickly 10-15 times; if it doesn't crash, kill and restart. It rarely 
takes more than 4-5 runs to get a traceback, or occasionally python itself just 
crashes. Bottom line, one thread in .mainloop() and another thread calling 
virtually any Tkinter function, even something as simple as .after(), is an 
invitation a crash.

--
title: Tkinter is not thread safe -> Tkinter is not thread safe (and that's... 
bad)
Added file: http://bugs.python.org/file20630/TkinterCrash2.py

___
Python tracker 

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



[issue8176] Interpreter crash with "double free or corruption" message

2011-01-31 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

I wouldn't be surprised if the crash was related to some concurrency issues 
during shutdown. Other (Python or not Python) threads can continue running 
while the main thread is running Py_Finalize; this might be the reason; or 
perhaps some extension modules don't really support reloading.

--
nosy: +pitrou

___
Python tracker 

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



[issue11023] pep 227 missing text

2011-01-31 Thread R. David Murray

R. David Murray  added the comment:

Eric, what you say is technically true, but we don't have any other place to 
track PEP bugs.

--
assignee:  -> docs@python
components: +Documentation
nosy: +docs@python, r.david.murray
resolution: invalid -> 
stage: committed/rejected -> needs patch
status: closed -> open
type:  -> behavior

___
Python tracker 

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



[issue11077] Tkinter is not thread safe

2011-01-31 Thread Brian Curtin

Changes by Brian Curtin :


--
title: Tkinter is not thread safe (and that's... bad) -> Tkinter is not thread 
safe

___
Python tracker 

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



[issue11081] from struct import * misses pack_into

2011-01-31 Thread Georg Brandl

Georg Brandl  added the comment:

Yes, this can go in.

--
assignee: georg.brandl -> belopolsky

___
Python tracker 

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



[issue9197] Crash when importing an extension after Py_Initialize, Py_Finalize and Py_Initialize

2011-01-31 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc  added the comment:

Here are the files I used to reproduce the crash.
See "build.sh" for the build command, there may be better ways...

--
Added file: http://bugs.python.org/file20631/simpletest.zip

___
Python tracker 

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



[issue10360] _weakrefset.WeakSet.__contains__ should not propagate TypeErrors

2011-01-31 Thread Georg Brandl

Georg Brandl  added the comment:

Because I don't think porting every change immediately is worth my time when I 
can do it much faster in mass-merges.

I know other developers do this differently, but since I use svnmerge to do my 
mass-merges, there won't be any falling through cracks.

--

___
Python tracker 

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



[issue571767] string.capitlize() documentation

2011-01-31 Thread R. David Murray

R. David Murray  added the comment:

I see correct doc strings on both 2.7 head and 3.1.

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



[issue11077] Tkinter is not thread safe

2011-01-31 Thread Alexander Belopolsky

Alexander Belopolsky  added the comment:

Hmm, either my hand is too slow or my laptop is too fast, but I cannot 
reproduce the crash. Can you create a non-interactive script?  Maybe start a 
separate thread generating "launch" events?

What do you mean by "crash"?  Do you get a python backtrace or OS diagnostic 
saying that the process was killed by a signal of some sort?  If it is the 
former, please post the backtrace.  If the latter, can you produce C backtrace?

--

___
Python tracker 

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



[issue2504] Add gettext.pgettext() and variants support

2011-01-31 Thread Étienne BERSAC

Changes by Étienne BERSAC :


--
nosy:  -Felix Schwarz

___
Python tracker 

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



[issue2504] Add gettext.pgettext() and variants support

2011-01-31 Thread Étienne BERSAC

Changes by Étienne BERSAC :


--
nosy: +bersace

___
Python tracker 

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



[issue2504] Add gettext.pgettext() and variants support

2011-01-31 Thread Étienne BERSAC

Changes by Étienne BERSAC :


--
nosy: +Felix Schwarz

___
Python tracker 

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



[issue11082] ValueError: Content-Length should be specified

2011-01-31 Thread William Wu

New submission from William Wu :

I found this bug when I started to trying Python 3.2 release candidate 1.

When using urllib.request.urlopen to handle HTTP POST, I got the error message:

ValueError: Content-Length should be specified for iterable data of type 
 'foo=bar'

I'll attach the patch and test case.

--
components: Library (Lib)
messages: 127646
nosy: William.Wu
priority: normal
severity: normal
status: open
title: ValueError: Content-Length should be specified
type: behavior
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



[issue11083] threading.Thread - start() rises RuntimeException?

2011-01-31 Thread Federico Culloca

New submission from Federico Culloca :

In the threading module documentation, about the start() method of the 
threading.Thread class, it says that, upon calling start() more then once, a 
RuntimeException is raised. I couldn't find in the whole documentation other 
references to this "RuntimeException".

Maybe it's RuntimeError?

--
assignee: docs@python
components: Documentation
messages: 127647
nosy: Federico.Culloca, docs@python
priority: normal
severity: normal
status: open
title: threading.Thread - start() rises RuntimeException?
type: behavior
versions: Python 2.7

___
Python tracker 

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



[issue11077] Tkinter is not thread safe

2011-01-31 Thread Alexander Belopolsky

Alexander Belopolsky  added the comment:

I converted TkinterCrash2.py to 3.x using 2to3 (result attached as 
TkinterCrash3.py) and it works with 3.2rc2 just fine.

--
Added file: http://bugs.python.org/file20632/TkinterCrash3.py

___
Python tracker 

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



[issue11081] from struct import * misses pack_into

2011-01-31 Thread Alexander Belopolsky

Alexander Belopolsky  added the comment:

Committed in revision 88280.

--
resolution:  -> fixed
stage: commit review -> committed/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



[issue11082] ValueError: Content-Length should be specified

2011-01-31 Thread William Wu

Changes by William Wu :


--
keywords: +patch
Added file: http://bugs.python.org/file20633/test_urllib_request.patch

___
Python tracker 

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



[issue11082] ValueError: Content-Length should be specified

2011-01-31 Thread William Wu

Changes by William Wu :


Added file: http://bugs.python.org/file20634/urllib_request.patch

___
Python tracker 

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



[issue11083] threading.Thread - start() rises RuntimeException?

2011-01-31 Thread Brian Curtin

Brian Curtin  added the comment:

Thanks, fixed in r88281. Back porting to the other branches as well.

--
nosy: +brian.curtin
resolution:  -> fixed
stage:  -> committed/rejected
status: open -> closed
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



[issue11084] Serialization of decimal.Decimal to XML-RPC

2011-01-31 Thread GDR!

New submission from GDR! :

xmlrpc.client (and xmlrpclib in 2.x) can't serialize instances of Decimal, 
throwing TypeError instead. Because XML is a textual format, converting from 
decimal to float may cause loss of data.

According to http://www.xmlrpc.com/spec, encoding Decimal as XML-RPC  
is allowed: "The range of allowable values is implementation-dependent, is not 
specified." Therefore, including decimal numbers that can not be represented by 
IEEE double is allowed by the spec.

Also, in my opinion, making a numeric type available in standard library 
unsupported by another part of standard library, is counterintuitive, but it's 
just my personal point of view.

I can provide a patch if this bug report is considered proper.

--
components: Library (Lib)
messages: 127651
nosy: gdr
priority: normal
severity: normal
status: open
title: Serialization of decimal.Decimal to XML-RPC
type: behavior
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



[issue11074] fix tokenize so it can be reloaded

2011-01-31 Thread Brett Cannon

Changes by Brett Cannon :


--
assignee: georg.brandl -> brett.cannon
versions: +Python 3.3 -Python 3.2

___
Python tracker 

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



[issue11085] expose _abcoll as collections.abc

2011-01-31 Thread Raymond Hettinger

New submission from Raymond Hettinger :

For the 3.3, make _abcoll (which is full of the collections abstract base 
classes) visible as a module called collections.abc and document that as the 
preferred way to access them.

For backwards compatibility, continue to import the names directly into the 
collections.py namespace so that no one has to change existing code.

Background:  Experience with teaching ABCs and dealing with bug reports has 
shown that it is creating some confusion having the long list of abstract APIs 
commingled with the concrete APIs (for example, seeing collections.Mapping and 
thinking it is one of the various concrete types in the collections module).  
If it were to become a practice to write collections.abc.Mapping, it would be 
immediately clear that an ABC was being used rather than a concrete class like 
OrderedDict.

The other reason to separate them is that the use cases tend to be different.  
People look to the abstract APIs either for a specification (reference 
purposes), for mixin methods (aid in building their own classes), or for 
registration (to control isinstance and issubclass).  In contrast, people use 
concrete APIs directly for managing data.  Accordingly, it makes senses to 
group the two different types of tools into separate toolboxes.

--
components: Library (Lib)
messages: 127652
nosy: rhettinger
priority: low
severity: normal
status: open
title: expose _abcoll as collections.abc
type: feature request
versions: Python 3.3

___
Python tracker 

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



[issue10992] tests failing when run under coverage

2011-01-31 Thread Brett Cannon

Changes by Brett Cannon :


--
assignee:  -> brett.cannon

___
Python tracker 

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



[issue10512] regrtest ResourceWarning - unclosed sockets and files

2011-01-31 Thread Brett Cannon

Brett Cannon  added the comment:

Once Python 3.3 is open I will apply the cgi fix. Just to double-check, can I 
close this issue once the test_cgi patch goes in?

--
assignee: georg.brandl -> brett.cannon

___
Python tracker 

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



[issue5803] email/quoprimime: encode and decode are very slow on large messages

2011-01-31 Thread Matt Cain

Matt Cain  added the comment:

I re-wrote encode() to be simpler and faster.
My version runs about 10 times faster on a 30KB message.

I have tested it somewhat but not rigorously

see attached patch

--
keywords: +patch
nosy: +cainmatt
Added file: http://bugs.python.org/file20635/quoprimime.py.diff

___
Python tracker 

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



[issue11084] Serialization of decimal.Decimal to XML-RPC

2011-01-31 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

-1 on an implicit, lossy conversion.

The principal reasons for using decimal in the first place is avoid 
representation error.  For example, when money is being represented as a 
decimal, it is improper to convert it to float (where it can no longer be 
compared for equality and where the representable range is smaller).

A user needs explicit control in this situation, converting to float when it 
doesn't matter, or using an API that allows the decimal repr to be handled.

One other issue is that in an RPC environment, good design suggests that the 
client do its best to match the type expectations for of the functions on the 
server.  Implicit signature changing makes even less sense for RPC than it does 
in a regular application.

--
nosy: +rhettinger
type: behavior -> feature request
versions: +Python 3.3 -Python 3.1

___
Python tracker 

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



[issue5803] email/quoprimime: encode and decode are very slow on large messages

2011-01-31 Thread R. David Murray

Changes by R. David Murray :


--
assignee:  -> r.david.murray
nosy: +r.david.murray
stage: needs patch -> patch review
versions: +Python 3.3

___
Python tracker 

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



[issue11085] expose _abcoll as collections.abc

2011-01-31 Thread R. David Murray

R. David Murray  added the comment:

Why not just put them in the 'abc' namespace?  IMO, collections.abc.Callable 
makes a lot less sense than abc.Mapping.

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



[issue8275] callback function on win64 results in bad behavior. mem corruption?

2011-01-31 Thread stan mihai

stan mihai  added the comment:

ok, please also fix the first parameter of the tests. Because it has the same 
value in the first call and the callback it will always be right by accident, 
since the first call puts the value in both standard and floating point 
registers.

--

___
Python tracker 

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



[issue3405] Add support for the new data option supported by event generate (Tk 8.5)

2011-01-31 Thread O.C.

O.C.  added the comment:

Hello,

I read the proposed patch "event_generate__data2.diff" and the Tcl/Tk manual 
http://www.tcl.tk/man/tcl8.5/TkCmd/bind.htm#M24

* Could you please also add a field "e.user_data" ? This would simply be a copy 
of 'd' :
---
e.detail = d
e.user_data = d
---
My reasoning is that the Tcl/Tk manual mentions the two names "detail" and 
"user_data". However, "user_data" may often be preferred because it has a clear 
meaning, whereas "detail" is quite vague.

* I did not understand why you try to get a widget reference from the "%d" 
field. Is it supposed to contain a widget name at some point ? According to the 
manual (and if I understood it well), it should never. 

Best regards,

O.C.

--
nosy: +dghjfrdj

___
Python tracker 

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



[issue11086] add lib2to3/__main__.py

2011-01-31 Thread Brett Cannon

New submission from Brett Cannon :

There is no reason why the 2to3 script can't be gutted and turned into just a 
stub that uses runpy to call lib2to3.__main__. Also has the nice benefit that 
one can use ``-m lib2to3`` instead of having to use the 2to3 script.

--
components: Library (Lib)
keywords: easy
messages: 127659
nosy: brett.cannon
priority: low
severity: normal
stage: needs patch
status: open
title: add lib2to3/__main__.py
versions: Python 3.3

___
Python tracker 

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



[issue11084] Serialization of decimal.Decimal to XML-RPC

2011-01-31 Thread GDR!

GDR!  added the comment:

I didn't mean to implicitly convert Decimal to float. My point was that 
xmlrpclib should serialize Decimals natively to avoid loss of precision when 
converting to float and then to string.

Whether other party will be able to represent this number exactly or not should 
not be our issue. 

To make it more clear, this is what Python currently does:
http://gdr.pastebin.pl/35766
this is what I propose it shoud do:
http://gdr.pastebin.pl/35765

--

___
Python tracker 

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



  1   2   >