[issue10969] Make Tcl recommendation more prominent

2011-01-22 Thread Raymond Hettinger

Raymond Hettinger rhettin...@users.sourceforge.net added the comment:

If you want to be less specific making recommendations for getting it to work, 
at least have a prominent disclosure of some sort:

Mac OS X 32-bit i386/PPC Installer (3.2rc1) for OS X 10.3 through 10.6 [2] (sig)
Mac OS X 64-bit/32-bit Installer (3.2rc1) for Mac OS X 10.6 [2] (sig)
 (may need an updated Tcl/Tk install to run IDLE or use Tkinter, see note 2 for 
instructions).

--

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



[issue10955] Possible regression with stdlib in zipfile

2011-01-22 Thread Georg Brandl

Georg Brandl ge...@python.org added the comment:

Patch #2 looks innocent enough to me, and is clearly an improvement.

--

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



[issue10955] Possible regression with stdlib in zipfile

2011-01-22 Thread Georg Brandl

Georg Brandl ge...@python.org added the comment:

For 3.3, we might want to consider implementing cp437 in C, as a necessary 
consequence of supporting import from zipfiles.  Shouldn't be so hard, I guess.

--

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



[issue5885] uuid.uuid1() is too slow

2011-01-22 Thread Ross Lagerwall

Ross Lagerwall rosslagerw...@gmail.com added the comment:

Attached is a patch based on the original patch, meant to have better 
performance.

On my PC, this:

import sys, time, uuid

def uu(n):
t = time.time()
for x in range(n):
uuid.uuid1()
print('%.3f microseconds' % ((time.time() - t) * 100.0 / n))

uu(5)

records a time of 38.5 microseconds unpatched (still using ctypes/libuuid) and 
a time of 16.5 microseconds afterwards.
uuid4() results in an improvement from 30 microseconds to 9 microseconds. From 
what I could see, what took the most time was the call to UUID() with a bytes 
object. That's why this patch passes in the uuid as a long.

It also fixes setup.py to check for the uuid.h header.

--
nosy: +rosslagerwall
Added file: http://bugs.python.org/file20485/issue_5885.patch

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



[issue10960] os.stat() does not mention that it follow symlinks by default

2011-01-22 Thread Марк Коренберг

Марк Коренберг socketp...@gmail.com added the comment:

Yes, os.stat and os.lstat should be one after next in docs. Also IMHO, they 
should have cross-references. See excellent php docs for example.

--

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



[issue10969] Make Tcl recommendation more prominent

2011-01-22 Thread Michael Foord

Michael Foord mich...@voidspace.org.uk added the comment:

For what it's worth I prefer Raymond's original wording. Installing the 
Activestate Tcl/Tk will never be a *bad* thing to do for using Python, so I 
don't see a problem with stating it as a requirement. Users are unlikely to see 
the current warning when they download and a broken IDLE by default is a bad 
situation.

--
nosy: +michael.foord

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



[issue10974] IDLE 3.2 not loading on double-click in Finder, OSX 10.6

2011-01-22 Thread Nestor Aguilera

Nestor Aguilera aguil...@santafe-conicet.gov.ar added the comment:

Ned: thanks for the explanation.

Nestor

===

On 22 Jan 2011, at 04:50, Ned Deily wrote:

 
 Changes by Ned Deily n...@acm.org:
 
 
 --
 Removed message: http://bugs.python.org/msg126820
 
 ___
 Python tracker rep...@bugs.python.org
 http://bugs.python.org/issue10974
 ___

--

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



[issue10955] Possible regression with stdlib in zipfile

2011-01-22 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

georg.brandl Patch #2 looks innocent enough to me, 
georg.brandl and is clearly an improvement.

Ok, issue fixed by r88140 (+r88141):

Issue #10955: zipimport uses ASCII encoding instead of cp497 to decode
filenames, at bootstrap, if the codec registry is not ready yet. It is
still possible to have non-ASCII filenames using the Unicode flag
(UTF-8 encoding) for all file entries in the ZIP file.

Oh, by the way, using ASCII at bootstrap is not a regression of Python 3.2: 
Python 3.1 used the wrong encoding (UTF-8) to decode filenames encoded to 
cp437. Raise a UnicodeDecodeError is better than decoding with the wrong 
encoding.

 For 3.3, we might want to consider implementing cp437 in C, ...

Since, I don't like this solution, I will not open a new issue for that. Feel 
free to open a new issue if you consider that we need that in Python 3.3.

--
resolution:  - fixed
status: open - closed

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



[issue9723] pipes.quote() needs to be documented

2011-01-22 Thread Matt Joiner

Matt Joiner anacro...@gmail.com added the comment:

Two reasons: The pipes module is Unix only, but pipes.quote is useful on all 
platforms. Secondly pipes.quote pertains to shell command-lines, this is also 
the domain of shlex which already cross platform. In pipes, an import 
shlex.quote would more than sufficient.

If this belongs in another separate bug I shall submit one. Please advise.

--

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



[issue10976] json.loads() throws TypeError on bytes object

2011-01-22 Thread hhas

hhas h...@users.sourceforge.net added the comment:

Doc fix works for me.

--

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



[issue10980] http.server Header Unicode Bug

2011-01-22 Thread Armin Ronacher

New submission from Armin Ronacher armin.ronac...@active-4.com:

