[issue7028] hex function should work with floats

2009-10-01 Thread Mark Dickinson

Mark Dickinson dicki...@gmail.com added the comment:

I agree it would be useful.  That's why this facility already exists in 
Python = 2.6 (including Python 3.x).  :-)

Python 2.6.2 (r262:71600, Jul  8 2009, 09:56:31) 
[GCC 4.0.1 (Apple Inc. build 5490)] on darwin
Type help, copyright, credits or license for more information.
 from math import pi
 pi.hex()
'0x1.921fb54442d18p+1'
 float.fromhex(_)
3.1415926535897931

--
nosy: +mark.dickinson
resolution:  - out of date
status: open - pending

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



[issue5949] IMAP4_SSL spin because of SSLSocket.suppress_ragged_eofs

2009-10-01 Thread Scott Dial

Scott Dial sc...@scottdial.com added the comment:

It would seem the logical patch would be to return the line when the
empty string is returned. This would fall in line with the behavior of
other objects with a readline() in python. In following with that, the
patch I have attached returns a truncated line. Therein, the _get_line()
implementation needs to actually check for the correct termination of
the line (it's arguably a bug as it is, just chucking away the last two
characters blindly).

--
keywords: +patch
nosy: +scott.dial
Added file: http://bugs.python.org/file15012/imaplib-r75166.patch

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



[issue5949] IMAP4_SSL spin because of SSLSocket.suppress_ragged_eofs

2009-10-01 Thread Scott Dial

Changes by Scott Dial sc...@scottdial.com:


Removed file: http://bugs.python.org/file15012/imaplib-r75166.patch

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



[issue5949] IMAP4_SSL spin because of SSLSocket.suppress_ragged_eofs

2009-10-01 Thread Scott Dial

Changes by Scott Dial sc...@scottdial.com:


Added file: http://bugs.python.org/file15013/imaplib-r75166.patch

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



[issue7028] hex function should work with floats

2009-10-01 Thread Mark Dickinson

Mark Dickinson dicki...@gmail.com added the comment:

 I agree it would be useful.  That's why this facility already exists

Ahem.  Embarrassing causation fail.  To clarify, Raymond Hettinger 
proposed this addition some time ago, and others on python-dev supported 
it.  *That's* why it was implemented. :)

--
status: pending - open

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



[issue7028] hex function should work with floats

2009-10-01 Thread Mark Dickinson

Changes by Mark Dickinson dicki...@gmail.com:


--
status: open - pending

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



[issue7026] test_urllib: unsetting missing 'env' variable

2009-10-01 Thread Georg Brandl

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

Can this issue be closed then?

--
nosy: +georg.brandl

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



[issue7022] Doc update for io module

2009-10-01 Thread Georg Brandl

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


--
assignee: georg.brandl - pitrou
nosy: +pitrou

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



[issue7026] test_urllib: unsetting missing 'env' variable

2009-10-01 Thread Senthil Kumaran

Senthil Kumaran orsent...@gmail.com added the comment:

This needs to be changed in python2.6 branch as well. I was hesitant as
barry was making the build. After the branch opens, I shall make the
changes in that and close the issue.

--
nosy: +barry

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



[issue6972] zipfile.ZipFile overwrites files outside destination path

2009-10-01 Thread Ralf Schmitt

Ralf Schmitt sch...@gmail.com added the comment:

I'd rather have an extractall version which just throws a RuntimeError
than one which overwrites any file with any content on my filesystem if
I'm trying to unzip a zip file.  Then I at least know that I have to
write my own version. Adding a warning to the documentation instead of
fixing that bug was wrong for the tarfile module and is wrong for the
zipfile module. The release process disagrees with me here, but I'd
still call that wrong.

--

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



[issue7027] test_io.py: codecs.IncrementalDecoder is sometimes None

2009-10-01 Thread Antoine Pitrou

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

This is something that sometimes happens when running the test suite due
to module initialization or finalization oddities (I don't understand
the precise reasons myself). It isn't specific to test_io, I think.

--
versions: +Python 2.7, Python 3.1, Python 3.2

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



[issue7022] Doc update for io module

