[issue4863] deprecate/delete distutils.mwerkscompiler...

2009-01-09 Thread Tarek Ziadé

Changes by Tarek Ziadé :


--
assignee:  -> tarek
nosy: +tarek

___
Python tracker 

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



[issue4889] difflib

2009-01-09 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc  added the comment:

Can you be more precise?
I tried to reproduce your problem, but I only get added/deleted chunks,
nothing in yellow.

Please include a script that shows what you did, and the result you
expected.

--
nosy: +amaury.forgeotdarc

___
Python tracker 

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



[issue4566] 2.6.1 breaks many applications that embed Python on Windows

2009-01-09 Thread Juha Rantanen

Juha Rantanen  added the comment:

We encountered a problem that Windows installer created with 2.5.2 could
not be installed with 2.6.1 as executing the post-installer script
fails. More details about the reason can be found from
http://code.google.com/p/robotframework/issues/detail?id=196. Is the
problem related to this issue or should I create new issue about that. I
can also provide simple project that could be used to test this out.

--
nosy: +rantanen

___
Python tracker 

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



[issue4890] handling empty text search pattern in tkinter

2009-01-09 Thread Matthias Kievernagel

New submission from Matthias Kievernagel :

Split this from issue 1581476 as suggested
 by Guilherme Polo (gpolo).

>Matthias: your issue about the pattern should be placed in a 
>different
>issue.

Quote of my original report:
(This is about the search function of the Text class in Tkinter.
 An IndexError is raised when pattern == '')
...
>In addition I get an IndexError, if I delete the
>last character of the search string.
>Does Tk allow calling search with an empty pattern?

>Tkinter could handle this (with a correct result)
>with the following change in Tkinter.py / Text.search():

>if pattern[0] == '-': args.append('--')
>->
>if pattern and pattern[0] == '-': args.append('--')

A further remark from Guilherme Polo (gpolo):

>For the suggestion about fixing the search method regarding the 
>pattern:
>the fix is almost fine, but we need to disallow None as a pattern.

I do not understand that remark. Is it to avoid the TclError?
Or because the exception changes (IndexError -> TclError)?
What do you want to do when pattern == None? Raise ValueError
or IndexError (as before)?

Appended slightly simplified demo program from issue 1581476
and a patch against trunk r68445.

Cheers,
Matthias Kievernagel
mkiever/at/web/dot/de

--
components: Tkinter
files: text_search_pattern.py
messages: 79459
nosy: mkiever
severity: normal
status: open
title: handling empty text search pattern in tkinter
versions: Python 2.4, Python 2.5, Python 2.6, Python 2.7
Added file: http://bugs.python.org/file12660/text_search_pattern.py

___
Python tracker 

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



[issue4890] handling empty text search pattern in tkinter

2009-01-09 Thread Matthias Kievernagel

Changes by Matthias Kievernagel :


--
keywords: +patch
Added file: http://bugs.python.org/file12661/text_search_pattern.patch

___
Python tracker 

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



[issue1581476] Text search gives bad count if called from variable trace

2009-01-09 Thread Matthias Kievernagel

Matthias Kievernagel  added the comment:

>Matthias: your issue about the pattern should be placed in a 
>different
>issue.

Done as Issue4890.
Appended a simplified copy of the demo program
and a patch there. I do not understand your remark
about None though (see new issue).

Cheers,
Matthias Kievernagel
mkiever/at/web/dot/de

___
Python tracker 

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



[issue1696199] Add collections.counts()

2009-01-09 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

Attaching an updated patch for Py2.7.

* Kept OP's simple constructor call but renamed it from counts() to
Counter():
 item_counts = Counter('acabbacba')
* Followed Guido's advice and avoided subclassing from defaultdict(). 
Instead, subclassed from dict, keeping its familiar API.
* Avoided KeyError issue by defining __missing__().
* Added most_common() method to address a principal use case --
patterned after Smalltalk's sortedByCount() method.
* Added elements() method requested by Alex Martelli -- patterned after
C++, Smalltalk, and Knuth's examples.
* Made necessary subclass overrides to dict methods: __repr__, update,
fromkeys, and copy.
* Wrote docstrings, doctests, and motivating examples.
* Verified that instances are copyable, deepcopyable, and picklable.

Working on docs and unittests.

Nice example (most common words in a text file):

>>> import re
>>> words = re.findall('\w+', open('hamlet.txt').read().lower())
>>> Counter(words).most_common(10)
[('the', 1143), ('and', 966), ('to', 762), ('of', 669), ('i', 631),
('you', 554), ('a', 546), ('my', 514), ('hamlet', 471), ('in', 451)]

--
keywords: +patch
stage:  -> test needed
type:  -> feature request
versions: +Python 2.7, Python 3.1 -Python 2.6
Added file: http://bugs.python.org/file12662/counter.diff

___
Python tracker 

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



[issue4891] formatwarning function signature change breaks code

2009-01-09 Thread Glenn Linderman

New submission from Glenn Linderman :

External code that temporarily replaces warnings.formatwarning, a
technique used in IDLE and worked around (see issue 4043), is broken by
the addition of the optional parameter lineno to the formatwarning function.

While normal calls to functions can be "compatibly" extended with
additional optional parameters, that is not the case when the function
is substituted for, by matching its signature... if the signature is
extended, the code breaks on a Python upgrade, because the substituted
function doesn't know about the new parameter, and has fewer than are
being supplied by calls to the function.

