[issue3456] compile python using MinGW

2008-07-28 Thread Xue Can

New submission from Xue Can <[EMAIL PROTECTED]>:

I hope the official source release can add support for MinGW
to compile python under Win32 platform. And layout built files
like python in Unix-like paltforms.

--
components: Build
messages: 70338
nosy: xuecan
severity: normal
status: open
title: compile python using MinGW
type: feature request
versions: Python 2.5, Python 2.6, Python 2.7, Python 3.0

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3455] os.remove()method document error

2008-07-28 Thread 香槟酒

香槟酒 <[EMAIL PROTECTED]> added the comment:

yes, i use this method,but actually the result don't agree with the Python's
manual. my OS is windows xp and version is simplified chinese!

2008/7/28 Benjamin Peterson <[EMAIL PROTECTED]>

>
> Benjamin Peterson <[EMAIL PROTECTED]> added the comment:
>
> What do you mean by "in use"?
>
> --
> nosy: +benjamin.peterson
>
> ___
> Python tracker <[EMAIL PROTECTED]>
> 
> ___
>

Added file: http://bugs.python.org/file10993/unnamed

___
Python tracker <[EMAIL PROTECTED]>

___yes, i use this method,but actually the result don't agree 
with the Python's manual. my OS is windows xp and version is simplified 
chinese!2008/7/28 Benjamin Peterson [EMAIL 
PROTECTED]>

Benjamin Peterson [EMAIL 
PROTECTED]> added the comment:

What do you mean by "in use"?

--
nosy: +benjamin.peterson

___
Python tracker [EMAIL 
PROTECTED]>
http://bugs.python.org/issue3455>
___

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



[issue3455] os.remove()method document error

2008-07-28 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment:

There seems to be some misunderstanding.

zkfarmer, you said: "it deletes my file that in use without any exception."
Can you explain this sentence? How is your file "in use"?

--
nosy: +amaury.forgeotdarc

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3436] csv.DictReader inconsistency

2008-07-28 Thread Skip Montanaro

Skip Montanaro <[EMAIL PROTECTED]> added the comment:

The consensus seems to be that __init__ shouldn't "magically" read the
header row, even though by not specifying a fieldnames arg that's
exactly what you're telling the DictReader where to find the column
headers.  Given that case, my argument is that we not make any changes
(no getheaders method, etc) since there are at least a couple different
ways mentioned already to do what you want.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3436] csv.DictReader inconsistency

2008-07-28 Thread Andrii V. Mishkovskyi

Andrii V. Mishkovskyi <[EMAIL PROTECTED]> added the comment:

I'm ok with that. :)
Looks like you can close this one as "won't fix".

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3436] csv.DictReader inconsistency

2008-07-28 Thread Skip Montanaro

Skip Montanaro <[EMAIL PROTECTED]> added the comment:

Done...

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

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3455] os.remove()method document error

2008-07-28 Thread Facundo Batista

Facundo Batista <[EMAIL PROTECTED]> added the comment:

zkfarmer, please try the following from your IDLE:

>>> myfilename = r"c:\tmp\test.txt"
>>> fh = open(myfilename, "w")
>>> fh.write("test\n")
>>> fh.close()
>>> fh = open(myfilename)
>>> import os
>>> os.remove(myfilename)

Traceback (most recent call last):
  File "", line 1, in 
os.remove(myfilename)
WindowsError: [Error 32] The process cannot access the file because it
is being used by another process: 'c:\\tmp\\test.txt'
>>> 

...and copy here what happened.

Thanks!

--
nosy: +facundobatista

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3457] Release notes for 2.6b2 call it an alpha release

2008-07-28 Thread Cliff Dyer

New submission from Cliff Dyer <[EMAIL PROTECTED]>:

The release notes for python 2.6b2 at
http://www.python.org/download/releases/2.6/ identify the release as an
alpha release.  I'm not sure, but the disclaimer regarding who should
use it might need changing too.

alpha != beta

--
assignee: georg.brandl
components: Documentation
messages: 70345
nosy: georg.brandl, jcd
severity: normal
status: open
title: Release notes for 2.6b2 call it an alpha release
type: behavior
versions: Python 2.6

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3457] Release notes for 2.6b2 call it an alpha release

