[issue4622] SequenceMatcher bug with long sequences

2008-12-10 Thread Gabriel Genellina

Gabriel Genellina [EMAIL PROTECTED] added the comment:

Python 2.3.4 and later have this bug. But release 2.1.3 doesn't:

Python 2.1.3 (#35, Apr  8 2002, 17:47:50) [MSC 32 bit (Intel)] on win32
Type copyright, credits or license for more information.
 import difflib
 difflib.SequenceMatcher(None, [4] + [5] * 500, [5] * 500).ratio()
0.99900099900099903
 difflib.SequenceMatcher(None, [4] + [5] * 200, [5] * 200).ratio()
0.99750623441396513
 difflib.SequenceMatcher(None, [4] + [5] * 100, [5] * 100).ratio()
0.99502487562189057

I don't have any 2.2 release to test right now.

--
nosy: +gagenellina

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue4622
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4622] SequenceMatcher bug with long sequences

2008-12-10 Thread Gabriel Genellina

Gabriel Genellina [EMAIL PROTECTED] added the comment:

#2986 may be a duplicate of this; #1528074 is relevant too.

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue4622
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4561] Optimize new io library

2008-12-10 Thread Ismail Donmez

Changes by Ismail Donmez [EMAIL PROTECTED]:


--
nosy: +cartman

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue4561
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4580] slicing of memoryviews when itemsize != 1 is wrong

2008-12-10 Thread Nick Coghlan

Nick Coghlan [EMAIL PROTECTED] added the comment:

It's quite possible that I misread the array.array implementation since
I only glanced at the code where it fills in the Py_buffer details - I
saw the point where it set shape to NULL, but there may have been code
later on to fill it in correctly that I missed.

Regardless, a coupe of sanity checks on the Py_buffer contents before
returning from PyObject_GetBuffer may still be useful to avoid the need
for buffer protocol consumers to repeat them all the time (I see this as
similar to the type-correctness and range checks we do for things like
the index protocol).

Antoine, regarding the shapes and strides info for subviews: don't think
of it as reallocating or altering the shape of the underlying buffer.
Think of it as having separate shape and stride information for the
contents of the underlying buffer (i.e. what memoryview gets back from
the PyObject_GetBuffer call) and for the view it exposes through
indexing and the like (i.e. taking into account the start and stop
offsets from the slicing operation). This is what I mean when I say that
the current memoryview relies too heavily on the Py_buffer that
describes the underlying object - the memoryview needs to maintain its
own state *outside* that description. It just so happens that fully
describing an arbitrary fragment of the underlying buffer will take a
number of the fields that would exist in a separate Py_buffer struct
(specifically len, ndim, shape, strides and offsets if we want to cover
the non-contiguous and ndim  1 cases - for the contiguous 1-D cases, we
don't needs strides or offsets).

Once we consider that aspect, I think it makes the most sense to just
maintain 2 Py_buffer instances inside the memoryview - one that
describes the underlying buffer, and one that describes the memoryview
itself after slicing is taken into account.

I also think it is worth considering changing the memoryview to also
take start/stop/step arguments in addition to the object to be viewed
(initially only supporting step=1, just like slicing, but we should be
able to lift that limitation as the implementation matures). The
FromBuffer C-level constructor could probably go away at that point.

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue4580
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4580] slicing of memoryviews when itemsize != 1 is wrong

2008-12-10 Thread Alexander Belopolsky

Changes by Alexander Belopolsky [EMAIL PROTECTED]:


--
nosy: +belopolsky

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue4580
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4580] slicing of memoryviews when itemsize != 1 is wrong

2008-12-10 Thread Nick Coghlan

Nick Coghlan [EMAIL PROTECTED] added the comment:

Antoine's latest patch looks to me like it will fix the current actual
errors in the 1-D case.

Something that may also be considered part of this bug is the fact that
m[i] = m[i] doesn't currently work for itemsize  1.

There is a XXX comment in the memory view implementation as to whether
we should require itemsize == itemsize in addition to len == len
when replacing sections of a memoryview. I think the failure of
self-assignment shows that we should only be caring about whether or not
the total memory size being overwritten matches, rather than the
underlying format or size.

Alternatively, we could just special case it and say that assignemnt
from buffers with itemsize=1 (i.e. raw bytes) is always acceptable,
regardless of the itemsize of the buffer underlying the memoryview.

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue4580
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue887237] Machine integers

2008-12-10 Thread Alexander Belopolsky

Changes by Alexander Belopolsky [EMAIL PROTECTED]:


Added file: http://bugs.python.org/file12323/ctypes-numbermixins-1.patch

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue887237
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue887237] Machine integers