2009-10-01 Thread Antoine Pitrou

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

If you are requesting new `start` and `end` arguments to readinto(), the
way to do that today is to use a memoryview:

   # b is your bytearray, f your IO object
   m = memoryview(b)[start:end]
   f.readinto(m)

If you still want that feature, please open a separate bug (doc updates
and feature requests should be open separately) :-)

As for the first part of the report (RawIOBase.read), I'll look into it.

--

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



[issue7022] Doc update for io module

2009-10-01 Thread Antoine Pitrou

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

Actually, I'm not sure what is wrong with the current doc:

read(n=-1)¶
Read and return up to n bytes from the stream. As a convenience, if
n is unspecified or -1, readall() is called. Otherwise, only one system
call is ever made. An empty bytes object is returned on EOF; None is
returned if the object is set not to block and has no data to read.

(http://docs.python.org/dev/py3k/library/io.html)

--

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



[issue7022] Doc update for io module

2009-10-01 Thread Antoine Pitrou

Changes by Antoine Pitrou pit...@free.fr:


--
priority:  - normal
type: feature request - behavior
versions: +Python 2.6, Python 2.7

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



[issue7028] hex function should work with floats

2009-10-01 Thread Antoine Pitrou

Changes by Antoine Pitrou pit...@free.fr:


--
status: pending - closed

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



[issue1759169] clean up Solaris port and allow C99 extension modules

2009-10-01 Thread Antoine Pitrou

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

We're in the middle of a release so this will have to wait until we are
done.
Apart from that, is there a reason *not* to apply the patch?
(it only seems to affect Solaris after all, and Solaris users here seem
consensual that the patch should be applied)

--
nosy: +pitrou

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



[issue5949] IMAP4_SSL spin because of SSLSocket.suppress_ragged_eofs

2009-10-01 Thread Nick Coghlan

Nick Coghlan ncogh...@gmail.com added the comment:

Probably too late for 2.6.3 - assigning to Barry to check anyway.

--
assignee:  - barry
nosy: +barry, ncoghlan

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



[issue5949] IMAP4_SSL spin because of SSLSocket.suppress_ragged_eofs

2009-10-01 Thread Barry A. Warsaw

Barry A. Warsaw ba...@python.org added the comment:

I'm afraid so.  Please consider this for landing after 2.6.3 is released.

--
assignee: barry - 

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



[issue2986] difflib.SequenceMatcher not matching long sequences

2009-10-01 Thread Geoffrey Bache

Changes by Geoffrey Bache gjb1...@users.sourceforge.net:


--
nosy: +gjb1002

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



[issue7028] hex function should work with floats

2009-10-01 Thread Josh Cogliati

Josh Cogliati jjcogliati...@yahoo.com added the comment:

Thank you for telling me about that function.  I read the documentation
on hex() and never realized that there was a second instance method
float.hex().  

I am curious why the proper way to turn a number into hex is the following:
import types

def to_hex(a):
if type(a) == type(0.0):
return a.hex()
elif type(a) == type(1):
return hex(a)
else:
raise TypeError('Must be int or float')



As in why does neither int.hex() or hex(float) work?

Thank you.

--

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



[issue7028] hex function should work with floats

2009-10-01 Thread Mark Dickinson

Mark Dickinson dicki...@gmail.com added the comment:

Josh, see the issue 3008 discussion.

--

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



[issue6733] curses line wrap broken when mixing full- and half-width unicode characters

2009-10-01 Thread Ezio Melotti

Changes by Ezio Melotti ezio.melo...@gmail.com:


--
nosy: +ezio.melotti

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6733
___
___
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

2009-10-01 Thread Antoine Pitrou

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

Some notes about posting patches:
- you should post the patch alone, not in an archive
- generally you should post patches against the 2.7 trunk, we take care
of merging them to py3k ourselves (but in this case the difference
should be minimal anyway)
- I'm not sure it's ok to add legal boilerplate at the top of files, we
never do that usually (and if everyone did it would become unreadable).
Does your company require you to do so?

I'll look at the patch itself another day, I don't have the time right
now. But thanks for posting it!

--
nosy: +pitrou
versions: +Python 2.7 -Python 2.5, Python 2.6

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1625
___
___
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

2009-10-01 Thread David Bonner

David Bonner dbon...@vmware.com added the comment:

Thanks for the reply.

My company's legal dept. told me that we needed to put the boilerplate
into the files as part of releasing it under the apache license.  I used
a tarball because they also recommended including a full copy of the
license with the patch.

I'm reattaching just the patch to the bug now.  I'll check with legal
and see if they'd have a problem with removing the boilerplate.

--
keywords: +patch
Added file: http://bugs.python.org/file15014/py3k_bz2.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1625
___
___
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

2009-10-01 Thread R. David Murray

R. David Murray rdmur...@bitdance.com added the comment:

If the patch is substantial enough that legal boilerplate is even an
issue, then I'm pretty sure a contributor agreement will be required for
patch acceptance, at which point I think the boilerplate won't be
needed.  The Apache license is certainly acceptable.  I'm obviously not
the authority on this, though.  That would be van Lindburg.

--
nosy: +r.david.murray

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



[issue6992] PEP 314 inconsistency (authors/author/maintainer)

2009-10-01 Thread Dariusz Suchojad

Dariusz Suchojad ds...@users.sourceforge.net added the comment:

Hello,

funny the bug report should surface in the very same time I was looking
for a way to put 2 authors in the 'author' field :-)