2008-07-28 Thread Cliff Dyer

Cliff Dyer <[EMAIL PROTECTED]> added the comment:

The same issue applies to 3.0b2.  The release is identified as alpha. 
Also, there's a bit about who the alphas are aimed at (developers), but
nothing about the role of the betas.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue2475] Popen.poll always returns None

2008-07-28 Thread reiko

reiko <[EMAIL PROTECTED]> added the comment:

I have also run into this problem.  If you only use p.poll() and never
p.wait(), returncode will always remain None.

roudkerk's workaround doesn't seem to work with the new Popen objects,
at least in python 2.4.  ("unexpected keyword argument '_deadstate'") 
Does anyone have a workaround for subprocess.Popen?  Do I have to switch
to the deprecated popen function(s)?

--
nosy: +reiko

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3455] os.remove()method document error

2008-07-28 Thread 香槟酒

香槟酒 <[EMAIL PROTECTED]> added the comment:

Thank you for your reply.I mean I used gvim to open a file. the Python
manual did not specify how to use a file, but said that if a file is to be
used, the deletion of the file will be exception to be raise.so when I use
gvim to open a file, then run os.remove () method to remove the file, the
file is deleted, and no exception to be raise.

2008/7/28 Facundo Batista <[EMAIL PROTECTED]>

>
> Facundo Batista <[EMAIL PROTECTED]> added the comment:
>
> zkfarmer, please try the following from your IDLE:
>
> >>> myfilename = r"c:\tmp\test.txt"
> >>> fh = open(myfilename, "w")
> >>> fh.write("test\n")
> >>> fh.close()
> >>> fh = open(myfilename)
> >>> import os
> >>> os.remove(myfilename)
>
> Traceback (most recent call last):
>  File "", line 1, in 
>os.remove(myfilename)
> WindowsError: [Error 32] The process cannot access the file because it
> is being used by another process: 'c:\\tmp\\test.txt'
> >>>
>
> ...and copy here what happened.
>
> Thanks!
>
> --
> nosy: +facundobatista
>
> ___
> Python tracker <[EMAIL PROTECTED]>
> 
> ___
>

Added file: http://bugs.python.org/file10994/unnamed

___
Python tracker <[EMAIL PROTECTED]>

___Thank you for your reply.I mean I used gvim to 
open a file. the Python manual did not specify how to use a file, but said that 
if 
a file is to be used, the deletion of the file will be exception to be raise.so 
when I use gvim to open a file, then run os.remove () method to 
remove the file, the file is deleted, and no exception to be 
raise.2008/7/28 Facundo Batista [EMAIL 
PROTECTED]>

Facundo Batista [EMAIL 
PROTECTED]> added the comment:

zkfarmer, please try the following from your IDLE:

>>> myfilename = r"c:\tmp\test.txt"
>>> fh = open(myfilename, "w")
>>> fh.write("test\n")
>>> fh.close()
>>> fh = open(myfilename)
>>> import os
>>> os.remove(myfilename)

Traceback (most recent call last):
  File "", line 1, in 
    os.remove(myfilename)
WindowsError: [Error 32] The process cannot access the file because it
is being used by another process: 'c:\\tmp\\test.txt'
>>>

...and copy here what happened.

Thanks!

--
nosy: +facundobatista

___
Python tracker [EMAIL 
PROTECTED]>
http://bugs.python.org/issue3455>
___

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



[issue3455] os.remove()method document error

2008-07-28 Thread Benjamin Peterson

Benjamin Peterson <[EMAIL PROTECTED]> added the comment:

Editors usually don't cause the file to be "in use." "In use" would 
mean that the file was being held open by a program. Editors only do 
that when they are opening or saving a file.

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

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3457] Release notes for 2.6b2 call it an alpha release

2008-07-28 Thread Benjamin Peterson

Changes by Benjamin Peterson <[EMAIL PROTECTED]>:


--
assignee: georg.brandl -> barry
nosy: +barry

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3455] os.remove()method document error