I have a critical bugfix that should make it into Python 3.2 even when it's in 
release candidate state.  Currently http.server.BaseHTTPServer encodes headers 
with ASCII charset.  This is at least in violation with PEP  which demands 
that latin1 is used.

Because HTTP itself suggests latin1 (iso-8859-1) I strongly recommend changing 
this in BaseHTTPServer and not wsgiref.

The attached patch fixes that in a backwards compatible fashion.

--
assignee: georg.brandl
components: Library (Lib)
files: http-server-unicode.patch
keywords: patch
messages: 126832
nosy: aronacher, georg.brandl
priority: normal
severity: normal
stage: patch review
status: open
title: http.server Header Unicode Bug
type: behavior
Added file: http://bugs.python.org/file20486/http-server-unicode.patch

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



[issue10981] options starting with -- match substrings

2011-01-22 Thread David Caro

New submission from David Caro david.caro.este...@gmail.com:

When parsing option like --optionname, --option will match it too

example:

 import argparse
  parser = argparse.ArgumentParser()
 parser = argparse.ArgumentParser()
 parser.add_argument('--superstring')
_StoreAction(option_strings=['--superstring'], dest='superstring', nargs=None, 
const=None, default=None, type=None, choices=None, help=None, metavar=None)
 parser.parse_args(['--super','value'])
Namespace(superstring='value')

I'm using argparse 1.1 with python 2.6.6 (r266:84292, Sep 15 2010, 15:52:39), 
on ubuntu 10.10 32bit

--
messages: 126833
nosy: David.Caro
priority: normal
severity: normal
status: open
title: options starting with -- match substrings

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



[issue10981] options starting with -- match substrings

2011-01-22 Thread David Caro

Changes by David Caro david.caro.este...@gmail.com:


--
components: +Extension Modules
versions: +Python 2.6

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



[issue10981] argparse: options starting with -- match substrings

2011-01-22 Thread David Caro

Changes by David Caro david.caro.este...@gmail.com:


--
title: options starting with -- match substrings - argparse: options starting 
with -- match substrings

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



[issue10980] http.server Header Unicode Bug

2011-01-22 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

Extract of PEP :  Note also that strings passed to start_response() as a 
status or as response headers must follow RFC 2616 with respect to encoding. 
That is, they must either be ISO-8859-1 characters, or use RFC 2047 MIME 
encoding. 

What is the best choice for portability (HTTP servers and web browsers): latin1 
or MIME encoding? Latin1 is a small subset of Unicode: only U+..U+00FF.

We should maybe give the choice to the user between Latin1, MIME, or maybe 
something else (eg. UTF-8, cp1252, ...). Or at least, you should try something 
like:

try:
   bytes = text.encode('latin1')
except UnicodeEncodeError:
   bytes = encodeMIME(text, 'utf-8')

Would it be a good idea to accept raw bytes headers? HTTP is *supposed* to be 
correctly encoded using different RFC, but in practical, anyone is free to do 
whateven he wants.

Sentence extracted randomly from the WWW (dec. 2008): it seems that neither 
Tomcat 5.5 or 6 properly decodes HTTP headers as per RFC 2047! The Tomcat code 
assumes everywhere that header values use ISO-8859-1.

Finally, why do you consider that this issue have to be fixed before Python 3.2?

--
nosy: +haypo

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



[issue10980] http.server Header Unicode Bug

2011-01-22 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

RFC 5987 (Character Set and Language Encoding for Hypertext Transfer Protocol 
(HTTP) Header Field Parameters), August 2010:
http://greenbytes.de/tech/webdav/rfc5987.html#language.specification.in.encoded.words

 3.3 Language Specification in Encoded Words