[Antoine Pitrou (pitrou)]
 It is still unknown what use case the new author scheme would solve 
 that the old one doesn't

I believe I have such a use case. I'm in the middle of taking over a
Python package and I would like to give credits to the original author
who passed the development over to me. You see, *he is* the author of
95% of the code, it seems unfair to replace his name with my own. I
thought I could simply use a list of authors but the 'author' field
hasn't been designed for it.

[Antoine Pitrou (pitrou)]
 (does someone want the authorfield to be machine parsable?
 for what purpose?),

I'm just a regular user and when I see a field described as a 'meta' one
then I'm actually not wondering how any future tools will take 
advantage of it. It being a 'meta' I understand it's mostly meant to be
interpreted by machines which, funnily enough, seems to be just to the
contrary of what you say.

Of course one can put anything they wish into 'author', it could even 
be CSV or XML but that's not the point, the point is that some things
simply have two and more authors and inserting the mailing list isn't
exactly the same. Sure, I can simply put it all in an AUTHORS file but
again it's not the same, what would be the 'author' field for then?

If someone were to ask me then I'd say there should only be the 'author'
and 'contributor' fields which both have a clear meaning in open-source
world, accepting both a string and a list/tuple in format of 'Foo Bar
foo...@example.com' which makes for easy parsing and other fields
discussed here should be deprecated. No one likes type checking but at
least it would provide backwards-compat for the most widely used field.
Just my 2c.

author = 'Foo Bar foo...@example.com'
author = ['Foo Bar foo...@example.com', 'Baz Frobble
bazfrob...@example.com']

But hey, I still very much like distutils :-) and I understand all the 
backwards-compatibility concerns, but as a user I can clearly see a need
for /some/ way to specify more than one author without having to wonder
what will any not-yet-written tool do with this or any other meta field.

--
nosy: +dsuch

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



[issue7022] Doc update for io module

2009-10-01 Thread Pascal Chambon

Pascal Chambon chambon.pas...@gmail.com added the comment:

Thanks for the memoryview tip - I though I was up-to-date with python's
features but obviously I wans't ^^ (I searched through dict views but
that wasn't it...)
It should be exactly what's needed to replace these unnecessary
additional arguments.

As for the simple doc update, I was just pointing out the fact that EOF
is reached if read methods returns an empty bytes AND we didn't ask for
0 bytes. Just to avoid confusing people : file.read(0) will always
return an empty bytes, but it doesnt mean that we're at eof, contarrily
to what the doc currently says B-)

--

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



[issue7019] unmarshaling of artificial strings can produce funny longs.

2009-10-01 Thread Carl Friedrich Bolz

Carl Friedrich Bolz cfb...@gmx.de added the comment:

[...]
 How did you encounter this in the first place?

