[issue7133] test_ssl failure

2011-09-26 Thread Senthil Kumaran

Senthil Kumaran  added the comment:

Keith, was your python compiled with ssl? Any extra information to reproduce 
this can help. (Download 2.7.2 from python.org, do a ./configure;make and 
verify if this can bug can be reproduced).

--
nosy: +orsenthil

___
Python tracker 

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



[issue13024] cgitb uses stdout encoding

2011-09-26 Thread Senthil Kumaran

Changes by Senthil Kumaran :


--
nosy: +orsenthil

___
Python tracker 

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



[issue12966] cookielib.LWPCookieJar breaks on cookie values with a newline

2011-09-26 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



[issue7133] test_ssl failure

2011-09-26 Thread Keith Briggs

Keith Briggs  added the comment:

Senthil: thanks for the reply.   That's how I did build python 2.7.2 anyway.   
But I can't see anything about SSL in the generated config files.However, 
on another system (Fedora 15 with python 2.7.1), I don't get the problem.
In case it's useful, I was trying to run the recipe 
http://code.activestate.com/recipes/573444-threaded-documenting-xml-rpc-server-over-https/?c=13559
 when this crash happened.   Is there something in that recipe which is not 
compatible with the current python modules?  

Keith

--

___
Python tracker 

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



[issue12966] cookielib.LWPCookieJar breaks on cookie values with a newline

2011-09-26 Thread Paulie Pena

Paulie Pena  added the comment:

RFC 2109's Section 4.1 "Syntax: General" (http://www.ietf.org/rfc/rfc2109.txt) 
states that the attributes and values should be tokens, which the define as 
"(informally, a sequence of non-special, non-white space characters) from the 
HTTP/1.1 specification [RFC 2068]."

The one site that had sent me a cookie with a newline in a value is no longer 
doing that, but of course, there could be other sites with buggy code for 
sending cookies.

--

___
Python tracker 

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



[issue13013] _ctypes.c: refleak

2011-09-26 Thread Ezio Melotti

Ezio Melotti  added the comment:

If the function is public I guess that some external module might use it, and 
possibly pass a wrong argument that triggers the leak.

--
nosy: +ezio.melotti

___
Python tracker 

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



[issue13013] _ctypes.c: refleak

2011-09-26 Thread Meador Inge

Meador Inge  added the comment:

> If the function is public I guess that some external module
> might use it

Agreed; That is the only case I could deduce as well, which I hinted at 
in msg144397.  So, I will leave the error check and keep the function
public for now.

I will commit the ref leak fix today.

--

___
Python tracker 

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



[issue2683] subprocess.Popen.communicate takes bytes, not str

2011-09-26 Thread Christoph Schindler

Christoph Schindler  added the comment:

The doc string refers to "string" instead of "byte string" as well.

--
nosy: +hop
Added file: http://bugs.python.org/file23245/subprocess_doc_string.diff

___
Python tracker 

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



[issue13049] distutils2 should not allow packages

2011-09-26 Thread Carl Meyer

New submission from Carl Meyer :

As discussed at 
http://groups.google.com/group/the-fellowship-of-the-packaging/browse_frm/thread/3b7a8ddd307d1020
 , distutils2 should not allow a distribution to install files into a top-level 
package that is already installed from a different distribution.

--
assignee: tarek
components: Distutils2
messages: 144542
nosy: alexis, carljm, eric.araujo, tarek
priority: normal
severity: normal
status: open
title: distutils2 should not allow packages
type: behavior

___
Python tracker 

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



[issue11457] Expose nanosecond precision from system calls

2011-09-26 Thread Larry Hastings

Larry Hastings  added the comment:

Mark Dickinson wrote:
> I think this could work.

"could"?  Oh ye of little faith!

Attached is a patch against a nice fresh trunk (2b47f0146639) that adds Decimal 
attributes "ctime", "mtime", and "atime" to the object returned by os.stat().  
The functions that consume mtime and atime values (os.utime, os.futimes, 
os.lutimes, os.futimesat) now also accept Decimal objects for those values.  My 
smoke-test using os.stat and os.utime works fine, and CPython passes the unit 
test suite with only the expected skippage.  However, the patch isn't ready to 
be checked in; I didn't update the documentation, for one.  I'd be happy to 
post the patch on Rietveld--just ask.

The implementation was complicated by the fact that Decimal is pure Python ;)  
I had to do some "build the ship in a bottle" work.  Also, it's possible for 
os.stat to be called before the Python interpreter is really ready.  So 
internally it has to gracefully handle an import error on "decimal".

Along the way I noticed some minor resource leaks, both in os.utime:
  * for Windows, if passed a Unicode filename it would leak "obwpath".
  * for non-Windows, if the call to the C function utime() failed