Section 5 of [RFC2231] extends the encoding defined in [RFC2047] to also 
support language specification in encoded words. Although the HTTP/1.1 
specification does refer to RFC 2047 ([RFC2616], Section 2.2), it's not clear 
to which header field exactly it applies, and whether it is implemented in 
practice (see http://tools.ietf.org/wg/httpbis/trac/ticket/111 for details).

Thus, this specification does not include this feature. 

Hum ok, Latin1 looks safe and enough.

--

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



[issue10980] http.server Header Unicode Bug

2011-01-22 Thread Armin Ronacher

Armin Ronacher armin.ronac...@active-4.com added the comment:

Georg Brandl signed off the commit and Python 3.2 will ship with the HTTP 
server accepting latin1 bytes.

--

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



[issue10909] thread hang, possibly related to print

2011-01-22 Thread Scott M

Scott M scott.m...@comcast.net added the comment:

Moving to 3.x means redoing large swaths of the extension I just wrote. It's 
only a couple thousand lines, but it was my first extension and it cost me a 
week of my life in Google, and it does a lot with strings.

I haven't pulled down the source code for Python's internals yet, but from the 
one trace back I did get in the failing thread test app, the problem was inside 
print and it looked like it was inside the mechanism where print gets 
redirected. I hope the problem isn't anything as fundamental as the GIL, 
because that throws the stability of all of 2.7 into question (and it's been 
solid in all my tests; I do a lot with threads in my extension, all going after 
the GIL and diving into Python code.)

--

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



[issue10574] email.header.decode_header fails if the string contains multiple directives

2011-01-22 Thread Roy Hyunjin Han

Roy Hyunjin Han starsareblueandfara...@gmail.com added the comment:

2010/11/30 R. David Murray rep...@bugs.python.org:
 Out of curiosity, which email program is it that is producing these invalid 
 headers?

I lost the headers for the original email, so I don't know which email
program created the invalid headers.

On searching for messages from the same address, it seems most of the
messages originate from a marketing company called informz.net, but in
rare instances there is a non-standard X-Mailer header:
- ColdFusion 8 Application Server (via JavaMail)
- IBM Lotus Domino Access for MS Outlook (2003) Release 7.0.2 September 26, 2006

Messages sent via informz.net generally parse correctly, so I am
guessing it might have been one of the X-Mailers above.

--

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



[issue10909] thread hang, possibly related to print

2011-01-22 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

 Antoine, could improvement from 2.7 to 3.2 have anything to new with
 the new implementation of the Global Interpreter Lock?

Perhaps, but then it's pure luck. 
Looking at the traceback, IDLE seems to replace sys.stdout with its own thingie 
when spawning a separate Python program. Perhaps that thingie isn't thread-safe.

--
components: +IDLE -Interpreter Core

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



[issue10909] thread hang, possibly related to print

2011-01-22 Thread Antoine Pitrou

Changes by Antoine Pitrou pit...@free.fr:


--
nosy: +kbk

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



[issue10980] http.server Header Unicode Bug

2011-01-22 Thread Georg Brandl

Georg Brandl ge...@python.org added the comment:

Armin committed the patch in r88142 and followed up with r88143 for the 
http.client library.

Needs backporting?

--

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



[issue10981] argparse: options starting with -- match substrings

2011-01-22 Thread David Caro

David Caro david.caro.este...@gmail.com added the comment:

It is not an issue, it will try to match all the optional parameters, and if 
only one matches, then it will use it:

2110 elif option_string.startswith(option_prefix):
2111 action = self._option_string_actions[option_string]
2112 tup = action, option_string, explicit_arg
2113 result.append(tup)

and

2057 # if exactly one action matched, this segmentation is good,
2058 # so return the parsed action
2059 elif len(option_tuples) == 1:
2060 option_tuple, = option_tuples
2061 return option_tuple


if you try to add more than one optional parameter that matches the substring, 
it will complain:

 import argparse
 parser = argparse.ArgumentParser()
 parser.add_argument('--superstring')
_StoreAction(option_strings=['--superstring'], dest='superstring', nargs=None, 
const=None, default=None, type=None, choices=None, help=None, metavar=None)
 parser.parse_args(['--super','value'])
Namespace(superstring='value')
 parser.add_argument('--superstring2')
_StoreAction(option_strings=['--superstring'], dest='superstring', nargs=None, 
const=None, default=None, type=None, choices=None, help=None, metavar=None)
 parser.parse_args(['--super','value'])
usage: [-h] [--superstring SUPERSTRING] [--superstring2 SUPERSTRING2]
: error: ambiguous option: --super could match --superstring, --superstring2

--
resolution:  - invalid
status: open - closed

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



[issue10977] Concrete object C API needs abstract path for subclasses of builtin types

2011-01-22 Thread Éric Araujo

Changes by Éric Araujo mer...@netwok.org:


--
nosy: +eric.araujo
title: Concrete object C API needs abstract path for subclasses of builtin  
types - Concrete object C API needs abstract path for subclasses of builtin 
types

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



[issue10935] wsgiref.handlers.BaseHandler and subclasses of str

2011-01-22 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

FYI, #10977 has been opened to tackle the general subclasses problem.

--

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



[issue10967] move regrtest over to using more unittest infrastructure

2011-01-22 Thread R. David Murray

R. David Murray rdmur...@bitdance.com added the comment:

I also would put increasing test coverage at a higher priority, but this sort 
of refactoring can be a good step in the development path of new contributors, 
and doing it does decrease the future maintenance burden.

--

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



[issue10980] http.server Header Unicode Bug

2011-01-22 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

I think so.

--
nosy: +benjamin.peterson, eric.araujo, orsenthil
resolution:  - accepted
stage: patch review - commit review
versions: +Python 2.7, Python 3.1, Python 3.2

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



[issue10982] asyncore timeouts do not work correctly

2011-01-22 Thread k1h

New submission from k1h k1h1...@gmail.com:

Asyncore for the versions of Python examined do not check for the empty 
sequences select.select returns to indicate a timeout.  The attached patch 
served my immediate needs, but no effort was made to verify that all scenarios 
were covered or that other issues weren't introduced.

--
components: Library (Lib)
files: asyncore_timeout_patch_with_example.txt
messages: 126846
nosy: k1h
priority: normal
severity: normal
status: open
title: asyncore timeouts do not work correctly
versions: Python 2.5, Python 2.6, Python 2.7, Python 3.1, Python 3.2
Added file: 
http://bugs.python.org/file20487/asyncore_timeout_patch_with_example.txt

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



[issue10982] asyncore timeouts do not work correctly

2011-01-22 Thread Antoine Pitrou

Changes by Antoine Pitrou pit...@free.fr:


--
nosy: +giampaolo.rodola
type:  - behavior
versions:  -Python 2.5, Python 2.6

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



[issue10975] #10961: Pydoc touchups in new 3.2 Web server (issue4090042)

2011-01-22 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

not-most-recent
 versions, and various resolutions?  (“fine” being defined as “not
worse than
 before the patch”)
 Works with ie, firefox and chromium. If you have something else,
please test it,
 and let me know.

What versions did you test with?  (I don’t have other browsers.)

changed
 in 3.3 if it's desirable to do so.

Okay.

Doc”?  Very
 clear and still short.
 Python and Python Docs is too general.  PyDoc is instantly
recognizable for
 what it is.

If you already know what it is.

Keep in
 mind pydoc may also be used to generate third party documentation, not
just
 python documentation.

Ah, good argument.  +0 for PyDoc then, +0.1 for Pydoc.

http://codereview.appspot.com/4090042/

--

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



[issue5831] Doc mistake : threading.Timer is *not* a class

2011-01-22 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

Explanation has been provided on #10968, and hopefully the code will be cleaned 
up.  Closing as superseded.

--
resolution:  - duplicate
stage:  - committed/rejected
status: open - closed
superseder:  - threading.Timer should be a class so that it can be derived

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



[issue10924] Adding salt and Modular Crypt Format to crypt library.

2011-01-22 Thread Sean Reifschneider

Sean Reifschneider j...@tummy.com added the comment:

At this point I'm going to consider this good to go, and will commit it after 
the 3.2 final release.  Thanks for the review everyone.  Of course, I'm open to 
further suggestions until then, just not expecting any...

--
assignee:  - jafo
keywords:  -needs review
resolution:  - later
status: open - pending

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



[issue9723] Add shlex.quote

2011-01-22 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

Even if quote does not start with an underscore, its absence from the docs and 
from the module’s __all__ make it a private function.

I propose to make it public as shlex.quote in 3.3 and deprecate pipes.quote for 
people that relied on it (i.e. move code from pipes/test_pipes to 
shlex/test_shlex, add doc, write a pipes.quote function that sends a 
DeprecationWarning and calls shlex.quote).

--
assignee: docs@python - 
components: +Library (Lib) -Documentation
nosy:  -docs@python
title: pipes.quote() needs to be documented - Add shlex.quote
type:  - feature request
versions: +Python 3.3 -Python 2.7, Python 3.1, Python 3.2

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



[issue10924] Adding salt and Modular Crypt Format to crypt library.

2011-01-22 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

Actually, the pending stage is only for when things have been committed :)
See http://docs.python.org/devguide/triaging.html#triaging