I was working on PyPy's marshaler, broke it in such a way that it was 
producing the bad input that I gave above. Then I fixed it, but didn't 
kill my .pyc files. So a few days later I got a long zero with the 
properties above in PyPy (which was quite annoying to debug). Then I 
figured that CPython likely has the same problem.

Thanks a lot for fixing this!

Carl Friedrich

--

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



[issue7022] Doc update for io module

2009-10-01 Thread Antoine Pitrou

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

Ok, I've improved the docs a bit in r75168. Thanks!

--
resolution:  - fixed
status: open - closed

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



[issue7020] regression in pywin32 build due to 2.6.3rc1

2009-10-01 Thread Sridhar Ratnakumar

Sridhar Ratnakumar sridh...@activestate.com added the comment:

Apparently Zope2 build fails for the same reason on 2.6.3rc1 (I'm 
attaching the log file)

  File c:\python26\lib\distutils\command\build_ext.py, line 633, in 
get_ext_fullpath

filename = self.get_ext_filename(modpath[-1])

  File c:\python26\lib\site-packages\setuptools-0.6c9-py2.6.egg
\setuptools\command\build_ext.py, line 85, in get_ext_filename

KeyError: 'cAccessControl'

--
Added file: http://bugs.python.org/file15015/zop2-build-failure.txt

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



[issue7020] regression in pywin32 build due to 2.6.3rc1

2009-10-01 Thread Tarek Ziadé

Tarek Ziadé ziade.ta...@gmail.com added the comment:

Its a setuptools bug.

That's because it uses Setuptools, which patches Distutils behavior, as
soon as you import setuptools.

Matthias Klose and I have fixed this flaw in debian, and it is also
fixed in Distribute, but not in Setuptools.

--

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



[issue7020] regression in pywin32 build due to 2.6.3rc1

2009-10-01 Thread Sridhar Ratnakumar

Sridhar Ratnakumar sridh...@activestate.com added the comment:

Tarek was referring to this bug - http://bitbucket.org/tarek/distribute/
issue/41/ - above.

--

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



[issue7029] Improve pybench

2009-10-01 Thread Kristján Valur Jónsson

New submission from Kristján Valur Jónsson krist...@ccpgames.com:

The attached patch contains suggested fixes to pybench.py:
1) add a processtime timer for windows
2) fix a bug in timer selection: timer wasn't put in 'self'
3) Collect 'gross' times for each round
4) show statistics for per-round sums, both for sum of adjusted times 
for each round, and 'gross' time per round.

The last one is important.  Traditionally, the focus would be on 
individual tests.  The series of individual timings for each test would 
be  examined, min and afverage found.  These minima and averages would 
then be summed up to get a total time.  These results are very noisy.  
In addition, the sum of individual minima is not a linear operator that 
has any meaning and is thus extremely noisy.

Looking at the minimum and average of the sum is a much stabler 
indication of total benchmark performance.

Another thing that I found when working with this, is that using 
calibration significantly adds to noise and can produce incorrect 
results.  It adds a level of non-linearity to the results that can 
appear very strange.  Typically the 'overhead' is so low that we should 
consider skipping the calibration.  The purpose of the benchmark must be 
to measure the performance of python in context.  The meaning of 
individual operations in isolation are pretty meaningless.  Although I 
didn't change the default number of calibration runs from 10, I would 
suggest documenting that it may be useful to turn it to 0 to increase 
predictability and get numbers indicative of real performance.

--
components: Demos and Tools
files: pybench.patch
keywords: patch
messages: 93416
nosy: krisvale
severity: normal
status: open
title: Improve pybench
type: behavior
versions: Python 2.7
Added file: http://bugs.python.org/file15016/pybench.patch

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



[issue7029] Improve pybench

2009-10-01 Thread Marc-Andre Lemburg

Marc-Andre Lemburg m...@egenix.com added the comment:

Kristján Valur Jónsson wrote:


Thanks for the patch. Here's a quick review (a bit terse, but
hope you don't mind)...

 The attached patch contains suggested fixes to pybench.py:
 1) add a processtime timer for windows