2008-12-10 Thread Thomas Heller

Thomas Heller [EMAIL PROTECTED] added the comment:

 One difficulty with the patch is that the original ctypes code
 contained a tp_as_number ...

This can be solved by changing the order of bases for c_type classes.  
See attached.

Cool! Why didn't I think of that myself?

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue887237
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4610] Unicode case mappings are incorrect

2008-12-10 Thread Alex Stapleton

Alex Stapleton [EMAIL PROTECTED] added the comment:

I agree with loewis that ICU is probably the best way to get this 
functionality into Python.

lemburg, yes it seems like extending those methods would be required at 
the very least. We would probably also need to support ICUs collators as 
well I think.

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue4610
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4619] Invalid Behaviour When a Default Argument is a Mutable Object

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

Martin v. Löwis [EMAIL PROTECTED] added the comment:

I don't see the need to do anything about this. Python works correctly,
and the documentation correctly describes how it works, and how using
mutable objects as default values typically doesn't do what the
programmer normally expects.

In any case, a bug report is not the place to request such a change. At
a minimum, a PEP would have to be written (which then likely can't be
accepted before Python 4.0).

--
nosy: +loewis
resolution:  - wont fix
status: open - closed

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue4619
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4598] IDLE not opening

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

Martin v. Löwis [EMAIL PROTECTED] added the comment:

Ok, closing that as not reproducable, then.

--
resolution:  - works for me
status: open - closed

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue4598
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4185] re module treats raw strings as normal strings

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

Martin v. Löwis [EMAIL PROTECTED] added the comment:

 Eh? It's just a doc bug now.

[assuming you are wondering why it is out of scope for 2.5.3]
I don't understand the actual issue (and don't have time to find out
what it is), so somebody else would have to provide a patch. Since there
is no patch, this issue likely misses 2.5.3 (if it is just an error
in a doc string, I don't find it particularly necessary to fix it
in the bug fix release, either).

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue4185
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3999] Real segmentation fault handler

2008-12-10 Thread Gabriel Genellina

Changes by Gabriel Genellina [EMAIL PROTECTED]:


--
nosy: +gagenellina

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3999
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4597] EvalFrameEx fails to set 'why' for some exceptions

2008-12-10 Thread Amaury Forgeot d'Arc

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

Reopening: this need to be manually merged into 2.6 and 3.0 maintenance 
branches.

+ a NEWS entry is still missing.

--
nosy: +amaury.forgeotdarc
stage: committed/rejected - commit review
status: closed - open

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue4597
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4620] Memory leak with datetime used with time.strptime

2008-12-10 Thread Gabriel Genellina

Gabriel Genellina [EMAIL PROTECTED] added the comment:

After running for more than 2 hours, I could not see any memory growth 
with 2.5.2 on WinXP.

--
nosy: +gagenellina

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue4620
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4589] 'with' loses -bool exceptions

2008-12-10 Thread Amaury Forgeot d'Arc

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

Fixed with r67684 (2.5), r67688 (trunk), r67689 (py3k), r67690 (3.0), 
r67691 (2.6).

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

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue4589
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1030250] distutils' dry-run wants to create some real build dirs

2008-12-10 Thread Amaury Forgeot d'Arc

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

Committed r67692 (trunk).

I don't feel the need to backport: this issue was opened 4 years ago, it 
is not urgent anymore ;-)

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1030250
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1030250] distutils' dry-run wants to create some real build dirs

2008-12-10 Thread Amaury Forgeot d'Arc

Changes by Amaury Forgeot d'Arc [EMAIL PROTECTED]:


--
resolution:  - fixed
status: open - closed

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1030250
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3999] Real segmentation fault handler

2008-12-10 Thread Alexander Belopolsky

Changes by Alexander Belopolsky [EMAIL PROTECTED]:


--
nosy: +belopolsky

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3999
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4416] state_reset not called on 'state' before sre_search invoked

2008-12-10 Thread Brian Szuter

Brian Szuter [EMAIL PROTECTED] added the comment:

Examples:
/Python-2.5.2/Modules/_sre.c Lines 3289 - 3297 (scanner_search)
/Python-2.5.2/Modules/_sre.c Lines 2349 - 2357 (pattern_subx)
/Python-2.5.2/Modules/_sre.c Lines 2197 - 2205 (pattern_split)
/Python-2.5.2/Modules/_sre.c Lines 2067 - 2075 (pattern_findall)

--
versions: +Python 2.5.3 -Python 2.7

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue4416
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4416] state_reset not called on 'state' before sre_search invoked

2008-12-10 Thread Brian Szuter

