[issue8047] Serialiser in ElementTree returns unicode strings in Py3k

2010-03-11 Thread Stefan Behnel

Stefan Behnel  added the comment:

One more thing: given that many web-frameworks are still not available for Py3 
at this time, and that there are still tons of third-party libraries missing on 
that platform, I would be surprised if there was any ElementTree based XML/HTML 
processing code written specifically and only for Py3 by now. So I cannot 
imagine any noticeable body of code being available that relies on this new Py3 
feature.

--

___
Python tracker 

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



[issue8047] Serialiser in ElementTree returns unicode strings in Py3k

2010-03-11 Thread Stefan Behnel

Stefan Behnel  added the comment:

Hi Guido, your comment was long overdue in this discussion.

Guido van Rossum, 12.03.2010 01:35:
> My thinking was that since an XML document looks like text, it should
> probably be considered text, at least by default.  (There may have
> been some unittests that appeared to require this -- of course this
> was probably just the confusion between byte strings and 8-bit text
> strings inherent in Python 2.)

Well, well, XML...

It does look like text, but it's encoded text that is defined as a stream of 
bytes, and that's the only safe way of dealing with it.

There certainly *is* a use case for treating the serialised result as text, 
that's why lxml has this feature. A minor one is for debug output (which 
certainly doesn't merit being the default), but another one is when dealing 
with HTML, where encoding information is certainly less well defined and *much* 
less often seen in the wild. So users tend to be happy when they get their 
real-world HTML input fixed up into proper Unicode, still happier when they see 
that lxml can parse that correctly and even serialise the result back into a 
Unicode string directly, that they can post-process as text if they need to.

However, the main part here is the input, i.e. getting HTML data properly 
decoded into Unicode. The output part is a lot less important, and it's often 
easier to let lxml.html do the correct serialisation into bytes with proper 
encoding meta information, rather than dealing with it yourself.

Those are the two use cases I see for lxml. Their impact on ElementTree is 
relatively low as it doesn't support *parsing* from a Unicode string, so the 
most important HTML feature isn't there in the first place. The lack of major 
use cases in ElementTree is one of the reasons I'm so opposed to making this 
feature the backwards incompatible default for the output side.


> Regarding backwards compatibility, there are now two backwards
> compatibility problems: with 2.x, and with 3.1.  It seems we cannot
> easily be backwards compatible with both (though if someone figures
> out a way that would be best of course).
> 
> If I were to propose an API for returning a Unicode string, I would
> probably add a new method (e.g. tounicode()) rather than using a
> "magical" argument (tostring(encoding=str)), but given that that
> exists in another supposedly-compatible implementation I'm not
> against it.

Actually, lxml.etree originally had a tounicode() function for this purpose, 
and I deprecated it in favour of tostring(encoding=unicode) to avoid having a 
separate interface for this, while staying just as explicit as before.  I'm 
aware that this wasn't an all-win decision, but I found passing the unicode 
type to be explicit enough, and separate enough from an encoding /name/ to make 
it clear what happens. It's certainly less beautiful in Py3, where you write 
"tostring(encoding=str)".

I still didn't remove the function from the API, but it's been deprecated for 
years. Reactivating it in lxml.etre, and duplicating it in ET would safe 
lxml.etree from having to break user code (as "tostring(encoding=str)" could 
simply continue to work, but disappear from the docs). It wouldn't safe ET-Py3 
from breaking backwards compatibility to itself, though.


> Maybe tostring(encoding=None) could also be made to work? That would
> at least make it *possible* to write code that receives a text object
> and that works in 3.1 and 3.2 both.  In 2.x I think neither of these
> should work, and there probably isn't a need -- apps needing full
> compatibility will just have to refrain from calling tostring()
> without arguments.

It could be made to work, and it doesn't even read that bad. I can't imagine 
anyone using this explicitly to get the default behaviour, although you never 
know how people put together their keyword argument dicts programmatically. 
'None' has always been the documented default for the encoding parameter, so 
I'm sure there's at least a tiny bit of code that uses it to say "I'm not 
overriding the default here".

Actually, the encoding has been a keyword-only parameter in lxml.etree for 
ages, which was ok with the original default and conform with the official ET 
documentation. So it would be easy to switch here, although not beautiful in 
the implementation. Same for ElementTree, where the current default None in the 
signature could simply be replaced by the 'real' default 'us-ascii'. Within the 
Py3 series, this change would not keep up backwards compatibility either.

So, as a solution, I do prefer separating this feature out into a separate 
function, so that we can simplify the interface of tostring() into always 
returning a byte string serialisation, as it always was in ET. The rather 
distinct use case of serialising to an unencoded text string can well be 
handled by a tounicode() function.


> ISTM that the behavior of write() is just fine -- the contents of the
> file will be correct after al

[issue8117] TimedRotatingFileHandler doesn't rotate log file at startup.

2010-03-11 Thread Vinay Sajip

Vinay Sajip  added the comment:

Fix checked into trunk (r78853), thanks.

--
resolution:  -> fixed
status: open -> closed
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



[issue8047] Serialiser in ElementTree returns unicode strings in Py3k

2010-03-11 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
nosy:  -pitrou

___
Python tracker 

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



[issue8047] Serialiser in ElementTree returns unicode strings in Py3k

2010-03-11 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Not wanting to waste my time anymore on this.

--

___
Python tracker 

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



[issue2001] Pydoc interactive browsing enhancement

2010-03-11 Thread Benjamin Peterson

Changes by Benjamin Peterson :


--
stage:  -> patch review

