[issue2611] Extend buildbot web interface to allow for forced tests to be run on a slave in verbose mode.

2010-01-24 Thread Martin v . Löwis

Martin v. Löwis  added the comment:

I'm closing this as "won't fix". If there is a need to run specific tests in 
specific ways, it is best to check in code that does it as desired. If it is 
then unacceptable to run that change on all slaves, a branch can be created, 
and building the branch can be triggered in the UI.

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



[issue7767] Add PyLong_AsLongLongAndOverflow

2010-01-24 Thread Mark Dickinson

Changes by Mark Dickinson :


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



[issue7736] os.listdir hangs since opendir() and closedir() do not release GIL

2010-01-24 Thread Martin v . Löwis

Martin v. Löwis  added the comment:

I think the bug here is really in the application, which makes a system call to 
fuse and the fuse callback in the same process. This isn't supported, and IMO 
doesn't need to be. Python makes no promises that it will accept callbacks 
while a system call is in progress.

That said, working around this problem in this specific case with the proposed 
patch is fine with me.

--

___
Python tracker 

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



[issue7242] Forking in a thread raises RuntimeError

2010-01-24 Thread Martin v . Löwis

Martin v. Löwis  added the comment:

One relevant difference may be the change to the fork semantics in Solaris 10: 
fork() now means the same as fork1(). Before, fork() meant the same as 
forkall(), unless the applications was linked with -lpthread, in which case 
fork() also meant fork1(). See fork(2).

So I'd be curious if a) the test case passes on Solaris 8 if fork1 is being 
used, and b) whether it passes if you make sure -lpthread is being used. If so, 
I'd rather fix this issue by changing the linkage for Solaris 8 (or declaring 
that system as unsupported altogether), instead of fiddling yet again with the 
fork handling. In Python, posix.fork definitely needs to mean "POSIX fork".

If it's something else (i.e. the thread ID changes in Solaris 8 whether fork1 
or forkall is used), then the patch is fine in principle. However, I would 
always reset the thread ID. In your patch, it is not clear why you apply this 
resetting to Solaris and AIX, but not other systems.

--

___
Python tracker 

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



[issue7633] decimal.py: type conversion in context methods

2010-01-24 Thread Mark Dickinson

Mark Dickinson  added the comment:

Thanks for the latest patch!  It's looking good, but I have a few comments:

(1) It's not necessary to do an isinstance(a, Decimal) check before calling 
_convert_other, since _convert_other does that check anyway.  It doesn't really 
harm either, but for consistency with the way the Decimal methods themselves 
are written, I think the isinstance check should be left out.

(2) The error message that's produced when the Decimal operation returns 
NotImplemented is a bit strange:

>>> decimal.getcontext().add(2, 'bob')
Traceback (most recent call last):
  File "", line 1, in 
  File "/Users/dickinsm/python/svn/trunk/Lib/decimal.py", line 3869, in add
raise TypeError("Unable to convert %s to Decimal" % r)
TypeError: Unable to convert NotImplemented to Decimal

Presumably that '% r' should be '% b' instead.

(3) It looks like Context.power is missing a NotImplemented check:

>>> decimal.getcontext().power(2, 'bob')
NotImplemented

(4) We should consider updating the documentation for the Context methods, 
though there's actually nothing there that would suggest that these operations 
wouldn't work for integers.

--

___
Python tracker 

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



[issue7633] decimal.py: type conversion in context methods

2010-01-24 Thread Mark Dickinson

Mark Dickinson  added the comment:

One more:

(5) The patch includes a (presumably accidental) change to the divmod 
docstring, from "Return (a // b, a % b)" to "Return (self // other, self % 
other)".  I think the first version is preferable.

--

___
Python tracker 

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



[issue7633] decimal.py: type conversion in context methods

2010-01-24 Thread Mark Dickinson

Mark Dickinson  added the comment:

And another.  :)

(6) I think that with these changes, the single argument methods, like 
Context.exp, and Context.sqrt, should also accept integers.  Thoughts?

--

___
Python tracker 

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



[issue2531] float compared to decimal is silently incorrect.

2010-01-24 Thread Mark Dickinson

Mark Dickinson  added the comment:

So here's the plan for trunk.  The big question is:  what should be done for 
py3k?

For trunk:

 - all comparisons (==, !=, <=, >=, <, >) between floats and Decimals
   return the correct numerical result, as though the float were
   converted to a Decimal with no loss of precision.  Like-signed float
   and Decimal infinities compare equal.  float and Decimal nans compare
   unequal to everything else, as always.

 - check whether anything special needs to be done to make sure that
   cmp also returns sensible results.

 - fix Decimal.__hash__ so that when x == y for a float x and Decimal
   instance y, hash(x) == hash(y)

 - the hash fix above is going to slow down hash computations, so
   consider caching hash values for Decimal instances (as a _hash
   attribute on the Decimal object itself).  My gut feeling is that
   this probably isn't worth it, given that Decimal objects probably
   don't get hashed very often in normal use, but I'll do some timings
   to find out what the performance impact of the new hash is.

For py3k, the obvious options are:

(A) adopt the above changes, or