it would leak "opath".
I fixed these, along with a spelling error.

I also cleared up some sillyness.  When built on non-Windows, extract_time etc. 
used nine places of precision; on Windows it only used six.  Windows only calls 
extract_time for os.utime--the other functions that use extract_time aren't 
available on Windows.  And in the Windows implementation of os.utime, it 
multiplied the time it got from extract_time by a thousand!  This might even be 
throwing away some precision--not sure.  Definitely it was cruft.

However, modifying this meant changing the Windows code, which I can't test!  
So I'm not 100% certain it's right.


Finally the bad news: this patch contributes a major performance regression on 
os.stat.  On my laptop, timeit says os.stat takes 10x longer when building the 
three Decimal fields.  My immediate thought: lazy-create them.  This would mean 
some major brain surgery; I'd have to make a subtype of PyStructSequence and 
override... something (tp_getattr? tp_getattro?).  (Though this might also 
neatly ameliorate the early-startup import problem above.)  I'd also have to 
hide the exact integers in the object somewhere--but since I'd be subclassing 
anyway this'd be no big deal.

My second thought: maybe one of the other Decimal constructors is faster?  I'm 
currently using the "parse a string" form.  My guess is, one of the other forms 
might be faster but not by an order of magnitude.


Martin van Löwis wrote:
> For example, gcc doesn't support __float128 in 32-bit
> mode on x86.

That was only true for GCC 4.3.  GCC 4.4 and newer support __float128 in 32- 
and 64-bit modes on Intel.  That release has been out for more than two years.

But consider the matter dropped ;-)

--
Added file: http://bugs.python.org/file23246/larry.decimal.utime.patch.1.txt

___
Python tracker 

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



[issue13048] Handling of paths in first argument of imp.find_module()

2011-09-26 Thread Brett Cannon

Brett Cannon  added the comment:

It's probably not a bad thing it's undocumented either since importing by file 
path was removed in Python 3, so this is another case where imp.find_module() 
differentiates from __import__.

--

___
Python tracker 

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



[issue13047] imp.find_module("") and imp.find_module(".")

2011-09-26 Thread Brett Cannon

Brett Cannon  added the comment:

I don't think this is undocumented as much as it's unexpected behavior. I 
really doubt this functionality was  on purpose.

--

___
Python tracker 

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



[issue13046] imp.find_module() should not find unimportable modules

2011-09-26 Thread Brett Cannon

Brett Cannon  added the comment:

I'm w/ Ezio on this; imp.find_module() handling modules whose names can't be 
used by __import__() is fine.

--
resolution:  -> invalid
status: open -> closed

___
Python tracker 

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



[issue12966] cookielib.LWPCookieJar breaks on cookie values with a newline

2011-09-26 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

By "it crashes on the invalid line" do you mean Python raises an exception, 
prints a traceback, and exits? Or does it seqfault, dump core, or the Windows 
equivavlent?

--

___
Python tracker 

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



[issue12966] cookielib.LWPCookieJar breaks on cookie values with a newline

2011-09-26 Thread Paulie Pena

Paulie Pena  added the comment:

Sorry, by "crash" I did mean that it raised an exception.  My program wasn't 
expecting cookielib to fail while reading a cookie file that it had written, so 
I didn't wrap the code to read the cookie file in a try..except.  I would 
imagine that most people wouldn't.  Do you agree?

--

___
Python tracker 

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



[issue12966] cookielib.LWPCookieJar breaks on cookie values with a newline

2011-09-26 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

It would be better to raise an exception* upon receiving a cookie. On the other 
hand, I presume cookies are stored in files that any process can mess with, so 
reading failures are always a possibility. So if you want to catch a (very 
rare) failure, to do something useful, then you should do so.

*My preference versus silent rejection. But I do not do web programming.

Unless the current doc says something I missed, I think either change from the 
current 'store anything' policy would be a feature request. This is assuming 
that current behavior is unchanged from 2.5.

--

___
Python tracker 

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



[issue12966] cookielib.LWPCookieJar breaks on cookie values with a newline

2011-09-26 Thread Paulie Pena

Paulie Pena  added the comment:

OK, I'll wrap it in a try-except.  Do you think the documentation should 
updated to make users aware of this possible problem?

Thanks,
Paulie

--

___
Python tracker 

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



[issue1625] bz2.BZ2File doesn't support multiple streams

2011-09-26 Thread Crispin Wellington

Crispin Wellington  added the comment:

This is all fine and well, but this is clearly a bug and not a feature. Can we 
please see this bug fix go into 2.7 at some point?

--
nosy: +Crispin.Wellington

___
Python tracker 

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