___
Python tracker 

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



[issue8108] test_ftplib fails with OpenSSL 0.9.8m

2010-03-11 Thread STINNER Victor

STINNER Victor  added the comment:

There are different kind of bugs, but all of them are related to 
SSL_Shutdown(). It depends on the socket timeout:
 - blocking socket: nothing special (no change from previous OpenSSL version)
 - timeout or non blocking socket: if SSL_shutdown() returns -1 and 
SSL_get_error()==SSL_ERROR_WANT_READ, we have to read bytes from the socket (to 
read the "close" notify acknowledge?)

I did't understood how much bytes have to be read, nor if we have to check the 
socket status using select() or not.

Attached patch is a draft to demonstrate how the bug have to be fixed, but I 
don't know OpenSSL nor asynchat enough to write a good fix. TODO: unwrap() 
returns None on SSL_shutdown() error and if the socket has been closed.

--
keywords: +patch
Added file: http://bugs.python.org/file16527/ssl_shutdown.patch

___
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-03-11 Thread Vasily Ivanov

Changes by Vasily Ivanov :


--
nosy: +bas

___
Python tracker 

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



[issue8047] Serialiser in ElementTree returns unicode strings in Py3k

2010-03-11 Thread Guido van Rossum

Guido van Rossum  added the comment:

Hey, can we all try to get along?

For anyone who didn't follow the link to r56841, that was mine (though 
Christian Heimes provided the basis for much of the patch apart from 
elementtree), and I wrote at the time:

"""I had to fix a few tests and modules beyond what Christian did, and
invent a few conventions.  E.g. in elementtree, I chose to
write/return Unicode strings whe no encoding is given, but bytes when
an explicit encoding is given."""

I am not a user of elementtree, so this may well have been a mistake -- at the 
time (in 2007) we were so busy making zillions of tests pass that some mistakes 
were made.  Some of those were caught in time, others apparently not.

My thinking was that since an XML document looks like text, it should probably 
be considered text, at least by default.  (There may have been some unittests 
that appeared to require this -- of course this was probably just the confusion 
between byte strings and 8-bit text strings inherent in Python 2.)

Regarding backwards compatibility, there are now two backwards compatibility 
problems: with 2.x, and with 3.1.  It seems we cannot easily be backwards 
compatible with both (though if someone figures out a way that would be best of 
course).

If I were to propose an API for returning a Unicode string, I would probably 
add a new method (e.g. tounicode()) rather than using a "magical" argument 
(tostring(encoding=str)), but given that that exists in another 
supposedly-compatible implementation I'm not against it.  Maybe 
tostring(encoding=None) could also be made to work? That would at least make it 
*possible* to write code that receives a text object and that works in 3.1 and 
3.2 both.  In 2.x I think neither of these should work, and there probably 
isn't a need -- apps needing full compatibility will just have to refrain from 
calling tostring() without arguments.

ISTM that the behavior of write() is just fine -- the contents of the file will 
be correct after all.

--
nosy: +gvanrossum

___
Python tracker 

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



[issue7424] segmentation fault in listextend during install

2010-03-11 Thread Jon Buller

Jon Buller  added the comment:

This is bad.  The problem went away and the test completed without the 
segfault.  If you think the output would help track anything down, let 
me know and I'll
save and upload it somewhere.  (Or I could hand out an SSH account via 
IPv6 to the machine...  With some effort, I could probably reconfigure 
my network to get it
on one of my 2 IPv4 addresses.)

--

___
Python tracker 

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



[issue8047] Serialiser in ElementTree returns unicode strings in Py3k

2010-03-11 Thread R. David Murray

R. David Murray  added the comment:

Well, Benjamin pointed out to me that it would be a bad thing if array.tostring 
produced a string.  True, the method is named wrong, but it is less broken than 
returning a string.  I suspect that that is the same argument Fredrik is 
making: that returning the XML as a byte string is less broken than returning 
it as a string when it in fact may contain other encoded stuff.  The email 
package has some of the same problems, and there we are retooling the API to 
deal with this.

Presumably ET needs to have a retooled API for Python3 as well.  Then the 
question becomes what do we do in the meantime?  For email, we are just living 
with the breakage until we can get something better in place, because no one 
has come up with any good short term solutions for email.

--

___
Python tracker 

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



[issue8047] Serialiser in ElementTree returns unicode strings in Py3k

2010-03-11 Thread Fredrik Lundh

Fredrik Lundh  added the comment:

So now it's the domain experts against some hypothetical people that might 
exist?  Tricky.

--

___
Python tracker 

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



[issue2698] Extension module build fails for MinGW: missing vcvarsall.bat

2010-03-11 Thread Craig McQueen

Craig McQueen  added the comment:

Not so much of a traceback. But essentially the same final error:
running build
running build_py
running build_ext
building 'cobs._cobsext' extension
error: Unable to find vcvarsall.bat

--

___
Python tracker 

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



[issue7424] segmentation fault in listextend during install

2010-03-11 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Can you try to recompile Python in debug mode?
("make distclean && ./configure --with-pydebug").

--
nosy: +pitrou

___
Python tracker 

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



[issue8108] test_ftplib fails with OpenSSL 0.9.8m

2010-03-11 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
nosy: +janssen

___
Python tracker 

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



[issue8108] test_ftplib fails with OpenSSL 0.9.8m

2010-03-11 Thread STINNER Victor

STINNER Victor  added the comment:

More informations:
http://www.openssl.org/docs/ssl/SSL_shutdown.html
http://rt.openssl.org/Ticket/Display.html?user=guest&pass=guest&id=1891