(B) keep Decimal and float non-comparable (as currently).  In this case, a 
Decimal-to-float comparison in trunk should probably raise a 
DeprecationWarning.  (Note that DeprecationWarnings are now silent by default, 
so such a warning wouldn't impact end-users much.)

--
priority:  -> high
versions: +Python 3.2 -Python 2.6

___
Python tracker 

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



[issue7633] decimal.py: type conversion in context methods

2010-01-24 Thread Stefan Krah

Stefan Krah  added the comment:

(6) Yes, I think that is logical. In cdecimal, I accept integers for all unary 
methods except is_canonical and number_class.

--

___
Python tracker 

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



[issue2531] float compared to decimal is silently incorrect.

2010-01-24 Thread Stefan Krah

Stefan Krah  added the comment:

I'm new to this thread, so I hope I didn't miss anything that has been
said already. I don't fully understand why TypeError cannot be raised
in 2.x. The 2.6 documentation for tp_richcompare says:

"If you want to implement a type for which only a limited set of comparisons 
makes sense (e.g. == and !=, but not < and friends), directly raise TypeError 
in the rich comparison function."


I just tried that in the 2.7 version of cdecimal, and it works well:


>>> from cdecimal import *
>>> Decimal(9) < 2.5
Traceback (most recent call last):
  File "", line 1, in 
TypeError: conversion from float to Decimal is not supported

--

___
Python tracker 

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



[issue2531] float compared to decimal is silently incorrect.

2010-01-24 Thread Mark Dickinson

Mark Dickinson  added the comment:

Stefan:  the problem is backwards compatibility.  In 2.6 it's possible to sort 
a heterogeneous list that contains both Decimal instances and floats.  The 
resulting order may not be particularly meaningful, but for some applications 
that doesn't matter.

If we make a Decimal-to-float comparison raise TypeError for 2.7 then sort will 
raise a TypeError where it used to work, so it's a potential code-breaking 
change.  We could deprecate:  raise a warning in 2.7 and make it a TypeError in 
2.8, but since 2.8 currently seems unlikely to happen that would be a bit 
pointless.

--

___
Python tracker 

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



[issue7769] SimpleXMLRPCServer.SimpleXMLRPCServer.register_function as decorator

2010-01-24 Thread Johannes Schönberger

New submission from Johannes Schönberger :

I would suggest to make SimpleXMLRPCServer.SimpleXMLRPCServer.register_function 
a decorator function.
See the attached file for the solution I wrote (l.209-240), which also works 
with the current syntax:
@server.register_function
@server.register_function('name')
@server.register_function(name='name')
or:
server.register_function(func)
server.register_function(func, name='name')
server.register_function(function=func, name='name')

So as far as I've tested it (py2.6), it is fully backwards compatible and 
supports decorators in addition.

--
components: Extension Modules
files: SimpleXMLRPCServer.py
messages: 98219
nosy: ahojnnes
severity: normal
status: open
title: SimpleXMLRPCServer.SimpleXMLRPCServer.register_function as decorator
type: feature request
versions: Python 2.6
Added file: http://bugs.python.org/file15986/SimpleXMLRPCServer.py

___
Python tracker 

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



[issue7764] Doc for itertools recipe consume is complicated and less efficient

2010-01-24 Thread Muhammad Alkarouri

Muhammad Alkarouri  added the comment:

Excellent solution and comments. Many thanks.

--
status: open -> closed

___
Python tracker 

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



[issue7770] sin/cos function in decimal-docs

2010-01-24 Thread Johannes Schönberger

New submission from Johannes Schönberger :

Unfortunately the sin/cos function in the decimal docs seems to return false 
results.

In [33]: sin(decimal.Decimal('75'))
Out[33]: Decimal('0.377879483645203210442266845614')

In [34]: sin(decimal.Decimal('76'))
Out[34]: Decimal('-2.08828460009724889326220807212')

In [42]: sin(decimal.Decimal('100'))
Out[42]: Decimal('-58433045378.5877442230422602000')

#

In [37]: cos(decimal.Decimal('79'))
Out[37]: Decimal('-14.3603762068086273628189466621')

In [38]: cos(decimal.Decimal('77'))
Out[38]: Decimal('-13.6219693138941571794243404126')

In [39]: cos(decimal.Decimal('75'))
Out[39]: Decimal('1.25761570869417008177315814688')

In [40]: cos(decimal.Decimal('72'))
Out[40]: Decimal('-1.02323683857735456186757099584')

--
assignee: georg.brandl
components: Documentation
messages: 98221
nosy: ahojnnes, georg.brandl
severity: normal
status: open
title: sin/cos function in decimal-docs
type: behavior
versions: Python 2.6

___
Python tracker 

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



[issue7770] sin/cos function in decimal-docs

2010-01-24 Thread Ezio Melotti

Changes by Ezio Melotti :


--
nosy: +mark.dickinson
priority:  -> normal
stage:  -> test needed

___
Python tracker 

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



[issue7770] sin/cos function in decimal-docs

2010-01-24 Thread Mark Dickinson

Mark Dickinson  added the comment:

I think that recipe is meant more as a simple example of what's possible than 
as a bullet-proof library function.  Can you suggest changes that would improve 
accuracy while also keeping the recipe clear and simple?

The usual method for sin/cos is to do an initial reduction by an integral 
multiple of pi/2 so that the argument lies in [-pi/4, pi/4].  (Though that's 
still problematic for very large arguments, where pi needs to be computed to 
many more places than the desired output accuracy.)

Perhaps it would be best to just add a note to the docstring indicating that 
this is an implementation that's suitable for small arguments; for large 
arguments, more sophisticated algorithms are needed.

--
nosy: +rhettinger

___
Python tracker 

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



[issue3754] minimal cross-compilation support for configure

2010-01-24 Thread Roumen Petrov

Roumen Petrov  added the comment:

system python has to be at least revision 77704 (trunk)

--
Added file: http://bugs.python.org/file15987/python-trunk-20100124-CROSS.patch

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



[issue3871] cross and native build of python for mingw32 with distutils

2010-01-24 Thread Roumen Petrov

Roumen Petrov  added the comment:

system python has to be at least revision 77704 (trunk)

--
Added file: http://bugs.python.org/file15988/python-trunk-20100124-MINGW.patch

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



[issue7770] sin/cos function in decimal-docs

2010-01-24 Thread Johannes Schönberger

Johannes Schönberger  added the comment:

This is the version I would suggest and which is quite accurate unless the 
numbers get extremely large.

def sin(x):
"""Return the sine of x as measured in radians.

>>> print sin(Decimal('0.5'))
0.4794255386042030002732879352
>>> print sin(0.5)
0.479425538604
>>> print sin(0.5+0j)
(0.479425538604+0j)

"""
x = x - pi()*int(x / pi())
getcontext().prec += 2
i, lasts, s, fact, num, sign = 1, 0, x, 1, x, 1
while s != lasts:
lasts = s
i += 2
fact *= i * (i-1)
num *= x * x
sign *= -1
s += num / fact * sign
getcontext().prec -= 2
return +s

--

___
Python tracker 

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



[issue7770] sin/cos function in decimal-docs

2010-01-24 Thread Mark Dickinson

Mark Dickinson  added the comment:

Hmm.  Isn't sine periodic with period 2*pi, not pi?

I'd also suggest making use of remainder_near.

--

___
Python tracker 

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



[issue7770] sin/cos function in decimal-docs

2010-01-24 Thread Johannes Schönberger

Johannes Schönberger  added the comment:

stupid, it is much better to just use the modulo operator. The same works with 
cos...

def sin(x):
"""Return the sine of x as measured in radians.

>>> print sin(Decimal('0.5'))
0.4794255386042030002732879352
>>> print sin(0.5)
0.479425538604
>>> print sin(0.5+0j)
(0.479425538604+0j)

"""
x %= pi()
getcontext().prec += 2
i, lasts, s, fact, num, sign = 1, 0, x, 1, x, 1
while s != lasts:
lasts = s
i += 2
fact *= i * (i-1)
num *= x * x
sign *= -1
s += num / fact * sign
getcontext().prec -= 2
return +s

def cos(x):
"""Return the cosine of x as measured in radians.

>>> print cos(Decimal('0.5'))
0.8775825618903727161162815826
>>> print cos(0.5)
0.87758256189
>>> print cos(0.5+0j)
(0.87758256189+0j)

"""
x %= pi()
getcontext().prec += 2
i, lasts, s, fact, num, sign = 0, 0, 1, 1, 1, 1
while s != lasts:
lasts = s
i += 2
fact *= i * (i-1)
num *= x * x
sign *= -1
s += num / fact * sign
getcontext().prec -= 2
return +s

--

___
Python tracker 

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



[issue7770] sin/cos function in decimal-docs

2010-01-24 Thread Mark Dickinson

Mark Dickinson  added the comment:

Johannes: note that the reduction needs to be by 2*pi, not pi.  The 
remainder_near method is slightly better than the modulo operator here:
remainder_near reduces to the range [-pi, pi], while the modulo operator 
reduces to the range (-2*pi, 2*pi), so ends up passing larger arguments to the 
Taylor series.  (And it's a nice excuse to show what remainder_near is good 
for!)  Also, the reduction should happen *after* the temporary increase in 
context precision.

Here's a doc patch, that just adds a single line:

x = x.remainder_near(2*pi())

after getcontext().prec += 2, for both the sin and cos recipes.  It also 
removes the float and complex examples in the docstrings, since remainder_near 
doesn't exist for those types.

Raymond, is this change okay with you?

--
keywords: +patch
stage: test needed -> patch review
versions: +Python 2.7, Python 3.1, Python 3.2
Added file: http://bugs.python.org/file15989/issue7770.patch

___
Python tracker 

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



[issue7768] raw_input should encode unicode prompt with std.stdout.encoding.

2010-01-24 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

I agree that would be nice, but it's usefulness would also be limited by the 
fact that raw_input always returns a normal string.

--
nosy: +benjamin.peterson
priority:  -> normal

___
Python tracker 

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



[issue3754] minimal cross-compilation support for configure

2010-01-24 Thread Brian Curtin

Changes by Brian Curtin :


--
keywords: +needs review
priority:  -> normal
stage:  -> patch review

___
Python tracker 

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



[issue7769] SimpleXMLRPCServer.SimpleXMLRPCServer.register_function as decorator

2010-01-24 Thread Brian Curtin

Brian Curtin  added the comment:

Can you submit your patch as a unified diff -- it's not easy to tell where you 
made changes to that file. 
Can you also include tests showing how this is used, especially using 
register_function in both the old way and the new way you propose? 
Lib/test/test_xmlrpc.py is a good place to put your tests.

--
nosy: +brian.curtin
priority:  -> normal
stage:  -> test needed
versions: +Python 2.7 -Python 2.6

___
Python tracker 

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



[issue7759] mhlib fails on Btrfs filesystem (test_mhlib failure)

2010-01-24 Thread Neil Schemenauer

Neil Schemenauer  added the comment:

On Sun, Jan 24, 2010 at 01:25:18AM +, Antoine Pitrou wrote:
> That wasn't really my question. What I ask is: since mhlib is
> deprecated, why do we need to fix it while people are encouraged to use
> mailbox instead?

Sorry, I don't understand what you are proposing. Do you mean we
should just let the test fail for people who develop on HFS+ and
Btrfs filesystems? That seems not so good.

> And, besides, does mailbox show the same problem?

No, it doesn't have that optimization.

  Neil

--

___
Python tracker 

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



[issue3871] cross and native build of python for mingw32 with distutils

2010-01-24 Thread Brian Curtin

Changes by Brian Curtin :


--
keywords: +needs review
priority:  -> normal
stage:  -> patch review

___
Python tracker 

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



[issue7759] mhlib fails on Btrfs filesystem (test_mhlib failure)

2010-01-24 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

> Sorry, I don't understand what you are proposing. Do you mean we
> should just let the test fail for people who develop on HFS+ and
> Btrfs filesystems? That seems not so good.

Hmm, you are right. From a quick glance, the patch looks ok. I assume you've 
checked it doesn't break anything else :)

--

___
Python tracker 

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



[issue7759] mhlib fails on Btrfs filesystem (test_mhlib failure)

2010-01-24 Thread Chris Withers

Changes by Chris Withers :


--
nosy:  -cjw296

___
Python tracker 

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



[issue7769] SimpleXMLRPCServer.SimpleXMLRPCServer.register_function as decorator

2010-01-24 Thread Johannes Schönberger

Johannes Schönberger  added the comment:

I'm not very used to working with bug/issue trackers, is there any tutorial 
here, where this is explained?

I did the stuff you asked me to do:

diff: http://paste.pocoo.org/compare/169357/169359/
test: http://paste.pocoo.org/show/169360/

--

___
Python tracker 

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



[issue1729305] test_doctest fails when run in verbose mode

2010-01-24 Thread Florent Xicluna

Florent Xicluna  added the comment:

The patch did not work with latest trunk.

Here is an updated version of the patch.

Patch tested with different commands:
~ $ ./python -m test.regrtest test_doctest
~ $ ./python -m test.regrtest -v test_doctest
~ $ ./python -m test.regrtest -v test_doctest |less
~ $ ./python -3 -Wd Lib/test/regrtest.py -v test_doctest |less

--
versions: +Python 3.1, Python 3.2
Added file: http://bugs.python.org/file15990/issue1729305_doctest.diff

___
Python tracker 

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



[issue1729305] test_doctest fails when run in verbose mode

2010-01-24 Thread Florent Xicluna

Florent Xicluna  added the comment:

And for Python 3. (Slightly different)

--
stage:  -> patch review
Added file: http://bugs.python.org/file15991/issue1729305_doctest_py3k.diff

___
Python tracker 

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



[issue7769] SimpleXMLRPCServer.SimpleXMLRPCServer.register_function as decorator

2010-01-24 Thread Brian Curtin

Brian Curtin  added the comment:

http://www.python.org/dev/workflow/ and http://python.org/dev/faq/ should help 
you get started. The workflow doc will let you know what the process is around 
here. The FAQ will tell you how to setup Subversion, how to make a diff, etc.

With that said, I think your change could be useful. Being that it's a feature 
request, it will go into 2.7 if accepted.

--

___
Python tracker 

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



[issue7764] dictview

2010-01-24 Thread Jan Kaliszewski

Changes by Jan Kaliszewski :


--
title: Doc for itertools recipe consume is complicated and less efficient -> 
dictview
versions:  -Python 2.6, 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



[issue7764] Doc for itertools recipe consume is complicated and less efficient

2010-01-24 Thread Jan Kaliszewski

Changes by Jan Kaliszewski :


--
title: dictview -> Doc for itertools recipe consume is complicated and less 
efficient

___
Python tracker 

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



[issue7764] Doc for itertools recipe consume is complicated and less efficient

2010-01-24 Thread Jan Kaliszewski

Jan Kaliszewski  added the comment:

(sorry! typed into a wrong field)

--
nosy: +zuo
versions: +Python 2.6, 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



[issue7769] SimpleXMLRPCServer.SimpleXMLRPCServer.register_function as decorator

2010-01-24 Thread Johannes Schönberger

Johannes Schönberger  added the comment:

OK, thank you for the links!

Do you still want me to do anything (like test cases etc.)?

--

___
Python tracker 

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



[issue7769] SimpleXMLRPCServer.SimpleXMLRPCServer.register_function as decorator

2010-01-24 Thread Brian Curtin

Brian Curtin  added the comment:

Once you get a Subversion checkout of the source, have a look in 
Lib/test/test_xmlrpc.py for examples of how things are currently tested (using 
unittest). Once you get a feel for it, add new tests for what your changes do. 
The file you paste'd looks good as an example, you just have to make actual 
tests out of it now.

--

___
Python tracker 

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



[issue7771] dict view comparison methods are not documented

2010-01-24 Thread Jan Kaliszewski

New submission from Jan Kaliszewski :

Dictionary views documentation (e.g. 
http://docs.python.org/3.1/library/stdtypes.html#dictionary-view-objects) 
contains nothing about comparison (> >= < <= == !=) operations.

--
assignee: georg.brandl
components: Documentation
messages: 98240
nosy: georg.brandl, zuo
severity: normal
status: open
title: dict view comparison methods are not documented
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



[issue7769] SimpleXMLRPCServer.SimpleXMLRPCServer.register_function as decorator

2010-01-24 Thread Johannes Schönberger

Johannes Schönberger  added the comment:

OK, will work on it and reply as soon as I have results!

--

___
Python tracker 

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



[issue7764] Doc for itertools recipe consume is complicated and less efficient

2010-01-24 Thread Florent Xicluna

Florent Xicluna  added the comment:

Changeset r77721 should be ported to trunk, and py3k probably.

--
nosy: +flox
status: closed -> open

___
Python tracker 

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



[issue7269] buildbot occasional DBFileExistsError failures in test_bsddb3

2010-01-24 Thread Florent Xicluna

Florent Xicluna  added the comment:

It may occur on any platform.
The patch fixes the issue.

--
title: Windows buildbot occasional DBFileExistsError failures in test_bsddb3 -> 
buildbot occasional DBFileExistsError failures in test_bsddb3

___
Python tracker 

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



[issue7772] test_py3kwarn fails when running the whole test suite

2010-01-24 Thread Florent Xicluna

New submission from Florent Xicluna :

"test_py3kwarn" fails when running the whole test suite

This is a known behaviour, because of extension modules loaded by previous 
tests (which cannot be "reloaded").

However, the warnings module store all the warnings when they appear in a 
dictionary attribute attached to the module which does the "import".

We may read this dictionary attribute for the purpose of this test.

--
components: Tests
messages: 98244
nosy: flox
severity: normal
status: open
title: test_py3kwarn fails when running the whole test suite
type: behavior
versions: Python 2.6, Python 2.7

___
Python tracker 

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



[issue7772] test_py3kwarn fails when running the whole test suite

2010-01-24 Thread Florent Xicluna

Florent Xicluna  added the comment:

Here comes the patch:
 - use test_support.__warningregistry__ to check past warnings
 - filter the warnings with "(module|package)", to be sure that they are 
silenced by "test_support.import_module"
 - fix test_reduce_move (it failed when run after test_unittest)


Note:
 - it requires that all "deprecated" imports are filtered through the 
"test_support.import_module" function (issue #7092)

--
dependencies: +Test suite emits many DeprecationWarnings when -3 is enabled
keywords: +patch
stage:  -> patch review
Added file: http://bugs.python.org/file15992/issue7772_py3kwarn.diff

___
Python tracker 

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



[issue7713] implement ability to disable automatic search path additions

2010-01-24 Thread Arfrever Frehtes Taifersar Arahesis

Changes by Arfrever Frehtes Taifersar Arahesis :


--
nosy: +Arfrever

___
Python tracker 

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



[issue7772] test_py3kwarn fails when running the whole test suite

2010-01-24 Thread Florent Xicluna

Changes by Florent Xicluna :


--
nosy: +ncoghlan

___
Python tracker 

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



[issue7770] sin/cos function in decimal-docs

2010-01-24 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

I'll look at it when I get a chance.  Want to continue to show how the same 
recipe can work for different input types.  I may just document the function's 
range of inputs.

--
assignee: georg.brandl -> rhettinger
priority: normal -> low

___
Python tracker 

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



[issue7764] Doc for itertools recipe consume is complicated and less efficient

2010-01-24 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

Remain calm.  I left the status as Open for a reason.  When I'm satisfied that 
people are reacting well to the new update, will port to other versions.

--

___
Python tracker 

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



[issue7770] sin/cos function in decimal-docs

2010-01-24 Thread Johannes Schönberger

Johannes Schönberger  added the comment:

This adds two further lines, so you can pass int's, float's or Decimal types to 
the function.

def sin(x):
"""Return the sine of x as measured in radians.

>>> print sin(Decimal('0.5'))
0.4794255386042030002732879352
>>> print sin(0.5)
0.479425538604
>>> print sin(0.5+0j)
(0.479425538604+0j)

"""
getcontext().prec += 2
if not isinstance(x, Decimal):
x = Decimal(x)
x = x.remainder_near(2*pi())
i, lasts, s, fact, num, sign = 1, 0, x, 1, x, 1
while s != lasts:
lasts = s
i += 2
fact *= i * (i-1)
num *= x * x
sign *= -1
s += num / fact * sign
getcontext().prec -= 2
return +s

--

___
Python tracker 

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



[issue7770] sin/cos function in decimal-docs

2010-01-24 Thread Johannes Schönberger

Johannes Schönberger  added the comment:

sorry, forgot the str:

def rsin(x):
"""Return the sine of x as measured in radians.

>>> print sin(Decimal('0.5'))
0.4794255386042030002732879352
>>> print sin(0.5)
0.479425538604
>>> print sin(0.5+0j)
(0.479425538604+0j)

"""
getcontext().prec += 2
if not isinstance(x, Decimal):
x = Decimal(str(x))
x = x.remainder_near(2*pi())
i, lasts, s, fact, num, sign = 1, 0, x, 1, x, 1
while s != lasts:
lasts = s
i += 2
fact *= i * (i-1)
num *= x * x
sign *= -1
s += num / fact * sign
getcontext().prec -= 2
return +s

--

___
Python tracker 

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



[issue7773] platform._parse_release_file() can cause UnboundLocalError

2010-01-24 Thread Arfrever Frehtes Taifersar Arahesis

New submission from Arfrever Frehtes Taifersar Arahesis 
:

When the release file doesn't contain some data, then 
platform._parse_release_file() causes UnboundLocalError. I'm attaching the 
patch to fix it.

$ python2.7 -c 'import platform; platform._parse_release_file("")'
Traceback (most recent call last):
  File "", line 1, in 
  File "/usr/lib64/python2.7/platform.py", line 285, in _parse_release_file
return '', version, id
UnboundLocalError: local variable 'version' referenced before assignment

--
components: Library (Lib)
files: python-fix_platform._parse_release_file.patch
keywords: patch
messages: 98250
nosy: Arfrever
severity: normal
status: open
title: platform._parse_release_file() can cause UnboundLocalError
versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2
Added file: 
http://bugs.python.org/file15993/python-fix_platform._parse_release_file.patch

___
Python tracker 

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



[issue7773] platform._parse_release_file() can cause UnboundLocalError

2010-01-24 Thread Arfrever Frehtes Taifersar Arahesis

Changes by Arfrever Frehtes Taifersar Arahesis :


--
nosy: +lemburg

___
Python tracker 

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



[issue7771] dict view comparison methods are not documented

2010-01-24 Thread Ezio Melotti

Changes by Ezio Melotti :


--
nosy: +ezio.melotti
priority:  -> normal
stage:  -> needs patch

___
Python tracker 

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



[issue7347] Add {Create|Delete}KeyEx to _winreg, doc and test updates

2010-01-24 Thread Brian Curtin

Brian Curtin  added the comment:

After looking into this again, the testing situations are much different than I 
had originally written.

Some of the tests aren't really valid exercises. For one, the 
querying/enabling/disabling of reflection keys aren't good tests as they aren't 
tested against reflected keys. Windows 7 and Server 2008 R2 act differently in 
reflection situations when compared to XP/Vista/Server 2003, and I'll need to 
account for that.

For now, forget about the current patches, I'm working on a more correct 
testing approach.

--
assignee:  -> brian.curtin

___
Python tracker 

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



[issue7269] buildbot occasional DBFileExistsError failures in test_bsddb3

2010-01-24 Thread Ezio Melotti

Ezio Melotti  added the comment:

Fixed in r77733 (trunk) and r77734 (release26-maint), thanks for the patch!

--
assignee: jcea -> ezio.melotti
nosy: +ezio.melotti
resolution:  -> fixed
stage: patch review -> committed/rejected
status: open -> closed

___
Python tracker 

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



[issue4570] Bad example in set tutorial

2010-01-24 Thread John Marter

John Marter  added the comment:

I see that the spelling of banana has been fixed but what is the purpose of 
assigning fruit and then immediately reassigning it another value without even 
looking at the first assignment?

>>> fruit = ['apple', 'orange', 'apple', 'pear', 'orange', 'banana']
>>> fruit = set(basket)   # create a set without duplicates

--

___
Python tracker 

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



[issue7092] Test suite emits many DeprecationWarnings when -3 is enabled

2010-01-24 Thread Florent Xicluna

Changes by Florent Xicluna :


Removed file: http://bugs.python.org/file15928/issue7092_filterwarnings_v2.diff

___
Python tracker 

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



[issue7092] Test suite emits many DeprecationWarnings when -3 is enabled

2010-01-24 Thread Florent Xicluna

Changes by Florent Xicluna :


Removed file: http://bugs.python.org/file15929/issue7092_syntax_imports_v2.diff

___
Python tracker 

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



[issue7092] Test suite emits many DeprecationWarnings when -3 is enabled

2010-01-24 Thread Florent Xicluna

Changes by Florent Xicluna :


Removed file: http://bugs.python.org/file15788/issue7092_check_warnings.diff

___
Python tracker 

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



[issue7092] Test suite emits many DeprecationWarnings when -3 is enabled

2010-01-24 Thread Florent Xicluna

Changes by Florent Xicluna :


Added file: http://bugs.python.org/file15994/issue7092_syntax_imports_v3.diff

___
Python tracker 

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



[issue7092] Test suite emits many DeprecationWarnings when -3 is enabled

2010-01-24 Thread Florent Xicluna

Changes by Florent Xicluna :


Added file: http://bugs.python.org/file15995/issue7092_check_warnings_v3.diff

___
Python tracker 

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



[issue7092] Test suite emits many DeprecationWarnings when -3 is enabled

2010-01-24 Thread Florent Xicluna

Florent Xicluna  added the comment:

Re-uploaded after fixes for #7737.

To remove all "-3" warnings:
 - apply the 4 patches
 - fix SQLite "buffer()" warnings (issue #7223)

--
stage: committed/rejected -> patch review
Added file: http://bugs.python.org/file15996/issue7092_filterwarnings_v3.diff

___
Python tracker 

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



[issue4570] Bad example in set tutorial

2010-01-24 Thread Florent Xicluna

Florent Xicluna  added the comment:

Confirmed in trunk and 3.1

--
nosy: +flox
resolution: fixed -> 
stage:  -> needs patch
status: closed -> open
versions: +Python 3.1, Python 3.2

___
Python tracker 

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



[issue7773] platform._parse_release_file() can cause UnboundLocalError

2010-01-24 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

An accompanying test would be wonderful.

--
nosy: +benjamin.peterson

___
Python tracker 

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



[issue7774] subprocess executable option wrong location

2010-01-24 Thread Tarek Ziadé

New submission from Tarek Ziadé :

test_subprocess.test_executable now has a failure in the subprocess created 
(see 
http://www.python.org/dev/buildbot/builders/amd64%20gentoo%20trunk/builds/303/steps/test/logs/stdio)

the bbots don't get red because this is happening in the subprocess and the 
test just look for the return code.

This is hapenning since I've added the sysconfig module. This change revealed a 
bug in subprocess.

This call :

  subprocess.Popen(["somethingyoudonthave", "-c", "import sys; print 
sys.executable"], executable=sys.executable)   

will print a directory name for sys.executable, instead of the real value. 
That's fooling sysconfig, which is now called through site.py, to set a few 
variables.

--
assignee: jnoller
components: Library (Lib)
messages: 98257
nosy: jnoller, tarek
priority: normal
severity: normal
status: open
title: subprocess executable option wrong location
type: behavior
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



[issue7774] subprocess executable option wrong location

2010-01-24 Thread Tarek Ziadé

Tarek Ziadé  added the comment:

Notice that this happen only under Linux and Solaris AFAIK. I couldn't 
reproduce it under Mac OS X

--

___
Python tracker 

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



[issue7774] subprocess executable option wrong location

2010-01-24 Thread Ezio Melotti

Changes by Ezio Melotti :


--
nosy: +ezio.melotti
stage:  -> test needed

___
Python tracker 

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



[issue7774] subprocess executable option wrong location

2010-01-24 Thread Florent Xicluna

Florent Xicluna  added the comment:

Confirmed on all Python versions.

Same behaviour without subprocess:
~ $ sh -c "exec -a missingfile python -c 'import sys; print sys.executable'"
/home/name/

--
nosy: +flox

___
Python tracker 

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



[issue7774] subprocess executable option wrong location

2010-01-24 Thread Florent Xicluna

Changes by Florent Xicluna :


--
versions: +Python 2.5, Python 2.6, Python 3.1

___
Python tracker 

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



[issue7774] sys.executable: wrong location if zeroth command argument is modified.

2010-01-24 Thread Florent Xicluna

Changes by Florent Xicluna :


--
title: subprocess executable option wrong location -> sys.executable: wrong 
location if zeroth command argument is modified.

___
Python tracker 

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



[issue7764] Doc for itertools recipe consume is complicated and less efficient

2010-01-24 Thread Muhammad Alkarouri

Muhammad Alkarouri  added the comment:

Mea culpa. Not knowing the conventions here, I closed the ticket, which 
probably resulted in florent's feedback. I will leave you to it then.

--

___
Python tracker 

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



[issue7774] sys.executable: wrong location if zeroth command argument is modified.

2010-01-24 Thread Jesse Noller

Jesse Noller  added the comment:

I'm not the subprocess owner Tarek :(

--
assignee: jnoller -> 

___
Python tracker 

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



[issue7773] platform._parse_release_file() can cause UnboundLocalError

2010-01-24 Thread Meador Inge

Meador Inge  added the comment:

Updated the patch to add a test case in 'test_platform'.  I also added a 
comment explaining the change and removed a redundant assignment.

--
nosy: +minge
Added file: http://bugs.python.org/file15997/issue-7773.patch

___
Python tracker 

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



[issue4570] Bad example in set tutorial

2010-01-24 Thread Raymond Hettinger

Changes by Raymond Hettinger :


--
assignee: georg.brandl -> rhettinger

___
Python tracker 

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



[issue7773] platform._parse_release_file() can cause UnboundLocalError

2010-01-24 Thread Brian Curtin

Changes by Brian Curtin :


--
keywords: +needs review
priority:  -> normal
stage:  -> patch review
type:  -> behavior

___
Python tracker 

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



[issue7773] platform._parse_release_file() can cause UnboundLocalError

2010-01-24 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

Thanks for the patch! Applied in r77735.

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



[issue7775] str.rpartition(sep) -> (tail, sep, head)

2010-01-24 Thread kai zhu

Changes by kai zhu :


--
assignee: georg.brandl
components: Documentation
nosy: georg.brandl, kaizhu
severity: normal
status: open
title: str.rpartition(sep) -> (tail, sep, head)
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



[issue7776] httplib.py: ._tunnel() broken

2010-01-24 Thread Cameron Simpson

New submission from Cameron Simpson :

I'm trying to do HTTPS via a proxy in Python 2.6.4 (which is supposed to 
incorporate this fix from issue 1424152).

While trying to debug this starting from the suds library I've been reading 
httplib.py and urllib2.py to figure out what's going wrong
and found myself around line 687 of httplib.py at the _tunnel()
function.

_tunnel() is broken because _set_hostport() has side effects.

_tunnel() starts with:
  self._set_hostport(self._tunnel_host, self._tunnel_port)
to arrange that the subsequent connection is made to the proxy
host and port, and that is in itself ok.

However, _set_hostport() sets the .host and .port attributes in
the HTTPConnection object.

The next action _tunnel() takes is to send the CONNECT HTTP command,
filling in the endpoint host and port from self.host and self.port.
But these values have been overwritten by the preceeding _set_hostport()
call, and so we ask the proxy to connect to itself.

It seems to me that _tunnel() should be grabbing the original host and port 
before calling _set_hostport(), thus:

  ohost, oport = self.host, self.port
  self._set_hostport(self._tunnel_host, self._tunnel_port)
  self.send("CONNECT %s:%d HTTP/1.0\r\n\r\n" % (ohost, oport))

In fact the situation seems even worse: _tunnel() calls send(), send() calls 
connect(), and connect() calls _tunnel() in an infinite regress.
- Cameron Simpson

--
components: Library (Lib)
messages: 98264
nosy: cameron
severity: normal
status: open
title: httplib.py: ._tunnel() broken
type: behavior
versions: Python 2.6

___
Python tracker 

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



[issue7776] httplib.py: ._tunnel() broken

2010-01-24 Thread Brian Curtin

Changes by Brian Curtin :


--
nosy: +brian.curtin
priority:  -> normal
stage:  -> test needed
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



[issue7615] unicode_escape codec does not escape quotes

2010-01-24 Thread Richard Hansen

Richard Hansen  added the comment:

Any comments on the patches?  I'd love to see at least patches 1-3 make it into 
Python 2.7.  :)

--

___
Python tracker 

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



[issue7776] httplib.py: ._tunnel() broken

2010-01-24 Thread Cameron Simpson

Cameron Simpson  added the comment:

Amendment: regarding the infinite regress, it looks like there will not be a 
recursion if the caller leaps straight to the .connect() method. However, if 
they do that then the call to _tunnel() from within connect() will happen 
_after_ the socket is made directly to the origin host, not via the proxy. So 
the behaviour seems incorrect then also; it looks very much like _tunnel() must 
always be called before the real socket connection is established, and 
.connect() calls _tunnel() afterwards, not before.

--

___
Python tracker 

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



[issue7776] httplib.py: ._tunnel() broken

2010-01-24 Thread Senthil Kumaran

Changes by Senthil Kumaran :


--
assignee:  -> orsenthil
nosy: +orsenthil

___
Python tracker 

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



[issue7775] str.rpartition(sep) -> (tail, sep, head)

2010-01-24 Thread Chris Withers

New submission from Chris Withers :

Can you please provide information about the actual problem you're reporting?

--
nosy: +cjw296

___
Python tracker 

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



[issue7776] httplib.py: ._tunnel() broken

2010-01-24 Thread Cameron Simpson

Cameron Simpson  added the comment:

It's looking like I have my idea of .host versus ._tunnel_host swapped. I think 
things are still buggy, but my interpretation of the bug is wrong or misleading.

I gather that after _set_tunnel(), .host is the proxy host and that 
._tunnel_host is the original target host.

I'll follow up here in a bit when I've better characterised the problem.
I think I'm letting urllib2's complicated state stuff confuse me too...

--

___
Python tracker 

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



[issue7621] Test issue

2010-01-24 Thread Martin v . Löwis

Changes by Martin v. Löwis :


--
nosy: +loewis

___
Python tracker 

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



[issue7621] Test issue

2010-01-24 Thread Martin v . Löwis

Martin v. Löwis  added the comment:

Generate a message.

--

___
Python tracker 

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



[issue7621] Test issue

2010-01-24 Thread Martin v . Löwis

Martin v. Löwis  added the comment:

> Generate a message.

Reply to it.

--

___
Python tracker 

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



[issue7777] Support needed for AF_RDS family

2010-01-24 Thread Andrew Grover

New submission from Andrew Grover :

RDS is a reliable datagram protocol used by Oracle clusters for inter-process 
communication. It is in the Linux kernel, and has a defined address family 
number. Its use is identical to UDP, except the address family is 21, and the 
type is SOCK_SEQPACKET.

So, what's this got to do with Python? :)

Apparently Modules/socketmodule.c getsockaddrarg() checks bind() args, and only 
allows known socket types to bind. Attempting to bind with an RDS socket fails.

It looks pretty straightforward to add support for a new family, but before 
doing so I wanted to check whether this was likely to be accepted, and also to 
ask if it wouldn't make more sense for getsockaddrarg() to not default to 
failing unknown families, but instead letting them through? If the params are 
wrong for a non-enumerated family, bind() will presumably return an error that 
the user will get.

--
components: Extension Modules
messages: 98271
nosy: Andrew.Grover
severity: normal
status: open
title: Support needed for AF_RDS family
type: feature request
versions: Python 2.5, Python 2.6, 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



[issue7777] Support needed for AF_RDS family

2010-01-24 Thread Martin v . Löwis

Martin v. Löwis  added the comment:

A patch has good chances of getting accepted (eventually; it may take several 
months or years). Test cases and documentation changes should be included.

Supporting generic socket addresses can't work (IMO): how could Python possibly 
know how to map a Python representation of the address (which is likely a tuple 
of some kind) onto a struct sockaddr?

--
nosy: +loewis
versions:  -Python 2.5, Python 2.6, Python 3.1

___
Python tracker 

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



[issue7775] str.rpartition(sep) -> (tail, sep, head)

2010-01-24 Thread Florent Xicluna

Changes by Florent Xicluna :


--
type:  -> behavior
versions: +Python 2.6, 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