[issue6210] Exception Chaining missing method for suppressing context

2010-12-04 Thread Georg Brandl

Changes by Georg Brandl :


--
assignee:  -> pitrou
nosy: +pitrou

___
Python tracker 

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



[issue10615] Trivial mingw compile fixes

2010-12-04 Thread Johann Hanne

Johann Hanne  added the comment:

>When the patch is applied, what's the resulting status of mingw compilation?

It compiles all C files which I require. Not sure if this is really *all* C 
files, but at least very close to all. I will post a list of object files I get 
on Monday.

--

___
Python tracker 

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



[issue766910] fix one or two bugs in trace.py

2010-12-04 Thread Eli Bendersky

Eli Bendersky  added the comment:

Alexander, 

I reviewed the patch and ported the changes to the newest sources (since the 
fix to issue 9299, os.makedirs can be naturally used with its new flag to fix 
the bug Zooko refers to).

However, while experimenting, I think I ran into much larger problems. Either 
that or I've forgotten how to use the module :-) Attaching two files (one 
imports the other) on which I try to run the following:

python -m trace -c trace_target.py

>> OK: I get trace_target.cover & traced_module.cover created

However, now running:

python -m trace -r --file=trace_target.cover

>> ...
pickle.load(open(self.infile, 'rb'))
_pickle.UnpicklingError: invalid load key, ' '.

Also, trying to provide --file to -c:

python -m trace -c trace_target.py --file=xyz.cover

>> xyz.cover is ignored and the same two .cover files are created.

Can you take a look at this?

--
Added file: http://bugs.python.org/file19933/trace_target.py

___
Python tracker 

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



[issue766910] fix one or two bugs in trace.py

2010-12-04 Thread Eli Bendersky

Changes by Eli Bendersky :


Added file: http://bugs.python.org/file19934/traced_module.py

___
Python tracker 

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



[issue10615] Trivial mingw compile fixes

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

Martin v. Löwis  added the comment:

Am 04.12.2010 09:32, schrieb Johann Hanne:
> 
> Johann Hanne  added the comment:
> 
>> When the patch is applied, what's the resulting status of mingw compilation?
> 
> It compiles all C files which I require. Not sure if this is really *all* C 
> files, but at least very close to all. I will post a list of object files I 
> get on Monday.

Will it then also link something?

--

___
Python tracker 

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



[issue10516] Add list.clear() and list.copy()

2010-12-04 Thread Eli Bendersky

Eli Bendersky  added the comment:

Was list.copy() also approved? After all, there are many ways to achieve the 
same even now:

1. L[:]
2. list(L)
3. import copy and then copy.copy

Especially re the last one: list.copy() can be deep or shallow, which one 
should it be?

--

___
Python tracker 

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



[issue10516] Add list.clear() and list.copy()

2010-12-04 Thread Eli Bendersky

Eli Bendersky  added the comment:

Also, where is the *official* place to document list objects and their methods?

--

___
Python tracker 

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



[issue6045] Add more dict methods to dbm interfaces

2010-12-04 Thread Georg Brandl

Georg Brandl  added the comment:

r87013 adds get() and setdefault() to dbm.gnu -- now gdbm and ndbm have the 
same set of dict methods available.

For me, that is enough to demote this to feature request.

There's another issue anyway for iteration protocol support.

--
priority: critical -> normal
title: Fix dbm interfaces -> Add more dict methods to dbm interfaces
type: behavior -> feature request
versions: +Python 3.3 -Python 3.1

___
Python tracker 

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



[issue10621] >>> 1 + 2j --> (1 + 2j) and not (1+2j)

2010-12-04 Thread Boštjan Mejak

New submission from Boštjan Mejak :

Python interpreter should put spaces around operators in return values of 
complex numbers. If you give it
>>> 1 + 2j
it should return
(1 + 2j)
and not the current
(1+2j)

My argument is that complex numbers are written like this, with spaces 
surrounding operators. Wikipedia has multiple instances of the complex number 
writren, and it's x + yi (in our world it's x + yj but you get the point and 
you can see that there are spaces around the operator). Please fix the 
tokenizer to do the right thing.

--
components: IO
messages: 123324
nosy: Retro
priority: normal
severity: normal
status: open
title: >>> 1 + 2j --> (1 + 2j) and not (1+2j)
versions: Python 2.7, Python 3.1, Python 3.2

___
Python tracker 

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



[issue10516] Add list.clear() and list.copy()

2010-12-04 Thread Georg Brandl

Georg Brandl  added the comment:

Yes, list.copy was also approved IIRC.  And it should be a shallow copy, like 
all other copy methods on builtins.

--

___
Python tracker 

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



[issue10516] Add list.clear() and list.copy()

2010-12-04 Thread Boštjan Mejak

Boštjan Mejak  added the comment:

This is really welcome. It makes Python even more readable.

If 'a' is a list object, a[:] is not so obvious at first to a newcomer, but
a.copy() is.

Also, a.clear() is so perfect and understandable. I wish you could decorate 
Python versions prior to 3.3 with this two new list methods.

--
nosy: +Retro

___
Python tracker 

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



[issue7904] urlparse.urlsplit mishandles novel schemes

2010-12-04 Thread Senthil Kumaran

Senthil Kumaran  added the comment:

On Fri, Dec 03, 2010 at 10:33:50PM +, Fred L. Drake, Jr. wrote:
> Though msg104261 suggests this change be documented in NEWS.txt, it
> doesn't appear to have made it.

Better late than never. I just added the NEWS in r87014 (py3k)
,r87015(release31-maint) ,r87016(release27-maint).

--

___
Python tracker 

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



[issue10553] Add optimize argument to builtin compile() and byte-compilation modules

2010-12-04 Thread Georg Brandl

Georg Brandl  added the comment:

Added PyZipFile API, and fixed the "optimze". Committed in r87019.

--
resolution:  -> accepted
status: open -> closed

___
Python tracker 

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




[issue10618] regression in subprocess.call() command quoting