I'm not sure why you added this: the systimes.py module
already has a ctypes wrapper for kernel32.GetProcessTimes() ?!

All you have to do is use this command line option to
enable it: --timer systimes.processtime

 2) fix a bug in timer selection: timer wasn't put in 'self'

Thanks for spotting this one.

 3) Collect 'gross' times for each round

I'm assuming that gross = test time + overhead. Is that right ?

I like the idea, but not the implementation :-) Don't like my own
pybench statistics implementation much either. I plan to
rewrite it for Python 2.7.

 4) show statistics for per-round sums, both for sum of adjusted times 
 for each round, and 'gross' time per round.
 
 The last one is important.  Traditionally, the focus would be on 
 individual tests.  The series of individual timings for each test would 
 be  examined, min and afverage found.  These minima and averages would 
 then be summed up to get a total time.  These results are very noisy.  
 In addition, the sum of individual minima is not a linear operator that 
 has any meaning and is thus extremely noisy.
 
 Looking at the minimum and average of the sum is a much stabler 
 indication of total benchmark performance.

I agree. For the minimum times, the minimum over all tests
should be used.

 Another thing that I found when working with this, is that using 
 calibration significantly adds to noise and can produce incorrect 
 results.  It adds a level of non-linearity to the results that can 
 appear very strange.  Typically the 'overhead' is so low that we should 
 consider skipping the calibration.  The purpose of the benchmark must be 
 to measure the performance of python in context.  The meaning of 
 individual operations in isolation are pretty meaningless.  Although I 
 didn't change the default number of calibration runs from 10, I would 
 suggest documenting that it may be useful to turn it to 0 to increase 
 predictability and get numbers indicative of real performance.

The idea behind the calibration is to hide away the overhead
of setting up the test. You're right, that nowadays the tests
run so fast, that the calibration causes more noise than do
good.

This is due to the fact that the number of iteration rounds
and test packs were chosen in 2006. Back then, both Python
and the CPUs were a lot slower.

OTOH, timers have not gotten a lot more accurate.

As a result, the measurements of pybench on todays machines
have far more noise than they did in 2006.

The only way to resolve this is to adjust all tests - something
which I also plan to do in time for Python 2.7.

--
nosy: +lemburg

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



[issue6958] Add Python command line flags to configure logging

2009-10-01 Thread Thomas Heller

Thomas Heller thel...@ctypes.org added the comment:

I retract this request.  It seems the idea is not liked or a solution is
not easy.

(The solution I now use is to start Python from a batch file that parses
some command line flags itself, sets environment variables, and my
sitecustomize.py file configures logging).

Thanks for the comments.

--
resolution:  - invalid
status: open - closed

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



[issue7030] Update version{added, changed} entries in py3k unittest docs

2009-10-01 Thread Mark Dickinson

New submission from Mark Dickinson dicki...@gmail.com:

The py3k unittest docs have a few instances of:

  .. versionadded:: 2.7

and

  .. versionchanged:: 2.7

Presumably all of these should be either 3.1 or 3.2.  I'd fix them, but 
I think Michael has a much better chance of getting all the version 
numbers right. :)

--
assignee: michael.foord
components: Documentation
messages: 93419
nosy: mark.dickinson, michael.foord
severity: normal
status: open
title: Update version{added,changed} entries in py3k unittest docs
versions: Python 3.1, Python 3.2

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



[issue6972] zipfile.ZipFile overwrites files outside destination path

2009-10-01 Thread Thomas W. Barr

Thomas W. Barr t...@rice.edu added the comment:

Even if we can't fix things for this release, presumably it's not too
late to fix things for 2.7, right?

Yes, there certainly are cases where you might want to have creative
usage of symlinks and stored paths to allow overwriting existing files,
and placing files outside of the extraction path, but that doesn't seem
like the default case to me. Would it be a decent compromise to add a
extract_under_path=True default option to extract() and extractall() for
2.7?

--

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



[issue7031] add assertIsInstance

2009-10-01 Thread Georg Brandl

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


