[issue2056] install command rejects --compiler option

2008-02-10 Thread Martin v. Löwis

Changes by Martin v. Löwis:


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

__
Tracker <[EMAIL PROTECTED]>

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



[issue1762] Inheriting from ABCs makes classes slower.

2008-02-10 Thread Jeffrey Yasskin

Jeffrey Yasskin added the comment:

Right. Decimal was just the place I noticed the problem first. Now it
affects Rational more, but it's really a problem with ABCs in general,
not specific concrete classes.

--
title: Inheriting from ABC slows Decimal down. -> Inheriting from ABCs makes 
classes slower.

__
Tracker <[EMAIL PROTECTED]>

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



[issue1736] Three bugs of FCICreate (PC/_msi.c)

2008-02-10 Thread Hirokazu Yamamoto

Hirokazu Yamamoto added the comment:

Refactored a little. More clean diff.

Added file: http://bugs.python.org/file9398/_msi.patch

__
Tracker <[EMAIL PROTECTED]>

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



[issue2058] reduce tarfile memory footprint

2008-02-10 Thread Lars Gustäbel

New submission from Lars Gustäbel:

tarfile.py wastes lots of memory resources. The memory consumption does
not depend on the size of an archive but on the numbers of members in it.
The attached patch reduces memory usage by about 60% and consists of two
independent strategies (each with about 30% reduction):

1. Add __slots__ to the TarInfo class. This was proposed in issue1540385
a while ago but rejected due to backward-compatibility issues.

2. Remove the undocumented buf attribute of the TarInfo class. buf
stores the original 512-byte header block read from the archive. This
was introduced in r45954 and is rather useless except for GNUTYPE_SPARSE
processing. This might as well be a candidate for backporting to 2.6.

--
assignee: lars.gustaebel
components: Library (Lib)
files: tarfile-memory.diff
keywords: patch
messages: 62248
nosy: lars.gustaebel
priority: normal
severity: normal
status: open
title: reduce tarfile memory footprint
type: resource usage
versions: Python 3.0
Added file: http://bugs.python.org/file9399/tarfile-memory.diff

__
Tracker <[EMAIL PROTECTED]>

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



[issue1682] Move Demo/classes/Rat.py to Lib/rational.py and fix it up.

2008-02-10 Thread Mark Dickinson

Mark Dickinson added the comment:

staticmethod substituted for classmethod in r60712.

I'm not sure I like the idea of names Rational and Fraction;  the two 
classes numbers.Rational and rational.Rational are quite different beasts, 
and using two almost-synonyms for their names seems like a bad idea.
Is there some more descriptive name for numbers.Rational that might give a 
hint of its ABC-ness?

__
Tracker <[EMAIL PROTECTED]>

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



[issue1682] Move Demo/classes/Rat.py to Lib/rational.py and fix it up.

2008-02-10 Thread Mark Dickinson

Mark Dickinson added the comment:

We still need to sort out the trim/approximate/convergents decisions.