2010-12-04 Thread Tim Golden

Tim Golden  added the comment:

I'm not quite sure how anyone's supposed to determine
which bugs are likely to have been worked around and
which haven't :) I'm also unsure why a clear bugfix
shouldn't make it into a minor version release. Surely
this isn't the only one to do so...

I'm happy to repatch/test to strip quotes before adding,
but I see that Benjamin prefers to leave it alone.

--

___
Python tracker 

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



[issue10621] >>> 1 + 2j --> (1 + 2j) and not (1+2j)

2010-12-04 Thread Mark Dickinson

Mark Dickinson  added the comment:

I suggest closing this as 'won't fix' (or even the apostrophetically-challenged 
'wont fix').  I'll leave it open for a while to allow others to comment.

I have some sympathy for the idea: I also think that the str/repr of a complex 
number would look better with spaces (and without parentheses (and with 'i' in 
place of 'j'))).  I've always appreciated the fact that lists are printed in 
the form '[1, 2, 3]' rather than the less readable '[1,2,3]'.

But there's a big difference between 'it might have been better if ...' and 
'it's worth changing this'.  Tinkering with minor details like this from 
release to release just isn't worth the potential difficulties (however minor) 
caused to users as they have to adapt their code.  The current behaviour is 
perfectly serviceable.

P.S.  What's the tokenizer got to do with this?

--
nosy: +mark.dickinson

___
Python tracker 

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



[issue1513299] Clean up usage of map() in the stdlib

2010-12-04 Thread Georg Brandl

Georg Brandl  added the comment:

Committed what was left applicable of the patch in r87020.

--
resolution:  -> fixed
status: open -> closed

___
Python tracker 

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



[issue10614] ZipFile and CP932 encoding

2010-12-04 Thread Hirokazu Yamamoto

Hirokazu Yamamoto  added the comment:

I'm not sure why, but I got BadZipFile error now. Anyway,
here is cp932 zip file to be created with python2.7.

--
Added file: http://bugs.python.org/file19935/non-ascii-cp932.zip

___
Python tracker 

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



[issue1772833] -q (quiet) option for python interpreter

2010-12-04 Thread Georg Brandl

Georg Brandl  added the comment:

Based on the +1's in #1728488, committed in r87021, with addition to the 
command-line docs.

--
resolution:  -> accepted
status: open -> closed

___
Python tracker 

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



[issue1569291] Speed-up in array_repeat()

2010-12-04 Thread Georg Brandl

Georg Brandl  added the comment:

I changed the patch to look more like unicode_repeat (which addresses Alex' 
point #2) and committed in r87022.

--
resolution:  -> accepted
status: open -> closed

___
Python tracker 

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



[issue10557] Malformed error message from float()

2010-12-04 Thread Mark Dickinson

Mark Dickinson  added the comment:

Looks okay, I guess.

I don't much like the extra boilerplate that's introduced (and repeated) in 
longobject.c, floatobject.c and complexobject.c, though.

--

___
Python tracker 

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



[issue7905] Shelf 'keyencoding' keyword argument is undocumented and does not work.

2010-12-04 Thread Georg Brandl

Georg Brandl  added the comment:

Patched up and committed in r87024.

--
resolution:  -> fixed
status: open -> closed
versions:  -Python 3.1

___
Python tracker 

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



[issue6559] [PATCH]add pass_fds paramter to subprocess.Popen()

2010-12-04 Thread Gregory P. Smith

Gregory P. Smith  added the comment:

I've committed this feature just in time for 3.2beta1 (so it can't be said i'm 
adding a feature after the beta ;).  r87026

It still needs tests and documentation.  It doesn't break any existing tests.

I'll take care of that after some sleep.

--
assignee:  -> gregory.p.smith
nosy: +gregory.p.smith

___
Python tracker 

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



[issue10622] WebKit browsers show superfluous scrollbars in html docs

2010-12-04 Thread Davide Rizzo

New submission from Davide Rizzo :

Some WebKit browsers show a superflous scrollbar on the right side of the  
boxes in the Sphinx generated html docs.

For example:
http://666kb.com/i/boxys2zktxky17vsh.png
taken on Chrome 7 on Windows.

I believe that the cause of the behaviour is a bug in the WebKit engine. If 
that's the case, adding "overflow-y: hidden" to the  css style would fix 
the issue.
"overflow-y" is not standard css, but it is understood by the affected 
browsers, looks ok on other modern browsers and is just ignored on older 
releases.

The provided patch has been tested on all major Windows browsers.

--
assignee: d...@python
components: Documentation
files: webkit.patch
keywords: patch
messages: 123338
nosy: davide.rizzo, d...@python
priority: normal
severity: normal
status: open
title: WebKit browsers show superfluous scrollbars in html docs
type: behavior
versions: Python 2.7, Python 3.1, Python 3.2
Added file: http://bugs.python.org/file19936/webkit.patch

___
Python tracker 

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



[issue10622] WebKit browsers show superfluous scrollbars in html docs

2010-12-04 Thread Gregory P. Smith

Gregory P. Smith  added the comment:

r87027 has it for py3k / 3.2.  needs backporting to the other branches.

--
nosy: +gregory.p.smith
versions:  -Python 3.2

___
Python tracker 

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



[issue10596] modulo operator bug

2010-12-04 Thread Mark Dickinson

Mark Dickinson  added the comment:

Fixed the sign of the zero (in py3k) in r87032.  I'll backport to 2.7 and 3.1, 
then close this.

Sergio, is that acceptable?  You still haven't said what results you were 
expecting for these operations.

--
resolution:  -> fixed
stage:  -> committed/rejected
versions: +Python 2.7, Python 3.1 -Python 2.6

___
Python tracker 

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



[issue10621] >>> 1 + 2j --> (1 + 2j) and not (1+2j)

2010-12-04 Thread Eric Smith

Eric Smith  added the comment:

I agree. It would be nice, but the impact on existing code is too large. I can 
easily imagine someone parsing the output of "print(somecomplexnumber)" and not 
considering spaces.

For the record, it would require changing complex.__repr__  (which is also 
complex.__str__) and complex.__format__.

Now that I look at the code, it seems that complex_format is only called from 
one place (complex_repr), with fixed parameters. It could be moved into 
complex_repr for what I think is a small improvement in readability.

--
nosy: +eric.smith

___
Python tracker 

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



[issue10621] >>> 1 + 2j --> (1 + 2j) and not (1+2j)

2010-12-04 Thread Boštjan Mejak

Boštjan Mejak  added the comment:

Please do the move to complex_repr if everything then works the same (i.e.
nothing breaks the build) if the readability is in fact improved. Also,
change the docs and fix the tests. You know the drill.

P.S.: (1+2j) is worth changing to become (1 + 2j) in the future (in Python
3.3 if not sooner?). Is it very hard to do this? It's worth changing this.
Reasons like 'Readability counts.' come into mind...

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

___
Python tracker 

___Please do the move to complex_repr if everything then works the same (i.e. 
nothing breaks the build) if the readability is in fact improved. Also, change 
the docs and fix the tests. You know the drill.
P.S.: (1+2j) is worth changing to become (1 + 2j) in the future (in Python 
3.3 if not sooner?). Is it very hard to do this? It's worth changing this. 
Reasons like 'Readability counts.' come into mind...
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10621] >>> 1 + 2j --> (1 + 2j) and not (1+2j)

2010-12-04 Thread Eric Smith

Eric Smith  added the comment:

There are no tests or docs to fix: it's an internal (static) helper function.

It's not a particularly straightforward change, because you're inserting a 
space into the middle of the floating point imaginary string. There would be 
extra bookkeeping and memory management going on.

But even if it were easy, I disagree that it's worth breaking existing usages 
of complex.__str__, .__repr__, and .__format__.

--

___
Python tracker 

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



[issue10596] modulo operator bug

2010-12-04 Thread Mark Dickinson

Mark Dickinson  added the comment:

Backported to 3.1 (after one botched backport attempt) and 2.7 in r87037 and 
r87033.

--
status: open -> closed

___
Python tracker 

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



[issue10623] What’s New In Python 3.2 document re fers to PEP 382: Defining a Stable ABI

2010-12-04 Thread Daniel Urban

New submission from Daniel Urban :

But "Defining a Stable ABI" is PEP 384: http://www.python.org/dev/peps/pep-0384/
(PEP 382 is "Namespace Packages")

--
assignee: d...@python
components: Documentation
messages: 123345
nosy: d...@python, durban
priority: normal
severity: normal
status: open
title: What’s New In Python 3.2 document refers to PEP 382: Defining a Stable 
ABI
type: behavior
versions: Python 3.2

___
Python tracker 

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



[issue10624] Move requires_IEEE_754 decorator from test_complex into test.support

2010-12-04 Thread Eric Smith

New submission from Eric Smith :

The decorator could be shared in at least datetimetester, test_cmath, 
test_complex, test_decimal, test_fractions, test_long, and test_math.

--
assignee: eric.smith
components: Tests
keywords: easy
messages: 123346
nosy: eric.smith, mark.dickinson
priority: low
severity: normal
status: open
title: Move requires_IEEE_754 decorator from test_complex into test.support
versions: Python 3.2

___
Python tracker 

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



[issue10624] Move requires_IEEE_754 decorator from test_complex into test.support

2010-12-04 Thread Mark Dickinson

Mark Dickinson  added the comment:

+1.

--

___
Python tracker 

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



[issue10625] There is no test for repr(complex(-0., 1.)) special handling

2010-12-04 Thread Eric Smith

New submission from Eric Smith :

There's a special test in the C code for this, but there no test for it in 
test_complex. Note that this needs to be a IEEE 754 specific test.

--
assignee: eric.smith
components: Tests
keywords: easy
messages: 123348
nosy: eric.smith
priority: normal
severity: normal
status: open
title: There is no test for repr(complex(-0.,1.)) special handling
versions: Python 3.2

___
Python tracker 

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



[issue10624] Move requires_IEEE_754 decorator from test_complex into test.support

2010-12-04 Thread Eric Smith

Eric Smith  added the comment:

Moved from test_math.py into support.py in r87040. I'll fix up the other 
modules shortly.

--

___
Python tracker 

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



[issue10625] There is no test for repr(complex(-0., 1.)) special handling

2010-12-04 Thread Mark Dickinson

Changes by Mark Dickinson :


--
nosy: +mark.dickinson

___
Python tracker 

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



[issue10625] There is no test for repr(complex(-0., 1.)) special handling

2010-12-04 Thread Eric Smith

Eric Smith  added the comment:

Technically the special handling in complex_repr() is for +0, but there needs 
to be a test both ways.

--

___
Python tracker 

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



[issue10623] What’s New In Python 3.2 document re fers to PEP 382: Defining a Stable ABI

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

Martin v. Löwis  added the comment:

Thanks for the report. Fixed in r87042

--
nosy: +loewis
resolution:  -> fixed
status: open -> closed

___
Python tracker 

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



[issue10626] test_concurrent_futures failure under Windows Server 2008

2010-12-04 Thread Antoine Pitrou

New submission from Antoine Pitrou :

See this buildbot log:
http://www.python.org/dev/buildbot/all/builders/AMD64%20Windows%20Server%202008%203.x/builds/198/steps/test/logs/stdio

==
FAIL: test_done_callback_raises (test.test_concurrent_futures.FutureTests)
--
Traceback (most recent call last):
  File 
"c:\buildslave-py3k\3.x.curtin-win2008-amd64\build\lib\test\test_concurrent_futures.py",
 line 646, in test_done_callback_raises
self.assertIn('Exception: doh!', logging_stream.getvalue())
AssertionError: 'Exception: doh!' not found in ''

--