Whether this is good, bad, documented, or appropriate, I don't know, but
it broke CherryPy 3.1.1 when running on Python 2.6, because of the new,
optional, lineno=None parameter to warnings.formatwarning



Not sure I have type and components right.  I'm a newbie.

This problem probably also applies to 3.0, but I don't have the
environment to test it there at present.

I first described this problem on python-dev and the suggestion was made
to put it here (remainder of this comment is a quote):

This formatwarning compatibility problem between 2.5 and 2.6 is a bug.
Please file a new issue for this.

-- Amaury Forgeot d'Arc

--
components: Interpreter Core
messages: 79462
nosy: v+python
severity: normal
status: open
title: formatwarning function signature change breaks code
type: crash
versions: Python 2.6

___
Python tracker 

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



[issue4891] formatwarning function signature change breaks code

2009-01-09 Thread Glenn Linderman

Glenn Linderman  added the comment:

For reference, the issue on the CherryPy tracker is #891 (amazing
numerical coincidence 891 there and 4891 here).

___
Python tracker 

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



[issue4892] Sending Connection-objects over multiprocessing connections fails

2009-01-09 Thread Henrik Gustafsson

New submission from Henrik Gustafsson :

It seems the old pyprocessing (http://pyprocessing.berlios.de/) can do 
some things that the new multiprocessing package can not; 
sending/receiving connection objects for one.

This is a quite handy functionality, so it would be nice if it were 
reintroduced.

Also, the error message isn't very helpful.

Failing test below.


$ python2.6 pipetest2.py 
asdf
Traceback (most recent call last):
  File "a.py", line 10, in 
print c1.recv()
TypeError: Required argument 'handle' (pos 1) not found

$ PYTHONPATH=processing-0.52-py2.5-macosx-10.5-i386.egg python2.5 
pipetest2.py 
asdf
Connection(handle=5)

$ PYTHONPATH=multiprocessing-2.6.0.2-py2.5-macosx-10.5-i386.egg 
python2.5 pipetest2.py 
asdf
Traceback (most recent call last):
  File "pipetest2.py", line 10, in 
print c1.recv()
TypeError: function takes at least 1 argument (0 given)

$ uname -a
Darwin midori.local 9.6.0 Darwin Kernel Version 9.6.0: Mon Nov 24 
17:37:00 PST 2008; root:xnu-1228.9.59~1/RELEASE_I386 i386

--
components: Library (Lib), Macintosh
messages: 79464
nosy: gsson
severity: normal
status: open
title: Sending Connection-objects over multiprocessing connections fails
type: behavior
versions: Python 2.6

___
Python tracker 

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



[issue4892] Sending Connection-objects over multiprocessing connections fails

2009-01-09 Thread Henrik Gustafsson

Henrik Gustafsson  added the comment:

$ cat pipetest2.py 
try:
from multiprocessing import Pipe
except ImportError:
from processing import Pipe

c1, c2 = Pipe(duplex=False)
c2.send('asdf')
print c1.recv()
c2.send(c1)
print c1.recv()

___
Python tracker 

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



[issue4893] Use separate thread support code under MS Windows CE

2009-01-09 Thread Ulrich Eckhardt

New submission from Ulrich Eckhardt :

There is a separate file thread_wince.h for use with CE, but that is
firstly not used due to a missing macro definition and secondly it
doesn't compile as it is. The attached patch defines WINCE_THREADS for
CE and makes the file at least compile.

Note that this doesn't touch any working code, because the CE port is
currently broken anyway. Further, the changes compile, but since there
are various other bits and pieces still missing, it is impossible to
test it yet.

--
components: Interpreter Core
files: python-2.7-wince-threads.0.patch
keywords: patch
messages: 79466
nosy: eckhardt
severity: normal
status: open
title: Use separate thread support code under MS Windows CE
versions: Python 2.7
Added file: http://bugs.python.org/file12663/python-2.7-wince-threads.0.patch

___
Python tracker 

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



[issue1696199] Add collections.counts()

2009-01-09 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

Added a few more in-module tests.

Added file: http://bugs.python.org/file12664/counter2.diff

___
Python tracker 

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



[issue1696199] Add collections.counts()

2009-01-09 Thread Raymond Hettinger

Changes by Raymond Hettinger :


Removed file: http://bugs.python.org/file12662/counter.diff

___
Python tracker 

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



[issue1696199] Add collections.counts()

2009-01-09 Thread Raymond Hettinger

Changes by Raymond Hettinger :


Added file: http://bugs.python.org/file12665/counter3.diff

___
Python tracker 

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



[issue1696199] Add collections.counts()

2009-01-09 Thread Raymond Hettinger

Changes by Raymond Hettinger :


Removed file: http://bugs.python.org/file12664/counter2.diff

___
Python tracker 

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



[issue4894] documentaion doesn't include parameter in urllib.request.HTTPRedirectHandler.redirect_request

2009-01-09 Thread mroman

New submission from mroman :

documentaion doesn't include parameter in 
urllib.request.HTTPRedirectHandler.redirect_request

http://docs.python.org/3.0/library/urllib.request.html#urllib.request.HT
TPRedirectHandler.redirect_request

says:
HTTPRedirectHandler.redirect_request(req, fp, code, msg, hdrs)

while code says:
def redirect_request(self, req, fp, code, msg, headers, newurl):

--
assignee: georg.brandl
components: Documentation
messages: 79468
nosy: georg.brandl, mroman, quiver
severity: normal
status: open
title: documentaion doesn't include parameter in 
urllib.request.HTTPRedirectHandler.redirect_request
versions: Python 2.6, Python 2.7, Python 3.0, Python 3.1

___
Python tracker 

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



[issue4895] Missing strdup() under MS Windows CE

2009-01-09 Thread Ulrich Eckhardt

New submission from Ulrich Eckhardt :

CE6 doesn't provide strdup() but provides an equivalent _strdup() in
stdlib.h. The attached patch simply #defines strdup _strdup after
including said header file.

--
components: Interpreter Core
files: python-2.7-wince-strdup.0.patch
keywords: patch
messages: 79469
nosy: eckhardt
severity: normal
status: open
title: Missing strdup() under MS Windows CE
type: compile error
versions: Python 2.7
Added file: http://bugs.python.org/file12666/python-2.7-wince-strdup.0.patch

___
Python tracker 

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



[issue4896] Faster why variable manipulation in ceval.c

2009-01-09 Thread Skip Montanaro

New submission from Skip Montanaro :

The why_code enum in ceval.c has values which form a bit set.  Comparison of
the why variable against multiple values is going to be faster using bitwise
operations instead of logical ones.  For example, instead of

why == WHY_RETURN || why == WHY_CONTINUE

the equivalent bitwise expression is

why & (WHY_RETURN | WHY_CONTINUE)

which has fewer operations (one vs three treating the rhs of & as a
constant).  This is already done in one place.  The attached patch converts
all other expressions of the first form.

Also, there are some further manipulations of why in the loop after the
fast_block_end.  The loop can only be entered if why != WHY_NOT.  In the
loop when it is set to WHY_NOT, the loop breaks.  There is thus no reason to
test its value in the while expression.  Further, instead of just breaking
from the loop and then checking the why != WHY_NOT again, just jump past
that check by adding a why_not_here label.

The attached patch implements these changes (against the py3k branch).  All
tests pass on my Mac except test_cmd_line (which has been failing for
awhile).

Skip

--
files: unnamed
messages: 79470
nosy: skip.montanaro
severity: normal
status: open
title: Faster why variable manipulation in ceval.c
Added file: http://bugs.python.org/file12667/unnamed

___
Python tracker 

___

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



[issue1696199] Add collections.counts()

2009-01-09 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Some comments:
- Counter sounds like a really strange name for a container. Why not
call it "Bag" or "Multiset" (or "CountingSet"?)
- why are the unittests inline rather than in Lib/test? inline tests
don't get executed by the buildbots, nor by people running the test
suite at home

--
nosy: +pitrou

___
Python tracker 

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



[issue4897] PyIter_Next documentation inconsistent with implementation

2009-01-09 Thread garcia

New submission from garcia :

The documentation for PyIter_Next says it will raise TypeError if the 
object passed to it is not an iterator.  However, the implementation in 
abstract.c performs an assert rather than raising TypeError.  I would 
prefer if the implementation were adjusted to match the documentation 
rather than vice-versa.

--
components: None
messages: 79472
nosy: garcia
severity: normal
status: open
title: PyIter_Next documentation inconsistent with implementation
type: behavior
versions: Python 2.5

___
Python tracker 

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



[issue4898] {context, unified}_diff add spurious trailing whitespace if fromfiledate/tofiledate are emptyk

2009-01-09 Thread Adeodato Simó

New submission from Adeodato Simó :

Hello.

I recently noticed that Bazaar's unified_diff() was emiting ---/+++ 
lines with a trailing whitespace if fromfiledate/tofiledate were the 
empty string. (Which was bad because a program to detect spurious 
trailing whitespace in diffs would flag them as errors.)

A patch [1] was committed recently in their tree. During the 
discussion, it was pointed out that the affected function was a copy 
of Python's own unified_diff() in difflib, which suffered the same 
problem.

  [1]: http://bazaar.launchpad.net/~bzr/bzr/trunk/revision/3923

I'm now attaching a patch to fix this issue in Python. It'd be great 
if you'd consider applying it. (It seems that the correct character to 
separate dates is a tab and not a space; if you feel changing this is 
breaking backwards compatibility, feel free to s/\t/ / in my patch.)

