[issue10542] Py_UNICODE_NEXT and other macros for surrogates

2010-12-30 Thread Martin v . Löwis

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

 Actually, it looks like PEP 3131 and the Language Reference [1] still
 disagree.  The latter says:
 
 identifier  ::=  id_start id_continue*
 
 which should probably be
 
 identifier  ::=  xid_start xid_continue*
 
 instead.

Interesting. XID_* is being used in the PEP since r57023, whereas the
documentation was added in r57824. In any case, this is now fixed in
r87575/r87576.

--

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



[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2010-12-30 Thread Georg Brandl

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

Hearty +1.  I have the hope of putting this in 3.3, and for that I'd like to 
see how the code matures, which is much easier when in version control.

--

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



[issue3232] Wrong str-bytes conversion in Lib/encodings/idna.py

2010-12-30 Thread Antoine Pitrou

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

 Arguably, it is not a bug if codec's decode method rejects unicode
 strings with a TypeError.

Agreed, but it would be better if it did so deliberately and explicitly, rather 
than as a result of a bogus forward-port ;)

--

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



[issue10542] Py_UNICODE_NEXT and other macros for surrogates

2010-12-30 Thread Georg Brandl

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

 I think the proposal is that fixing this minefield can wait until
 Python 3.3 (or even 3.4, or later).

That is what I was thinking.  (Alex: You might not know that Martin
was the main proponent of non-ASCII identifiers, so this assessment
should have some weight.)

 I'm thinking about an approach of a variable representation:
 one, two, or four bytes, depending on the widest character that
 appears in the string. I think it can be arranged to make this mostly
 backwards-compatible with existing APIs, so it doesn't need to wait
 for py4k, IMO. OTOH, I'm not sure I'll make it for 3.3.

That is an interesting idea.  I would be interested in helping out
when you'll implement it.

--

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



[issue10794] Infinite recursion while garbage collecting loops indefinitely

2010-12-30 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc amaur...@gmail.com added the comment:

Normally you should never call __del__, OTOH the issue is the same with a class 
like::

class A:
def close(self):
self.close()
def __del__(self):
self.close()