--
assignee: bquinlan
components: Library (Lib), Tests
messages: 123352
nosy: bquinlan, brian.curtin, pitrou
priority: normal
severity: normal
status: open
title: test_concurrent_futures failure under Windows Server 2008
type: behavior
versions: Python 3.2

___
Python tracker 

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



[issue10516] Add list.clear() and list.copy()

2010-12-04 Thread Eli Bendersky

Eli Bendersky  added the comment:

Attaching a patch with the following:

1. list.copy() and list.clear() implemented in Objects/listobject.c, with 
appropriate doc strings (modeled after dict's docstrings)
2. Same methods implemented in collections.UserList
3. Tests added that exercise the methods in both list and UserList

Re the documentation, it's currently unclear where it should go. I asked on 
d...@python.org.

--
Added file: http://bugs.python.org/file19938/issue10516.2.patch

___
Python tracker 

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



[issue10516] Add list.clear() and list.copy()

2010-12-04 Thread Éric Araujo

Éric Araujo  added the comment:

Hi Eli,

I think the right place is 4.6.4,
http://docs.python.org/dev/library/stdtypes#mutable-sequence-types

It starts with “List and bytearray objects support additional operations
that allow in-place modification of the object”.

For methods not supported by bytearray, you can use the fake footnote
(8) and edit its texte (“sort() is not supported by bytearray objects”).

Regards

--

___
Python tracker 

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



[issue6490] os.popen documentation in 2.6 is probably wrong

2010-12-04 Thread Neil Muller

Changes by Neil Muller :


--
versions: +Python 3.2

___
Python tracker 

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



[issue9523] Improve dbm modules

2010-12-04 Thread Éric Araujo

Éric Araujo  added the comment:

In 3.2, objects return by dbm.dumb.open implement MutableMapping with incorrect 
semantics: keys return a list, iterkeys exist, etc.

--

___
Python tracker 

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



[issue10609] dbm documentation example doesn't work (iteritems())

2010-12-04 Thread Éric Araujo

Éric Araujo  added the comment:

Arg, the internal classes returned by dbm.*.open have keys but not necessarily 
items.  See #9523, #6045 and #5736.

The docs should be fixed independently of that, with the less non-idiomatic 
code that we can find.  Do you want to check the dbm docs for other similar 
broken examples?  I’ll review the patch.

--
assignee: d...@python -> eric.araujo

___
Python tracker 

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



[issue10624] Move requires_IEEE_754 decorator from test_complex into test.support

2010-12-04 Thread Eric Smith

Eric Smith  added the comment:

Modified all other tests to use support.requires_IEEE_754 in r87043.

--
resolution:  -> accepted
stage:  -> committed/rejected
status: open -> closed

___
Python tracker 

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



[issue5736] Add the iterator protocol to dbm modules

2010-12-04 Thread Éric Araujo

Éric Araujo  added the comment:

This may be superseded by #9523.  There are comments and patches in both 
issues, so I’m not closing either as duplicate of the other.

--
nosy: +eric.araujo

___
Python tracker 

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



[issue6045] Add more dict methods to dbm interfaces

2010-12-04 Thread Éric Araujo

Éric Araujo  added the comment:

See also #9523.

--
nosy: +eric.araujo

___
Python tracker 

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



[issue10625] There is no test for repr(complex(-0., 1.)) special handling

2010-12-04 Thread Eric Smith

Eric Smith  added the comment:

Checked-in in r87044.

--
resolution:  -> accepted
stage:  -> committed/rejected
status: open -> closed

___
Python tracker 

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



[issue7936] sys.argv contains only scriptname

2010-12-04 Thread Jiri Kulik

Jiri Kulik  added the comment:

Encountered the same issue with 3.1.2 and 3.1.3 64bit on Win7 64bit. I was able 
to fix it in registry but did so many changes at once that I'm not able to 
reproduce (was really annoyed after trying to fix it for half a day...). 
Anyway, sending my observations:

- the root cause seems to be creation of "python.exe" and "pythonw.exe" entries 
under HKEY_CLASSES_ROOT. Their open command did not have %*. They were not 
created under HKEY_LOCAL_MACHINE. They were probably created automatically by 
the system when manually associating py and pyw files (see below).
- .py and .pyw files were originally associated with py_auto_file and 
pyw_auto_file in HKCR. The associations were probably created by the system, 
when I manually change association of the .py and .pyw files from jython to 
python through control panel. The py_auto_file and pyw_auto_files seemed to 
call those python.exe and pythonw.exe entries in the HKLC.
- The assoc and ftype commands changed association in HKLM but it is not 
propagated automatically into HKCR, not even after restart. After manually 
deleting .py and .pyw entries from HKCR, they were replaced by correct entries 
from HKLM.
- BUT!! the system still called open commands under python.exe and pythonw.exe 
entries in HKCR! (even if .py was associated with Python.File in HKCR and 
proper Python.File existed even in HKCR!) Only after deleting them, it works as 
should. But I deleted a lot of other python related entries as well, so this is 
only assumption.

If anyone else can confirm that deleting of python.exe and pythonw.exe from 
HKCR itself corrects the issue, I think the installation program can check if 
these entries exists and offer to delete them.

Just for complete picture, it works now even with .py and .pyw in PATHEXT, so 
calling the scripts without extension.

--
nosy: +jiri.kulik
versions: +Python 3.3 -Python 3.1

___
Python tracker 

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



[issue5863] bz2.BZ2File should accept other file-like objects.

2010-12-04 Thread Xuanji Li

Xuanji Li  added the comment:

I'll try working on a patch.

--
nosy: +xuanji

___
Python tracker 

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



[issue10616] Change PyObject_AsCharBuffer() error message

2010-12-04 Thread Éric Araujo

Changes by Éric Araujo :


--
nosy: +eric.araujo

___
Python tracker 

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



[issue10621] >>> 1 + 2j --> (1 + 2j) and not (1+2j)

2010-12-04 Thread Éric Araujo

Changes by Éric Araujo :


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

___
Python tracker 

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



[issue10621] >>> 1 + 2j --> (1 + 2j) and not (1+2j)

2010-12-04 Thread Éric Araujo

Éric Araujo  added the comment:

-1 on the change.

Retro: would you mind stop sending HTML email to this tracker?  It creates 
unnamed attachments that are distracting.  Thanks in advance.

--
nosy: +eric.araujo

___
Python tracker 

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



[issue7936] sys.argv contains only scriptname

2010-12-04 Thread Jiri Kulik

Jiri Kulik  added the comment:

I'm sorry, I changed version to 3.3 by mistake. Did not want to do it.

--
versions: +Python 3.1 -Python 3.3

___
Python tracker 

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



[issue10621] >>> 1 + 2j --> (1 + 2j) and not (1+2j)

2010-12-04 Thread Mark Dickinson

Mark Dickinson  added the comment:

Okay, closing as 'wont fix'.

--
resolution:  -> wont fix
status: open -> closed

___
Python tracker 

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



[issue10621] >>> 1 + 2j --> (1 + 2j) and not (1+2j)

2010-12-04 Thread Mark Dickinson

Changes by Mark Dickinson :


--
components: +Interpreter Core -IO
type:  -> feature request

___
Python tracker 

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



[issue3132] implement PEP 3118 struct changes

2010-12-04 Thread Mark Dickinson

Mark Dickinson  added the comment:

> Another possibility is to implement the 'O' format unsafely [...]

Hmm.  I don't much like that idea.  Historically, it's supposed to be very 
difficult to segfault the Python interpreter with pure Python code (well except 
if you're using ctypes, I guess).

--

___
Python tracker 

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



[issue10627] Remove usage of deprecated configparser.ConfigParser class in the stdlib

2010-12-04 Thread Łukasz Langa

New submission from Łukasz Langa :

configparser.ConfigParser is deprecated as of 3.2 and thus standard library 
modules should not use that.

The migration path is trivial and should not introduce any compatibility 
problems whatsoever. All it needs is to switch usage of ConfigParser to 
SafeConfigParser.

Please find attached a patch that makes the necessary renames.

For the curious, rationale for the deprecation:
- ConfigParser forces interpolation on users, providing no way of escaping 
interpolation if necessary
- ConfigParser does not check types given on set() and add*() methods, which 
may lead to invalid internal state (which will raise exceptions when trying to 
write() configuration or get() values from it)
- until recently configparser's unit tests assumed no instance customization. 
ConfigParser's error handling is broken when optionxform is overriden

--
assignee: tarek
components: Distutils, IDLE, Library (Lib)
keywords: needs review, patch
messages: 123367
nosy: eric.araujo, lukasz.langa, tarek
priority: high
severity: normal
stage: patch review
status: open
title: Remove usage of deprecated configparser.ConfigParser class in the stdlib
type: behavior
versions: Python 3.2

___
Python tracker 

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



[issue10627] Remove usage of deprecated configparser.ConfigParser class in the stdlib

2010-12-04 Thread Łukasz Langa

Changes by Łukasz Langa :


Added file: http://bugs.python.org/file19939/issue10627.diff

___
Python tracker 

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



[issue10627] Remove usage of deprecated configparser.ConfigParser class in the stdlib

2010-12-04 Thread Łukasz Langa

Changes by Łukasz Langa :


--
nosy: +vinay.sajip

___
Python tracker 

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



[issue7245] better Ctrl-C support in pdb (program can be resumed) (issue216067)

2010-12-04 Thread Georg Brandl

Georg Brandl  added the comment:

Committed rest of patch in r87045.  Will try to get test_pdb2 in shape and 
working on all platforms.

--
resolution:  -> accepted
status: open -> closed

___
Python tracker 

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



[issue10621] >>> 1 + 2j --> (1 + 2j) and not (1+2j)

2010-12-04 Thread Boštjan Mejak

Boštjan Mejak  added the comment:

Do you ever fix anything?

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

___
Python tracker 

___Do you ever fix anything?
___
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-04 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

It is not possible to do this using a method, since "raise exc" will add a 
context anyway. So, if this is desired, it needs some new syntax and should be 
discussed on python-ideas.

(I don't think this is very important personally. Tracebacks are for developers 
to look at and I don't think the added information is confusing or detrimental)

--
assignee: pitrou -> 

___
Python tracker 

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



[issue10621] >>> 1 + 2j --> (1 + 2j) and not (1+2j)

2010-12-04 Thread Eric Smith

Changes by Eric Smith :


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

___
Python tracker 

___
___
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-04 Thread Nick Coghlan

Nick Coghlan  added the comment:

To get back to my original objection, it shouldn't be that difficult to 
differentiate between "__context__ never set" and "__context__ explicitly 
suppressed".

(e.g. using a property that sets an internal flag when set from Python code or 
via PyObject_SetAttr, or else a special ExceptionContextSuppressed singleton).

BaseException could then be given a "no_context" class method that did whatever 
dancing was necessary to suppress the context.

So Steven's examples would become:
def process(iterable):
try:
x = next(iterable)
except StopIteration:
raise ValueError.no_context("can't process empty iterable")
continue_processing()

def func(x):
try:
x + 0
except (ValueError, TypeError):
raise MyException.no_context('x is not a number')
do_something_with(x)

With appropriate changes to the exception display code, no_context could be as 
simple as the C equivalent of the following:

@classmethod
def no_context(cls, *args, **kwds):
  exc = cls(*args, **kwds)
  exc.__context__ = ExceptionContextSuppressed
  return exc

Another alternative would be an additional internal flag queried by the 
exception chaining code itself:

@classmethod
def no_context(cls, *args, **kwds):
  exc = cls(*args, **kwds)
  exc.__context__ = None
  exc._add_context = False
  return exc

--

___
Python tracker 

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



[issue10627] Remove usage of deprecated configparser.ConfigParser class in the stdlib

2010-12-04 Thread Tarek Ziadé

Tarek Ziadé  added the comment:

So, as discussed w/ Lukasz:

- distutils1 gets unchanged and the warning is silenced there
- distutils2 uses SafeConfigParser [done]

--

___
Python tracker 

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



[issue4391] use proper gettext plurals forms in argparse and optparse

2010-12-04 Thread Éric Araujo

Éric Araujo  added the comment:

Attached patch fixes the two misuses I found in argparse.

I tried importing ngettext as _ngettext to comply with arpgarse’s 
crazy^Wpersonal  import style (enforced in TestImportStar), but then I 
could not force xgettext to find all the strings.  Rather than struggle longer 
with the program, I chose to add an exception for ngettext in the test.  “from 
argparse import *” does not import ngettext, thanks to __all__, so I think my 
choice is simple and sensible.

--
title: optparse: use proper gettext plurals forms -> use proper gettext plurals 
forms in argparse and optparse
Added file: http://bugs.python.org/file19941/fix-argparse-ngettext.diff

___
Python tracker 

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



[issue10601] sys.displayhook: use backslashreplace error handler if repr(value) is not encodable to sys.stdout

2010-12-04 Thread STINNER Victor

STINNER Victor  added the comment:

Commited to Python 3.2 (r87054).

--
resolution:  -> fixed
status: open -> closed

___
Python tracker 

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



[issue4391] use proper gettext plurals forms in argparse and optparse

2010-12-04 Thread Éric Araujo

Éric Araujo  added the comment:

Georg approved my patch for the beta1.  Steven, since you approved my other 
gettext-related changes, we thing it’s okay if I don’t wait for your +1.

For optparse, I will review the changes later.

--
assignee:  -> eric.araujo

___
Python tracker 

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



[issue7110] Output test failures on stderr in regrtest.py

2010-12-04 Thread R. David Murray

R. David Murray  added the comment:

I've decided that writing (some) errors to stdout instead of stderr is really a 
bug, not a feature request, and have backported this fix to 3.1 in r87053 and 
to 2.7 in r87055.

The one possible reason not to do this is that it is conceivable that it would 
affect the error reporting from an automated acceptance test (say for a 
distro).  This seems unlikely to me, but if anyone thinks it is a serious 
concern I'll back out the backports.

--
nosy: +Arfrever, barry, doko
type: feature request -> behavior

___
Python tracker 

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



[issue4391] use proper gettext plurals forms in argparse and optparse

2010-12-04 Thread Éric Araujo

Éric Araujo  added the comment:

Revision 87056

--

___
Python tracker 

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



[issue10627] Remove usage of deprecated configparser.ConfigParser class in the stdlib

2010-12-04 Thread Éric Araujo

Éric Araujo  added the comment:

I’ve changed d2 to use RawConfigParser six months ago: 
http://bitbucket.org/tarek/distutils2/changeset/e2a1113b5572

I don’t think we need the interpolation provided by SafeConfigParser.

--

___
Python tracker 

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



[issue10621] >>> 1 + 2j --> (1 + 2j) and not (1+2j)

2010-12-04 Thread Éric Araujo

Éric Araujo  added the comment:

Not much: 
http://bugs.python.org/issue?%40search_text=&ignore=file%3Acontent&title=&%40columns=title&id=&%40columns=id&stage=&creation=&creator=&activity=&%40columns=activity&%40sort=activity&actor=&nosy=&type=&components=&versions=&dependencies=&assignee=&keywords=&priority=&%40group=priority&status=2&%40columns=status&resolution=3&nosy_count=&message_count=&%40pagesize=50&%40startwith=0&%40queryname=&%40old-queryname=&%40action=search

--

___
Python tracker 

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



[issue10553] Add optimize argument to builtin compile() and byte-compilation modules

2010-12-04 Thread Éric Araujo

Éric Araujo  added the comment:

As discussed on IRC, compileall had not gained a new command-line argument 
because “python -O -m compileall” does the job.  Can I make a doc update for 
that, or do you think it may be obvious enough?

--
nosy: +eric.araujo

___
Python tracker 

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



[issue10553] Add optimize argument to builtin compile() and byte-compilation modules

2010-12-04 Thread Georg Brandl

Georg Brandl  added the comment:

Yes, a doc update is probably a good idea.  (But after the freeze :)

--

___
Python tracker 

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



[issue10553] Add optimize argument to builtin compile() and byte-compilation modules

2010-12-04 Thread Éric Araujo

Éric Araujo  added the comment:

Temporarily reopening.

--
assignee:  -> eric.araujo
status: closed -> open

___
Python tracker 

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



[issue10516] Add list.clear() and list.copy()

2010-12-04 Thread Raymond Hettinger

Changes by Raymond Hettinger :


--
assignee:  -> rhettinger
keywords: +easy -patch

___
Python tracker 

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



[issue10628] Typos in 3.2 what’s new

2010-12-04 Thread Éric Araujo

New submission from Éric Araujo :

See patch.

--
assignee: rhettinger
components: Documentation
files: whatsnew-3.2-typos.diff
keywords: patch
messages: 123383
nosy: eric.araujo, rhettinger
priority: normal
severity: normal
status: open
title: Typos in 3.2 what’s new
versions: Python 3.2
Added file: http://bugs.python.org/file19942/whatsnew-3.2-typos.diff

___
Python tracker 

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



[issue6101] SETUP_WITH

2010-12-04 Thread Thomas Vander Stichele

Thomas Vander Stichele  added the comment:

Maybe I am missing something, but why was it ok for this patch to move 
EXTENDED_ARGS from 143 to 145 ? I thought the numbers for opcodes were part of 
the ABI ?

--
nosy: +thomasvs

___
Python tracker 

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



[issue6101] SETUP_WITH

2010-12-04 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

2010/12/4 Thomas Vander Stichele :
>
> Thomas Vander Stichele  added the comment:
>
> Maybe I am missing something, but why was it ok for this patch to move 
> EXTENDED_ARGS from 143 to 145 ? I thought the numbers for opcodes were part 
> of the ABI ?

Very much not.

--

___
Python tracker 

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



[issue10615] Trivial mingw compile fixes

2010-12-04 Thread Johann Hanne

Johann Hanne  added the comment:

>Will it then also link something?

Sure - it actually builds a python.exe which is fully working for me. If you 
need a proof, please let me know, I have no problem uploading it somewhere...

Is there a reason you are so sceptical? After all, Python for Linux is also 
usually compiled with gcc, so why shouldn't it work for Win32?

--

___
Python tracker 

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



[issue10626] test_concurrent_futures failure

2010-12-04 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Same one under Ubuntu:
http://www.python.org/dev/buildbot/all/builders/PPC64%20Ubuntu%203.x/builds/265/steps/test/logs/stdio

--
title: test_concurrent_futures failure under Windows Server 2008 -> 
test_concurrent_futures failure

___
Python tracker 

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



[issue10557] Malformed error message from float()

2010-12-04 Thread Alexander Belopolsky

Alexander Belopolsky  added the comment:

On Sat, Dec 4, 2010 at 6:03 AM, Mark Dickinson  wrote:
..
> I don't much like the extra boilerplate that's introduced (and repeated)
> in longobject.c, floatobject.c and complexobject.c, though.
>

Yes, that's exactly what I meant when I called that code
"repetitious."  Maybe we can tighten this up during the beta period.
What do you think about adding number parsers that operate directly on
Py_UNICODE* strings?

--

___
Python tracker 

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



[issue10615] Trivial mingw compile fixes

2010-12-04 Thread Éric Araujo

Changes by Éric Araujo :


--
nosy: +eric.araujo
versions: +Python 2.7, Python 3.2

___
Python tracker 

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



[issue6101] SETUP_WITH

2010-12-04 Thread Thomas Vander Stichele

Thomas Vander Stichele  added the comment:

Really ? Is this documented somewhere ? Do you know of any other case where a 
number for an existing opcode was changed ? I can't find any so far.

--

___
Python tracker 

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



[issue6101] SETUP_WITH

2010-12-04 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

> Really ? Is this documented somewhere ? Do you know of any other case
> where a number for an existing opcode was changed ? I can't find any
> so far.

Opcodes are an implementation detail. If you are fiddling with opcodes,
how will your code work under Jython, IronPython or even PyPy?
Besides, not only opcode numbers may change, but the semantics of a
given opcode can change too (even if its number stays the same). So
there's nothing stable you can rely on here.

--

___
Python tracker 

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



[issue10615] Trivial mingw compile fixes

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

Martin v. Löwis  added the comment:

> Sure - it actually builds a python.exe which is fully working for me. If you 
> need a proof, please let me know, I have no problem uploading it somewhere...
> 
> Is there a reason you are so sceptical? After all, Python for Linux is also 
> usually compiled with gcc, so why shouldn't it work for Win32?

There is a long track of people contributing patches to Python saying
"you need this and that to make it work on platform XYZ". Right after
accepting these patches (without testing, because we might not have
access to XYZ) they come back with more patches. If you then look
carefully at the initial submission, they never actually claimed that
this is *all* patches that are needed. Instead, they use phrases like
"some trivial fixes" (meaning that the difficult fixes are yet to come).

--

___
Python tracker 

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



[issue10626] test_concurrent_futures failure

2010-12-04 Thread Łukasz Langa

Łukasz Langa  added the comment:

Possibly related: issue #10517.

--
nosy: +lukasz.langa

___
Python tracker 

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



[issue10562] Change 'j' for imaginary unit into an 'i'

2010-12-04 Thread Éric Araujo

Changes by Éric Araujo :


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

___
Python tracker 

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



[issue10618] regression in subprocess.call() command quoting

2010-12-04 Thread Éric Araujo

Changes by Éric Araujo :


--
nosy: +eric.araujo

___
Python tracker 

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



[issue6101] SETUP_WITH

2010-12-04 Thread Thomas Vander Stichele

Thomas Vander Stichele  added the comment:

Well, I just checked, and from 2.3 to 2.6 opcodes were only added, existing 
ones were never renumbered.

2.7 however reshuffled a bunch of them, for no apparent reason at all:

$ diff -au opcodes-2.6 opcodes-2.7
--- opcodes-2.6 2010-12-04 20:47:19.110031279 +0100
+++ opcodes-2.7 2010-12-04 20:47:06.770611299 +0100
@@ -10,7 +10,6 @@
   12 UNARY_NOT
   13 UNARY_CONVERT
   15 UNARY_INVERT
-  18 LIST_APPEND
   19 BINARY_POWER
   20 BINARY_MULTIPLY
   21 BINARY_DIVIDE
@@ -73,6 +72,7 @@
   91 DELETE_NAME
   92 UNPACK_SEQUENCE
   93 FOR_ITER
+  94 LIST_APPEND
   95 STORE_ATTR
   96 DELETE_ATTR
   97 STORE_GLOBAL
@@ -82,15 +82,18 @@
  101 LOAD_NAME
  102 BUILD_TUPLE
  103 BUILD_LIST
- 104 BUILD_MAP
- 105 LOAD_ATTR
- 106 COMPARE_OP
- 107 IMPORT_NAME
- 108 IMPORT_FROM
+ 104 BUILD_SET
+ 105 BUILD_MAP
+ 106 LOAD_ATTR
+ 107 COMPARE_OP
+ 108 IMPORT_NAME
+ 109 IMPORT_FROM
  110 JUMP_FORWARD
- 111 JUMP_IF_FALSE
- 112 JUMP_IF_TRUE
+ 111 JUMP_IF_FALSE_OR_POP
+ 112 JUMP_IF_TRUE_OR_POP
  113 JUMP_ABSOLUTE
+ 114 POP_JUMP_IF_FALSE
+ 115 POP_JUMP_IF_TRUE
  116 LOAD_GLOBAL
  119 CONTINUE_LOOP
  120 SETUP_LOOP
@@ -110,4 +113,7 @@
  140 CALL_FUNCTION_VAR
  141 CALL_FUNCTION_KW
  142 CALL_FUNCTION_VAR_KW
- 143 EXTENDED_ARG
+ 143 SETUP_WITH
+ 145 EXTENDED_ARG
+ 146 SET_ADD
+ 147 MAP_ADD

--

___
Python tracker 

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



[issue6101] SETUP_WITH

2010-12-04 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

> Well, I just checked, and from 2.3 to 2.6 opcodes were only added,
> existing ones were never renumbered.
> 
> 2.7 however reshuffled a bunch of them, for no apparent reason at all:

LIST_APPEND was renumbered because it gained an argument.
There are also new opcodes in this list.
Regardless, there is no guarantee about opcode numbering stability. You
cannot infer such an expectation from previous behaviour.

--

___
Python tracker 

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



[issue6101] SETUP_WITH

2010-12-04 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

Yes, someone went nuts with renumbering.  That is allowed but was probably 
unnecessary.

That being said, users of opcodes should really use the names in opcode.py 
instead of the numbers themselves.

--
nosy: +rhettinger

___
Python tracker 

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



[issue10615] Trivial mingw compile fixes

2010-12-04 Thread Johann Hanne

Johann Hanne  added the comment:

Ok, I see. And no, this is *not* my intention. I will post the list of 
successfully compiled objects files and the linker result on Monday as 
promised. If it turns out I lied, feel free to put me into the hall of shame.

After all, the Win32 platform is not that uncommon. I know, MinGW could be seen 
as a different platform, but I never encountered a situation where I required 
anything but the exe file (no special MinGW DLL or something like that).

--

___
Python tracker 

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



[issue10615] Trivial mingw compile fixes

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

Martin v. Löwis  added the comment:

> After all, the Win32 platform is not that uncommon. I know, MinGW
> could be seen as a different platform, but I never encountered a
> situation where I required anything but the exe file (no special
> MinGW DLL or something like that).

Traditionally, MingW-compiled Python binaries would often be
binary-incompatible with the ones available from python.org, since the
MingW build would use a different version of the MS CRT than the
python.org version. As a consequence, extensions built for the official
binaries would crash in the MingW build, and vice versa.

--

___
Python tracker 

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



[issue10557] Malformed error message from float()

2010-12-04 Thread Mark Dickinson

Mark Dickinson  added the comment:

> What do you think about adding number parsers that operate directly on
> Py_UNICODE* strings?

I think that might make some sense.  It's not without difficulties, though.  
One issue is that we'd still need the char* -> double operations, partly 
because PyOS_string_to_double is part of the public API, and partly to continue 
to support creation of a float from a bytes instance.

The other issue is that for floats, it's difficult to separate the parser from 
the base conversion;  to be useful, we'd probably end up making the whole of 
dtoa.c Py_UNICODE aware.  (One of the return values from the dtoa.c parser is a 
pointer to the significant digits in the original input string;  so the 
base-conversion calculation itself needs access to portions of the original 
string.)

Ideally, for float(string), we'd have a zero-copy setup that operated directly 
on the unicode input (read-only);  but I think that achieving that right now is 
going to be messy, and involve dtoa.c knowing far more about Unicode that I'd 
be comfortable with.

N.B. If we didn't have to deal with alternative digits, it *really* would be 
much simpler.

Perhaps a compromise option is available, that does a preliminary pass on the 
Unicode string and only makes a copy if non-European digits are discovered.

--

___
Python tracker 

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



[issue10626] test_concurrent_futures failure

2010-12-04 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Minimal command line for reproducing:

./python -m test -uall test_pydoc test_logging test_concurrent_futures
[1/3] test_pydoc
[46429 refs]
[46430 refs]
[46430 refs]
[46429 refs]
[46430 refs]
[46425 refs]
[46425 refs]
[2/3] test_logging
[3/3] test_concurrent_futures
test test_concurrent_futures failed -- Traceback (most recent call last):
  File "/home/antoine/py3k/debug/Lib/test/test_concurrent_futures.py", line 
646, in test_done_callback_raises
self.assertIn('Exception: doh!', logging_stream.getvalue())
AssertionError: 'Exception: doh!' not found in ''


And the culprint seems to be r86962:

user:nick.coghlan
date:Fri Dec 03 10:29:11 2010 +0100
summary: [svn r86962] Improve Pydoc interactive browsing (#2001).  Patch by 
Ron Adam.

--
assignee: bquinlan -> ncoghlan
nosy: +ncoghlan

___
Python tracker 

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



[issue10516] Add list.clear() and list.copy()

2010-12-04 Thread Eli Bendersky

Eli Bendersky  added the comment:

Following Éric's suggestion, I'm attaching an updated patch with with the 
documentation in Doc/library/stdtypes.rst updated with the new methods.

There seems to be a slight Sphinx markup problem with this addition. I rewrote 
note (8) as:

   :meth:`clear`, :meth:`copy` and :meth:`sort` are not supported by
   :class:`bytearray` objects.

Unfortunately, :meth:`copy` is getting linked to the copy module.

--
keywords: +patch
Added file: http://bugs.python.org/file19943/issue10516.3.patch

___
Python tracker 

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



[issue10516] Add list.clear() and list.copy()

2010-12-04 Thread Eli Bendersky

Changes by Eli Bendersky :


Removed file: http://bugs.python.org/file19835/issue10516.1.patch

___
Python tracker 

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



[issue10516] Add list.clear() and list.copy()

2010-12-04 Thread Eli Bendersky

Changes by Eli Bendersky :


Removed file: http://bugs.python.org/file19938/issue10516.2.patch

___
Python tracker 

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



[issue10516] Add list.clear() and list.copy()

2010-12-04 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

Nothing will happen on this until 3.2 is done and the py3k branch starts with 
3.3 submissions.

--
resolution:  -> later

___
Python tracker 

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



  1   2   >