Extract of the manual page:

 
 If the underlying BIO is non-blocking, SSL_shutdown() will also return when 
the underlying BIO could not satisfy the needs of SSL_shutdown() to continue 
the handshake. In this case a call to SSL_get_error() with the return value of 
SSL_shutdown() will yield SSL_ERROR_WANT_READ or SSL_ERROR_WANT_WRITE. ***The 
calling process then must repeat the call after taking appropriate action to 
satisfy the needs of SSL_shutdown().*** The action depends on the underlying 
BIO. When using a non-blocking socket, nothing is to be done, but select() can 
be used to check for the required condition. When using a buffering BIO, like a 
BIO pair, data must be written into or retrieved out of the BIO before being 
able to continue.

--

___
Python tracker 

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



[issue8047] Serialiser in ElementTree returns unicode strings in Py3k

2010-03-11 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Le Thu, 11 Mar 2010 22:03:37 +,
Fredrik Lundh  a écrit :
> 
> >>> import array
> >>> array.array("i", [1, 2, 3]).tostring()
> b'\x01\x00\x00\x00\x02\x00\x00\x00\x03\x00\x00\x00'

The fact that array is old, rusty and slightly broken doesn't meen we
should propagate that brokenness to other Python modules.
Also, as David said, the fact that you think there is a bug
here doesn't mean everyone would agree.
Finally, the behaviour you seem to be looking for could be added
as a separated API or an optional method argument. Patches welcome.

--

___
Python tracker 

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



[issue8047] Serialiser in ElementTree returns unicode strings in Py3k

2010-03-11 Thread Fredrik Lundh

Fredrik Lundh  added the comment:

>>> import array
>>> array.array("i", [1, 2, 3]).tostring()
b'\x01\x00\x00\x00\x02\x00\x00\x00\x03\x00\x00\x00'

--

___
Python tracker 

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




[issue2001] Pydoc interactive browsing enhancement

2010-03-11 Thread Sridhar Ratnakumar

Changes by Sridhar Ratnakumar :


--
nosy: +srid

___
Python tracker 

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



[issue8108] test_ftplib fails with OpenSSL 0.9.8m

2010-03-11 Thread STINNER Victor

STINNER Victor  added the comment:

The patch changing SSL_Shutdown() behaviour on non blocking socket was written 
in 2006 by Darryl Miles and it will commited into 0.9.8m. The original patch:
http://marc.info/?l=openssl-dev&m=115153998821797&w=2

In our testcase, SSL_Shutdown() fails with SSL_ERROR_WANT_READ, which means 
(extract of the email): "Return -1 WANT_READ while we are still waiting for the 
inbound recv notify alert to be received."

--

___
Python tracker 

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



[issue8108] test_ftplib fails with OpenSSL 0.9.8m

2010-03-11 Thread STINNER Victor

STINNER Victor  added the comment:

The problem comes from SSL_Shutdown() on a non blocking connection. See:
http://www.mail-archive.com/openssl-...@openssl.org/msg24097.html

--

___
Python tracker 

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



[issue8047] Serialiser in ElementTree returns unicode strings in Py3k

2010-03-11 Thread R. David Murray

R. David Murray  added the comment:

You may well be correct.  But just because no one reported a bug does not mean 
that no one is using the API.  The person using it may find it perfectly 
logical (and may be writing py3 only code, not porting py2 code).

However, regardless of whether we decide it is acceptable to change the 
behavior, it seems to me that having an interface named 'tostring' that returns 
bytes by default in Python3 would be a broken API.  I don't see any way around 
that terminology problem.

--

___
Python tracker 

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



[issue8032] Add gdb7 hooks to make it easier to debug Python

2010-03-11 Thread Dave Malcolm

Dave Malcolm  added the comment:

Attaching diff from v2 to v3

--
Added file: 
http://bugs.python.org/file16526/diff-of-gdb7-hooks-v3-relative-to-v2.diff

___
Python tracker 

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



[issue8032] Add gdb7 hooks to make it easier to debug Python

2010-03-11 Thread Dave Malcolm

Dave Malcolm  added the comment:

Thanks for reviewing the patch.

I've changed the pretty-printing of NULL pointers to "0x0" as suggested, and 
I've updated frame printing.  Frames are now printed like this
(gdb) p f
$1 = Frame 0x827e544, for file /home/david/coding/python-gdb/crasher.py, line 
19, in  ()

...so that in a gdb backtrace you might see:
#18 0x080f9aab in PyEval_EvalFrameEx (f=Frame 0x827e544, for file 
/home/david/coding/python-gdb/crasher.py, line 19, in  (), throwflag=0) 
at Python/ceval.c:2665

Is this what you had in mind?

As for the use of the word "remote",this is mostly for my own sanity, but I 
suspect it is needed.  My rationale for this is that there are two address 
spaces at play: the local address space with the gdb process, and the remote 
one within the inferior process.  It's possible for addresses with the gdb 
process to be printed for any object with a NULL tp_repr in its class, and if 
it were, it would be confusing which address space is it.

For example, if within gdb I run this command:
(gdb) python print repr(gdb.selected_frame())


the hexadecimal value that's printed is an address within gdb's address space, 
that of the python object wrapping the gdb frame information.

I did deliberately model the FakeRepr representation on the output of 
PyObject_Repr when tp_repr is NULL:
   PyString_FromFormat("<%s object at %p>", Py_TYPE(v)->tp_name, v);
adding the "remote" word to disambiguate things.

