[issue1727780] 64/32-bit issue when unpickling random.Random

2007-09-23 Thread Martin v. Löwis

Changes by Martin v. Löwis:


--
assignee:  -> loewis
severity: normal -> major

_
Tracker <[EMAIL PROTECTED]>

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



[issue1130] Idle - Save (buffer) - closes IDLE and does not save file (Windows XP)

2007-09-23 Thread Tal Einat

New submission from Tal Einat:

The saving bug is a string/bytes issue, simply fixed by replaced line
366 in Lib\idlelib\IOBinding.py with:
chars = chars.replace(b"\n", self.eol_convention.encode('ASCII'))

--
nosy: +taleinat

__
Tracker <[EMAIL PROTECTED]>

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



[issue1182] Paticular decimal mod operation wrongly output NaN.

2007-09-23 Thread Hirokazu Yamamoto


Hirokazu Yamamoto
 added the comment:

I tracked down, and I noticed following code was invoked.

Lib/decimal.py (release-maint25 Decimal#_rescale)

1912: if watchexp and digits > context.prec:
1913: return context._raise_error(InvalidOperation, 'Rescale > prec')

from decimal import *
d = Decimal("23.08589694291355371979265447")
print d % Decimal("2.302585092994045640179914546844") # NaN
print Decimal("0.060046012973097317993509001560")._rescale(-30) # error

Length of decimal seems to be important, so I changed length and it
seemed working.

print d % Decimal("2.302585092994045640179914547") #
0.060046012973097317993509000

Maybe is this intended behavior? Still I feel 2.6's behavior is less
suprising though...

__
Tracker <[EMAIL PROTECTED]>

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



[issue1160] Medium size regexp crashes python

2007-09-23 Thread Fredrik Lundh

Fredrik Lundh added the comment:

Well, I'm not sure 81k qualifies as "medium sized", really.  If you look
at the size distribution for typical RE:s (which are usually
handwritten, not machine generated), that's one or two orders of
magnitude larger than "medium".

(And even if this was guaranteed to work on all Python builds, my guess
is that performance would be pretty bad compared to a using a minimal RE
and checking potential matches against a set.  The "|" operator is
mostly O(N), not O(1).)

As for fixing this, the "byte code" used by the RE engine uses a word
size equal to the Unicode character size (sizeof(Py_UNICODE)) for the
given platform.  I don't think it would be that hard to set it to 32
bits also on platforms using 16-bit Unicode characters (if anyone would
like to experiment, just set SRE_CODE to "unsigned long" in sre.h and
see what happens when you run the test suite).

__
Tracker <[EMAIL PROTECTED]>

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



[issue1192] Python 3 documents crash Firefox

2007-09-23 Thread Robert T McQuaid

New submission from Robert T McQuaid:

I downloaded python-3.0a1.msi for Windows XP and after install converted
the documentation from chm format to html with the hh.exe utility in XP.
The resulting files crashed Firefox version 2.0 (it slowly chokes to
death in a dozen operations), but worked fine on Opera 9.21.

--
components: Documentation
messages: 56099
nosy: rtmq
severity: minor
status: open
title: Python 3 documents crash Firefox
type: behavior
versions: Python 3.0

__
Tracker <[EMAIL PROTECTED]>

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



[issue1192] Python 3 documents crash Firefox

2007-09-23 Thread Martin v. Löwis

Martin v. Löwis added the comment:

Why do you think this is a bug in Python? If Firefox crashes, isn't this
rather a bug in Firefox? Please report it at bugzilla.mozilla.com.

Closing as third-party bug.

--
nosy: +loewis
resolution:  -> invalid
status: open -> closed
versions: +3rd party -Python 3.0

__
Tracker <[EMAIL PROTECTED]>

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



[issue1193] os.system() encoding bug on Windows

2007-09-23 Thread Fan Decheng

New submission from Fan Decheng:

Python 3.0 uses utf-8 encoding, but os.system() when running on Windows 
uses
the system default encoding, which may be "cp936" or "mbcs". They are
incompatible.

--
components: Library (Lib)
messages: 56101
nosy: r_mosaic
severity: major
status: open
title: os.system() encoding bug on Windows
type: behavior
versions: Python 3.0

__
Tracker <[EMAIL PROTECTED]>

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



[issue1193] os.system() encoding bug on Windows

2007-09-23 Thread Fan Decheng

Fan Decheng added the comment:

Steps to reproduce:

1. Use a Windows, with system default encoding to cp936 (Chinese PRC, or
Simplified Chinese) in Regional Options.
2. Open Python 3.0 (command line).
3. Type:
import os
import sys
os.system(("echo " + sys.stdin.readline().rstrip("\n")).encode("cp936"))
(in stdin type:)
我

Result:
The output from "echo" would be utf-8 mistakenly used as cp936:
鎴?

Expected result:
The "echo" command outputs "我".

Comments:
I guess os.system can recoding the string before sending the string out.
This may be done in the C part of Python. BTW, The os.popen() function 
is
correct.

__
Tracker <[EMAIL PROTECTED]>

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



[issue1194] The reduce() documentation is lost in Python 3.0a1

2007-09-23 Thread Fan Decheng

New submission from Fan Decheng:

The reduce() documentation is lost in Python 3.0a1.
In the documentation, functools.reduce() points onto itself, so no
further explanation can be found.

--
components: Documentation
messages: 56103
nosy: r_mosaic
severity: minor
status: open
title: The reduce() documentation is lost in Python 3.0a1
type: rfe
versions: Python 3.0

__
Tracker <[EMAIL PROTECTED]>

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