Thanks.

--
components: Library (Lib)
files: python_difflib_fix.diff
keywords: patch
messages: 79473
nosy: dato, jameinel
severity: normal
status: open
title: {context,unified}_diff add spurious trailing whitespace if 
fromfiledate/tofiledate are emptyk
type: behavior
Added file: http://bugs.python.org/file12668/python_difflib_fix.diff

___
Python tracker 

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



[issue4892] Sending Connection-objects over multiprocessing connections fails

2009-01-09 Thread Jesse Noller

Changes by Jesse Noller :


--
assignee:  -> jnoller
nosy: +jnoller

___
Python tracker 

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



[issue4892] Sending Connection-objects over multiprocessing connections fails

2009-01-09 Thread Jesse Noller

Jesse Noller  added the comment:

thanks for filing this. I'll need to compare the two code bases and figure 
out why it's either regressed, or Richard removed it prior to the 
integration.

___
Python tracker 

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



[issue4888] misplaced (or misleading) assert in ceval.c

2009-01-09 Thread Guido van Rossum

Guido van Rossum  added the comment:

I don't see why the refactoring has to maintain the same logic bug as
the original.  I'm with Skip & Jeffrey.

--
nosy: +gvanrossum

___
Python tracker 

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



[issue4881] Python's timezon handling: daylight saving option

2009-01-09 Thread Pablo Castagnino

Pablo Castagnino  added the comment:

Ok, first of all I want to say I'm no Python programmer/developer.
However, I recently posted a 'bug' for a Linux/Windows program I'm using
very much which is based in Python. The program is called Anki and it's
designed to help you remember facts (such as words and phrases in a
foreign language) as easily, quickly and efficiently as possible.

Here, http://code.google.com/p/anki/issues/detail?id=613, you'll find my
explanation of the 'bug'.

Briefly, I live in Argentina and the current administration has changed
current time because of 'daylight saving'. However, when syncing my
decks (which store all my cards) with Anki's server, it tells me my
current time is wrong and that I need to change it. In fact, it's not MY
clock which is wrong, but Anki's. So, I posted this bug and the
developer, as you can see, told me that: it's not really anki's job - a
setting to shift the clock would need changes all throughout the code.
probably something in python's timezone handling needs to be updated.
could you post about the daylight savings issue on the python mailing
list and see what they say? So, this is what I'm doing. 

Right now I will notify the developer of this program that, actually,
Python already handles 'time saving'.

Thanks for your help. Any other comments/ideas would be greatly appreciated.

___
Python tracker 

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



[issue4899] doctest should support fixtures

2009-01-09 Thread Giovanni

New submission from Giovanni :

The doctest module should have support for fixtures (e.g. setUp and
tearDown methods).

It is very silly to be forced to always re-import all the modules needed
in every function tested with doctest.
For example, when you have to document functions that open files, you
have to import StringIO or TempFile, and then create a file, while this
could be done easily with a fixture.

--
components: Tests
messages: 79477
nosy: dalloliogm
severity: normal
status: open
title: doctest should support fixtures
type: feature request

___
Python tracker 

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



[issue4900] Can't Locate File with No Capital in Name

2009-01-09 Thread mark pennock

Changes by mark pennock :


--
components: None
nosy: markpennock
severity: normal
status: open
title: Can't Locate File with No Capital in Name
versions: Python 2.5

___
Python tracker 

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



[issue4900] Can't Locate File with No Capital in Name

2009-01-09 Thread mark pennock

New submission from mark pennock :

error reading files in python 2.5

reports files don't exist under certain conditions

*Doesn't Work Code*
f = open("D:\test.html", "r").read()

*Does Work Code*
(Change file name and retry)

f = open("D:\Test.html", "r").read()

*Comments*
i tried different file types and names all of which made no difference.
When I copied the file (Windows XP) of the file it automatically adds
"Copy of" to the name. I then narrowed it down to the Capital letter in
the name.

___
Python tracker 

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



[issue4900] Can't Locate File with No Capital in Name

2009-01-09 Thread Ulrich Eckhardt

Ulrich Eckhardt  added the comment:

"\t" is a tab while "\T" is (I think) just an ugly equivalent to "T". 
Use either of

  r"D:\test.html" 
  "D:\\test.html"

Please check if that is the reason for your failure.

--
nosy: +eckhardt

___
Python tracker 

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



[issue4900] Can't Locate File with No Capital in Name

2009-01-09 Thread mark pennock

mark pennock  added the comment:

Your right! Thanks a lot, I am obviously a newbie.

___
Python tracker 

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



[issue4897] PyIter_Next documentation inconsistent with implementation

2009-01-09 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

Closing a duplicate of #3720.

--
nosy: +benjamin.peterson
resolution:  -> duplicate
status: open -> closed
superseder:  -> segfault in for loop with evil iterator

___
Python tracker 

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



[issue4900] Can't Locate File with No Capital in Name

2009-01-09 Thread Benjamin Peterson

Changes by Benjamin Peterson :


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



[issue4896] Faster why variable manipulation in ceval.c

2009-01-09 Thread Daniel Diniz

Daniel Diniz  added the comment:

Neat, gives a 10% speedup on a Celeron M with gcc 4.2.

--
nosy: +ajaksu2
versions: +Python 3.0, Python 3.1
Added file: http://bugs.python.org/file12669/gcc_4.2.4_linux_ia32_bench.txt

___
Python tracker 

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



[issue4896] Faster why variable manipulation in ceval.c

2009-01-09 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

I get a 3% speedup on x86-64 with gcc 4.3.2.
The label "why_not_here" should be renamed to something more meaningful
IMO. Or you could just kill the label and use "continue" instead.

--
nosy: +pitrou

___
Python tracker 

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



[issue4896] Faster why variable manipulation in ceval.c

2009-01-09 Thread Skip Montanaro

Skip Montanaro  added the comment:

Antoine> The label "why_not_here" should be renamed to something more
Antoine> meaningful IMO. Or you could just kill the label and use
Antoine> "continue" instead.

I thought "why_not_here" was meaningful.  "Here" is where you go when why ==
WHY_NOT.  I don't think continue will work.  The goto is coming out of an
inner loop.  If you continue from there you just continue the inner loop.  I
replaced a break with a goto.

Skip

___
Python tracker 

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



[issue4705] python3.0 -u: unbuffered stdout

2009-01-09 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
resolution:  -> accepted
stage: patch review -> commit review
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



[issue4884] Work around gethostbyaddr_r bug

2009-01-09 Thread Jeffrey Yasskin

Jeffrey Yasskin  added the comment:

Committed as r68450.

--
resolution:  -> fixed
stage: patch review -> committed/rejected
status: open -> closed

___
Python tracker 

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



[issue4896] Faster why variable manipulation in ceval.c

2009-01-09 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

> I thought "why_not_here" was meaningful.

I don't know, when I see "goto why_not_here" it looks like a joke to
me :)