Is that OK?  It seemed to me like the best compromise of readability and lack 
of ambiguity.


I'm attaching an updated version of the patch (version 3), and am about to 
attach a diff against the last version (which was version 2)

There are some other substantial changes in the patch:
- Line numbers reported in frames were incorrect; I've fixed this, mimicking 
the "dis" module/PyCode_Addr2Line
- I've started to add various "py-" commands (with selftests):
  - "py-list" command, which tries to mimic gdb's "list" command, but at the 
level of Python source code
  - "py-up" and "py-down" command, which go up and down the stack, based on the 
location of PyEval_EvalFrameEx frames
  - "py-bt" which prints a python-level backtrace, based on the location of 
PyEval_EvalFrameEx frames
- I added a trivial script (Lib/test/test_gdb_sample.py) for use by the test 
cases for the above
- Fixed a bug in PyStringObjectPtr.proxyval() so that it now supports strings 
with embedded NUL characters
- Various comment fixes.

I split out the test cases into multiple classes, invoking them all.  All pass 
on my system, taking under 20 seconds ("Ran 28 tests in 17.770s")

--
Added file: 
http://bugs.python.org/file16525/add-gdb7-python-hooks-to-trunk-v3.patch

___
Python tracker 

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



[issue8119] Minor comment error in configure.in ("malloc support" appears twice)

2010-03-11 Thread Brett Cannon

Changes by Brett Cannon :


--
priority:  -> low

___
Python tracker 

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



[issue8117] TimedRotatingFileHandler doesn't rotate log file at startup.

2010-03-11 Thread kwas

Changes by kwas :


--
nosy: +kwas

___
Python tracker 

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



[issue8047] Serialiser in ElementTree returns unicode strings in Py3k

2010-03-11 Thread Stefan Behnel

Stefan Behnel  added the comment:

Then I would call that a clear sign that no-one actually stumbled over this 
feature in Py3 before I did, well hidden as it was. Still time to fix it.

--

___
Python tracker 

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



[issue8047] Serialiser in ElementTree returns unicode strings in Py3k

2010-03-11 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

> > Ha. There has been a very long temporal window
> 
> You should have had plenty of time to fix it, then, right?

Under the condition that someone would have actually reported it, yes.
We don't magically fix bugs if nobody (including us) detects and reports
them.

--

___
Python tracker 

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



[issue5712] tkinter - askopenfilenames returns string instead of tuple in windows 2.6.1 release

2010-03-11 Thread Dan Halbert

Changes by Dan Halbert :


--
nosy: +dhalbert

___
Python tracker 

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



[issue8032] Add gdb7 hooks to make it easier to debug Python

2010-03-11 Thread Martin v . Löwis

Martin v. Löwis  added the comment:

I find the printing of frame objects confusing:

3033f = PyFrame_New(tstate, co, globals, locals);
(gdb)
3034if (f == NULL)
(gdb) p f
$3 = File /home/martin/work/27/Lib/encodings/utf_8.py, line 15, in decode ()

I didn't recognize that this is actually the output of the Frame; I recommend 
something like

  Frame %x, for file 

Also, it prints NULL PyObject* as "". I think null 
pointers should be special cased, and just be printed as 0x0. Also, what is the 
"remote" keyword? Aren't all pointers remote in this application? I'd hope that 
local Python objects never show up.

--

___
Python tracker 

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



[issue6472] Update ElementTree with upstream changes

2010-03-11 Thread Fredrik Lundh

Fredrik Lundh  added the comment:

W00t!

--

___
Python tracker 

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



[issue8047] Serialiser in ElementTree returns unicode strings in Py3k

2010-03-11 Thread Fredrik Lundh

Fredrik Lundh  added the comment:

> if I don't specify an encoding, I get unicode.  If I do specify an encoding, 
> I get encoded bytes.

You're confusing the XML document encoding with character set encoding.

A serialized (unparsed) XML document is a byte stream, not a string of Unicode 
characters.  And the character set encoding is both embedded in that byte 
stream and affects how it's generated in more than one way; you cannot just 
recode XML documents nilly willy and expect things to work.

A parsed XML document (an infoset) -- for ET, that's the tree of Element 
objects -- does indeed contain Unicode strings, but the transformation from the 
byte stream to the Unicode string doesn't just involve character set decoding; 
there are several other constructs that are handled by the XML parser.

> Ha. There has been a very long temporal window

You should have had plenty of time to fix it, then, right?

--

___
Python tracker 

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



[issue8112] xmlrpc.server: ServerHTMLDoc.docroutine uses (since 3.0) deprecated function "inspect.getargspec()"

2010-03-11 Thread R. David Murray

R. David Murray  added the comment:

A patch with tests would be an excellent thing to have.

--
nosy: +r.david.murray
priority:  -> normal
type: crash -> behavior

___
Python tracker 

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



[issue8112] xmlrpc.server: ServerHTMLDoc.docroutine uses (since 3.0) deprecated function "inspect.getargspec()"

2010-03-11 Thread tormen

tormen  added the comment:

If you want I can send you a patch.

--

___
Python tracker 

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



[issue8047] Serialiser in ElementTree returns unicode strings in Py3k

2010-03-11 Thread R. David Murray

R. David Murray  added the comment:

I suspect that what Antoine is referring to is the fact that Python 3.1 has 
this behavior.  Whether or not it is explicitly documented is a secondary issue.

We're having a similar issue in the unittest package, where there's a new 
function, assertSameElements, that has an unfortunate and poorly documented 
API.  But changing that API now that the function exists in a released version 
(3.1) is not something to be done lightly, if it is done at all.