2008-07-28 Thread 香槟酒

香槟酒 <[EMAIL PROTECTED]> added the comment:

Thanks, you are right, I am wrong, I think that is the use of editing, so I
made a mistake.

2008/7/28 Benjamin Peterson <[EMAIL PROTECTED]>

>
> Benjamin Peterson <[EMAIL PROTECTED]> added the comment:
>
> Editors usually don't cause the file to be "in use." "In use" would
> mean that the file was being held open by a program. Editors only do
> that when they are opening or saving a file.
>
> --
> resolution:  -> invalid
> status: open -> closed
>
> ___
> Python tracker <[EMAIL PROTECTED]>
> 
> ___
>

Added file: http://bugs.python.org/file10995/unnamed

___
Python tracker <[EMAIL PROTECTED]>

___Thanks, you are right, I am wrong, I think that 
is the use of 
editing, so I made a mistake.2008/7/28 
Benjamin Peterson [EMAIL 
PROTECTED]>

Benjamin Peterson [EMAIL 
PROTECTED]> added the comment:

Editors usually don't cause the file to be "in use." "In 
use" would
mean that the file was being held open by a program. Editors only do
that when they are opening or saving a file.

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

___
Python tracker [EMAIL 
PROTECTED]>
http://bugs.python.org/issue3455>
___

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



[issue1540529] cgi.py error on parsing/handling content-disposition

2008-07-28 Thread Oleksiy Golovko

Oleksiy Golovko <[EMAIL PROTECTED]> added the comment:

Here is the another patch for this issue.

--
nosy: +zindel
title: cgi.py error on parsing/handling content-disposition  -> cgi.py error on 
parsing/handling content-disposition
Added file: http://bugs.python.org/file10996/cgtest.py

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3445] Ignore missing attributes in functools.update_wrapper

2008-07-28 Thread Antoine Pitrou

Antoine Pitrou <[EMAIL PROTECTED]> added the comment:

Another possibility would be for methods to also get the __name__ and
__module__ attributes. I don't see any counter-indication to it.

--
nosy: +pitrou

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3458] dict.update() optimisation gives unexpected/invalid results when passed a subclass of DictType

2008-07-28 Thread David Farrar

New submission from David Farrar <[EMAIL PROTECTED]>:

Using a python module that expected me to pass a dictionary as a
parameter to a function, I found that I was getting unexpected results
when using a class which inherits from types.DictType.

The module was passing the instance I had supplied as a parameter to
update() on a newly created dictionary. I wanted my class to present its
methods as items of the dictionary it was pretending to be. Even though
I could see that __getattribute__ had been called to get 'keys', keys()
was not called and I ended up with an empty dictionary.

Trying to find the cause of the problem, I downloaded the python source
package and found that in PyDict_Merge (in Objects/dictobject.c, line
1359), there is an optimisation that is run if PyDict_Check determines
that the parameter we passed is itself a dictionary. The optimisation
takes advantage of the fact that we know how data is stored in the
dictionary and accesses whatever it needs directly.

I had overridden keys() to provide the result I wanted but this
optimisation prevented the code from ever being run, leading to code
that seems like it should work failing with no apparent cause. The only
way I could find around this was to raise AttributeError in
__getattribute__ when getting 'keys', causing dict_update_common to call
PyDict_MergeFromSeq2 in place of PyDict_Merge.

Should the call to PyDict_Check in PyDict_Merge not be replaced with
PyDict_CheckExact ? This would keep the optimisation in place in most
cases, where we know that it is safe, still allowing keys() to be
overridden as you expect.

--
components: Interpreter Core
files: dictionary.patch
keywords: patch
messages: 70353
nosy: david
severity: normal
status: open
title: dict.update() optimisation gives unexpected/invalid results when passed 
a subclass of DictType
type: behavior
versions: Python 2.5, Python 2.6
Added file: http://bugs.python.org/file10997/dictionary.patch

___
Python tracker <[EMAIL PROTECTED]>

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



[issue2834] re.IGNORECASE not Unicode-ready

2008-07-28 Thread Antoine Pitrou

