[issue34248] dbm errors should contain file names

2018-09-27 Thread Berker Peksag


Change by Berker Peksag :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

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



[issue34248] dbm errors should contain file names

2018-09-27 Thread Berker Peksag


Berker Peksag  added the comment:


New changeset 9df346bf98069a87de14a3c2f69009d800994c63 by Berker Peksag (Zsolt 
Cserna) in branch 'master':
bpo-34248: Add filename to error raised in {gnu,ndbm}.open() (GH-8590)
https://github.com/python/cpython/commit/9df346bf98069a87de14a3c2f69009d800994c63


--

___
Python tracker 

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



[issue34248] dbm errors should contain file names

2018-08-05 Thread Berker Peksag


Berker Peksag  added the comment:

PR 8590 only changes dbm.gnu. If we do this, we should update dbm.ndbm as well:


https://github.com/python/cpython/blob/4a745333406a4b9c5b0194bdac4a77d9fadd5457/Modules/_dbmmodule.c#L65

--
nosy: +berker.peksag
type:  -> enhancement
versions:  -Python 2.7, Python 3.4, Python 3.5, Python 3.6, Python 3.7

___
Python tracker 

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



[issue34248] dbm errors should contain file names

2018-07-31 Thread Zsolt Cserna


Zsolt Cserna  added the comment:

Alright, I created a PR for this. We will see if this can be merged to upstream 
or not.

--

___
Python tracker 

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



[issue34248] dbm errors should contain file names

2018-07-31 Thread Zsolt Cserna


Change by Zsolt Cserna :


--
pull_requests: +8100
stage:  -> patch review

___
Python tracker 

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



[issue34248] dbm errors should contain file names

2018-07-31 Thread sds


sds  added the comment:

thanks for the patch.
alas, I do not build python myself, so I cannot try it.

--

___
Python tracker 

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



[issue34248] dbm errors should contain file names

2018-07-31 Thread Zsolt Cserna


Zsolt Cserna  added the comment:

I've made a patch which works for me.

>>> dbm.gnu.open("/tmp/z")
Traceback (most recent call last):
  File "", line 1, in 
_gdbm.error: [Errno 2] No such file or directory: '/tmp/z'
>>> 


Could you please give it a try?

--
keywords: +patch
nosy: +csernazs
Added file: https://bugs.python.org/file47724/patch.diff

___
Python tracker 

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



[issue34248] dbm errors should contain file names

2018-07-27 Thread sds


New submission from sds :

`dbm` errors should contain file names when appropriate, just like `OSError`.
E.g.:
```
>>> open("fo")
Traceback (most recent call last):
  File "", line 1, in 
FileNotFoundError: [Errno 2] No such file or directory: 'fo'
>>> import dbm.gnu
>>> dbm.gnu.open("fo")
Traceback (most recent call last):
  File "", line 1, in 
_gdbm.error: [Errno 2] No such file or directory
```
the `_gdbm.error` should report the file name `'fo'` just like 
`FileNotFoundError` does (and `exn.args` should contain the file name too!)

--
components: Extension Modules
messages: 322492
nosy: sam-s
priority: normal
severity: normal
status: open
title: dbm errors should contain file names
versions: Python 2.7, Python 3.4, Python 3.5, Python 3.6, Python 3.7, Python 3.8

___
Python tracker 

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