[issue5384] mmap and exception type

2016-11-22 Thread Raymond Hettinger

Raymond Hettinger added the comment:

Though the changes look like they would nicely harmonize mmap with other 
modules, I'm going to decline this patch.  No one else has stepped forward to 
offer agreement and it likely isn't worth the disruption that would come from 
breaking existing code.  Unfortunately, the time the fix-up an API is when it 
is proposed rather than years after the ship has already sailed.

Charles-François, thank you for the patch.

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

___
Python tracker 

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



[issue5384] mmap and exception type

2014-02-03 Thread Mark Lawrence

Changes by Mark Lawrence breamore...@yahoo.co.uk:


--
nosy:  -BreamoreBoy

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



[issue5384] mmap and exception type

2011-06-02 Thread Charles-François Natali

Charles-François Natali neolo...@free.fr added the comment:

Here's a patch.

--
keywords: +needs review, patch
nosy: +charles-francois.natali, haypo
stage:  - patch review
versions: +Python 3.3 -Python 2.7, Python 3.1
Added file: http://bugs.python.org/file0/mmap_exceptions.diff

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



[issue5384] mmap and exception type

2011-06-02 Thread Raymond Hettinger

Raymond Hettinger raymond.hettin...@gmail.com added the comment:

It is uncomfortable changing exception types have been a published API for over 
a decade, so I'll leave this one open for a bit so that others can comment.

Most of the changes in the patch are correct and match their counterparts for 
lists and strings.  The TypeError for slice deletion was correct as-is (it 
matches del 'abc'[1]).  The IndexError on slice assignment may be correct as-is 
(I'll do more research).  The from ValueError to SystemError is questionable.  
Otherwise, the patch looks to be mostly correct (I'll give it a more thorough 
review later).

--
assignee:  - rhettinger
nosy: +rhettinger
priority: normal - low

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



[issue5384] mmap and exception type

2010-07-09 Thread Mark Lawrence

Mark Lawrence breamore...@yahoo.co.uk added the comment:

Could someone please advise on the appropriate exception types for mmap.

--
nosy: +BreamoreBoy

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



[issue5384] mmap and exception type

2009-02-27 Thread Hirokazu Yamamoto

New submission from Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp:

It seems mmap module is using inappropriate exception types. For example,

if (! (PyString_Check(v)) ) {
PyErr_SetString(PyExc_IndexError,
mmap slice assignment must be a string);
return -1;
}

I think this should be PyExc_TypeError.

if (self-size = pos  count  self-size - pos) {
PyErr_SetString(PyExc_ValueError,
source or destination out of range);
return NULL;

I think this is out of range, so PyExc_IndexError.

Of course, there is the case difficult to determine which exception is
suitable. For example, if Py_ssize_t is negative value, OverflowError or
IndexError?

--
messages: 82849
nosy: ocean-city
severity: normal
status: open
title: mmap and exception type
type: behavior
versions: Python 2.7, Python 3.1

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