The problem is not with _infinite_ recursion, though; a depth of 47 is enough 
(but 46 won't show the problem)::

class A:
def __del__(self):
self.recurse(47)
def recurse(self, n):
if n:
self.recurse(n-1)
else:
raise ValueError

Hint: PyTrash_UNWIND_LEVEL is defined to 50; I checked that recompiling Python 
with a different value also changes the necessary recursion depth.

There is some nasty interaction between the Trashcan mechanism and 
resurrected objects stored in deep structures. A list is enough, no need to 
involve frames and exceptions::

class C:
def __del__(self):
print .,
x = self
for i in range(49):# PyTrash_UNWIND_LEVEL-1
x = [x]
l = [C()]
del l

--
nosy: +amaury.forgeotdarc

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



[issue10794] Infinite recursion while garbage collecting loops indefinitely

2010-12-30 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc amaur...@gmail.com added the comment:

Precision: with new-styles classes (or py3k) the limit is 
PyTrash_UNWIND_LEVEL-2. This does not change anything to the problem.

--

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



[issue10796] readline completion flaw

2010-12-30 Thread rheise

New submission from rheise ralfhe...@freenet.de:

Python's readline library generates out of the choices provided by a custom 
completion function the wrong terminal input. Say, the completion function 
suggests 'foobar' and 'foobaz' as matching completion strings, readline should 
produce the characters 'fooba' to prompt and await further interaction by the 
user. 
This is the intended behaviour of readline and this works in Python as well. 
However this does nod work anymore as soon, as the suggestion 
list contains dashes `-' as input argument. 

A working as supposed example:

 import readline
 
 def complete(text, state):
...   if (state == 0):
... return abc
...   if (state == 1):
... return ade
...   else:
... return None
... 
 
 readline.parse_and_bind(Tab: complete)
 readline.set_completer(complete)
 
 raw_input()
a
abc  ade  
a
'a'
 

remark: I entered a and hit tab. readline produces abc/ade as valid choices, 
stopping at the first ambiguous character. Now consider the following example:

 import readline
 
 def complete(text, state):
...   if (state == 0):
... return a-bc
...   if (state == 1):
... return a-de
...   else:
... return None
... 
 
 readline.parse_and_bind(Tab: complete)
 readline.set_completer(complete)
 
 raw_input()
a-a-a-
'a-a-a-'
 

The intended behaviour is the very same as for the first example. Readline 
should produce 'a-' and offer a-bc and a-de as valid choices. Instead it 
produces an additional a- for every time I hit tab. 

Same for Python3.1:

$ python3.1
Python 3.1.2 (release31-maint, Sep 26 2010, 13:51:01) 
[GCC 4.4.5] on linux2
Type help, copyright, credits or license for more information.
 import readline
 
 def complete(text, state):
...   if (state == 0):
... return a-bc
...   if (state == 1):
... return a-de
...   else:
... return None
... 
 
 readline.parse_and_bind(Tab: complete)
 readline.set_completer(complete)
 
 input()
a-a-a-a-a-
'a-a-a-a-a-'
 


Other programming languages falling back to the GNU C-readline library don't 
have this problem. Consider the roughly equivalent example in Perl which works 
as expected:

use Term::ReadLine;

sub complete
{
my ($text, $state) = @_;
if ($state == 0)
{
return a-bc;
}
elsif ($state == 1)
{
return a-cd;
}
else
{
return undef;
}
}

my $term = new Term::ReadLine 'sample';
my $attribs = $term-Attribs;

$term-parse_and_bind(Tab: complete);
$attribs-{completion_entry_function} = \complete;

$term-readline();



Running it:

$ perl rl 
a-
a-bc  a-cd  
a-

--
components: Library (Lib)
messages: 124917
nosy: rheise
priority: normal
severity: normal
status: open
title: readline completion flaw
type: behavior
versions: Python 2.6, Python 3.1

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



[issue6210] Exception Chaining missing method for suppressing context

2010-12-30 Thread Patrick W.

Patrick W. p...@borntolaugh.de added the comment:

Nick Coghlan (ncoghlan) at 2010-12-29 08:46 (UTC):
 No, the context must always be included unless explicitly suppressed.

Then there should be some actually working way to suppress it, right?

I think the standard behaviour that automatically sets the `__context__` of an 
exception is fine, especially when thinking about exceptions that get raised 
inside `except` blocks and are not custom made. However there should be some 
way to suppress the context in some way.

Personally, I would prefer if `raise .. from ..` would set the exception's 
cause, but would *not* automatically print that cause. But then again, it would 
be a problem to get the cause afterwards when the program terminated because of 
that exception. So obviously, in such situations, both the cause and the 
context of a raised exception cannot be used (because both prints out the full 
trackback).

So we obviously need some new mechanism or syntax to ignore the previous 
exception. As it seems that the cause has a higher precedence than the context 
(which is fine as the cause is changeable), using `None` as the cause of an 
exception would be the best solution in my opinion:

try:
x / y
except ZeroDivisionError as e:
raise Exception( 'Invalid value for y' ) from None

While it might be difficult as the cause is `None` before and gets set to 
`None` afterwards, Python is totally able to detect that the value was 
explicitely set to `None`. Either the raise statement should set some internal 
flag, or the setter for `__cause__` should just check when it is first written 
to.

If that would be too complicated (although it would be possible and very 
logically to do it like that), maybe a different syntax would work:

try:
x / y
except ZeroDivisionError as e:
raise Exception( 'Invalid value for y' ) instead

Something like that.

--

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



[issue10795] standard library do not use ssl as recommended

2010-12-30 Thread Antoine Pitrou

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

There are open issues for specific modules: #8808 for imaplib, #8809 for 
smtplib.
In 3.2, poplib already has support for SSL contexts, as do ftplib, http.client 
and nntplib. If I'm missing a module please tell me.

--
resolution:  - duplicate
status: open - closed
type:  - feature request
versions: +Python 3.3 -Python 2.7

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



[issue10786] unittest.TextTextRunner does not respect redirected stderr

2010-12-30 Thread Mark Roddy

Changes by Mark Roddy markro...@gmail.com:


--
keywords: +patch
Added file: http://bugs.python.org/file20193/py27.patch

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



[issue10786] unittest.TextTextRunner does not respect redirected stderr

2010-12-30 Thread Mark Roddy

Changes by Mark Roddy markro...@gmail.com:


Added file: http://bugs.python.org/file20194/py32.patch

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



[issue10786] unittest.TextTextRunner does not respect redirected stderr

2010-12-30 Thread Mark Roddy

Mark Roddy markro...@gmail.com added the comment:

All patches change the default value of stream to None in the constructor, and 
set it to the current to sys.stderr if the argument is None.  Unit tests 
included to check this behavior.  

Also, the patch against Python 3.1 adds the Test_TextTestRunner test case to 
the list of tests to be run.  Apparently this test case was not being run.

--
nosy: +MarkRoddy
Added file: http://bugs.python.org/file20195/py31.patch

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



[issue10794] Infinite recursion while garbage collecting loops indefinitely

2010-12-30 Thread Gregory P. Smith

Gregory P. Smith g...@krypto.org added the comment:

FWIW, the example pasted in the bug was the smallest one he could come up
with.  in reality we were never calling .__del__() explicitly. We ran into
the problem due to a __del__ method triggering a __getattr__ call and the
__getattr__ ending up in infinite recursion because an attribute it accessed
internally wasn't defined.  That particular bug was fixable by fixing the
__getattr__ to not depend on any instance attributes but it is still a
problem in Python for the interpreter to get into an infinite loop calling
the destructor in that case...

--
Added file: http://bugs.python.org/file20196/unnamed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10794
___FWIW, the example pasted in the bug was the smallest one he could come up with. 
 in reality we were never calling .__del__() explicitly. We ran into the 
problem due to a __del__ method triggering a __getattr__ call and the 
__getattr__ ending up in infinite recursion because an attribute it accessed 
internally wasn#39;t defined.  That particular bug was fixable by fixing the 
__getattr__ to not depend on any instance attributes but it is still a problem 
in Python for the interpreter to get into an infinite loop calling the 
destructor in that case...div

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



[issue10681] PySlice_GetIndices() signature changed

2010-12-30 Thread Dave Malcolm

Dave Malcolm dmalc...@redhat.com added the comment:

For reference, this seems to affect SWIG, specifically, I'm seeing build 
failures using:
  /usr/share/swig/2.0.1/python/pycontainer.swg
from swig-2.0.1

See downstream build failure report for znc, which uses swig to generate python 
3 bindings:
  https://bugzilla.redhat.com/show_bug.cgi?id=666429

--
nosy: +dmalcolm

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



[issue6632] Include more fullwidth chars in the decimal codec

2010-12-30 Thread Alexander Belopolsky

Alexander Belopolsky belopol...@users.sourceforge.net added the comment:

I wonder if the issues raised here can be neatly addressed by applying NFKC 
normalization before string to number conversion.  This will convert full-width 
variants to ASCII and also eliminate digit/decimal differences.  For example 
superscript and subscript variants will be converted to ASCII.  Note that NFKC 
normalization is already applied to identifiers, so its effect should be 
familiar to users.

--

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



[issue9893] Usefulness of the Misc/Vim/ files?

2010-12-30 Thread Éric Araujo

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

Alright, let me change my opinion: Let’s replace the Vim files by a README.vim 
file explaining where to get good helper files (like Misc/README.emacs added in 
r85927).  Then I will learn how to manage my Vim configuration to keep it 
updated (and adequate for each Python version), and when needed contact the Vim 
community to request updates.

--
stage:  - needs patch
type: resource usage - 

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



[issue1816] sys.cmd_flags patch

2010-12-30 Thread Éric Araujo

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

I’ve recently remarked that -i maps to both sys.flags.inspect and 
sys.flags.interactive.  Is this behavior useful?

--
nosy: +eric.araujo

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



[issue6210] Exception Chaining missing method for suppressing context

2010-12-30 Thread Raymond Hettinger

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

 using `None` as the cause of an exception would be the 
 best solution in my opinion:

+1

--

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



[issue6210] Exception Chaining missing method for suppressing context

2010-12-30 Thread Antoine Pitrou

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

  using `None` as the cause of an exception would be the 
  best solution in my opinion:
 
 +1

We are talking about context, not cause.

--

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



[issue1284670] Allow to restrict ModuleFinder to get direct dependencies

2010-12-30 Thread Éric Araujo

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

The depth parameter idea sounds like YAGNI, so let’s stay with a recurse 
boolean :)

--
assignee:  - eric.araujo
nosy:  -BreamoreBoy, misc_from_metz
stage: unit test needed - patch review
versions: +Python 3.3 -Python 3.2

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



[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2010-12-30 Thread Matthew Barnett

Matthew Barnett pyt...@mrabarnett.plus.com added the comment:

The project is now at:

https://code.google.com/p/mrab-regex/

Unfortunately it doesn't have the revision history. I don't know why not.

--

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



[issue10786] unittest.TextTextRunner does not respect redirected stderr

2010-12-30 Thread Michael Foord

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

Committed to py3k in revision 87582.

--

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



[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2010-12-30 Thread Robert Xiao

Robert Xiao nneon...@gmail.com added the comment:

Do you have it in any kind of repository at all? Even a private SVN repo or 
something like that?

--

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



[issue10787] [random.gammavariate] Add the expression of the distribution in a comprehensive form for random.gammavariate

2010-12-30 Thread Raymond Hettinger

Changes by Raymond Hettinger rhettin...@users.sourceforge.net:


--
assignee: d...@python - rhettinger

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



[issue10797] Wrong detection of lines in readlines() function

2010-12-30 Thread Miso.Kopera

New submission from Miso.Kopera miso.kop...@gmail.com:

bug in file.readlines() function. It doesn't detect end of the line when line 
is ending only with 0x0D byte. In python3.1 it works fine (as I expect). File 
in attachment should has 6 lines not only 1 as python2.7 returns.

--
components: None
files: testFile
messages: 124932
nosy: Miso.Kopera
priority: normal
severity: normal
status: open
title: Wrong detection of lines in readlines() function
type: behavior
versions: Python 2.7
Added file: http://bugs.python.org/file20197/testFile

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



[issue10798] test_concurrent_futures fails on FreeBSD

2010-12-30 Thread Martin v . Löwis

New submission from Martin v. Löwis mar...@v.loewis.de:

This is similar to #10348, but has a different scope; the attached patch 
disables the ProcessPoolExecutor if the system has too few POSIX semaphores.

To keep support for the ThreadPoolExecutor, I had the test cases stop using 
multiprocessing.Event in the threaded test cases. Unfortunately, this had two 
side effect that I think indicate a bug elsewhere: 

1. ThreadPoolWaitTests.test_all_completed_some_already_completed hangs
2. (sometimes) ThreadPoolWaitTests.test_first_exception fails:

self.assertEqual(set([future1, future2]), finished)
AssertionError: Items in the first set but not the second:
Future at 0x1851ad0 state=running

I haven't been able to determine yet why it hangs. If the hanging test is 
disabled, the tests pass on both Linux and FreeBSD 7.3.

--
files: fbsd.diff
keywords: patch
messages: 124933
nosy: bquinlan, loewis
priority: normal
severity: normal
status: open
title: test_concurrent_futures fails on FreeBSD
Added file: http://bugs.python.org/file20198/fbsd.diff

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



[issue10797] Wrong detection of lines in readlines() function

2010-12-30 Thread Eric Smith

Eric Smith e...@trueblade.com added the comment:

Either use mode 'U' or the io module if you want to match 3.x.

$ python
Python 2.6.5 (r265:79063, Jun 12 2010, 17:07:01)
[GCC 4.3.4 20090804 (release) 1] on cygwin
Type help, copyright, credits or license for more information.
 open('testFile').readlines()
['# bla\r#\r\t# bl\r\t#\r\t#\r#blaaa\t\r']
 open('testFile', 'U').readlines()
['# bla\n', '#\n', '\t# bl\n', '\t#\n', '\t#\n', '#blaaa\t\n']
 import io
 io.open('testFile').readlines()
[u'# bla\n', u'#\n', u'\t# bl\n', u'\t#\n', u'\t#\n', u'#blaaa\t\n']

--
nosy: +eric.smith
resolution:  - invalid
status: open - closed

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



[issue1816] sys.cmd_flags patch

2010-12-30 Thread Georg Brandl

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

Maybe not, but note that there is both a Py_InteractiveFlag and Py_InspectFlag, 
and they enable different things (they are both set by -i, while setting the 
PYTHONINSPECT envvar only activates Py_InspectFlag).

--
nosy: +georg.brandl

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



[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2010-12-30 Thread Matthew Barnett

Matthew Barnett pyt...@mrabarnett.plus.com added the comment:

msg124904: It would, of course, be slower on first use, but I'm surprised that 
it's (that much) slower afterwards.

msg124905, msg124906: I have those matching now.

msg124931: The sources are in TortoiseBzr, but I couldn't upload, so I exported 
to TortoiseSVN.

--

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



[issue7962] Demo and Tools need to be tested and pruned

2010-12-30 Thread Georg Brandl

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

Removed Demo and some of the Tools in a series of commits starting with r87579.

--
dependencies:  -Allow larger programs to be frozen under Win32, 
Demo/classes/Dates.py does not work in 3.x, Demo/embed/demo.c use of 
PySys_SetArgv() is invalid, Single-line option to pygettext.py, 
Tools/unicode/gencodec.py error, Use ISO timestamp in diff.py, add an optional 
default argument to tokenize.detect_encoding, replace 
dist/src/Tools/scripts/which.py with tmick's which, svnmerge errors in 
msgfmt.py, untabify.py fails on files that contain non-ascii characters
resolution:  - accepted
status: open - closed

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



[issue3194] Demo/loop.c passing char * instead of wchar_t *

2010-12-30 Thread Georg Brandl

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

Demo/embed has now been removed.

--
nosy: +georg.brandl
resolution:  - out of date
status: open - closed

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



[issue10495] Demo/comparisons/sortingtest.py needs some usage information.

2010-12-30 Thread Georg Brandl

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

Demo/comparisons has now been removed.

--
nosy: +georg.brandl
resolution:  - out of date
status: open - closed

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



[issue10494] Demo/comparisons/regextest.py needs some usage information.

2010-12-30 Thread Georg Brandl

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

Demo/comparisons has now been removed.

--
resolution:  - out of date
status: open - closed

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



[issue9153] Run tests and demos as part of the test suite

2010-12-30 Thread Georg Brandl

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

Closing; Demo/ is no more.

--
nosy: +georg.brandl
resolution: accepted - out of date
status: open - closed

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



[issue2889] curses for windows (alternative patch)

2010-12-30 Thread Georg Brandl

Changes by Georg Brandl ge...@python.org:


--
versions: +Python 3.3 -Python 3.2

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



[issue6210] Exception Chaining missing method for suppressing context

2010-12-30 Thread Patrick W.

Patrick W. p...@borntolaugh.de added the comment:

Antoine Pitrou (pitrou) at 2010-12-30 18:32 (UTC)
 We are talking about context, not cause.

Yes, but - as said before - obviously the cause takes a higher precedence than 
context (otherwise it wouldn't show a context message when you explicitely set 
that). So when *explicitely* setting the cause to `None`, it should use the 
cause `None` and ignore the context, and as such display nothing.

--

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



[issue10537] OS X IDLE 2.7 from 64-bit installer hangs when you paste something.

2010-12-30 Thread Terry J. Reedy

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


--
title: OS X IDLE 2.7rc1 from 64-bit installer hangs when you paste something. 
- OS X IDLE 2.7 from 64-bit installer hangs when you paste something.

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



[issue6864] IDLE 2.6.1 locks up on Mac OS 10.6

2010-12-30 Thread Terry J. Reedy

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

According to Ronald (msg92914) and Ned (msg92923) this particular issue is 2.6 
only (and fixed in 2.7 because of patches not backported).
2.6 is in security fix only mode.
So unless someone claims that this is a security issue (and Barry agrees) or 
reports that this particular issue appears in a current version (2.7.1, 3.1.3, 
3.2) separate from other open Apple/Tk/IDLE issues, this should be closed.

--
nosy: +terry.reedy

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



[issue1816] sys.cmd_flags patch

2010-12-30 Thread Éric Araujo

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

Okay, so having both flags makes sense.

--

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



[issue9771] add an optional default argument to tokenize.detect_encoding

2010-12-30 Thread Éric Araujo

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


--
nosy: +eric.araujo
versions: +Python 3.3 -Python 3.2

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



[issue9153] Run tools and demos as part of the test suite

2010-12-30 Thread Éric Araujo

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

It seems there is no easy way to test tools apart from human inspection.

--
title: Run tests and demos as part of the test suite - Run tools and demos as 
part of the test suite

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



[issue4685] IDLE will not open (2.6.1 on WinXP pro)

2010-12-30 Thread Terry J. Reedy

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

2.6 is now security fix only.

--
nosy: +terry.reedy
resolution:  - out of date
status: open - closed

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



[issue2708] IDLE subprocess error

2010-12-30 Thread Terry J. Reedy

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

3.0 is closed to fixed and 2.6 is security fix only.
This is otherwise a duplicate of similar issues.

--
nosy: +terry.reedy
resolution:  - out of date
status: open - closed

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



[issue5315] signal handler never gets called

2010-12-30 Thread s7v7nislands

Changes by s7v7nislands s7v7nisla...@gmail.com:


--
nosy: +s7v7nislands

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



[issue10799] Improve webbrowser.open doc (and, someday, behavior?)

2010-12-30 Thread Terry J. Reedy

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

webbrowser.open (and two aliases):

1. document return value, which seems to be: True if a browser tab or window is 
opened, regardless of whether or not the url is found; False otherwise.

2. document that (on Windows, at least) the default browser only gets used if a 
non .htm(l) url starts with 'www' or 'http:'.

This is true because os.startfile(url) apparently only works if above is true, 
as required for the Start/Run box to recognize an entry as a url.

In particular, I have Firefox as default and 'www.google.com' and 
'http://bugs.python.org' get opened in Firefox (new tab as requested). However, 
'google.com' and 'bugs.python.org' open with IE after some delay. [Start/run 
either opens with Firefox or reports 'cannot find'.]
-

In the longer run, what I would really like is for webbrowser to be better at 
using the default or finding executables.

I thought of adding 'http://' if not present but that would disable opening 
files in a file browser.

I suspect there is a registry entry but do not know what it is. That would also 
pick up new browswers like Chrome.

It seems to me that the current behavior is a 'limitation' in this code:

# Detect some common Windows browsers, fallback to IE
iexplore = os.path.join(os.environ.get(PROGRAMFILES, C:\\Program Files),
Internet Explorer\\IEXPLORE.EXE)
for browser in (firefox, firebird, seamonkey, mozilla,
netscape, opera, iexplore):
if _iscommand(browser):
register(browser, None, BackgroundBrowser(browser))

Firefox is not being recognized as a command because _iscommand('firefox') does 
not not see firefox.exe as an executable because it only checks _isexecutable() 
in the hodgepodge list of paths in PATH. At one time (but no longer), 
executables were ofter put in c:/windows, which by default is in PATH.

Since you hardcoded the default real path for iexplore (C:\\Program 
Files\\Internet Explorer\\IEXPLORE.EXE), you could do the same for other 
programs: 

firefox = os.path.join(os.environ.get(PROGRAMFILES, C:\\Program Files), 
Mozilla Firefox\\firefox.exe)

--
assignee: georg.brandl
components: Library (Lib)
messages: 124949
nosy: georg.brandl, terry.reedy
priority: normal
severity: normal
stage: needs patch
status: open
title: Improve webbrowser.open doc (and, someday, behavior?)
versions: Python 3.2

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



[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2010-12-30 Thread Matthew Barnett

Matthew Barnett pyt...@mrabarnett.plus.com added the comment:

Even after much uninstalling and reinstalling (and reboots) I never got 
TortoiseSVN to work properly, so I switched to TortoiseHg. The sources are now 
at:

https://code.google.com/p/mrab-regex-hg/

--

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



[issue6285] Silent abort on XP help document display

2010-12-30 Thread Terry J. Reedy

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

webbrowser appears to be designed to return True/False if it does/or not open a 
browser window (regardless of site response). (I opened #10799 for a doc 
addition.) I believe an exception would likely indicate a bug therein. So I 
only wrapped the Windows startfile call (and only catch WindowsError), which 
could fail with any bad entry, and not just one left over from a previous 
install.

This patch should make the behavior on Windows much like on other systems: 
display message and move on. I have (yet) not tested this (but may try to), but 
take Scott's and Amaury's claims that the message call is correct. I will 
commit in a week if there are no objections.

--
assignee:  - terry.reedy
keywords: +patch
stage:  - commit review
type:  - behavior
versions: +Python 2.7, Python 3.2
Added file: http://bugs.python.org/file20199/z6285.diff

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



[issue2710] error: (10035, 'The socket operation could not complete without blocking')

2010-12-30 Thread Terry J. Reedy

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

If there is no verification that there is a bug in 2.7/3.1,2, then I think this 
should be closed.

--
nosy: +terry.reedy
versions:  -Python 2.6

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



[issue10694] zipfile.py end of central directory detection not robust

2010-12-30 Thread Xuanji Li

Xuanji Li xua...@gmail.com added the comment:

Ok, new patch that creates a zipfile (actually I used TESTFN2, all the other 
tests seem to also use it)

--
Added file: http://bugs.python.org/file20200/Issue10694_2.diff

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



[issue7995] On Mac / BSD sockets returned by accept inherit the parent's FD flags

2010-12-30 Thread Ross Lagerwall

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

Attached is a patch (the original one in patch form) against py3k with unit 
test.

It seems to work well - tested on Linux  FreeBSD.

--
keywords: +patch
nosy: +rosslagerwall
Added file: http://bugs.python.org/file20201/7995_v1.patch

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



[issue10044] small int optimization

2010-12-30 Thread Xuanji Li

Xuanji Li xua...@gmail.com added the comment:

fwiw I've always found this helpful for undefined behavior: 
http://blog.regehr.org/archives/213 and, just as it says x+1  x will be 
optimized to a nop, by the same logic v = array[0]  v  array[array_len] 
will also be optimized to a nop.

--
nosy: +xuanji

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



[issue10800] libffi build failure on HP-UX 11/PA

2010-12-30 Thread bugs-pyt...@vendor.thewrittenword.com

New submission from bugs-pyt...@vendor.thewrittenword.com 
bugs-pyt...@vendor.thewrittenword.com:

Python 3.1.3 fails to build on HP-UX/PA:
In file included from 
/opt/build/Python-3.1.3/Modules/_ctypes/libffi/src/dlmalloc.c:1156:
/opt/TWWfsw/gcc42/lib/gcc/hppa2.0-hp-hpux11.31/4.2/include/stdlib.h:577: error: 
redefinition of 'struct mallinfo'

Failed to build these modules:
_ctypes

stdlib.h on HP-UX has a conflicting definition for struct mallinfo:
#ifndef _STRUCT_MALLINFO
#  define _STRUCT_MALLINFO

  /* structure filled by mallinfo */
  struct mallinfo  {
int32_t arena;  /* total number of bytes in arena */
int32_t ordblks;/* number of ordinary blocks */
int32_t smblks; /* number of small blocks */
int32_t hblks;  /* number of holding blocks */
int32_t hblkhd; /* number of bytes in holding block headers */
int32_t usmblks;/* number of bytes in small blocks in use */
int32_t fsmblks;/* number of bytes in free small blocks */
int32_t uordblks;   /* number of bytes in ordinary blocks in use */
int32_t fordblks;   /* number of bytes in free ordinary blocks */
int32_t keepcost;   /* cost of enabling keep option */
  };
#endif /* _STRUCT_MALLINFO */

--
assignee: theller
components: ctypes
messages: 124956
nosy: bugs-pyt...@vendor.thewrittenword.com, theller
priority: normal
severity: normal
status: open
title: libffi build failure on HP-UX 11/PA
type: compile error
versions: Python 3.1

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