> I don't think continue will work.  The goto is coming out of an
> inner loop.  If you continue from there you just continue the inner loop.

Oops, sorry for misguided advice.

___
Python tracker 

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



[issue4901] inconsistent API docs for tp_iter

2009-01-09 Thread garcia

New submission from garcia :

Page 107 of api.pdf says that Py_TPFLAGS_HAVE_ITER is set if the type 
object has the tp_iter and tp_iternext fields, but on page 109, preceding 
the documentation of tp_iter and tp_iternext, it says "the next two fields 
only exist if the Py_TPFLAGS_HAVE_CLASS flag bit is set".

Should the latter refer to Py_TPFLAGS_HAVE_ITER?

--
assignee: georg.brandl
components: Documentation
messages: 79487
nosy: garcia, georg.brandl
severity: normal
status: open
title: inconsistent API docs for tp_iter
versions: Python 2.5

___
Python tracker 

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



[issue4897] PyIter_Next documentation inconsistent with implementation

2009-01-09 Thread garcia

garcia  added the comment:

Thanks for the quick response.  I see that the discussion in 3720 
implicitly involves the implementation of PyIter_Next, but the 
documentation for PyIter_Next (and its conflict with the implementation) 
is not mentioned.

___
Python tracker 

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



[issue4897] PyIter_Next documentation inconsistent with implementation

2009-01-09 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

The reason I linked to that issue is that the proposed patch brings the
implementation inline with the documentation as you wished. :)

___
Python tracker 

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



[issue4705] python3.0 -u: unbuffered stdout

2009-01-09 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Committed in r68451. Thanks!

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

___
Python tracker 

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



[issue4566] 2.6.1 breaks many applications that embed Python on Windows

2009-01-09 Thread Martin v. Löwis

Martin v. Löwis  added the comment:

> Is the problem related to this issue or should I create new issue about that. 

You should assume that it is not related.

> I can also provide simple project that could be used to test this out.

That would be necessary.

___
Python tracker 

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



[issue4893] Use separate thread support code under MS Windows CE

2009-01-09 Thread Martin v. Löwis

Martin v. Löwis  added the comment:

So perhaps it is better to use thread_nt.h now on WinCE?

Mark?

--
nosy: +loewis, mhammond

___
Python tracker 

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



[issue4898] {context, unified}_diff add spurious trailing whitespace if fromfiledate/tofiledate are emptyk

2009-01-09 Thread Martin v. Löwis

Martin v. Löwis  added the comment:

Who is the author of this patch?

--
nosy: +loewis

___
Python tracker 

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



[issue4898] {context, unified}_diff add spurious trailing whitespace if fromfiledate/tofiledate are emptyk

2009-01-09 Thread Adeodato Simó

Adeodato Simó  added the comment:

> Who is the author of this patch?

I am the author of the patch attached to this bug report.

___
Python tracker 

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



[issue4899] doctest should support fixtures

2009-01-09 Thread David W. Lambert

David W. Lambert  added the comment:

I disagree.  Purpose of __doc__ is to explain functionality all at once.
This command idiom is useful:

$ python -c 'from a_module import thing; help(thing)'

The doctest module is a lightweight nicety that helps verify that which
is suitable.  The sufficiently simple algorithms of my code have doc
strings that are the complete test and explanation.  For others I
provide both docstring and unit tests.  But with many I explain the
arguments and output, possibly the algorithm in a doc string.  Tests and
use case examples reside in the module's unit test.

I'm among the "Choose correct tool for the job.  python comes with full
tool bag." group.

--
nosy: +LambertDW

___
Python tracker 

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



[issue4881] Python's timezon handling: daylight saving option

2009-01-09 Thread Martin v. Löwis

Martin v. Löwis  added the comment:

For Windows (what version are you using?), you need to install
Microsoft's time zone patches, e.g. the one described in

http://support.microsoft.com/kb/951072

Depending on the exact version of Windows that you use, and depending on
whether or not you run Windows update regularly, your system may or may
not have that patch installed.

Same for Linux, except that I can't point to a single update. What
precise Linux distribution are you using? Have you installed their time
zone updates?

___
Python tracker 

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



[issue4888] misplaced (or misleading) assert in ceval.c

2009-01-09 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

I wasn't opposing the patch.  Just wanted to look back at why the
assertion was put there in the first place.  If you want it in, go ahead.

--
assignee: rhettinger -> 

___
Python tracker 

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



[issue4604] close() seems to have limited effect

2009-01-09 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Expanded the test a bit and committed the patch in r68454. Thanks!

--
resolution:  -> accepted
stage: patch review -> committed/rejected
status: open -> pending
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



[issue3582] thread_nt.c update

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

Kristján Valur Jónsson  added the comment:

Committed this as revision: 68455

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

___
Python tracker 

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



[issue4604] close() seems to have limited effect

2009-01-09 Thread Antoine Pitrou

Changes by Antoine Pitrou :


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

___
Python tracker 

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



[issue3677] importing from UNC roots doesn't work

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

Kristján Valur Jónsson  added the comment:

Checked in as revision: 68457

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

___
Python tracker 

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



[issue4896] Faster why variable manipulation in ceval.c

2009-01-09 Thread Skip Montanaro

Skip Montanaro  added the comment:

>> I thought "why_not_here" was meaningful.

Antoine> I don't know, when I see "goto why_not_here" it looks like a
Antoine> joke to me :)

Well, I think the enum name WHY_NOT is kind of a joke itself, but it's been
that way for so long I see no reason to change it.  I'll add a comment to
the label which describes the intent in plain(er) English.