--
resolution: later - accepted
stage: patch review - commit review
status: pending - open

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



[issue10982] asyncore timeouts do not work correctly

2011-01-22 Thread Giampaolo Rodola'

Giampaolo Rodola' g.rod...@gmail.com added the comment:

You have misinterpreted the purpose of timeout argument.
timeout argument tells select() or poll() how long they have to wait before 
returning in case no file descriptors are ready.
This has nothing to do with asyncore.loop() which is supposed to keep running 
except when:

- all file descriptors have been closed/extinguished
- the count argument is provided

...in which case it finally returns.
Closing out as invalid.

--
resolution:  - invalid
status: open - closed

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



[issue10975] #10961: Pydoc touchups in new 3.2 Web server (issue4090042)

2011-01-22 Thread Éric Araujo

Changes by Éric Araujo mer...@netwok.org:


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

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



[issue10949] logging.RotatingFileHandler not robust enough

2011-01-22 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

Is it okay that there is no test?

--
nosy: +eric.araujo
stage:  - committed/rejected
versions: +Python 3.2 -Python 2.6

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



[issue10949] logging.RotatingFileHandler not robust enough

2011-01-22 Thread Georg Brandl

Georg Brandl ge...@python.org added the comment:

You could have said that the py3k branch is closed for changes without tests or 
review...

--
nosy: +georg.brandl

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



[issue10968] threading.Timer should be a class so that it can be derived

2011-01-22 Thread Giampaolo Rodola'

Changes by Giampaolo Rodola' g.rod...@gmail.com:


--
nosy: +giampaolo.rodola

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



[issue10973] OS X 10.6 IDLE, tkinter: Cocoa Tk 8.5 crash when composite character typed in text field

2011-01-22 Thread Ned Deily

Ned Deily n...@acm.org added the comment:

This seems to me to be a nasty release blocker. As documented in the Tk bug 
that Victor cited (thanks!), the crash occurs in Cocoa Tk when an input method 
prefix dead key combining character is typed in a Tk text field. So, for 
example, with the US Extended input method on a US keyboard, to type ñ, you can 
type the two keystrokes: Option-n n.  Or for an ä: Option-u a. Typing the 
leading dead key causes Tk to crash with the index out of bounds exception, 
bringing down tkinter and IDLE with it (and users losing their edits).  There 
is a workaround for users to enter these characters without a crash.  OS X also 
supports a postfix dead key combining sequence; ñ - n Shift-Option-n and ä 
- a Shift-Option-u.  The postfix forms do not cause a crash with Cocoa Tk 8.5 
and the expected character is stored in the field, although the screen may not 
get properly updated.  But, I suspect of the two, the prefix method is much 
more commonly used and, in any case, it is not reasonable to warn users that 
they risk a crash if they enter a common keyboard sequence.  (The other common 
method to enter characters not available on the keyboard is to use the system 
Character Viewer which gives access to all Unicode code points.  Unfortunately, 
Character Viewer input doesn't seem to work with Cocoa Tk 8.5.  That would seem 
to be a major deficiency in Cocoa Tk's support for full Unicode input.)

This problem is exhibited in the Apple-supplied Cocoa Tk 8.5 shipped with OS X 
10.6 and the Apple-supplied IDLEs (/usr/bin/idle2.6 and /usr/bin/idle2.5) 
suffer from the same vulnerability.  So this is not a new problem in the 
ActiveState Tk 8.5.9.  The Tk bug report on the SourceForge tracker was opened 
and accepted nearly a year ago and, although subsequent comments and activity 
have raised the priority to 9 (critical), there is no indication that a fix is 
forthcoming soon.  I am pinging both at the SF tracker and on the Tcl Mac list 
and will propose some alternatives for 3.2 here shortly.

--
components: +Tkinter
nosy: +benjamin.peterson, georg.brandl
priority: normal - release blocker
title: 'ñ' not working with IDLE 3.2rc1 - OSX 10.6.6 - OS X 10.6 IDLE, 
tkinter: Cocoa Tk 8.5 crash when composite character typed in text field
versions: +Python 2.7

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



[issue10684] Folders get deleted when trying to change case with shutil.move (Windows)

2011-01-22 Thread nooB

nooB nsharish@gmail.com added the comment:

Sorry, for the wrong info. The issues exists only for folder renaming in 
windows.
try this,

 import os, shutil
 os.mkdir('test')
 shutil.move('test', 'TEST')

poof. The folder is gone.
Shouldn't the path case be checked for file operations?

--
title: Shutil.move deletes file/folder in windows while renaming - Folders get 
deleted when trying to change case with shutil.move (Windows)
versions: +Python 2.5, Python 2.6, Python 2.7, Python 3.1, Python 3.3

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



[issue10684] Folders get deleted when trying to change case with shutil.move (Windows)

2011-01-22 Thread Antoine Pitrou

Changes by Antoine Pitrou pit...@free.fr:


--
priority: normal - high
stage:  - needs patch
versions:  -Python 2.5, Python 2.6, Python 3.3

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



[issue10983] Errors in http.client.HTTPConnection class (python3)

2011-01-22 Thread nooB

New submission from nooB nsharish@gmail.com:

In python 3.x http.client.HTTPConnection class, I saw few problems.

1) `_tunnel_headers` not initialized in the __init__ method. This causes 
`set_tunnel` method to raise `AttributeError` when called without `headers` 
keyword argument.

2) In `_tunnel` method, `self._tunnel_headers.iteritems()` has been used 
instead of `self._tunnel_headers.items()`, which caused AttributeError.

3) In `_tunnel` method, the CONNECT request is incomplete and hangs.
self.send(b'\r\n') is missing after sending the headers.

--
messages: 126857
nosy: nooB
priority: normal
severity: normal
status: open
title: Errors in http.client.HTTPConnection class (python3)
versions: Python 3.1, Python 3.2, Python 3.3

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



[issue10983] Errors in http.client.HTTPConnection class (python3)

2011-01-22 Thread Antoine Pitrou

Changes by Antoine Pitrou pit...@free.fr:


--
components: +Library (Lib)
nosy: +orsenthil
type:  - behavior

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



[issue10983] Errors in http.client.HTTPConnection class (python3)

2011-01-22 Thread nooB

Changes by nooB nsharish@gmail.com:


--
versions:  -Python 3.3

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



[issue10983] Errors in http.client.HTTPConnection class (python3)

2011-01-22 Thread Georg Brandl

Georg Brandl ge...@python.org added the comment:

All your points make sense and I fixed them in r88144.

Leaving this open for somebody to add a unittest that actually exercises these 
tunnel features.

--
nosy: +georg.brandl

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



[issue10973] OS X 10.6 IDLE, tkinter: Cocoa Tk 8.5 crash when composite character typed in text field

2011-01-22 Thread Ned Deily

Ned Deily n...@acm.org added the comment:

Here's a brain dump of possible options I see for 3.2rc2:

1. document and do nothing
- IDLE (and other tkinter program) crashes whenever a user types a 
composing character (like Option u in US layout for an umlaut) when the 
64-/32-bit installer is used

2. don't ship the OS X 64-bit installer, only the traditional 32-bit one

3a. don't ship IDLE.app and bin/idle with 64-bit installer

3b. don't ship tkinter, IDLE.app, and bin/idle with 64-bit installer

4. for 64-bit installer, link tkinter with Aqua Tk 8.4, like 32-bit 
installer
- no tkinter available in (default) 64-bit mode, users would need to 
force 32-bit execution
- need to fix IDLE to only run in 32-bit mode

5a. for 64-bit installer, link tkinter with a third-party X11 Tk 8.5, most 
likely MacPorts
- X11 version works in both 64- and 32- and is likely more widely 
tested (on Unixes). MacPorts for example currently supplies an X11 Tk by 
default.
- non-native look and feel
- is X11 installed by default on 10.6? (check and document)
- MacPorts currently does not supply binary packages so users would 
need to install Xcode developer tools