Antoine Pitrou <[EMAIL PROTECTED]> added the comment:

Final patch adding the (?a) inline flag (equivalent to re.ASCII). Please
review:
http://codereview.appspot.com/2439

Added file: http://bugs.python.org/file10998/reunicode5.patch

___
Python tracker <[EMAIL PROTECTED]>

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



[issue2491] io.open() handles errors differently on different platforms

2008-07-28 Thread Benjamin Peterson

Benjamin Peterson <[EMAIL PROTECTED]> added the comment:

What's the status of this?

--
nosy: +benjamin.peterson

___
Python tracker <[EMAIL PROTECTED]>

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



[issue2777] subprocess unit tests for kill, term and send_signal flaky

2008-07-28 Thread Benjamin Peterson

Benjamin Peterson <[EMAIL PROTECTED]> added the comment:

What's the status of this?

--
nosy: +benjamin.peterson

___
Python tracker <[EMAIL PROTECTED]>

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



[issue2538] memoryview of bytes is not readonly

2008-07-28 Thread Benjamin Peterson

Benjamin Peterson <[EMAIL PROTECTED]> added the comment:

How's this coming?

--
priority: critical -> release blocker

___
Python tracker <[EMAIL PROTECTED]>

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



[issue2534] Restore isinstance and issubclass speed in 2.6

2008-07-28 Thread Benjamin Peterson

Benjamin Peterson <[EMAIL PROTECTED]> added the comment:

Can this patch go in?

--
nosy: +benjamin.peterson

___
Python tracker <[EMAIL PROTECTED]>

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



[issue1967] Backport dictviews to 2.6

2008-07-28 Thread Benjamin Peterson

Benjamin Peterson <[EMAIL PROTECTED]> added the comment:

I'm going to defer this to 2.7.

--
nosy: +benjamin.peterson

___
Python tracker <[EMAIL PROTECTED]>

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



[issue1745] Backport of PEP 3102 "keyword-only arguments" to 2.6

2008-07-28 Thread Benjamin Peterson

Benjamin Peterson <[EMAIL PROTECTED]> added the comment:

This will probably have to be deferred to 2.7.

--
nosy: +benjamin.peterson

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3366] Add gamma and error functions to math module

2008-07-28 Thread nirinA raseliarison

nirinA raseliarison <[EMAIL PROTECTED]> added the comment:

i wrote pure Python equivalent of the patch and will
post it to the ASPN cookbook as suggested. i'm wondering
if i have to upload the code here too, or just the link
will suffice?

Raymond Hettinger:
> Can you also implement blending of approximations:
> (1-t)*f1(x) + t*f2(x)

i do this with the Python code for now, and my question is:
how to choose the values for the borders?

with erf, for example, one has typically 5 domains
of approximation and one can write something like:

def erf(x):
f = float(x)
if (f == inf):
return 1.0
elif (f == -inf):
return -1.0
elif (f == nan):
return nan
else:
if (abs(x)<0.84375):
return erf1(x)
elif (0.84375<=abs(x)<1.25):
return erf2(x)
elif (1.25<=abs(x)<2.857142):
return erf3(x)
elif (2.857142<=abs(x)<6):
return erf4(x)
elif (abs(x)>=6):
return erf5(x)

implementing the blending of approximations,
one may write:

def blend(x, a, b, f1, f2):
if x < a:
return f1(x)
if x > b:
return f2(x)
return (((b-x)*f1(x))-((a-x)*f2(x)))/(b-a)

and the definition becomes:

def erf(x):
f=float(x)
if (abs(x)<0.83):
return erf1(x)
elif (0.83<=abs(x)<0.85):
return blend(x,0.83,0.85,erf1,erf2)
elif (0.85<=abs(x)<1.24):
return erf2(x)
elif (1.24<=abs(x)<1.26):
return blend(x,1.24,1.26,erf2,erf3)
elif (1.26<=abs(x)<2.84):
return erf3(x)
elif (2.84<=abs(x)<2.86):
return blend(x,2.84,2.86,erf3,erf4)
elif (2.86<=abs(x)<5.99):
return erf4(x)
elif (5.99<=abs(x)<6.01):
return blend(x,5.99,6.01,erf4,erf5)
elif (abs(x)>=6.01):
return erf5(x)

