New submission from Rémi Lapeyre <remi.lape...@henki.fr>: This should target Python3.10, current behavior is:
Python 3.10.0a0 (heads/master:19e3e00264, May 19 2020, 14:40:31) [Clang 11.0.3 (clang-1103.0.32.29)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import shelve, pathlib >>> shelve.open(pathlib.Path('spam')) Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/Users/remi/src/cpython/Lib/shelve.py", line 243, in open return DbfilenameShelf(filename, flag, protocol, writeback) File "/Users/remi/src/cpython/Lib/shelve.py", line 227, in __init__ Shelf.__init__(self, dbm.open(filename, flag), protocol, writeback) File "/Users/remi/src/cpython/Lib/dbm/__init__.py", line 78, in open result = whichdb(file) if 'n' not in flag else None File "/Users/remi/src/cpython/Lib/dbm/__init__.py", line 113, in whichdb f = io.open(filename + ".pag", "rb") TypeError: unsupported operand type(s) for +: 'PosixPath' and 'str' >>> ---------- components: Library (Lib) messages: 369349 nosy: remi.lapeyre priority: normal severity: normal status: open title: shelve.open() should accept pathlib.Path type: behavior _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue40681> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com