5b. for 64-bit installer, have the installer build an X11 Tk 8.5 (using the 
installer's existing third-party lib infrastructure) and ship with the 64-bit 
installer
- same as 5a except that IDLE and tkinter would now work out of the 
box but at the cost of the additional unknown development and testing work to 
get Tk built with the installer

At the moment, for 3.2rc2 my inclination is to pursue option 4 and at least 
explore the feasibility of option 5b with a fallback to option 3a while 
encouraging (but not depending) on a future fix for Cocoa Tk. Again, this 
applies only to the 64-/32-bit installer; the traditional 32-bit installer is 
linked with Carbon Tk 8.4 which does not have this problem.

Post 3.2, I think it makes sense to pursue a previously-discussed option to 
support multiple Tk versions with one release so users can choose.  That would 
also have the potential benefit of making Tk 8.5 available in one form or 
another for users of earlier OS X releases.  But that's a matter for later 
exploration.

--
nosy: +michael.foord, rhettinger, ronaldoussoren
stage:  - needs patch

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



[issue10973] OS X 10.6 IDLE, tkinter: Cocoa Tk 8.5 crash when composite character typed in text field

2011-01-22 Thread Georg Brandl

Georg Brandl ge...@python.org added the comment:

Hmm.  It seems better to me to accept this bug (and document it, and point out 
that it isn't Python's fault) than depriving 64-bit users of IDLE, or (even 
worse) of tkinter.

If you can manage a solution that doesn't remove IDLE, I'm in favor, but 
otherwise option 1. is my favorite.  I trust there is no possibility of a 
workaround from the Python or _tkinter side of things?

--

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



[issue10973] OS X 10.6 IDLE, tkinter: Cocoa Tk 8.5 crash when composite character typed in text field

2011-01-22 Thread Ned Deily

Ned Deily n...@acm.org added the comment:

Since the key strokes are captured directly by Tk, I doubt that anything could 
be worked around on the Python side unless there was some Tk option to disable 
a class of input characters or something. Seems unlikely but I can check with 
the tcl-mac list.

I should point out regarding 5a and 5b that with the X11 option (as with 
MacPorts today) using the Apple X11 Quartz window manager server (the default 
option) is a relatively seemless experience for the user. Clicking on IDLE.app 
or executing bin/idle in a shell causes the Apple X11.app to launch 
automatically and the expected IDLE windows appear alongside the user's 
existing (non-X11) windows.  The main difference is that there is the look of 
the windows and that the menu bars are in the X windows rather than in the 
normal OS X menu bar at the top of the screen (that menu bar is for X11.app).

--

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



[issue10984] argparse add_mutually_exclusive_group should accept existing arguments to register conflicts

2011-01-22 Thread Chris Lasher

New submission from Chris Lasher chris.las...@gmail.com:

argparse supports registering conflicting arguments, however, it does so in a 
way that an argument may belong to at most one group of conflicting arguments. 
The inspiration for this bug is Stack Overflow question #4770576.
http://stackoverflow.com/questions/4770576/does-argparse-python-support-mutually-exclusive-groups-of-arguments

The most straightforward use case argparse can not accommodate is the 
following: the user has three flags, '-a', '-b', and '-c'. The flag '-b' is 
incompatible with both '-a' and with '-c', however, '-a' and '-c' are 
compatible with each other.

Current practice is to register a conflict by first defining a conflict group 
with parser.add_mutually_exclusive_group(), and then create new arguments 
within that group using group.add_argument(). Because the programmer is not 
allowed to create the argument prior to creating the group, an argument cannot 
be registered in two exclusive groups.

I feel it would be much more useful to be given the option to create exclusive 
groups after the programmer has defined and created the options, as is the 
design for ConflictsOptionParser
http://pypi.python.org/pypi/ConflictsOptionParser/

--
components: Library (Lib)
messages: 126862
nosy: gotgenes
priority: normal
severity: normal
status: open
title: argparse add_mutually_exclusive_group should accept existing arguments 
to register conflicts
type: behavior
versions: Python 2.7, Python 3.1, Python 3.2, Python 3.3

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



[issue9723] Add shlex.quote

2011-01-22 Thread R. David Murray

R. David Murray rdmur...@bitdance.com added the comment:

Rather than doing a code deprecation you can just do 'from shlex import quote' 
in pipes (with a comment about backward compatibility).  I don't think there is 
any real harm in leaving that kind of backward compatibility in place 
indefinitely.

--
nosy: +r.david.murray

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



[issue10541] regrtest.py -T broken

2011-01-22 Thread Brett Cannon

Brett Cannon br...@python.org added the comment:

At least the test_trace fix for preventing the complete destruction of any 
preset trace should be looked at and possibly applied separately (prevents 
coverage.py from covering the entire test suite as well). Should probably add a 
test to regrtest to make sure that the trace function is not mutated after a 
test file runs.

--
nosy: +brett.cannon

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



[issue10985] test_sys triggers a fatal python error when run under coverage.py

2011-01-22 Thread Brett Cannon

New submission from Brett Cannon br...@python.org:

If you run test_sys under coverage.py with ``./python.exe -m coverage run 
--pylib Lib/test/regrtest.py test_sys`` you get::

  Fatal Python error: Cannot recover from stack overflow

Have not taken the time to try to figure out exactly what code is triggering 
the recursion, but coverage.py is being used w/o its extension coverage 
support. Could be caused by coverage.py, but I'm a bit surprised that it's a 
fatal error instead of a recursion limit exception.

--
messages: 126865
nosy: brett.cannon
priority: normal
severity: normal
stage: unit test needed
status: open
title: test_sys triggers a fatal python error when run under coverage.py
type: crash
versions: Python 3.2

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



[issue10985] test_sys triggers a fatal python error when run under coverage.py

2011-01-22 Thread Brett Cannon

Brett Cannon br...@python.org added the comment:

Ran the test under verbose mode at Antoine's suggestion; test triggering the 
failure is test_recursionlimit_recovery

--

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



[issue10985] test_sys triggers a fatal python error when run under coverage.py

2011-01-22 Thread Brett Cannon

Brett Cannon br...@python.org added the comment:

The comment on the test says its brittle and sensitive to nothing mucking 
around with recursion depth, so the test probably need a unittest.skipIf check 
for a trace function.

--

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



[issue10984] argparse add_mutually_exclusive_group should accept existing arguments to register conflicts

2011-01-22 Thread R. David Murray

Changes by R. David Murray rdmur...@bitdance.com:


--
nosy: +bethard

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



[issue10973] OS X 10.6 IDLE, tkinter: Cocoa Tk 8.5 crash when composite character typed in text field

2011-01-22 Thread Nestor Aguilera

Nestor Aguilera aguil...@santafe-conicet.gov.ar added the comment:

Thanks Ned for thinking of ways out.

- If I had a choice, I would agree with Georg's choice (Ned's option 1): most 
users will not use the composite characters and need not go through 
complications, or worse, cannibalization of the distribution (3a and 3b are 
unacceptable).