This is definitely an unfortunate state of affairs no matter how you look at it.

--

___
Python tracker 

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



[issue8112] xmlrpc.server: ServerHTMLDoc.docroutine uses (since 3.0) deprecated function "inspect.getargspec()"

2010-03-11 Thread tormen

tormen  added the comment:

If you want an example:

pydoc3.1 xmlrpc.server

2nd usage pattern

change "SimpleXMLRPCServer" to "DocXMLRPCServer"
change function signature from "pow(self, x, y)" to "pow(self, x:int, y:int)"

and your good to go and have your doc xmlrpc server crashed the moment you send 
a get request to him (e.g. by accessing "http://ip:port"; in the browser of your 
choice).

--

___
Python tracker 

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



[issue8112] xmlrpc.server: ServerHTMLDoc.docroutine uses (since 3.0) deprecated function "inspect.getargspec()"

2010-03-11 Thread tormen

tormen  added the comment:

Okey ...

Consider you have a function:
def fn( str:str ): pass

That you register to your DocXMLRPCServer:
register_function of SimpleXMLRPCDispatcher stores the function object  in the 
dictionary self.funcs under the name of the function (as key).

Then you start your server and access (with a browser) the ip and port of the 
machine running your xmlrpc server which calls
> DocXMLRPCRequestHandler.do_GET which
> generate_html_documenation() which copies the funcs dictionary into methods 
> and hands it to
> ServerHTMLDoc.docserver which calls for each function name + function object:
> ServerHTMLDoc.docroutine which calls (for inspect.ismethod and 
> inspect.isfunction):

inspect.getargspec on the function object

which will fail if you register an annotated function (like the above "fn") in 
the first place:
=
  File "/usr/lib/python3.1/inspect.py", line 789, in getargspec
raise ValueError("Function has keyword-only arguments or annotations"
ValueError: Function has keyword-only arguments or annotations, use 
getfullargspec() API which can support them
=

Which most probably leads to the conclusion that you should just use the 
getfullargspec instead of getargspec just to avoid that the XMLRPC server 
crashes if someone registers a annotated function.

--

___
Python tracker 

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



[issue4376] Nested ctypes 'BigEndianStructure' fails

2010-03-11 Thread Alexander Belopolsky

Alexander Belopolsky  added the comment:

theller> - Should 'part' be inserted as is, [possibly] leading 
theller>   to a total structure of fields with mixed byte order?

+1 for this option.

--
nosy: +Alexander.Belopolsky

___
Python tracker 

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



[issue2698] Extension module build fails for MinGW: missing vcvarsall.bat

2010-03-11 Thread Tarek Ziadé

Tarek Ziadé  added the comment:

What traceback do you get exactly ? The same one than the first TB of this 
issue ?

--
priority:  -> high

___
Python tracker 

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



[issue8107] test_distutils fails on Windows in 2.6.5rc2

2010-03-11 Thread Tarek Ziadé

Tarek Ziadé  added the comment:

@Ronald, @Barry: Yes that's what I did in trunk, so I can just merge that 
revision. (r78707, r78709)

The only problem I had with it is that in case xxmodule.c changes, I have to 
change it there too, but it's no big deal.

Barry, I'll merge back this as soon as I get a correct wifi connection this 
week :)  (I am at a conference)

--

___
Python tracker 

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



[issue6266] cElementTree.iterparse & ElementTree.iterparse return differently encoded strings

2010-03-11 Thread Florent Xicluna

Florent Xicluna  added the comment:

Fixed with #6472.

--
dependencies:  -Update ElementTree with upstream changes
resolution:  -> fixed
stage: needs patch -> committed/rejected
status: open -> closed
superseder:  -> Update ElementTree with upstream changes

___
Python tracker 

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



[issue8099] IDLE(Python GUI) Doesn't open

2010-03-11 Thread Martin v . Löwis

Martin v. Löwis  added the comment:

I recommend against deleting that Python installation: it probably came from 
the PC vendor, and might serve a purpose.

Just unset TCL_LIBRARY, through the Windows Environment GUI. Ask on 
comp.lang.python how to do this, or on some Windows help forum.

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



[issue8119] Minor comment error in configure.in ("malloc support" appears twice)

2010-03-11 Thread Dave Malcolm

New submission from Dave Malcolm :

A minor nit: configure.in has this comment twice:
"Check for Python-specific malloc support"

c.f.:

# Check for Python-specific malloc support
AC_MSG_CHECKING(for --with-tsc)

(snip)

# Check for Python-specific malloc support
AC_MSG_CHECKING(for --with-pymalloc)



Clearly the first one should read something like:
# Determine if the bytecode evaluation loop should be instrumented using the 
CPU timestamp-counter
or somesuch.

Seems to affect both trunk and py3k

--
components: Interpreter Core
messages: 100869
nosy: dmalcolm
severity: normal
status: open
title: Minor comment error in configure.in  ("malloc support" appears twice)
versions: Python 2.7, Python 3.1

___
Python tracker 

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



[issue8047] Serialiser in ElementTree returns unicode strings in Py3k

2010-03-11 Thread Stefan Behnel

Stefan Behnel  added the comment:

Sorry, Antoine, but you can't possibly mean what you say here. The culprit in 
question is clearly one of the best hidden features of the new Py3 ET API. The 
only existing reference to it that I can find is the SVN commit comment when it 
was applied. How is that supposed to be any reason for keeping up "backwards 
compatibility" within the Py3 series?

--

___
Python tracker 

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