Changes by Brian Szuter [EMAIL PROTECTED]:


--
versions: +Python 2.7 -Python 2.5.3

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue4416
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4416] state_reset not called on 'state' before sre_search invoked

2008-12-10 Thread Brian Szuter

Brian Szuter [EMAIL PROTECTED] added the comment:

This bug was found using a research tool that finds potential neglected
condition bugs by examining a code base, deducing rules from the code
base, and finding violations of those rules.  
I have not attempted to demonstrate a problem visible to users from this
bug, and so cannot provide a test case demonstrating a problem.

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue4416
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4216] subprocess.Popen hangs at communicate() when child exits

2008-12-10 Thread Louis-Dominique Dubeau

Louis-Dominique Dubeau [EMAIL PROTECTED] added the comment:

I'm running python 2.5.2 on Ubuntu 8.10.

I believe I've also encountered the problem reported here.  The scenario
in my case was the following:

1. Python process A uses subprocess.Popen to create another python
process (B).  Process B is created with stdout=PIPE and stderr=PIPE.
Process A communicates with process B using communicate().

2. Python process B, starts a ssh process (process C) which is invoked
to open a new control socket in master mode.  Process C is started
without pipes so it gets its std{in,out,err} from process B.  Process C
is going to run for a long time.  That is, it will run until a command
is sent to the control socket to close the ssh connexion.

3. Process B does not wait for process C to end, so it ends right away.

4. Python process A remains stuck in communicate() until process C (ssh)
dies even though process B has ended already.

Analysis:

The reason for this is that process C (ssh) gets its stdout and stderr
from process B.  But process C keeps both stdout and stderr opened until
it is terminated.  So process A does not get an EOF on the pipes it
opened for communicating with process B until process C ends.

The set of conditions which will trigger the effect is not outlandish.
However, it is specific enough that testing by executing pwd or ls
-l, or echo blah or any other simple command won't trigger it.

In my case, I fixed the problem by changing the code of process B to
invoke process C with stdout and stderr set to PIPE and close those
pipes as soon as process B is satisfied that process C is started
properly.  In this way, process A does not block.

(FYI, process A in my case is the python testing tool nosetests.  I use
nosetests to test a backup script written in python and that script
invokes ssh.)

It seems that in general subprocess creators might have two needs:

1. Create a subprocess and communicate with it until there is no more
data to be passed to its stdin or data to be read from its std{out,err}.

2. Create a subprocess and communicate with it *only* until *this*
process dies.  After it is dead, neither stdout nor stderr are of any
interest.

Currently, need 1 is addressed by communicate() but not need 2.  In my
scenario above, I was able to work around the problem by modifying
process B but there are going to be cases where process B is not
modifiable (or at least not easily modifiable).  In those cases, process
A has to be able to handle it.

--
nosy: +lemur

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue4216
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4623] IDLE shutdown if I run an edited file contains chinese

2008-12-10 Thread bianpeng

New submission from bianpeng [EMAIL PROTECTED]:

I use IDLE edit an script, if the script contains chinese,
IDLE crashed if run the script.

I put chinese character in commoent or string, and both get the same result.

--
components: IDLE
files: test.py
messages: 77583
nosy: bianpeng
severity: normal
status: open
title: IDLE shutdown if I run an edited file contains chinese
type: crash
versions: Python 3.0
Added file: http://bugs.python.org/file12324/test.py

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue4623
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4259] Update pydoc URLs

2008-12-10 Thread A.M. Kuchling

A.M. Kuchling [EMAIL PROTECTED] added the comment:

Committed to 2.5 in rev. 67693.

Do I need to 'svnmerge block' this revision to prevent
future merges from attempting to apply it to trunk?

--
status: open - closed

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue4259
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4624] Can not import readline on python3.0 (ubuntu 8.04)

2008-12-10 Thread X Xiao

New submission from X Xiao [EMAIL PROTECTED]:

I can import readline just fine on AMD64 ubuntu 8.04 under python3.0,
however on 32-bit ubuntu 8.04 I could not import readline for
python3.0. It says 
import readline
ImportError: No module named readline. I made sure both ubuntu machines
have readline installed correctly, python2.x runs well and can import
readline without any issues.

--
components: Installation
messages: 77585
nosy: xxiao
severity: normal
status: open
title: Can not import readline on python3.0 (ubuntu 8.04)
type: behavior
versions: Python 3.0

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue4624
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4624] Can not import readline on python3.0 (ubuntu 8.04)

2008-12-10 Thread Benjamin Peterson

Benjamin Peterson [EMAIL PROTECTED] added the comment:

Did you build Python yourself? If so, can you paste the last lines of
the build process like this:

