[issue37210] Pure Python pickle module should not depend on _pickle.PickleBuffer

2019-06-13 Thread miss-islington
miss-islington added the comment: New changeset cbda40db7b604b377acfd3f04e19407ca33748a7 by Miss Islington (bot) in branch '3.8': bpo-37210: Fix pure Python pickle when _pickle is unavailable (GH-14016) https://github.com/python/cpython/commit/cbda40db7b604b377acfd3f04e19407ca33748a7

[issue37210] Pure Python pickle module should not depend on _pickle.PickleBuffer

2019-06-13 Thread STINNER Victor
STINNER Victor added the comment: I pushed my change to 3.8 and master branches. I close the issue. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue37210] Pure Python pickle module should not depend on _pickle.PickleBuffer

2019-06-13 Thread miss-islington
Change by miss-islington : -- keywords: +patch pull_requests: +13917 stage: resolved -> patch review pull_request: https://github.com/python/cpython/pull/14055 ___ Python tracker

[issue37210] Pure Python pickle module should not depend on _pickle.PickleBuffer

2019-06-13 Thread STINNER Victor
STINNER Victor added the comment: New changeset 63ab4ba07b492448844940c347787ba30735b7f2 by Victor Stinner in branch 'master': bpo-37210: Fix pure Python pickle when _pickle is unavailable (GH-14016) https://github.com/python/cpython/commit/63ab4ba07b492448844940c347787ba30735b7f2

[issue37210] Pure Python pickle module should not depend on _pickle.PickleBuffer

2019-06-12 Thread STINNER Victor
Change by STINNER Victor : -- resolution: wont fix -> status: closed -> open ___ Python tracker ___ ___ Python-bugs-list mailing

[issue37210] Pure Python pickle module should not depend on _pickle.PickleBuffer

2019-06-12 Thread STINNER Victor
STINNER Victor added the comment: I wrote a simple PR, PR 14016, to fix the pure Python implementation of pickle: simply restrict pickle to protocol 4 if PickleBuffer is missing. -- ___ Python tracker

[issue37210] Pure Python pickle module should not depend on _pickle.PickleBuffer

2019-06-12 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +13881 pull_request: https://github.com/python/cpython/pull/14016 ___ Python tracker ___

[issue37210] Pure Python pickle module should not depend on _pickle.PickleBuffer

2019-06-12 Thread STINNER Victor
STINNER Victor added the comment: FYI pyperformance is affected by this issue: vstinner@apu$ env/bin/python ~/prog/python/pyperformance/pyperformance/benchmarks/bm_pickle.py unpickle --pure-python -v -p3 Traceback (most recent call last): File

[issue37210] Pure Python pickle module should not depend on _pickle.PickleBuffer

2019-06-11 Thread Antoine Pitrou
Antoine Pitrou added the comment: Ok, closing then. -- resolution: -> wont fix stage: -> resolved status: open -> closed ___ Python tracker ___

[issue37210] Pure Python pickle module should not depend on _pickle.PickleBuffer

2019-06-11 Thread Alex Willmer
Alex Willmer added the comment: > it is probably not possible to write a pure Python PickleBuffer Fair enough > a usable pure Python Pickler, but without support for the PickleBuffer class. That makes sense. However, for third party packages (e.g. zodbpickle, pikl) wanting a pure Python

[issue37210] Pure Python pickle module should not depend on _pickle.PickleBuffer

2019-06-11 Thread Antoine Pitrou
Antoine Pitrou added the comment: Right, it is probably not possible to write a pure Python PickleBuffer. There's a reason it's written in C... When you said "make PickleBuffer an optional dependency", I thought you intended to have a usable pure Python Pickler, but without support for the

[issue37210] Pure Python pickle module should not depend on _pickle.PickleBuffer

2019-06-11 Thread Alex Willmer
Alex Willmer added the comment: I don't think I can do this. My WIP code is in https://github.com/moreati/cpython/pull/new/bpo-37210, and associated make test output is attached. Principal blockers - `_pickle.PickleBuffer.raw()` can return a contiguous buffer from either a c_contiguous,

[issue37210] Pure Python pickle module should not depend on _pickle.PickleBuffer

2019-06-09 Thread Alex Willmer
Alex Willmer added the comment: Attempting a PR -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue37210] Pure Python pickle module should not depend on _pickle.PickleBuffer

2019-06-09 Thread Antoine Pitrou
Antoine Pitrou added the comment: In short I'm not against making PickleBuffer optional but I'm not sure it makes a lot of sense. Would you make memoryview optional because it's written in C? Is anyone annoyed by the fact that something comes from _pickle.c. (note that the pure Python

[issue37210] Pure Python pickle module should not depend on _pickle.PickleBuffer

2019-06-09 Thread Antoine Pitrou
Antoine Pitrou added the comment: Note that PickleBuffer is really a built-in type (it's defined in Objects/picklebufobject.c). However it's exposed from _pickle.c because it doesn't make sense to expose it in the `builtins` module. -- ___ Python

[issue37210] Pure Python pickle module should not depend on _pickle.PickleBuffer

2019-06-09 Thread Alex Willmer
Alex Willmer added the comment: Arggh, typo. I mean maximizing *your* convenience is paramount. -- ___ Python tracker ___ ___

[issue37210] Pure Python pickle module should not depend on _pickle.PickleBuffer

2019-06-09 Thread Alex Willmer
Alex Willmer added the comment: I noticed this because I was experimenting with pickle.py from the 3.8 branch to support protocol 5 in https://github.com/moreati/pikl (and later to https://pypi.org/project/zodbpickle/). However I want to make it clear, if CPython maintainers wish to keep

[issue37210] Pure Python pickle module should not depend on _pickle.PickleBuffer

2019-06-09 Thread Christian Heimes
New submission from Christian Heimes : In https://twitter.com/moreati/status/1137815804530049028 Alex Willmer wrote: > In CPython 3.8dev the pure http://pickle.py module now depends on the C > _pickle module, but only for one class >