but the choice of these values is somewhat arbitrary.
or i completely misunderstood what you mean by "blending of approximations"!

for erf functions, blending of approximations, as i understand it,
may be implemented easily as the functions are monotonics.
for gammas, this will be a bit complicated, especially for
negative values, where there are extremums for half integers and
discontinuities for integers.
in the other hand, i'm wondering if these coefficients had been chosen
with optimization of discontinuities already taken into account.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue2222] Memory leak in os.rename?

2008-07-28 Thread Benjamin Peterson

Benjamin Peterson <[EMAIL PROTECTED]> added the comment:

How's this coming along?

--
nosy: +benjamin.peterson

___
Python tracker <[EMAIL PROTECTED]>

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



[issue2542] PyErr_ExceptionMatches must not fail

2008-07-28 Thread Benjamin Peterson

Changes by Benjamin Peterson <[EMAIL PROTECTED]>:


--
priority: critical -> release blocker

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3458] dict.update() optimisation gives unexpected/invalid results when passed a subclass of DictType

2008-07-28 Thread Raymond Hettinger

Raymond Hettinger <[EMAIL PROTECTED]> added the comment:

Will look back in my notes.  I believe this was previously discussed 
and rejected.

--
assignee:  -> rhettinger
nosy: +rhettinger

___
Python tracker <[EMAIL PROTECTED]>

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



[issue1242657] list(obj) can swallow KeyboardInterrupt

2008-07-28 Thread Benjamin Peterson

Benjamin Peterson <[EMAIL PROTECTED]> added the comment:

Raymond, can you comment?

--
nosy: +benjamin.peterson

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3459] optimize bytes.join()

2008-07-28 Thread Antoine Pitrou

New submission from Antoine Pitrou <[EMAIL PROTECTED]>:

When the separator is empty and the sequence only contains one non-empty
item, it is possible to optimize b"".join([...]) by simply returning the
non-empty item.

Since b"".join() is the recommended idiom to join large strings
together, I think it can be useful. I encountered this when trying to
optimize io.BufferedReader.

./python -m timeit -s "l=[b'', b'a' * 1]" "b''.join(l)"

before the patch:
10 loops, best of 3: 2.35 usec per loop
after the patch:
100 loops, best of 3: 0.335 usec per loop

--
components: Interpreter Core
files: bytesjoin.patch
keywords: patch
messages: 70365
nosy: pitrou
severity: normal
status: open
title: optimize bytes.join()
type: performance
versions: Python 3.0
Added file: http://bugs.python.org/file10999/bytesjoin.patch

___
Python tracker <[EMAIL PROTECTED]>

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



[issue1242657] list(obj) can swallow KeyboardInterrupt

2008-07-28 Thread Raymond Hettinger

Raymond Hettinger <[EMAIL PROTECTED]> added the comment:

Georg's suggestion seems reasonable.  Alternatively, you can just catch 
AttributeError or TypeError.

Lowering the priority to normal and marking as unresolved.  At some 
point, it would be nice to review the whole code base to see if other 
calls to PyErr_Clear() are too aggressive.  In that review, perhaps a 
more clean and general solution with present itself.

--
assignee: rhettinger -> georg.brandl
priority: critical -> normal
resolution: fixed -> 
versions: +Python 2.6, Python 3.1

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3460] PyUnicode_Join could perhaps be simpler

2008-07-28 Thread Antoine Pitrou

New submission from Antoine Pitrou <[EMAIL PROTECTED]>:

In py3k, PyUnicode_Join inherits some complexity from the 2.x days.
However, it seems some of the precautions taken there may not be needed
anymore. Witness the following comment:

/* G.  A codec may be invoked to convert str objects to
 * Unicode, and so it's possible to call back into Python code
 * during PyUnicode_FromObject(), and so it's possible for a sick
 * codec to change the size of fseq (if seq is a list).  Therefore
 * we have to keep refetching the size -- can't assume seqlen
 * is invariant.
 */