Failed to find the necessary bits to build these modules:
bsddb185   gdbm   linuxaudiodev   
ossaudiodevspwd   sunaudiodev 
To find the necessary bits, look in setup.py in detect_modules() for the
module's name.

running build_scripts

--
nosy: +benjamin.peterson

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue4624
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4624] Can not import readline on python3.0 (ubuntu 8.04)

2008-12-10 Thread X Xiao

X Xiao [EMAIL PROTECTED] added the comment:

I just rebuild it again, it went away. not sure what I did wrong at
first try.

The last few lines during compilation are:
INFO: Can't locate Tcl/Tk libs and/or headers

Failed to find the necessary bits to build these modules:
_dbm   _sqlite3   _tkinter
To find the necessary bits, look in setup.py in detect_modules() for the
module's name.

Looks like I need install python-sqlite etc.

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue4624
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4624] Can not import readline on python3.0 (ubuntu 8.04)

2008-12-10 Thread Benjamin Peterson

Changes by Benjamin Peterson [EMAIL PROTECTED]:


--
resolution:  - invalid
status: open - closed

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue4624
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4625] IDLE won't open anymore, .idlerc unaccessible

2008-12-10 Thread Sophia K. Cheng

New submission from Sophia K. Cheng [EMAIL PROTECTED]:

Hello,

I was able to run IDLE once or twice on my laptop.  Then I downloaded
kiki and tried to run it but had forgotten to install wxPython.  After
that, IDLE no longer opens although the command prompt does still work.
 I get the following error:

C:\Python25python.exe Lib\idlelib\idle.py
Traceback (most recent call last):
  File Lib\idlelib\idle.py, line 21, in module
idlelib.PyShell.main()
  File C:\Python25\lib\idlelib\PyShell.py, line 1404, in main
shell = flist.open_shell()
  File C:\Python25\lib\idlelib\PyShell.py, line 275, in open_shell
self.pyshell = PyShell(self)
  File C:\Python25\lib\idlelib\PyShell.py, line 813, in __init__
OutputWindow.__init__(self, flist, None, None)
  File C:\Python25\lib\idlelib\OutputWindow.py, line 16, in __init__
EditorWindow.__init__(self, *args)
  File C:\Python25\lib\idlelib\EditorWindow.py, line 248, in __init__
self.update_recent_files_list()
  File C:\Python25\lib\idlelib\EditorWindow.py, line 715, in
update_recent_fil
es_list
rf_file = open(self.recent_files_path, 'w')
IOError: [Errno 13] Permission denied: 'C:\\Documents and
Settings\\skcheng\\.id
lerc\\recent-files.lst'

I've tried uninstalling and reinstalling several times 2.5 and also 2.6.
 When I look at the folder .idlerc in windows explorer, I get an error
each time I click on it that access is denied, even though I am running
as administrator on my laptop. I have tried uninstalling Python and
deleting the .idlerc folder.  I have also tried manually unchecking the
read-only property for the folder. I have a Lenovo T400 that is built
for Windows Vista, but am running Windows XP.  Thank you.

--
components: IDLE
messages: 77588
nosy: skcheng
severity: normal
status: open
title: IDLE won't open anymore, .idlerc unaccessible
versions: Python 2.5.3

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue4625
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3999] Real segmentation fault handler

2008-12-10 Thread Skip Montanaro

Changes by Skip Montanaro [EMAIL PROTECTED]:


--
nosy: +skip.montanaro

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3999
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4084] Decimal.max(NaN, x) gives incorrect results when x is finite and long

2008-12-10 Thread Facundo Batista

Facundo Batista [EMAIL PROTECTED] added the comment:

Commited in trunk and Py3, thanks Mark!

Please, could you commit it in 2.5? The only change I've made in the
patch is adding the issue number to Misc/NEWS, the rest is ok.

After that, just close this.

Thanks again!

--
versions:  -Python 2.6, Python 2.7, Python 3.0, Python 3.1

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue4084
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4626] compile() doesn't ignore the source encoding when a string is passed in

2008-12-10 Thread Brett Cannon

New submission from Brett Cannon [EMAIL PROTECTED]:

When compile() is called with a string it is a reasonable assumption
that it has already been decoded. But this is not in fact the case and
leads to errors when trying to use non-ASCII identifiers::

  source = # coding=latin-1\n\u00c6 = '\u00c6'
  compile(source, 'test', 'exec')
 Traceback (most recent call last):
   File stdin, line 1, in module
   File test, line 2
 Æ = 'Æ'
^
 SyntaxError: invalid character in identifier
  compile(source.encode('latin-1'), 'test', 'exec')
 code object module at 0x389cc8, file test, line 2