--
assignee: michael.foord
components: Library (Lib)
files: assertIsInstance.diff
keywords: easy, needs review, patch, patch
nosy: georg.brandl, michael.foord
priority: normal
severity: normal
status: open
title: add assertIsInstance
type: feature request
versions: Python 2.7, Python 3.2
Added file: http://bugs.python.org/file15017/assertIsInstance.diff

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



[issue7031] add assertIsInstance

2009-10-01 Thread Georg Brandl

New submission from Georg Brandl ge...@python.org:

Change negated method name to assertNotIsInstance.

--
Added file: http://bugs.python.org/file15018/assertIsInstance2.diff

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



[issue7029] Improve pybench

2009-10-01 Thread Kristján Valur Jónsson

Kristján Valur Jónsson krist...@ccpgames.com added the comment:

Hello Marc-Andre.
1) yes, this is nonsense.  I thought that systimes was some archaeic 
module that had been discontinued, since I didn't find it in the 
standard modules (where time is).  I didn't realize that it was a 
special helper sibling-module to pybench.

3) 'gross', yes, as opposed to 'net'.  The total time of each round.  
For timers which don't update frequently, such as GetProcessTimes(), 
summing up many small contributions compounds the error (in this case, 
+- 10ms per measurement).  Can you be more specific about what it is 
that you don't like?

About the calibration:  I ran into problems where I was tuning the 
memory allocator.  I put HeapAlloc in place of malloc() and found a 
consistent 10% performance degradation, even when using the LFH.  I was 
puzzled by this until I turned off calibration and the effect went away.

The calibration technique is not a bad idea, but it would be helpful, 
when one is comparing runs, to be able to keep the calibration times of 
the previous run, so as not to introduce a random element into the 
comparison.  Alternatively, explain that when doing successive tests, 
the lowest variance in the result is to be expeced with -C 0.

So, how can I improve this?

--

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



[issue7031] add assertIsInstance

2009-10-01 Thread Georg Brandl

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

Committed in r75180.

--
assignee: michael.foord - georg.brandl
resolution:  - accepted
status: open - closed

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



[issue7032] Make assertMultilineEqual default for unicode string comparison in

2009-10-01 Thread Michael Foord

New submission from Michael Foord mich...@voidspace.org.uk:

unittest.TestCase.assertEqual uses the new type equality functions for
comparing containers. 

In Python 2.7 assertMultilineEqual should be the default comparison
method for unicode strings and in Python 3.2 for comparing strings.

assertMultilineEqual should only use difflib for showing differences for
strings above a certain length. (For short strings the extra output is
actually more confusing than helpful.)

--
assignee: michael.foord
messages: 93424
nosy: michael.foord
severity: normal
status: open
title: Make assertMultilineEqual default for unicode string comparison in
versions: Python 2.7, Python 3.2

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



[issue6958] Add Python command line flags to configure logging

2009-10-01 Thread Vinay Sajip

Vinay Sajip vinay_sa...@yahoo.co.uk added the comment:

Ok. I think it's a reasonable request, but I can see that implementing
it naively without some further thought will lead to (justifiable)
complaints from some users that the behaviour is contradictory or
unintuitive in terms of which configuration wins in the event of
ambiguity.

--

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



[issue6972] zipfile.ZipFile overwrites files outside destination path

2009-10-01 Thread Gregory P. Smith

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

yes this will be fixed in 2.7/3.2.

as for creative uses where someone might want the out of supplied path 
overwriting behavior?  those people are insane and should be made to jump 
through extra hoops to get it. ;)

--

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



[issue6972] zipfile.ZipFile overwrites files outside destination path

2009-10-01 Thread Gregory P. Smith

Changes by Gregory P. Smith g...@krypto.org:


--
versions: +Python 2.7, Python 3.2

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



[issue7028] hex function should work with floats

2009-10-01 Thread Josh Cogliati

Josh Cogliati jjcogliati...@yahoo.com added the comment:

Okay.  Thank you. I looked at the issue 3008 discussion.  I see why
hex() was not changed.  Can int.hex() and int.fromhex() be added for
symmetry?  I am willing to work on the patch, it just might be a bit. 
As well, either way, it might be useful for the documentation for hex()
to mention float.hex().  

Thanks.

--

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