Perhaps the existence of the bug could be documented together with the need of 
a proper Tcl/Tk version.

- My experience with python 3.1.3 with OS 10.6 is that when starting IDLE I 
always get several messages of the sort:

  Python(1305,0xa0a5c540) malloc: *** error for object
  0x1a277738: pointer being freed was not allocated
  *** set a breakpoint in malloc_error_break to debug

possibly leading to memory leaks. Thus, I am not happy with 4.

- As for 5a, perhaps with the warnings of Tcl/Tk and composite crashes, one 
could announce this alternative installation. 5b doesn't seem to be worth the 
trouble, given the existence of the MacPorts version.

My 2 cents.

Néstor

--

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



[issue8591] update mkpkg to latest coding standards

2011-01-22 Thread Sean Reifschneider

Changes by Sean Reifschneider j...@tummy.com:


--
nosy:  -jafo

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



[issue10940] IDLE 3.2 hangs with Cmd-M hotkey on OS X 10.6 with 64-bit installer and A/S Tk 8.5

2011-01-22 Thread Ned Deily

Ned Deily n...@acm.org added the comment:

It appears that the Cocoa Tk 8.5 added support for the Apple convention using 
Cmd-M as the window minimize menu item (collapses the window into the dock) and 
that conflicts with IDLE's use of the Cmd-M as the shortcut for the Open Module 
menu item.  I'll see if Tk can be persuaded to not use that shortcut, otherwise 
it will probably be necessary to use a new shortcut for Open Module on OS X.

--
stage:  - needs patch

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



[issue10973] OS X 10.6 IDLE, tkinter: Cocoa Tk 8.5 crash when composite character typed in text field

2011-01-22 Thread Martin v . Löwis

Martin v. Löwis mar...@v.loewis.de added the comment:

 Hmm.  It seems better to me to accept this bug (and document it, and
 point out that it isn't Python's fault) than depriving 64-bit users
 of IDLE, or (even worse) of tkinter.

I disagree. There aren't really 64-bit users on OSX, thanks to fat
binaries. So if starting IDLE would start a 32-bit interpreter, users
likely won't even notice. If they do notice, they can still run in
64-bit mode from the command line.

In my experience with fat python builds on OSX, it's typically better
to prefer 32-bit mode, anyway, as extension modules often don't come
in a fat version, but often in 32-bit mode only.

--
title: OS X 10.6 IDLE, tkinter: Cocoa Tk 8.5 crash when composite character 
typed in text field - OS X 10.6 IDLE,  tkinter: Cocoa Tk 8.5 crash when 
composite character typed in text  field

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



[issue10986] traceback's rendering behavior while throwing custom exception

2011-01-22 Thread Benjamin VENELLE

New submission from Benjamin VENELLE gu0su...@gmail.com:

Hi,

From few days, I've acknowledge when throwing an exception, the last traceback 
entry is always related to the raise statement. This is ok when the exception 
takes source from a non fail-safe code. But when an exception is raised due to 
a function's inputs sanity check (like an assertion error) the last traceback 
entry is non-sense. I've done a script to spot this behavior.

Is there a way to prevent last traceback rendering (not suppressing) while 
exception is displayed without explicit call to traceback.print_exception ? If 
not, it would be useful to have a boolean declared in Exception's classes which 
will allow last traceback entry rendering or not.

--
components: Interpreter Core
files: traceback_rendering.py
messages: 126871
nosy: Kain94
priority: normal
severity: normal
status: open
title: traceback's rendering behavior while throwing custom exception
type: feature request
versions: Python 3.1
Added file: http://bugs.python.org/file20488/traceback_rendering.py

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