Perhaps it would also allow to preallocate the target buffer all at once
(like bytes.join does) rather than resize it incrementally.
Marc-Andre, what do you think?

--
components: Unicode
messages: 70367
nosy: lemburg, pitrou
priority: normal
severity: normal
status: open
title: PyUnicode_Join could perhaps be simpler
type: performance
versions: Python 3.0

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3455] os.remove()method document error

2008-07-28 Thread Georg Brandl

Georg Brandl <[EMAIL PROTECTED]> added the comment:

Can a file be "in use" other than being opened? If not, wouldn't be
"opened" be a better wording?

___
Python tracker <[EMAIL PROTECTED]>

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



[issue2523] binary buffered reading is quadratic

2008-07-28 Thread Antoine Pitrou

Antoine Pitrou <[EMAIL PROTECTED]> added the comment:

Following our discussion and Guido's answer on python-3000 (*), I
committed a modified fix in r65264.

(*) http://mail.python.org/pipermail/python-3000/2008-July/014466.html

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

___
Python tracker <[EMAIL PROTECTED]>

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



[issue2834] re.IGNORECASE not Unicode-ready

2008-07-28 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment:

Are all those re.ASCII flags mandatory, or are they here just for
theoretical correctness?
For example, the output of "gcc -dumpversion" is certainly plain ASCII.
I don't mind that \d also matches some exotic digit - it just won't happen.

--
nosy: +amaury.forgeotdarc

___
Python tracker <[EMAIL PROTECTED]>

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



[issue2834] re.IGNORECASE not Unicode-ready

2008-07-28 Thread Antoine Pitrou

Antoine Pitrou <[EMAIL PROTECTED]> added the comment:

Le lundi 28 juillet 2008 à 20:41 +, Amaury Forgeot d'Arc a écrit :
> Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment:
> 
> Are all those re.ASCII flags mandatory, or are they here just for
> theoretical correctness?

For theoretical correctness. I just don't want to analyze each case
individually and I'm probably not competent for many of them.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3461] smtplib does not fully support IPv6 in EHLO

2008-07-28 Thread Derek Morr

New submission from Derek Morr <[EMAIL PROTECTED]>:

On an IPv6-only machine, smtplib does not send an IPv6 address in the 
EHLO. It sends "EHLO [0.0.0.0]" instead. For example, on a v6-only 
network with stateless autoconfiguration enabled (a common 
configuration), smtplib will show this error.

Further, SMTP's __init__() method tries to determine the value of EHLO 
parameter before the socket is established. But it can't know what 
value to use before the socket is setup (e.g., should it use a 
hostname, a v4 address literal, or a v6 address literal).

The attached patch moves the self.local_hostname processing into the 
connect() method, and updates it to use IPv6-aware resolver interfaces.

--
components: Library (Lib)
files: python_smtplib.patch
keywords: patch
messages: 70372
nosy: dmorr
severity: normal
status: open
title: smtplib does not fully support IPv6 in EHLO
type: behavior
versions: Python 3.1
Added file: http://bugs.python.org/file11000/python_smtplib.patch

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3458] dict.update() optimisation gives unexpected/invalid results when passed a subclass of DictType

2008-07-28 Thread Raymond Hettinger

Raymond Hettinger <[EMAIL PROTECTED]> added the comment:

This is duplicate of http://bugs.python.org/issue1615701 .  The 
check_exact solution was attempted once but it broke code in a subtle 
and hard to find way so it had to be reverted.  For your use case, try 
UserDict instead of subclassing dict.

--
resolution:  -> duplicate
status: open -> closed

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3462] test_builtin fails after test_decimal

2008-07-28 Thread Benjamin Peterson

New submission from Benjamin Peterson <[EMAIL PROTECTED]>:

In Py3k:

$ ./python Lib/test/regrtest.py test_decimal test_builtin
test_decimal
test_builtin
test test_builtin failed -- Traceback (most recent call last):
  File "Lib/test/regrtest.py", line 603, in runtest_inner
indirect_test()
  File "/temp/python/py3k/Lib/test/test_builtin.py", line 1252, in test_main
