{ "info": { "author": "Alex Willmer", "author_email": "alex@moreati.org.uk", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "License :: OSI Approved :: Python Software Foundation License", "License :: OSI Approved :: Zope Public License", "Operating System :: MacOS :: MacOS X", "Operating System :: Microsoft :: Windows", "Operating System :: Unix", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: Jython", "Programming Language :: Python :: Implementation :: PyPy", "Topic :: Database", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "``pikl`` README\n===============\n\n.. image:: https://travis-ci.org/moreati/pikl.svg?branch=master\n :target: https://travis-ci.org/moreati/pikl\n\n.. image:: https://coveralls.io/repos/github/moreati/pikl/badge.svg\n :target: https://coveralls.io/github/moreati/pikl\n :alt: Coverage status\n\n.. image:: https://img.shields.io/pypi/v/pikl.svg\n :target: https://pypi.python.org/pypi/pikl\n :alt: PyPI\n\n.. image:: https://img.shields.io/pypi/pyversions/pikl.svg\n :target: https://pypi.python.org/pypi/pikl\n :alt: Python versions\n\nThis package is an attempt to create a rehabilitated pickle module:\n\n- GLOBAL and INST opcodes have been removed. The copyreg extension registry is\n left as the only (opt-in) mechanism to dump or load custom classes.\n\n- Protocol 0 and 1 support has been removed. Only binary pickles are accepted.\n\n- Protocol 3 is the default protocol on both Python 2.x and Python 3.x\n\n``pikl`` is derived from zodbpickle_, a uniform pickling interface for ZODB.\n\n.. _zodbpickle: https://github.com/zopefoundation/zodbpickle\n\nCaution\n-------\n\n``pikl`` is ultimately derived from Python's ``pickle`` module.\nAlthough efforts have been made to remove identified security vulnerabilities,\nit is almost certain that more vulneravilities remain.\n\nThe ``pickle`` module is not intended to be secure against erroneous or\nmaliciously constructed data. Never unpickle data received from an\nuntrusted or unauthenticated source as arbitrary code might be executed.\n\nAlso see https://docs.python.org/3.6/library/pickle.html\n\nGeneral Usage\n-------------\n\nTo use ``pikl`` instead of Python's inbuilt ``pickle`` module, replace::\n\n import pickle\n\nby::\n\n import pikl.pickle as pikl\n\nThis provides compatibility, but has the effect that you get the fast implementation\nin Python 3, while Python 2 uses the slow version.\n\nTo get a more deterministic choice of the implementation, use one of::\n\n import pikl.fastpickle as pikl # always C\n import pikl.slowpickle as pikl # always Python\n\nA bytestream produced by ``pickle`` can by loaded by ``pikl`` provided it\nmeets certain restrictions (e.g. protocol >= 2, no use of GLOBAL opcode)::\n\n $ python3\n >>> import pickle\n >>> s = pickle.dumps({'abc': 2})\n >>> from pikl import pickle as pikl\n >>> pikl.loads(s)\n {'abc': 2}\n\nLoading an earlier protocol will raise ``UnpicklingError``::\n\n >>> s = pickle.dumps({'abc': 2}, protocol=0)\n >>> pikl.loads(s)\n Traceback (most recent call last):\n ...\n pikl.pickle_3.UnpicklingError: Only binary pickle protocols are supported\n\nLoading an unregistered class or callable will raise ``UnpicklingError``::\n\n >>> s = pickle.dumps(complex(2, 1))\n >>> pikl.loads(s)\n Traceback (most recent call last):\n ...\n pikl.pickle_3.UnpicklingError: GLOBAL opcode is not supported\n\nExtension Registry\n------------------\n\nTo provide an opt-in mechanism for loading classes or callables ``pikl`` uses\nthe extension registry in the ``copyreg`` module::\n\n >>> import copyreg\n >>> copyreg.add_extension('builtins', 'complex', 240)\n >>> s = pickle.dumps(complex(2, 1))\n >>> pikl.loads(s)\n (2+1j)\n\nBoth the pickler and unpickler must agree on the same registry codes. A future\nversion of pikl will include a mechanism (e.g. defined profiles) to make this\nassist.\n\n\n===========\n Changelog\n===========\n\n0.0.1 (2018-09-26)\n==================\n\n- Forked from zodbpickle 1.0.3\n- Remove support for pickle protocol 0 and 1\n- Remove support for DUP opcode\n- Remove support for GLOBAL opcode\n- Remove support for INST opcode\n- Add pickle.LOWEST_PROTOCOL and cPickle.LOWEST_PROTOCOL constants\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/moreati/pikl", "keywords": "pickle", "license": "PSFL 2 and ZPL 2.1", "maintainer": "", "maintainer_email": "", "name": "pikl", "package_url": "https://pypi.org/project/pikl/", "platform": "any", "project_url": "https://pypi.org/project/pikl/", "project_urls": { "Homepage": "https://github.com/moreati/pikl" }, "release_url": "https://pypi.org/project/pikl/0.0.1/", "requires_dist": null, "requires_python": "", "summary": "A rehabilitated, less dangerous pickle.", "version": "0.0.1" }, "last_serial": 4314491, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "c0cb48fd207e51f03577995888163378", "sha256": "b2a48f78a087140bc7cd6b1f96373a0b4edb18722195dd6dc953468542f1b05a" }, "downloads": -1, "filename": "pikl-0.0.1.tar.gz", "has_sig": false, "md5_digest": "c0cb48fd207e51f03577995888163378", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 173040, "upload_time": "2018-09-26T23:18:06", "url": "https://files.pythonhosted.org/packages/8a/7c/e5302167a5c43714a3577fec229080aa20eb98f52a1367cf1cc7c40dd241/pikl-0.0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "c0cb48fd207e51f03577995888163378", "sha256": "b2a48f78a087140bc7cd6b1f96373a0b4edb18722195dd6dc953468542f1b05a" }, "downloads": -1, "filename": "pikl-0.0.1.tar.gz", "has_sig": false, "md5_digest": "c0cb48fd207e51f03577995888163378", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 173040, "upload_time": "2018-09-26T23:18:06", "url": "https://files.pythonhosted.org/packages/8a/7c/e5302167a5c43714a3577fec229080aa20eb98f52a1367cf1cc7c40dd241/pikl-0.0.1.tar.gz" } ] }