[issue10541] regrtest.py -T broken

2011-01-22 Thread Terry J. Reedy

Changes by Terry J. Reedy tjre...@udel.edu:


--
nosy:  -terry.reedy

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



[issue10986] traceback's rendering behavior while throwing custom exception

2011-01-22 Thread Benjamin Peterson

Benjamin Peterson benja...@python.org added the comment:

Please see python-ideas list.

--
nosy: +benjamin.peterson
resolution:  - rejected
status: open - closed

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



[issue10954] No warning for csv.writer API change

2011-01-22 Thread John Machin

John Machin sjmac...@lexicon.net added the comment:

I don't understand Changing csv api is a feature request that could only 
happen in 3.3. This is NOT a request for an API change. Lennert's point is 
that an API change was made in 3.0 as compared with 2.6 but there is no fixer 
in 2to3. What is requested is for csv.reader/writer to give more meaningful 
error messages for valid 2.x code that has been put through fixer-less 2to3.

The name of the arg is newline. newlines is an attribute that stores what 
was actually found in universal newlines mode.

newline='' is needed on input for the same reason that binary mode is required 
in 2.x: \r and \n may quite validly appear in data, inside a quoted field, and 
must not be treated as part of a row separator.

newline='' is needed on output for the same reason that binary mode is required 
in 2.x: any \n in the data and any \n in the caller's chosen line terminator 
must be preserved from being changed to os.linesep (e.g. \r\n).

newline is not available as an attribute of the _io.TextIOWrapper object 
created by open('xxx.csv', 'w', newline=''); is exposing this possible?

--
versions: +Python 3.2 -Python 3.3

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



[issue10987] Bizarre pickle -- exception interaction bug

2011-01-22 Thread Terry J. Reedy

New submission from Terry J. Reedy tjre...@udel.edu:

Tool/scripts/find_recursionlimit.py includes test_cpickle() which, like the 
other test_xxx functions, is supposed to raise a RuntimeError when the 
recursion limit is reached. It appears to work correctly on 3.1 and I presume 
previously. On 3.2, test_cpickle() hangs. Here is much reduced code that shows 
the behavior:

import itertools
import io
import _pickle

# extracted from 'def test_cpickle' and condensed:
l = None
for n in itertools.count():
try:
raise KeyError
except KeyError:
for i in range(100):
l = [l]
print(n,i)
_pickle.Pickler(io.BytesIO(), protocol=-1).dump(l)

The added print line prints 0,99 1,99, ... indefinitely. If the recursive list 
l is added to the print function, the attempt to create repr(l) raises a 
runtime error at n = 9. If we remove the try-except part:

l = None
for n in itertools.count():
for i in range(100):
l = [l]
print(n,i)
_pickle.Pickler(io.BytesIO(), protocol=-1).dump(l)

*pickle* now raises a RuntimeError, as expected in the original context, at n=4!

1. I do not actually know which behavior is buggy. I suppose the next step 
would be to capture and not toss the pickle output to see what is the 
difference.

2. At least for the present, I think the call to test_cpickle should be 
commented out in find_recursionlimit.py.

There seems to be other pickle and recursive structure issues, like #9269, but 
I did not see any the same as this.

--
files: frl_pickle1.py
messages: 126874
nosy: belopolsky, pitrou, terry.reedy
priority: normal
severity: normal
status: open
title: Bizarre pickle -- exception interaction bug
type: behavior
versions: Python 3.2
Added file: http://bugs.python.org/file20489/frl_pickle1.py

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



[issue10987] Bizarre pickle -- exception interaction bug

2011-01-22 Thread Terry J. Reedy

Terry J. Reedy tjre...@udel.edu added the comment:

3.2rc1 on WinXP. I got hanging behavior with both interpreter and IDLE.

--

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



[issue10954] No warning for csv.writer API change

2011-01-22 Thread Lennart Regebro

Lennart Regebro rege...@gmail.com added the comment:

In the worst case, not checking for newline='' is not a big problem, as anyone 
moving from Python 2 to Python 3 will open the file in binary mode. That error 
message could tell the user to use binary mode newlines=''.

Using textmode and newlines is only likely to happen with people writing new 
code for Python 3 and not reading the docs, which is a different problem. :-)

--

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



[issue10973] OS X 10.6 IDLE, tkinter: Cocoa Tk 8.5 crash when composite character typed in text field

2011-01-22 Thread Georg Brandl

Georg Brandl ge...@python.org added the comment:

 I disagree. There aren't really 64-bit users on OSX, thanks to fat
 binaries. So if starting IDLE would start a 32-bit interpreter, users
 likely won't even notice. If they do notice, they can still run in
 64-bit mode from the command line.

Okay, fair enough.  If it's easy to always let IDLE run in 32-bit mode, I'm 
fine with that.  What about other programs using tkinter?

--

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



[issue10960] os.stat() does not mention that it follow symlinks by default

2011-01-22 Thread godfryd

godfryd godf...@gmail.com added the comment:

I improved a little bit lstat function description and added note to stat 
function. 

I see that links :func:`stat` do not lead to stat function but to stat module. 
Is it Sphinx bug? In my changes I made explicit link to os.stat function.

--
keywords: +patch
nosy: +godfryd
Added file: http://bugs.python.org/file20490/improved-lstat-doc-patch.diff

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