Skip

___
Python tracker 

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



[issue4336] Fix performance issues in xmlrpclib

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

Kristján Valur Jónsson  added the comment:

Checked in revision: 68458 and  
revision: 68459

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

___
Python tracker 

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



[issue3582] thread_nt.c update

2009-01-09 Thread Martin v. Löwis

Martin v. Löwis  added the comment:

Windows NT (3.1, and a number of later versions) only support 64 TLS
keys. Starting with Windows 2000, they added another page per thread for
TLS, giving an addition 1024 TLS slots, for a total of 1088 TLS slots.
FWIW, Win 9.x supported 80 TLS slots. See

http://www.nynaeve.net/?p=181
http://msdn.microsoft.com/en-us/library/ms686749.aspx
http://bugs.python.org/file11141/thread_nt.patch

TLS slots are typically considered a scarce resource, so that
programming language implementations typically don't allow applications
direct allocation of TLS slots. Instead, most runtimes I know of will
allocate a single TLS slot for themselves, which then is filled with an
array or a dictionary.

--
nosy: +loewis

___
Python tracker 

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



[issue4293] Thread Safe Py_AddPendingCall

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

Kristján Valur Jónsson  added the comment:

Checked in as revision: 68460

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

___
Python tracker 

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



[issue4753] Faster opcode dispatch on gcc

2009-01-09 Thread Daniel Diniz

Daniel Diniz  added the comment:

Paolo,
Applying your patches makes no difference with gcc 4.2 and gives a
barely noticeable (~2%) slowdown with icc. These results are from a
Celeron M 410 (Core Solo Yonah-based), so it's a rather old platform to
run benchmarks on.

___
Python tracker 

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



[issue4074] Building a list of tuples has non-linear performance

2009-01-09 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Patch with updated comments.

Added file: http://bugs.python.org/file12670/gctrigger6.patch

___
Python tracker 

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



[issue4293] Thread Safe Py_AddPendingCall

2009-01-09 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

> Kristján Valur Jónsson  added the comment:
> 
> Checked in as revision: 68460

Looks like you forgot the unit tests!

___
Python tracker 

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



[issue4902] failed to build ctypes in Python2.6.1 (even with gcc)

2009-01-09 Thread Aki

New submission from Aki :

I'm trying to build Python 2.6.1 on Solaris/x86 machine but it puked.

gcc -fPIC -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall
-Wstrict-prototypes -I. -I/home/neko/gnu/Python-2.6.1/./Include
-Ibuild/temp.solaris-2.10-i86pc-2.6/libffi/include
-Ibuild/temp.solaris-2.10-i86pc-2.6/libffi
-I/home/neko/gnu/Python-2.6.1/Modules/_ctypes/libffi/src -I. -IInclude
-I./Include -I/usr/local/include -I/home/neko/gnu/Python-2.6.1/Include
-I/home/neko/gnu/Python-2.6.1 -c
/home/neko/gnu/Python-2.6.1/Modules/_ctypes/libffi/src/x86/sysv.S -o
build/temp.solaris-2.10-i86pc-2.6/home/neko/gnu/Python-2.6.1/Modules/_ctypes/libffi/src/x86/sysv.o
Assembler:
"/usr/tmp/ccF9sUxS.s", line 215 : Syntax error
Near line: " movl ((10 + 3) & ~3)(%eax), %esi"
"/usr/tmp/ccF9sUxS.s", line 215 : Illegal character: <7e>
"/usr/tmp/ccF9sUxS.s", line 216 : Syntax error
Near line: " movl 10 + 3) & ~3) + 4) + 4)(%eax), %edx"
"/usr/tmp/ccF9sUxS.s", line 216 : Illegal character: <7e>
"/usr/tmp/ccF9sUxS.s", line 223 : Syntax error
Near line: " call *(((10 + 3) & ~3) + 4)(%eax)"
"/usr/tmp/ccF9sUxS.s", line 223 : Illegal character: <7e>

Failed to build these modules:
_ctypes_curses_curses_panel

//

I'm using gcc 3.4.6 and Solaris 10/x86.

I try to identify the problem but I couldn't figure out what went wrong.
I'm using Python 2.6.1 on Solaris/SPARC and I didn't see any problem.

--
messages: 79508
nosy: akineko
severity: normal
status: open
title: failed to build ctypes in Python2.6.1 (even with gcc)
type: compile error
versions: Python 2.6

___
Python tracker 

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



[issue4902] failed to build ctypes in Python2.6.1 (even with gcc)

2009-01-09 Thread Martin v. Löwis

Martin v. Löwis  added the comment:

Run the gcc command line with --save-temps (-fsave-temps if the former
doesn't work), and inspect the assembler file around the line where the
assembler complains. Is this inline assembler code possibly?

--
nosy: +loewis

___
Python tracker 

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



[issue4074] Building a list of tuples has non-linear performance

2009-01-09 Thread Collin Winter

Collin Winter  added the comment:

LGTM. Go ahead and commit this.

___
Python tracker 

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



[issue4293] Thread Safe Py_AddPendingCall

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

Kristján Valur Jónsson  added the comment:

I indeed forgot the unittests and docs.
They are now in, in revision: 68461

___
Python tracker 

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



[issue1696199] Add collections.counts()

2009-01-09 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

The counts/counter moniker emerged from the python-dev discussion and
I'm basically happy with it since the typical usage is c=Counter(myseq)
with no other non-dict accesses (mostly just c[elem]+=1 and print
c[elem]).  It's a simple counter with a dict interface so the name
shouldn't suggest anything more complicated than that.

To me, MultiSet or CountingSet is too offputtingly computer-sciency and
misleadingly suggests a set-like API instead of a dict interface. I know
several programmers who don't know the terms, bag or multiset, but they
intuitively understand what a counter does.  Am open to calling it a Bag
but I rather like the self-descriptiveness and simplicity of Counter.  

As noted previously, standalone unittests are forthcoming (and a doc
patch).  Wanted to get the API and sample use cases worked-out first.

Thanks for looking at the initial patch.

___
Python tracker 

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



[issue4899] doctest should support fixtures

2009-01-09 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

I concur with David.  This is not in the spirit of the doc test module.
 We already have the heavy-weight unittest module as an alternative when
more firepower is needed.  Also, adding more infra-structure to the this
already lengthy module will make it harder to learn, use, and remember.

Tim, I recommend rejecting this request.

--
assignee:  -> tim_one
nosy: +rhettinger, tim_one
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



[issue4902] failed to build ctypes in Python2.6.1 (even with gcc)

2009-01-09 Thread Aki

Aki  added the comment:

Hello Martin,

Thank you for your prompt response.
I recompiled the source with --save-temps.
I examined the assembler source and found that it was complaining about '~'!

movl 10 + 3) & ~3) + 4) + 4)(%eax), %edx
   ^ this one

The source was compiled and assembled through 'gcc'.
But I don't see gas in my machine so that I assumed it was assembled by
as (Sun's assembler) and as seems not supporting '~'.

I will try several things, such as installing gas to my machine.
I will update when I have something to report.

Thank you!
Aki-

___
Python tracker 

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



[issue4857] syntax: no unpacking in augassign

2009-01-09 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

The grammar in the doc is not the one used to generate the
parser/compiler.  The former is meant to be easier for humans to read,
the latter easier for the parser generator.  Neither completely embody
Python's syntax rules.  Additional restrictions may be applied later in
the chain.  From:
http://svn.python.org/view/python/trunk/Grammar/Grammar?rev=65872&view=auto

expr_stmt: testlist (augassign (yield_expr|testlist) |
 ('=' (yield_expr|testlist))*)

augassign: ('+=' | '-=' | '*=' | '/=' | '%=' | '&=' | '|=' | '^=' |
'<<=' | '>>=' | '**=' | '//=')
# For normal assignments, additional restrictions enforced by the
interpreter

Perhaps that should say "For augmented assignments

Except maybe for the comment above, I think this issue can be closed.

--
nosy: +tjreedy

___
Python tracker 

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



[issue4902] failed to build ctypes in Python2.6.1 (even with gcc)

2009-01-09 Thread Martin v. Löwis

Martin v. Löwis  added the comment:

> movl 10 + 3) & ~3) + 4) + 4)(%eax), %edx

I'm really puzzled; gcc would normally not generate assembler code
like this. Instead, with the expression being constant, gcc should
normally compute its result, and fill that into the assembler code.

To study this further, one would need to compare preprocessor output
and assembler output, to correlate them.

___
Python tracker 

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



[issue4902] failed to build ctypes in Python2.6.1 (even with gcc)

2009-01-09 Thread Aki

Aki  added the comment:

I have installed GNU binutil package to my machine to use GNU as.
I re-run configure but configure somehow always found Sun as rather than
GNU as even I saw GNU as first from my csh environment.

I temporalily renamed Sun as so that configure was forced to use GNU as.
With such brute force trick, I finally managed to build Python 2.6.1 on
Solaris/x86.

It would be nice if ctypes module and configure handle this elegantly
and amicably, instaed of arguing that Sun as is too old-fashined. 

But I don't have any good idea to deal with this so I need to leave this
to Python developers.

___
Python tracker 

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



[issue4902] failed to build ctypes in Python2.6.1 (even with gcc)

2009-01-09 Thread Aki

Aki  added the comment:

> I'm really puzzled; gcc would normally not generate assembler code
like this.

This is because an assembler source (sysv.S) was given.

Python-2.6.1/Modules/_ctypes/libffi/src/x86/sysv.S

It was created by Red Hat.
A macro, RAW_CLOSURE_CIF_OFFSET, contains '~'.

___
Python tracker 

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



[issue4890] handling empty text search pattern in tkinter

2009-01-09 Thread Guilherme Polo

Guilherme Polo  added the comment:

I don't know what I was thinking when I said that, the check you are
doing in the patch is fine. And just to answer your next question: it
would raise ValueError.

Also, it would be good to add the other missing search switches.

--
nosy: +gpolo
versions: +Python 3.0, Python 3.1 -Python 2.4, Python 2.5

___
Python tracker 

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



[issue4074] Building a list of tuples has non-linear performance

2009-01-09 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Ok, committed in trunk and py3k. Thanks!

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

___
Python tracker 

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



[issue4893] Use separate thread support code under MS Windows CE

2009-01-09 Thread Mark Hammond

Mark Hammond  added the comment:

Early windows CE devices were very crippled, and IIRC, only the Unicode
version of the API existed, and (also IIRC) this was well before Python
had builtin unicode.  I agree with Martin; it is probably worth
investigating how much effort it is to get thread_nt.h working on CE
these days...

___
Python tracker 

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



[issue1696199] Add collections.counts()

2009-01-09 Thread Raymond Hettinger

Changes by Raymond Hettinger :


