[issue38876] pickle is raising KeyError insteat of pickle.UnpicklingError under certain conditions

2019-11-24 Thread Alexandre Vassalotti
Change by Alexandre Vassalotti : -- assignee: -> alexandre.vassalotti resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: -Python 3.7, Python 3.8 ___ Python tracker

[issue38876] pickle is raising KeyError insteat of pickle.UnpicklingError under certain conditions

2019-11-24 Thread miss-islington
miss-islington added the comment: New changeset 6f03b236c17c96bc9f8a004ffa7e7ae0542e9cac by Miss Islington (bot) (Claudiu Popa) in branch 'master': bpo-38876: Raise pickle.UnpicklingError when loading an item from memo for invalid input (GH-17335)

[issue38876] pickle is raising KeyError insteat of pickle.UnpicklingError under certain conditions

2019-11-22 Thread PCManticore
Change by PCManticore : -- keywords: +patch pull_requests: +16819 stage: -> patch review pull_request: https://github.com/python/cpython/pull/17335 ___ Python tracker ___

[issue38876] pickle is raising KeyError insteat of pickle.UnpicklingError under certain conditions

2019-11-21 Thread PCManticore
PCManticore added the comment: It seems there are a couple of places in `_pickle.c` where we favour a `KeyError` instead of `UnpicklingError` such as https://github.com/python/cpython/blob/master/Modules/_pickle.c#L6178. From a quick debugging it seems it originates in `load_long_binget`.

[issue38876] pickle is raising KeyError insteat of pickle.UnpicklingError under certain conditions

2019-11-21 Thread Batuhan
Change by Batuhan : -- nosy: +BTaskaya, alexandre.vassalotti versions: +Python 3.8, Python 3.9 ___ Python tracker ___ ___

[issue38876] pickle is raising KeyError insteat of pickle.UnpicklingError under certain conditions

2019-11-21 Thread Linus Pithan
New submission from Linus Pithan : When unpickling fails one would expect a pickle.UnpicklingError exception or at least a PickleError. However, when trying pickle.loads(b"jens:") it fails with KeyError: 980643429 which is not the wanted behaviour. -- components: Library (Lib)