Currently, we have:

  from_continued_fraction
  to_continued_fraction
  approximate (what we've been calling trim: limit the denominator)

At this point I'm not sure how much I care about what is or is not 
included, but here are a few thoughts:

(1) if to_continued_fraction is kept it should be a generator instead of 
returning a list.
(2) from_continued_fraction would be better replaced by convergents, 
since a user is just as (more?) likely to be interested in the whole 
sequence of convergents than just the final convergent.  If 
from_continued_fraction is kept in addition to convergents then it 
should work forwards instead of backwards, so that it doesn't need to 
use reversed (and hence works on the output of to_continued_fraction).
(3) approximate needs finishing up and possibly renaming to trim.

Can we remove {from,to}_continued_fraction and just leave trim?

__
Tracker <[EMAIL PROTECTED]>

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



[issue2059] OptionMenu class is defined both in Tkinter and Tix

2008-02-10 Thread Ilya Sandler

New submission from Ilya Sandler:

Given that Tix imports all names from Tkinter this is likely to result
in confusion.

E.g.

>>> from Tix import *
>>> print Button
Tkinter.Button
>>> print OptionMenu
Tix.OptionMenu

To get to Tkinter's OptionMenu, one needs to do something like

import Tkinter
Tkinter.OptionMenu

--
components: Library (Lib)
messages: 62250
nosy: isandler
severity: normal
status: open
title: OptionMenu class is defined both in Tkinter and Tix
type: behavior
versions: Python 2.5

__
Tracker <[EMAIL PROTECTED]>

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



[issue1682] Move Demo/classes/Rat.py to Lib/rational.py and fix it up.

2008-02-10 Thread Guido van Rossum

Guido van Rossum added the comment:

> I'm not sure I like the idea of names Rational and Fraction;  the two
> classes numbers.Rational and rational.Rational are quite different beasts,
> and using two almost-synonyms for their names seems like a bad idea.
> Is there some more descriptive name for numbers.Rational that might give a
> hint of its ABC-ness?

I'd rather not change the Rational ABC's name -- it is the
mathematically accepted term (Complex, Real, Rational, Integer, and
then natural numbers I believe). I'd rather not add a suffix or prefix
like A or Abc to the ABCs either. To be honest, we have a rather
hodge-podge of mappings from numeric ABCs to concrete implementations:
Complex/complex, Real/float, Rational/?, Integer/int. I think that,
given that fraction is the *common* name for rationals (see
wikipedia), it fits relatively well. We can introduce fractions
without ever mentioning the ABCs and users will immediately know what
they mean even if they haven't got more than grade school math.

__
Tracker <[EMAIL PROTECTED]>

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



[issue1682] Move Demo/classes/Rat.py to Lib/rational.py and fix it up.

2008-02-10 Thread Mark Dickinson

Mark Dickinson added the comment:

Fair enough.  Should it be fractions.Fraction or fraction.Fraction?

__
Tracker <[EMAIL PROTECTED]>

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



[issue1682] Move Demo/classes/Rat.py to Lib/rational.py and fix it up.

2008-02-10 Thread Guido van Rossum

Guido van Rossum added the comment:

> Fair enough.  Should it be fractions.Fraction or fraction.Fraction?

I think "from fractions import Fraction" is linguistically more
correct -- the concept is always mentioned in plural, but a fractional
number is of course singular.  We also have "numbers".

__
Tracker <[EMAIL PROTECTED]>

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



[issue2059] OptionMenu class is defined both in Tkinter and Tix

2008-02-10 Thread Martin v. Löwis

Martin v. Löwis added the comment:

What is the issue that you are reporting here? There is nothing wrong
with two classes having the same name, AFAICT. That's what modules are for.

--
nosy: +loewis

__
Tracker <[EMAIL PROTECTED]>

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



[issue1682] Move Demo/classes/Rat.py to Lib/rational.py and fix it up.

2008-02-10 Thread Guido van Rossum

Guido van Rossum added the comment:

Go for it!

__
Tracker <[EMAIL PROTECTED]>

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



[issue1682] Move Demo/classes/Rat.py to Lib/rational.py and fix it up.

2008-02-10 Thread Mark Dickinson

Mark Dickinson added the comment:

Any reason not to make the name change?  Is further discussion/time 
required, or can we go ahead and rename Rational to Fraction and 
rational.py to fractions.py?  It seems like everybody's happy with the 
idea.

I note that the name change affects Lib/test/test_builtin.py as well as 
Doc/whatsnew/2.6.rst.  Any other non-obvious places that I've missed?

__
Tracker <[EMAIL PROTECTED]>

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



[issue1581906] test_sqlite fails on OSX G5 arch if test_ctypes is run

2008-02-10 Thread Skip Montanaro

Skip Montanaro added the comment:

I'm reopening this.  I am seeing the same behavior now on my
MacBook Pro running Mac OS X 10.5.1.  Looking at the crash report
in my ~/Library/Logs/CrashReporter directory I see both /usr/lib
and /opt/local/lib versions of libsqlite3:

 0x1188000 -  0x11defef +libsqlite3.0.dylib ??? (???)
/opt/local/lib/libsqlite3.0.dylib
0x911f6000 - 0x9127dff7  libsqlite3.0.dylib ??? (???)
<273efcb717e89c21207c851d7d33fda4> /usr/lib/libsqlite3.0.dylib

I was able to work around this by disabling the MacPorts version of
sqlite3.  Others might not be so lucky.  I don't see any references
to sqlite in the ctypes test code.  Must be an indirect reference.

Skip

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

_
Tracker <[EMAIL PROTECTED]>

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



[issue1682] Move Demo/classes/Rat.py to Lib/fractions.py and fix it up.

2008-02-10 Thread Mark Dickinson

Mark Dickinson added the comment:

Name change in r60721.

--
title: Move Demo/classes/Rat.py to Lib/rational.py and fix it up. -> Move 
Demo/classes/Rat.py to Lib/fractions.py and fix it up.

__
Tracker <[EMAIL PROTECTED]>

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



[issue2060] python2.6 -3 gives "warning: callable() not supported in 3.x" on startup

2008-02-10 Thread Benjamin Peterson

Benjamin Peterson added the comment:

On my Mac, I also get about 30 warnings about dict.has_key. By the way,
what are you supposed you use in py3k instead of callable?

--
nosy: +gutworth

__
Tracker <[EMAIL PROTECTED]>

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



[issue2060] python2.6 -3 gives "warning: callable() not supported in 3.x" on startup

2008-02-10 Thread Eduardo Padoan

New submission from Eduardo Padoan:

Running python2.6 with the -3 option, you get 6 warnings about callable():

[EMAIL PROTECTED]:~/dev/svn/python2.6$ python2.6 -3
warning: callable() not supported in 3.x
warning: callable() not supported in 3.x
warning: callable() not supported in 3.x
warning: callable() not supported in 3.x
warning: callable() not supported in 3.x
warning: callable() not supported in 3.x
Python 2.6a0 (trunk:60717, Feb 10 2008, 19:53:48) 
[GCC 4.2.3 (Ubuntu 4.2.3-1ubuntu2)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>

--
components: Interpreter Core
messages: 62260
nosy: eopadoan
severity: minor
status: open
title: python2.6 -3 gives "warning: callable() not supported in 3.x" on startup
versions: Python 2.6

__
Tracker <[EMAIL PROTECTED]>

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



[issue2060] python2.6 -3 gives "warning: callable() not supported in 3.x" on startup

2008-02-10 Thread Eduardo Padoan

Eduardo Padoan added the comment:

> By the way, what are you supposed you use in py3k instead of callable?

Either "try: foo(); except TypeError: ...", or "if hasattr(foo,
'__call__'): foo()".

__
Tracker <[EMAIL PROTECTED]>

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



[issue2061] IDLE - autocompletion to support alternate patch separators

2008-02-10 Thread Tal Einat

New submission from Tal Einat:

This patch makes the auto-completion of file names support possible
alternate separator characters (e.g. '/' in windows).

--
components: IDLE
files: IDLE_AutoComplete_path_separators.080211.patch
messages: 62263
nosy: kbk, taleinat
severity: minor
status: open
title: IDLE - autocompletion to support alternate patch separators
type: rfe
versions: Python 2.6
Added file: 
http://bugs.python.org/file9400/IDLE_AutoComplete_path_separators.080211.patch

__
Tracker <[EMAIL PROTECTED]>

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



[issue2021] Turn NamedTemporaryFile into a context manager

2008-02-10 Thread Alexander Belopolsky

Alexander Belopolsky added the comment:

Nick's comment made me think why NamedTemporaryFile can't simply 
subclass file and get properly working context manager's methods for 
free.

It turned out that although file is subclassable, in its present form, 
it does not allow NamedTemporaryFile implementation for the following 
reasons:

1. os.fdopen cannot create a subclass of file.

2. file.__exit__ does not call subclass' close method.

The attached patch fixes both issues and reimplements NamedTemporaryFile.

I understand that adding new functionality to file objects should be 
brought up on python-dev, but I would like to hear comments from the 
"nosy list" first.

The patch is proof-of-concept quality at the moment and may not work 
non-posix platforms.

Added file: http://bugs.python.org/file9401/subclass-file.diff

__
Tracker <[EMAIL PROTECTED]>

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



[issue2062] IDLE - autocompletion logic optimization

2008-02-10 Thread Tal Einat

New submission from Tal Einat:

Improve the code in AutoCompleteWindow._complete_string to be more
efficient.

(this is to be followed up by a more extensive patch, which builds on
this change to support case-insensitive completion)

--
components: IDLE
files: IDLE_AutoComplete_complete_string_optimization.080211.patch
messages: 62265
nosy: kbk, taleinat
severity: minor
status: open
title: IDLE - autocompletion logic optimization
type: behavior
versions: Python 2.6
Added file: 
http://bugs.python.org/file9402/IDLE_AutoComplete_complete_string_optimization.080211.patch

__
Tracker <[EMAIL PROTECTED]>

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



[issue2015] Possible optimisations in kwargs handling

2008-02-10 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Amaury, you may take a look at the patch in issue #1819.
Also, dict lookups have a big overhead compared to raw pointer compares,
I'm not sure naively converting all kwargs handling to dict lookups
would make things faster.

--
nosy: +pitrou

__
Tracker <[EMAIL PROTECTED]>

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



[issue2062] IDLE - autocompletion logic optimization

2008-02-10 Thread Tal Einat

Tal Einat added the comment:

Found two more instances in the code where a similar improvement can be
made. This (second) version of the patch is more consistent, please use
it instead of the initial version.

Added file: 
http://bugs.python.org/file9403/IDLE_AutoComplete_complete_string_optimization.080211.patch

__
Tracker <[EMAIL PROTECTED]>

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



[issue2049] IDLE - Restart Shell & Run Module

2008-02-10 Thread Kurt B. Kaiser

Kurt B. Kaiser added the comment:

I don't want to complicate the IDLE interface and confuse the users 
with an additional decision (or a chording keypress for the normal 
state) for this very special case (messing up a connection to a 
robot).  One of the main features of using the IDLE subprocess is a 
clean restart and reload of all code being run.

An alternate approach would be to have a config-main item which if 
set (and not settable in the Options Dialog!) would skip the Shell 
restart when running code with F5.  The user could then hit Ctrl-F6
when he did want a restart.

--
resolution:  -> rejected
status: open -> closed

__
Tracker <[EMAIL PROTECTED]>

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



[issue2062] IDLE - autocompletion logic optimization

2008-02-10 Thread Kurt B. Kaiser

Changes by Kurt B. Kaiser:


Removed file: 
http://bugs.python.org/file9402/IDLE_AutoComplete_complete_string_optimization.080211.patch

__
Tracker <[EMAIL PROTECTED]>

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



[issue2062] IDLE - autocompletion logic optimization

2008-02-10 Thread Kurt B. Kaiser

Kurt B. Kaiser added the comment:

I would greatly appreciate it if you would slow down and test your 
patches and use them for an extended period of time (preferably with 
some other people trying them) before submitting them.  It's quite 
aggravating to start working on one, and even have it checked in, only 
to have to start over again.  It doubles the work and makes me 
unwilling to address your patches.  How much time have you given the 
second version?

--
assignee:  -> kbk

__
Tracker <[EMAIL PROTECTED]>

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



[issue2053] IDLE - standardize dialogs

2008-02-10 Thread Kurt B. Kaiser

Kurt B. Kaiser added the comment:

I would greatly appreciate it if you would slow down and test your 
patches and use them for an extended period of time (preferably with 
some other people trying them) before submitting them.  It's quite 
aggravating to start working on one, and even have it checked in, only 
to have to start over again.  It doubles the work and makes me 
unwilling to address your patches.  How much time have you given the 
second version?  Deleting both patches, please provide a combination 
patch 
after you've tested it and thought about it for a few days.

__
Tracker <[EMAIL PROTECTED]>

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



[issue2053] IDLE - standardize dialogs

2008-02-10 Thread Kurt B. Kaiser

Changes by Kurt B. Kaiser:


Removed file: 
http://bugs.python.org/file9395/IDLE_standardize_dialogs.080209.patch

__
Tracker <[EMAIL PROTECTED]>

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



[issue2053] IDLE - standardize dialogs

2008-02-10 Thread Kurt B. Kaiser

Changes by Kurt B. Kaiser:


Removed file: 
http://bugs.python.org/file9396/IDLE_standardize_dialogs.080209_2.patch

__
Tracker <[EMAIL PROTECTED]>

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



[issue1682] Move Demo/classes/Rat.py to Lib/fractions.py and fix it up.

2008-02-10 Thread Mark Dickinson

Mark Dickinson added the comment:

I just checked in another very minor change in r60723.  The repr of a 
Fraction now looks like Fraction(1, 2) instead of Fraction(1,2).  Let me 
know if this change is more controversial than I think it is.

__
Tracker <[EMAIL PROTECTED]>

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



[issue2047] shutil.destinsrc returns wrong result when source path matches beginning of destination path

2008-02-10 Thread André Fritzsche

André Fritzsche added the comment:

Raghuram, you've been too fast ;-)

Your test matches the problem. I don't know if it happens on Linux, but
on my Win32 Installation the test 'test_destinsrc_2' fails with an 
AssertionError 'destinsrc() wrongly concluded that dst
(@test\srcdir.new) is in src (@test\srcdir)'.

Using the submitted patch everything comes out with 'Ok'.

I've appended the failing test output.

Added file: http://bugs.python.org/file9404/test_shutil_orig.txt

__
Tracker <[EMAIL PROTECTED]>

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



[issue2039] Pymalloc patch for int and float objects

2008-02-10 Thread Christian Heimes

Christian Heimes added the comment:

The new patch adds a small free list with 80 elements each using a LIFO
implemented as an array of fixed size.

Added file: http://bugs.python.org/file9405/freelist2.patch

__
Tracker <[EMAIL PROTECTED]>

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



[issue2063] os.times() utime and stime exchanged on windows

2008-02-10 Thread Kuang-che Wu

New submission from Kuang-che Wu:

According to document, os.times()[0] is process user time, [1] is system
time. However this two value was implemented exchanged on windows.

Python all versions have this issue. Attached patch is for trunk.

--
components: Extension Modules, Windows
files: diff-win-os-times.txt
messages: 62274
nosy: kcwu
severity: normal
status: open
title: os.times() utime and stime exchanged on windows
type: behavior
versions: Python 2.5, Python 2.6, Python 3.0
Added file: http://bugs.python.org/file9406/diff-win-os-times.txt

__
Tracker <[EMAIL PROTECTED]>

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