Added file: http://bugs.python.org/file12671/counter4.diff

___
Python tracker 

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



[issue1696199] Add collections.counts()

2009-01-09 Thread Raymond Hettinger

Changes by Raymond Hettinger :


Removed file: http://bugs.python.org/file12665/counter3.diff

___
Python tracker 

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



[issue4902] failed to build ctypes in Python2.6.1 (even with gcc)

2009-01-09 Thread Martin v. Löwis

Martin v. Löwis  added the comment:

Ah, ok. ctypes can indeed only build with GNU tools. This is a known
issue, and nobody has volunteered to fix it yet. Closing it as such, then.

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

___
Python tracker 

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



[issue4074] Building a list of tuples has non-linear performance

2009-01-09 Thread Martin v. Löwis

Martin v. Löwis  added the comment:

> Ok, committed in trunk and py3k. Thanks!

Thanks!

___
Python tracker 

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



[issue4903] binascii.crc32()

2009-01-09 Thread David M. Beazley

New submission from David M. Beazley :

The result of binascii.crc32() is different on the same input in Python 
2.6/3.0.  For example:

Python 2.6:

>>> binascii.crc32('Hello')
-137262718

Python 3.0:

>>> binascii.crc32(b'Hello')
4157704578

--
components: Library (Lib)
messages: 79524
nosy: beazley
severity: normal
status: open
title: binascii.crc32()
type: behavior
versions: Python 2.6, Python 3.0

___
Python tracker 

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



[issue4882] Behavior of backreferences to named groups in regular expressions unclear

2009-01-09 Thread Jim Jewett

Jim Jewett  added the comment:

That sounds like a good idea, particularly since it is a bit different 
from Perl.  Please do write up the a clarification.

Typically, I have either attached a file with the suggested wording, or 
included it in a comment from which a commiter could cut-and-paste.

(If Georg has different preferences on how to submit the patch, they 
should probably go into a FAQ anyhow.)

--
nosy: +jimjjewett

___
Python tracker 

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



[issue4903] binascii.crc32()

2009-01-09 Thread Gregory P. Smith

Gregory P. Smith  added the comment:

When treated as an unsigned 32bit value those are identical.

Guido prefers to keep Python 2.x always having signed values for the 
scattered crc functions.  We changed it for 3.0 because it makes more 
sense given that python these days no real fixed-bits numeric type.

See also

http://bugs.python.org/issue1202

I posted a workaround in there.  Always & the crc32() or adler32() 
return value with 0x.

--
dependencies: +zlib.crc32() and adler32() return value
nosy: +gregory.p.smith
resolution:  -> duplicate
status: open -> closed

___
Python tracker 

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



[issue1202] zlib.crc32() and adler32() return value

2009-01-09 Thread Gregory P. Smith

Gregory P. Smith  added the comment:

seems there are bugs with it not staying signed as it should on some 
64bit platforms.  i'll be looking into this shortly.  its a good 
candidate bug for 2.6.x and 3.0.x releases.

--
keywords:  -easy

___
Python tracker 

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



[issue1202] zlib.crc32() and adler32() return value

2009-01-09 Thread Gregory P. Smith

Gregory P. Smith  added the comment:

err not 3.0.x, 3.0 is always unsigned like anyone sane would want. :)

--
versions:  -Python 3.0

___
Python tracker 

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



[issue4903] binascii.crc32()

2009-01-09 Thread David M. Beazley

David M. Beazley  added the comment:

Can someone PLEASE make sure this gets documented someplace.

___
Python tracker 

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



[issue4631] urlopen returns extra, spurious bytes

2009-01-09 Thread Craig Holmquist

Changes by Craig Holmquist :


--
nosy: +craigh

___
Python tracker 

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



[issue4753] Faster opcode dispatch on gcc

2009-01-09 Thread Paolo 'Blaisorblade' Giarrusso

Paolo 'Blaisorblade' Giarrusso  added the comment:

@ ajaksu2
> Applying your patches makes no difference with gcc 4.2 and gives a
> barely noticeable (~2%) slowdown with icc.
"Your patches" is something quite unclear :-)
Which are the patch sets you are comparing?
And on 32 or 64 bits? But does Yonah supports 64bits? IIRC no, but I'm
not sure.
I would be surprised from slowdowns for restore-old-oparg-load.diff,
really surprised.
And I would be just surprised by slowdowns on
reenable-static-prediction.diff.
Also, about ICC output, we still need to ensure that it's properly
compiled (see above the instructions for counting "jmp *" or similar).
In the measurements above, ICC did miscompile the patch with the switch.
By "properly compiled" I mean that separate indirect branches are
generated, instead of just one.

> These results are from a
> Celeron M 410 (Core Solo Yonah-based), so it's a rather old platform to
> run benchmarks on.

Not really - at the very least we should listen to results on Pentium 4,
Core (i.e. Yonah) and Core 2, and I would also add Pentium3/Pentium M to
represent the P6 family.
Anyway, I have to do my benchmarks on this, I hope this weekend I'll
have time.

___
Python tracker 

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



[issue4904] Typo for PickingError in pickle.py

2009-01-09 Thread Erick Tryzelaar

New submission from Erick Tryzelaar :

Noticed that in the release version of python 3.0 and the latest svn that 
on line 835 the exception UnpickingError is raised instead of UnpicklingError.

--
components: Library (Lib)
messages: 79531
nosy: erickt
severity: normal
status: open
title: Typo for PickingError in pickle.py
type: behavior
versions: Python 3.0

___
Python tracker 

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