This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author remi.lapeyre
Recipients remi.lapeyre
Date 2020-05-19.12:43:29
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1589892210.12.0.905216269999.issue40681@roundup.psfhosted.org>
In-reply-to
Content
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'
>>>
History
Date User Action Args
2020-05-19 12:43:30remi.lapeyresetrecipients: + remi.lapeyre
2020-05-19 12:43:30remi.lapeyresetmessageid: <1589892210.12.0.905216269999.issue40681@roundup.psfhosted.org>
2020-05-19 12:43:30remi.lapeyrelinkissue40681 messages
2020-05-19 12:43:29remi.lapeyrecreate