--
components: Interpreter Core
messages: 77590
nosy: brett.cannon
severity: normal
stage: needs patch
status: open
title: compile() doesn't ignore the source encoding when a string is passed in
type: behavior
versions: Python 3.0

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue4626
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4627] Add Mac OS X Disk Images to Python.org homepage

2008-12-10 Thread Carl Johnson

New submission from Carl Johnson [EMAIL PROTECTED]:

As recently as Python 2.6.0's release, Python.org had a link to download a 
disk image with a special newb-friendly installer for OS X. See 
http://www.python.org/download/releases/2.6/

Now, it's gone in Python 2.6.1, and it was never there for Python 3.0. 
Which is a pain, because it's really hard to get readlines to install 
just using config/make/install. 

So, whoever is in charge of making that disk image should make it again.

--
components: Macintosh
messages: 77591
nosy: carlj
severity: normal
status: open
title: Add Mac OS X Disk Images to Python.org homepage
type: compile error
versions: Python 2.6, Python 3.0

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue4627
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4597] EvalFrameEx fails to set 'why' for some exceptions

2008-12-10 Thread Jeffrey Yasskin

Jeffrey Yasskin [EMAIL PROTECTED] added the comment:

Added NEWS in r67685; ported to 2.5 branch in r67687; to 2.6 branch in
r67696; to 3.1 branch in r67697; and to 3.0 branch in r67698.

--
status: open - closed

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue4597
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4084] Decimal.max(NaN, x) gives incorrect results when x is finite and long

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

Martin v. Löwis [EMAIL PROTECTED] added the comment:

Mark, if you want to backport this, please go ahead. If want me to,
assign to me.

--
assignee: facundobatista - marketdickinson
priority: normal - release blocker

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue4084
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4627] Add Mac OS X Disk Images to Python.org homepage

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

Martin v. Löwis [EMAIL PROTECTED] added the comment:

Unfortunately, nobody is in charge of making disk images (this is a
volunteer project entirely), so none might get made.

--
nosy: +loewis

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue4627
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4628] No universal newline support for compile() when using bytes

2008-12-10 Thread Brett Cannon

New submission from Brett Cannon [EMAIL PROTECTED]:

Passing in bytes to compile() works well for letting the parser handle
the decoding of a file when an encoding is specified, but it doesn't
take care of universal newlines::

  source = b'a = 1\r\nb = 2\r\n'
  compile(source, 'test', 'exec')
 Traceback (most recent call last):
   File stdin, line 1, in module
   File test, line 1
 a = 1
 ^
 SyntaxError: invalid syntax

--
components: Interpreter Core
messages: 77596
nosy: brett.cannon
severity: normal
stage: needs patch
status: open
title: No universal newline support for compile() when using bytes
type: behavior
versions: Python 3.0

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue4628
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4629] getopt should not accept no_argument that ends with '='

2008-12-10 Thread Wang Chun

New submission from Wang Chun [EMAIL PROTECTED]:

Consider the following program tmp.py:

import sys, getopt
print(getopt.getopt(sys.argv[1:], '', ['help']))

The program accept --help without a value:

python helloworld.py --help

But if someone invoke the program like:

python helloworld.py --help=

Python should raise an error.

--help= is not considered as no_argument in libc's getopt implementation 
(tested on Mac OS X 
Leopard):

#include getopt.h

static struct option longopts[] = { 
{ help, no_argument, NULL, h },
};

#include getopt.h

static struct option longopts[] = { 
{ help, no_argument, NULL, 'h' },
};

int main(int argc, char **argv)
{
while (getopt_long(argc, argv, h, longopts, NULL) != -1);
return 0;
}

macbook:~/tmp$ gcc -o tmp tmp.c
macbook:~/tmp$ ./tmp --help=
tmp: option `--help' doesn't allow an argument
macbook:~/tmp$

--
components: Library (Lib)
messages: 77597
nosy: wangchun
severity: normal
status: open
title: getopt should not accept no_argument that ends with '='
type: behavior
versions: Python 2.1.1, Python 2.1.2, Python 2.2, Python 2.2.1, Python 2.2.2, 
Python 2.2.3, Python 2.3, Python 2.4, Python 2.5, Python 2.5.3, Python 2.6, 
Python 2.7, Python 3.0, Python 3.1

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue4629
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4629] getopt should not accept no_argument that ends with '='

2008-12-10 Thread Wang Chun

Changes by Wang Chun [EMAIL PROTECTED]:


--
keywords: +patch
Added file: http://bugs.python.org/file12325/getopt.py.diff

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue4629
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



<    1   2