[issue8118] PYTHON_API_VERSION needs to be bumped?

2010-03-11 Thread Ronald Oussoren

New submission from Ronald Oussoren :

If I understand the code correct Python 2.6 has the same value for 
PYTHON_API_VERSION, even though extensions are not compatible.

In particular: when you compile an extension that uses PyInt_Check with 
python2.6 and load that extension with python 2.5 you will not get a version 
warning from Py_InitModule4 and you will also not get the right answers from 
PyInt_Check.

This due to PyType_FastSubclass (in python 2.6) which tests flags in the type 
structure that are not initiazed in 2.5.  That is a change in the ABI and hence 
should be accompanied by increasing PYTHON_API_VERSION.

 
This is technically a bug in 2.6, but I'm not selecting that version in the 
list because increasing PYTHON_API_VERSION in 2.6.x would break existing 
installations when they upgrade.

--
components: Extension Modules, Interpreter Core
messages: 100867
nosy: ronaldoussoren
priority: high
severity: normal
status: open
title: PYTHON_API_VERSION needs to be bumped?
type: behavior
versions: Python 2.7

___
Python tracker 

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



[issue8099] IDLE(Python GUI) Doesn't open

2010-03-11 Thread Brian Curtin

Brian Curtin  added the comment:

Just delete the Python22 folder.

Typing "set TCL_LIBRARY=" (note the equal sign) will unset the environment 
variable for that command prompt. Can you try running the steps from msg100786?

--

___
Python tracker 

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



[issue8099] IDLE(Python GUI) Doesn't open

2010-03-11 Thread Estroms

Estroms  added the comment:

When I type "set TCL_LIBRARY" it says 
"TCL_LIBRARY=C:IBMTOOLS\Python22\tcl\tcl18.4".
So I have older version of python on my computer in IBMtools, but I want to use 
the new Python. How can I uninstall older python, because it can't be found in 
Start menu and there is no uninstall program in python folder. So how can I 
uninstall it using command prompt?

--

___
Python tracker 

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



[issue6232] Improve test coverage of ElementTree and cElementTree

2010-03-11 Thread Florent Xicluna

Changes by Florent Xicluna :


--
dependencies:  -Update ElementTree with upstream changes
priority:  -> normal
resolution:  -> fixed
stage:  -> committed/rejected
status: open -> closed
superseder:  -> Update ElementTree with upstream changes

___
Python tracker 

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



[issue6265] cElementTree & ElementTree use different exceptions for XML Errors

2010-03-11 Thread Florent Xicluna

Changes by Florent Xicluna :


--
dependencies:  -Update ElementTree with upstream changes
resolution:  -> fixed
stage:  -> committed/rejected
status: open -> closed
superseder:  -> Update ElementTree with upstream changes

___
Python tracker 

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



[issue6230] ElementTree.Element and cElementTree.Element have slightly different repr

2010-03-11 Thread Florent Xicluna

Florent Xicluna  added the comment:

Fixed in trunk with #6472.

--
dependencies:  -Update ElementTree with upstream changes
resolution:  -> fixed
stage:  -> committed/rejected
status: open -> closed
superseder:  -> Update ElementTree with upstream changes

___
Python tracker 

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



[issue6565] improper use of __setitem__ in ElementTree for Python 3.1

2010-03-11 Thread Florent Xicluna

Florent Xicluna  added the comment:

Fixed in 2.7 with #6472. It should be ported to 3.x later.

--
dependencies:  -Update ElementTree with upstream changes
resolution:  -> fixed
stage: needs patch -> committed/rejected
status: open -> closed
superseder:  -> Update ElementTree with upstream changes

___
Python tracker 

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



[issue3151] elementtree serialization bug for weird namespace urls

2010-03-11 Thread Florent Xicluna

Florent Xicluna  added the comment:

Fixed in trunk.

--
dependencies:  -Update ElementTree with upstream changes
resolution:  -> fixed
stage: patch review -> committed/rejected
status: open -> closed
superseder:  -> Update ElementTree with upstream changes

___
Python tracker 

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



[issue7300] Unicode arguments in str.format()

2010-03-11 Thread Eric Smith

Eric Smith  added the comment:

I'm not sure I'm wild about doing the work twice, once as string and once as 
unicode if need be. But I'll consider it, especially since this is only a 2.7 
issue.

There could be side effects of evaluating the replacement strings, but I'm not 
sure it's worth worrying about. Attribute (or index) access having side effects 
isn't something I think we need to cater to.

--

___
Python tracker 

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



[issue3475] _elementtree.c import can fail silently

2010-03-11 Thread Florent Xicluna

Florent Xicluna  added the comment:

Fixed with latest xml.etree.

--
dependencies:  -Update ElementTree with upstream changes
resolution:  -> fixed
stage:  -> committed/rejected
status: open -> closed
superseder:  -> Update ElementTree with upstream changes
versions:  -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



[issue1538691] Patch cElementTree to export CurrentLineNumber

2010-03-11 Thread Florent Xicluna

Florent Xicluna  added the comment:

ElementTree fixed in 2.7. See #6472.

--
dependencies:  -Update ElementTree with upstream changes
resolution: postponed -> fixed
stage: patch review -> committed/rejected
status: open -> closed
superseder:  -> Update ElementTree with upstream changes

___
Python tracker 

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



[issue8107] test_distutils fails on Windows in 2.6.5rc2

2010-03-11 Thread Barry A. Warsaw

Barry A. Warsaw  added the comment:

Adding xxmodule.c to the test directory is more than I want to do for 2.6.5.  
The actual crash happens because if sysconfig.get_config_var('srcdir') returns 
None, os.path.join() will traceback.  It doesn't know how to handle None 
arguments.  So my suggestion is that when srcdir is None, fallback to using 
sysconfig.project_base as before.

As long as that is guaranteed to be a string, we won't get the crash.  
_get_source_filename() will return some bogus but syntactically valid path, and 
then the os.path.exists() test in test_suite() will return False, so the test 
will be skipped.  That seems like the safest change for 2.6.5 final, though I 
am fine with backporting the trunk fix for realzies in 2.6.6.

--

___
Python tracker 

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



[issue8047] Serialiser in ElementTree returns unicode strings in Py3k

2010-03-11 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

> The "no header" thing is very much done on purpose, and it's
> documented in the upstream ElementTree documentation.

I'm sorry, where is that?
I can't find it either at
http://effbot.org/zone/pythondoc-elementtree-ElementTree.htm#elementtree.ElementTree.tostring-function
or
http://effbot.org/zone/pythondoc-elementtree-ElementTree.htm#elementtree.ElementTree.ElementTree.write-method

> I suggest dropping this "Python 3 exists in its own universe"
> nonsense; it's not very professional, and it's hurting Python, its
> users, and all third party developers.

Ha. There has been a very long temporal window (until 3.1, probably)
during which things were very much in flux and anyone with a
professional knowledge of elementtree and XML APIs could chime in and
point out any nonsense in py3k.

Now Python 3.1 is out and as a result py3k also has to ensure upwards
compatibility for its own APIs. Of course we can still make exceptions
if the alleged breakage is truly major. To me, it doesn't /seem/ to be
the case here.

--

___
Python tracker 

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



[issue6472] Update ElementTree with upstream changes

2010-03-11 Thread Florent Xicluna

Florent Xicluna  added the comment:

Fixed on trunk with r78838.
Some extra work is required to port it to 3.x.

Thank you Fredrik and Antoine for reviewing this patch.

--
resolution:  -> fixed
stage: patch review -> committed/rejected

___
Python tracker 

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



[issue8117] TimedRotatingFileHandler doesn't rotate log file at startup.

2010-03-11 Thread R. David Murray

Changes by R. David Murray :


--
nosy: +vinay.sajip

___
Python tracker 

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



[issue8099] IDLE(Python GUI) Doesn't open

2010-03-11 Thread Brian Curtin

Brian Curtin  added the comment:

That was an example of the cmd prompt. 
Just type "set TCL_LIBRARY=" without the quotes, along with the contents of the 
other three lines except for the "C:\>".

--

___
Python tracker 

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



[issue5100] ElementTree.iterparse and Element.tail confusion

2010-03-11 Thread Fredrik Lundh

Fredrik Lundh  added the comment:

Footnote: "iterparse" does things this way mostly to keep the implementation 
simple and fast; due to buffering, the tree builder are usually ahead of the 
event generation with up to 16k.  See the note on this page:

http://effbot.org/zone/element-iterparse.htm

and the message it links to for more on this topic.

Your case is a very common use case for "tostring", so it would probably have 
made sense to make "tostring" skip the tail on the element itself, at least if 
it's whitespace only.  Guess we could add an option...

But in your case, you can probably just nuke or normalize the "tail" element 
before writing it out (i.e. set it to None or "\n").

--

___
Python tracker 

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



[issue8099] IDLE(Python GUI) Doesn't open

2010-03-11 Thread Estroms

Estroms  added the comment:

When I write to Command Promt "C:\>set TCL_LIBRARY=" it says: "'C:\' is not 
recognized as an internal or external command, operable program or batch file."

--

___
Python tracker 

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



[issue7114] HTMLParser doesn't handle

2010-03-11 Thread Fredrik Lundh

Fredrik Lundh  added the comment:

And to clarify, XHTML is an reformulation of HTML4 using XML syntax, so you 
should use an XML parser to parse it, not an HTML parser.  The formats are 
related, but not identical.

--

___
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-03-11 Thread STINNER Victor

STINNER Victor  added the comment:

Oh well, it's really hard to test the tests in my working copy because it 
depends on a lot of factors: the current working directory, is Python installed 
or not, the OS, etc. The test introduced in r78835 was incorrect (only the 
test, the fix is correct): r78836 fixes the test for Windows (where 
sys.executable is correct even if argv[0] is set to a non existent program 
name, I don't understand how) and r78837 fixes the test for Ubuntu.

r78837 is a temporary fix to workaround #7774 bug: it's the same hack used in 
test_executable_with_cwd() from test_subprocess.

--

___
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-03-11 Thread STINNER Victor

Changes by STINNER Victor :


--

___
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-03-11 Thread STINNER Victor

STINNER Victor  added the comment:

There is a 4th case about sys.executable: If argv[0] is an empty string, Python 
search the absolute path of "python" (hardcoded program name). The result is 
/usr/bin/python in my Linux box, whereas the real program name should be 
/opt/pythontrunk/bin/python. I think that this case is a bug and should be 
fixed.

--

___
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-03-11 Thread STINNER Victor

STINNER Victor  added the comment:

r78835 (trunk) fixes getpath and includes also a fix for sysconfig which should 
fix test_executable_with_cwd() of test_subprocess.

My fix on sysconfig is different than flox's patch: since I fixed getpath, 
sys.executable cannot be a directory name. At revision r78835, sys.executable 
can have 3 values:
 (a) absolute path to Python executable name (most common case)
 (b) empty string if argv[0] has been set to a non existent program name
 (c) absolute path to a different program if argv[0] has been set to a 
different program, with or without path (eg. "true" and "/bin/path")

(c) is the worst case: Python refuses to start. r78835 fixes the site module 
error for case (b).

There are different methods to get the real program name, but no one is 
portable. As flox wrote, we can "do a best effort to provide a valid 
sys.executable". Extract of stackoverflow link:

 * Mac OS X: _NSGetExecutablePath() (man 3 dyld)
 * Linux: readlink /proc/self/exe
 * Solaris: getexecname()
 * FreeBSD: sysctl CTL_KERN KERN_PROC KERN_PROC_PATHNAME -1
 * BSD with procfs: readlink /proc/curproc/file
 * Windows: GetModuleFileName() with hModule = NULL

--

___
Python tracker 

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



[issue8113] PyUnicode_AsUnicode doesn't check for NULL pointer

2010-03-11 Thread Lorenz Quack

Lorenz Quack  added the comment:

Thanks for the fast replies.

I used to groups some Python calls together and check in the end if any of them 
failed in one exception handling block. I will now check every call 
individually.

I will open a new bug for documentation fixes where there is now information on 
what a function returns when it fails.

feel free to set resolution to invalid. or what ever you feel is appropriate.

thanks again for your time.

--
status: open -> closed

___
Python tracker 

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



[issue8116] Addition problem

2010-03-11 Thread Mark Dickinson

Mark Dickinson  added the comment:

This isn't a bug in Python:  it's an unavoidable symptom of using binary 
floating-point arithmetic internally to store values.

I recommend looking at the last chapter of the Python tutorial, which gives a 
very nice explanation of floating-point issues.

http://docs.python.org/3.1/tutorial/floatingpoint.html

--
nosy: +mark.dickinson
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



[issue8047] Serialiser in ElementTree returns unicode strings in Py3k

2010-03-11 Thread Fredrik Lundh

Fredrik Lundh  added the comment:

The "no header" thing is very much done on purpose, and it's documented in the 
upstream ElementTree documentation.

I suggest dropping this "Python 3 exists in its own universe" nonsense; it's 
not very professional, and it's hurting Python, its users, and all third party 
developers.  The "things I don't understand are braindead" stuff is less of a 
problem; that only hurts yourself.

--

___
Python tracker 

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



[issue8117] TimedRotatingFileHandler doesn't rotate log file at startup.

2010-03-11 Thread Yuriy Taraday

New submission from Yuriy Taraday :

Screnario:
 - start logging, log something;
 - stop logging (stop application, for example);
 - start logging again after rotate interval passes.

log4j's RotatingFileAppender's behavior:
After restart, logfile is rotated if nessesary.

TimedRotatingFileHandler's behavior:
After restart do no checks on existing logs.

I thing, log4j's behavior is more intuitive. Patch adds necessary check to 
constructor.

--
components: Library (Lib)
files: python-logging.diff
keywords: patch
messages: 100845
nosy: yorik.sar
severity: normal
status: open
title: TimedRotatingFileHandler doesn't rotate log file at startup.
type: behavior
Added file: http://bugs.python.org/file16524/python-logging.diff

___
Python tracker 

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



[issue7424] segmentation fault in listextend during install

2010-03-11 Thread Jon Buller

Jon Buller  added the comment:

"./configure --without-threads" didn't seem to have any effect...  :(

--

___
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-03-11 Thread STINNER Victor

STINNER Victor  added the comment:

getpath.patch: another patch written by flox. If argv[0] is set to a non 
existent program name, sys.executable is set to an empty string instead of a 
directory name.

Example of the bug with Python 2.5:

$ sh -c "exec -a xxx python -c 'import sys, os; print repr(sys.executable), 
repr(os.getcwd())'"
'/home/haypo/' '/home/haypo'

--
Added file: http://bugs.python.org/file16523/getpath.patch

___
Python tracker 

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



[issue8116] Addition problem

2010-03-11 Thread Aleš Drinovec

New submission from Aleš Drinovec :

*** Python 3.1.2rc1 (r312rc1:78742, Mar  7 2010, 07:49:40) [MSC v.1500 32 bit 
(Intel)] on win32. ***
>>> 5.1+3.8
8.899
>>> 4.1+4.8
8.899
>>> 

Tested in IDLE and in PyScripter

--
components: Interpreter Core
messages: 100842
nosy: sailoral
severity: normal
status: open
title: Addition problem
type: behavior
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



[issue2698] Extension module build fails for MinGW: missing vcvarsall.bat

2010-03-11 Thread Eric Devolder

Eric Devolder  added the comment:

Yes, I believe it is.

that should be re-opened.

2010/3/11 Craig McQueen 

>
> Craig McQueen  added the comment:
>
> This still seems to be a bug in Python 3.1.1, does it not? Can this be
> re-opened?
>
> --
>
> ___
> Python tracker 
> 
> ___
>

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

___
Python tracker 

___Yes, I believe it is.
 
that should be re-opened.
2010/3/11 Craig McQueen rep...@bugs.python.org>

Craig McQueen pyt...@craig.mcqueen.id.au> 
added the comment:This still seems to be a bug in Python 3.1.1, 
does it not? Can this be re-opened?



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



[issue7291] urllib2 cannot handle https with proxy requiring auth

2010-03-11 Thread Senthil Kumaran

Senthil Kumaran  added the comment:

In this ticket, setting the authentication using a ProxyBasicAuthHandler is not 
yet addressed yet. (this was informed in the last note). Reopening this one to 
track it.

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

___
Python tracker 

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