run_unittest(*test_classes)
  File "/temp/python/py3k/Lib/test/support.py", line 717, in run_unittest
_run_suite(suite)
  File "/temp/python/py3k/Lib/test/support.py", line 700, in _run_suite
raise TestFailed(err)
test.support.TestFailed: Traceback (most recent call last):
  File "/temp/python/py3k/Lib/test/test_builtin.py", line 390, in
test_general_eval
self.assertEqual(eval('globals()', g, m), g)
AssertionError: {'unittest': , 'random': , 'test_conv_no_sign': [('0', 0),
('1', 1), ('9', 9), ('10', 10), ('99', 99), ('100', 100), ('314', 314),
(' 314', 314), ('314 ', 314), ('  \t\t  314  \t\t  ', 314),
('2147483647', 2147483647), ('  1x', ), ('  1  ',
1), ('  1\x02  ', ), ('', ), ('
', ), ('  \t\t  ', ),
('\u0663\u0661\u0664 ', 314), ('\u0200', )],
'test_conv_sign': [('0', 0), ('1', 1), ('9', 9), ('10', 10), ('99', 99),
('100', 100), ('314', 314), (' 314', ), ('314 ',
314), ('  \t\t  314  \t\t  ', ), ('2147483647',
2147483647), ('  1x', ), ('  1  ', ), ('  1\x02  ', ), ('', ), (' ', ), ('  \t\t  ', ), ('\u0663\u0661\u0664 ', 314), ('\u0200', )], 'run_with_locale': , 'io': ,
'Squares': , 'neg': , '__package__': None, 'collections': , 'TestFailingIter': , 'run_unittest': , '__doc__': None, 'test_main': , 'fractions': , 'StrSquares': , 'warnings': , '__builtins__': {'bytearray':
, 'IndexError': , 'all':
, 'help': Type help() for interactive help, or
help(object) for help about object., 'vars': ,
'SyntaxError': , 'UnicodeDecodeError': , 'memoryview': , 'isinstance':
, '__build_class__': , 'copyright': Copyright (c) 2001-2008 Python Software
Foundation.
All Rights Reserved.

Copyright (c) 2000 BeOpen.com.
All Rights Reserved.

Copyright (c) 1995-2001 Corporation for National Research Initiatives.
All Rights Reserved.

Copyright (c) 1991-1995 Stichting Mathematisch Centrum, Amsterdam.
All Rights Reserved., 'NameError': , 'BytesWarning':
, 'dict': , 'IOError': , 'oct': , 'bin': , 'SystemExit': , 'format': , 'repr': , 'sorted': , 'False': False, 'RuntimeWarning': ,
'list': , 'iter': , 'Warning':
, '__package__': None, 'round': , 'dir': , 'cmp': ,
'set': , 'bytes': , 'UnicodeTranslateError':
, 'issubclass': , 'EOFError': , 'locals': , 'BufferError': , 'slice': , 'FloatingPointError': , 'sum':
, 'getattr': , 'abs':
, 'exit': Use exit() or Ctrl-D (i.e. EOF) to
exit, 'print': , 'True': True, 'FutureWarning':
, 'ImportWarning': ,
'None': None, 'hash': , 'ReferenceError': , 'len': , 'credits': Thanks
to CWI, CNRI, BeOpen.com, Zope Corporation and a cast of thousands
for supporting Python development.  See www.python.org for more
information., 'frozenset': , '__name__': 'builtins',
'ord': , 'super': , '_':
Decimal('NaN123'), 'TypeError': , 'license': Type
license() to see the full license text, 'KeyboardInterrupt': , 'UserWarning': , 'filter':
, 'range': , 'staticmethod': , 'SystemError': , 'BaseException':
, 'pow': , 'RuntimeError':
, 'float': , 'MemoryError': , 'StopIteration': , 'globals':
, 'divmod': ,
'enumerate': , 'Ellipsis': Ellipsis, 'LookupError':
, 'open': , 'quit': Use
quit() or Ctrl-D (i.e. EOF) to exit, 'UnicodeError': , 'zip': , 'hex': ,
'next': , 'ImportError': ,
'chr': , 'type': , '__doc__':
"Built-in functions, exceptions, and other objects.\n\nNoteworthy: None
is the `nil' object; Ellipsis represents `...' in slices.", 'Exception':
, 'tuple': , 'reversed': , 'UnicodeEncodeError': ,
'input': , 'hasattr': , 'delattr': , 'setattr': , 'SyntaxWarning': , 'compile':
, 'ArithmeticError': , 'str': , 'property': , 'GeneratorExit': , 'int': , '__import__': , 'KeyError': , 'PendingDeprecationWarning': , 'EnvironmentError': , 'ascii': , 'id': , 'OSError': , 'DeprecationWarning': , 'min': , 'UnicodeWarning':
, 'any': , 'complex':
, 'bool': , 'ValueError': , 'NotImplemented': NotImplemented, 'map': ,
'exec': , 'max': ,
'object': , 'TabError': ,
'ZeroDivisionError': , 'eval': , '__debug__': True, 'IndentationError': , 'AssertionError': ,
'classmethod': , 'UnboundLocalError': , 'NotImplementedError': , 'AttributeError': ,
'OverflowError': }, '__file__':
'/temp/python/py3k/Lib/test/test_builtin.py', 'BuiltinTest': , 'TestFailingBool': , 'sys': ,
'test': ,
'__name__': 'test.test_builtin', 'unlink': , 'TESTFN': '@test', 'TestSorted': , 'BitBucket': , 'fcmp': } !=
{'unittest': , 'random': , 'test_conv_no_sign': [('0', 0),
('1', 1), ('9', 9), ('10', 10), ('99', 99), ('100', 100), ('314', 314),
(' 314', 314), ('314 ', 314), ('  \t\t  314  \t\t  ', 314),
('2147483647', 2147483647), ('  1x', ), ('  1  ',
1), ('  1\x02  ', ), ('', ), ('
', ), ('  \t\t  ', ),
('\u0663\u0661\u0664 ', 314), ('\u0200', )],
'test_conv_sign': [('0', 0), ('1', 

[issue3463] make life.py use more rendering characters

2008-07-28 Thread mvngu

New submission from mvngu <[EMAIL PROTECTED]>:

Allows life.py to use other characters for rendering (alphanumeric plus
punctuation characters), apart from the default asterisk "*". The
rendering character can be specified from the command line.

--
components: Demos and Tools
files: life.py.diff
keywords: patch
messages: 70375
nosy: mvngu
severity: normal
status: open
title: make life.py use more rendering characters
type: behavior
versions: Python 3.0
Added file: http://bugs.python.org/file11001/life.py.diff

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3453] PyType_Ready doesn't ensure that all bases are ready

2008-07-28 Thread Roger Upole

Roger Upole <[EMAIL PROTECTED]> added the comment:

If that were the case, it wouldn't need to call PyType_Ready for 
tp_base either.  From stepping thru the code, there are several places 
in the interpreter core that PyType_Ready is called for types whose 
tp_base has not been initialized yet.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3464] Python & NCURSES

2008-07-28 Thread nandhakumar

New submission from nandhakumar <[EMAIL PROTECTED]>:

i have installed python 2.4 and ncurses 5.4 in my linux server.
 
Python script is working fine but when i tried using thread function in
my script(which also uses ncurses) it gives the following error: 

 
Traceback (most recent call last):
  File ".py", line 199, in ?
curses.wrapper(AnDoRun)
  File "/usr/local/lib/python2.4/curses/wrapper.py", line 44, in wrapper
return func(stdscr, *args, **kwds)
  File ".py", line 182, in AnDoRun
ando.start()
  File ".py", line 136, in start
self.proxyManagerThread.start()
  File "/usr/local/lib/python2.4/threading.py", line 416, in start
_start_new_thread(self.__bootstrap, ())
thread.error: can't start new thread

help me how can i solve this problem ASAP

--
components: None
messages: 70377
nosy: nandha
severity: normal
status: open
title: Python & NCURSES
type: compile error
versions: Python 2.4

___
Python tracker <[EMAIL PROTECTED]>

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