pkginfo2


Namepkginfo2 JSON
Version 30.0.0 PyPI version JSON
download
home_pagehttps://github.com/nexB/pkginfo2
SummaryQuery metadatdata from sdists / bdists / installed packages. Safer fork of pkginfo to avoid doing arbitrary imports and eval()
upload_time2022-01-27 23:56:14
maintainer
docs_urlNone
authorMaintained by nexB, Inc. Authored by Tres Seaver, Agendaless Consulting
requires_python
licenseMIT
keywords distribution sdist installed metadata
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ``pkginfo2`` README
=====================

Homepage URL: https://github.com/nexB/pkginfo2
SPDX-License-Identifier: MIT

This package provides an API for querying the distutils metadata written in
the ``PKG-INFO`` file inside a source distriubtion (an ``sdist``) or a
binary distribution or a wheel (e.g., created by running ``bdist_egg``).  It can
also query the ``EGG-INFO`` directory of an installed distribution, and
the ``*.egg-info`` stored in a "development checkout"
(e.g, created by running ``setup.py develop``), or the ``*.dist-info`` from
an as-installed package.

This is a fork of http://bazaar.launchpad.net/~tseaver/pkginfo removing the
ability to import and eval arbitrary code and work with modules known to the
current interpreter. Use importlib_metadata for this if you need it.


Please see the `pkginfo2 repo at <https://github.com/nexB/pkginfo2>`_
for more documentation.


``pkginfo2`` Changelog
=======================

30.0.0 (2022-01-28)
--------------------

- Forked and rename to pkginfo2. Removed ability to import or eval packages
  or modules.
- Move the bzr history to git

1.8.2 (2021-12-01)
------------------

- Add fix for installed distributions with '__package__' set to an empty
  string. LP #1952946.

1.8.1 (2021-11-19)
------------------

- Add 'MANIFEST.in' to ensure example files used by tests are included
  in source distributions.  LP #1951553.

1.8.0 (2021-11-18)
------------------

- Support new standard metadata location for installed dists. LP #1865286.

- Don't overwrite header-based 'description' with empty payload. LP #1885458.

- Add support for Metadata-Version 2.2. LP #1928729.

- Add support for uncompressed tarballs for sdists.  LP #1951457.

- Add support for Python 3.10.

1.7.1 (2021-07-09)
------------------

- Use Python3 to build docs, and fix doctest examples to use Python3-
  compatible syntax.  LP #1933322.

1.7.0 (2021-01-16)
------------------

- Add support for Python 3.9.

- Drop support for Python 3.5.

1.6.1 (2020-10-26)
------------------

- Adjust test classifiers to match supported Python versions. LP #1901127.

1.6.0 (2020-10-20)
------------------

- Add support for Python 3.8.
  LP #1869854.

- Drop support for Python 3.4.

- Update tests to match setuptools' change, no longer reporting metadata
  version for installed packages w/o explicit metadata.  LP #1870197.

1.5.0.1 (2019-01-08)
--------------------

- Fix broken 'sdist'.  LP #1639585.

1.5.0 (2019-01-07)
------------------

- Fix 'console_scripts' entry point syntax.  LP #1810734.

- Add support for JSON output from the CLI.  LP #1700580.

- Add support for installed wheels.  E.g., 'dist-info/' dirs.  LP #1700200.

- Harden metadata extraction against unexpected encodings.  LP #1780454.

- Update tests to match pip/setuptools' use of new metadata version.
  LP #1772274.

- Add support for Python 3.6 and 3.7.

- Drop support for Python 3.3.

1.4.2 (2018-03-14)
------------------

- Use relative imports in pkginfo modules.  Supports vendoring of the
  package into setuptools.

- Add support for ``Provides-Extra`` and ``Description-Content-Type`` fields.
  Per https://packaging.python.org/specifications/.  See:  PEP 566.

- Remove support for old setuptools leaving ``PKG-INFO`` in the root of
  the project directory.

1.4.1 (2016-11-07)
------------------

- Packaging only change (invalid sdist built for 1.4.0).

1.4.0 (2016-11-04)
------------------

- Relicense under MIT license:  the PSF license is not suitable for
  third-party libraries.

1.3.2 (2016-05-24)
------------------

- Packaging-only change (automate fix for wheel built for 1.3.1).

1.3.1 (2016-05-24)
------------------

- Packaging-only change (invalid wheel built for 1.3.0).

1.3.0 (2016-05-23)
------------------

- Update homepage URL to point to Launchpad, rather than PyPI.

- Add support for building wheels.

- Add support for Python 3.5.

- Drop support for Python 2.6 and 3.2.

1.2.1 (2014-01-02)
------------------

- Add overlooked Trove classifier for Python 3.4.

1.2 (2014-01-02)
----------------

- Add support for Python 3.4, PyPy3.

- Add 100% coverage for ``pkginfo.commandline`` module.

1.2b1 (2013-12-05)
------------------

- Add support for the "wheel" distribution format, along with minimal
  metadata 2.0 support (not including new PEP 426 JSON properties).
  Code (re-)borrowed from Donald Stuft's ``twine`` package.

1.1 (2013-10-09)
----------------

- Fix tests to pass with current PyPy releases.

1.1b1 (2013-05-05)
------------------

- Support "develop" packages which keep their ``*.egg-info`` in a subdirectory.
  See https://bugs.launchpad.net/pkginfo/+bug/919147.

- Add support for "unpacked SDists" (thanks to Mike Lundy for the patch).

1.0 (2013-05-05)
----------------

- No changes from 1.0b2.

1.0b2 (2012-12-28)
------------------

- Suppress resource warning leaks reported against clients.

- Fix 'commandline' module under Py3k.

1.0b1 (2012-12-28)
------------------

- Add support for Python 3.2 and 3.3, including testing them under ``tox``.

- Add support for PyPy, including testing it under ``tox``.

- Test supported Python versions under ``tox``.

- Drop support for Python 2.5.

- Add a ``setup.py dev`` alias:  runs ``setup.py develop`` and installs
  testing extras (``nose`` and ``coverage``).

0.9.1 (2012-10-22)
------------------

- Fix test failure under Python >= 2.7, which is enforcing
  'metadata_version == 1.1' because we have classifiers.


0.9 (2012-04-25)
----------------

- Fix introspection of installed namespace packages.
  They may be installed as eggs or via dist-installed 'egg-info' files.
  https://bugs.launchpad.net/pkginfo/+bug/934311

- Avoid a regression in 0.8 under Python 2.6 / 2.7 when parsing unicode.
  https://bugs.launchpad.net/pkginfo/+bug/733827/comments/3


0.8 (2011-03-12)
----------------

- Work around Python 2.7's breakage of StringIO.  Fixes
  https://bugs.launchpad.net/pkginfo/+bug/733827

- Fix bug in introspection of installed packages missing the
  ``__package__`` attribute.
  

0.7 (2010-11-04)
----------------

- Preserve newlines in the ``description`` field.  Thanks to Sridhar
  Ratnakumar for the patch.

- 100% test coverage.


0.6 (2010-06-01)
----------------

- Replace use of ``StringIO.StringIO`` with ``io.StringIO``, where available
  (Python >= 2.6).

- Replace use of ``rfc822`` stdlib module with ``email.parser``, when
  available (Python >= 2.5).  Ensured that distributions "unfold" wrapped
  continuation lines, stripping any leading / trailing whitespace, no matter
  which module was used for parsing.

- Remove bogus testing dependency on ``zope.testing``.

- Add tests that the "environment markers" spelled out in the approved
  PEP 345 are captured.

- Add ``Project-URL`` for ``1.2`` PKG-INFO metdata (defined in the accepted
  version of PEP 345).


0.5 (2009-09-11)
----------------

- Marked package as non-zip-safe.

- Fix Trove metadata misspelling.

- Restore compatibility with Python 2.4.

- Note that the introspection of installed packages / modules works only
  in Python 2.6 or later.

- Add ``Index`` class as an abstraction over a collection of distributions.

- Add ``download_url_prefix`` argument to ``pkginfo`` script.  If passed,
  the script will use the prefix to synthesize a ``download_url`` for
  distributions which do not supply that value directly.


0.4.1 (2009-05-07)
------------------

- Fix bugs in handling of installed packages which lack ``__file__``
  or ``PKG-INFO``.


0.4 (2009-05-07)
----------------

- Extend the console script to allow output as CSV or INI.  Also, added
  arguments to specify the metadata version and other parsing / output
  policies.

- Add support for the different metadata versions specified in PEPs
  241, 314, and 345.  Distributions now parse and expose only the attributes
  corresponding to their metadata version, which defaults to the version
  parsed from the ``PKG-INFO`` file.  The programmer can override that version
  when creating the distribution object.


0.3 (2009-05-07)
----------------

- Add support for introspection of "development eggs" (checkouts with
  ``PKG-INFO``, perhaps created via ``setup.py develop``).

- Add a console script, ``pkginfo``, which takes one or more paths
  on the command line and writes out the associated information.  Thanks
  to ``runeh`` for the patch!

- Add ``get_metadata`` helper function, which dispatches a given path or
  module across the available distribution types, and returns a distribution
  object.  Thanks to ``runeh`` for the patch!

- Make distribution objects support iteration over the metadata fields.
  Thanks to ``runeh`` for the patch!

- Make ``Distribution`` and subclasses new-style classes.  Thanks to ``runeh``
  for the patch!


0.2 (2009-04-14)
----------------

- Add support for introspection of ``bdist_egg`` binary distributions.


0.1.1 (2009-04-10)
------------------

- Fix packaging errors.


0.1 (2009-04-10)
----------------

- Initial release.



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/nexB/pkginfo2",
    "name": "pkginfo2",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "distribution sdist installed metadata",
    "author": "Maintained by nexB, Inc. Authored by Tres Seaver, Agendaless Consulting",
    "author_email": "tseaver@agendaless.com",
    "download_url": "https://files.pythonhosted.org/packages/90/8d/09cc1c99a30ac14050fc4e04e549e024be83ff72a7f63e75023501baf977/pkginfo2-30.0.0.tar.gz",
    "platform": "Unix",
    "description": "``pkginfo2`` README\n=====================\n\nHomepage URL: https://github.com/nexB/pkginfo2\nSPDX-License-Identifier: MIT\n\nThis package provides an API for querying the distutils metadata written in\nthe ``PKG-INFO`` file inside a source distriubtion (an ``sdist``) or a\nbinary distribution or a wheel (e.g., created by running ``bdist_egg``).  It can\nalso query the ``EGG-INFO`` directory of an installed distribution, and\nthe ``*.egg-info`` stored in a \"development checkout\"\n(e.g, created by running ``setup.py develop``), or the ``*.dist-info`` from\nan as-installed package.\n\nThis is a fork of http://bazaar.launchpad.net/~tseaver/pkginfo removing the\nability to import and eval arbitrary code and work with modules known to the\ncurrent interpreter. Use importlib_metadata for this if you need it.\n\n\nPlease see the `pkginfo2 repo at <https://github.com/nexB/pkginfo2>`_\nfor more documentation.\n\n\n``pkginfo2`` Changelog\n=======================\n\n30.0.0 (2022-01-28)\n--------------------\n\n- Forked and rename to pkginfo2. Removed ability to import or eval packages\n  or modules.\n- Move the bzr history to git\n\n1.8.2 (2021-12-01)\n------------------\n\n- Add fix for installed distributions with '__package__' set to an empty\n  string. LP #1952946.\n\n1.8.1 (2021-11-19)\n------------------\n\n- Add 'MANIFEST.in' to ensure example files used by tests are included\n  in source distributions.  LP #1951553.\n\n1.8.0 (2021-11-18)\n------------------\n\n- Support new standard metadata location for installed dists. LP #1865286.\n\n- Don't overwrite header-based 'description' with empty payload. LP #1885458.\n\n- Add support for Metadata-Version 2.2. LP #1928729.\n\n- Add support for uncompressed tarballs for sdists.  LP #1951457.\n\n- Add support for Python 3.10.\n\n1.7.1 (2021-07-09)\n------------------\n\n- Use Python3 to build docs, and fix doctest examples to use Python3-\n  compatible syntax.  LP #1933322.\n\n1.7.0 (2021-01-16)\n------------------\n\n- Add support for Python 3.9.\n\n- Drop support for Python 3.5.\n\n1.6.1 (2020-10-26)\n------------------\n\n- Adjust test classifiers to match supported Python versions. LP #1901127.\n\n1.6.0 (2020-10-20)\n------------------\n\n- Add support for Python 3.8.\n  LP #1869854.\n\n- Drop support for Python 3.4.\n\n- Update tests to match setuptools' change, no longer reporting metadata\n  version for installed packages w/o explicit metadata.  LP #1870197.\n\n1.5.0.1 (2019-01-08)\n--------------------\n\n- Fix broken 'sdist'.  LP #1639585.\n\n1.5.0 (2019-01-07)\n------------------\n\n- Fix 'console_scripts' entry point syntax.  LP #1810734.\n\n- Add support for JSON output from the CLI.  LP #1700580.\n\n- Add support for installed wheels.  E.g., 'dist-info/' dirs.  LP #1700200.\n\n- Harden metadata extraction against unexpected encodings.  LP #1780454.\n\n- Update tests to match pip/setuptools' use of new metadata version.\n  LP #1772274.\n\n- Add support for Python 3.6 and 3.7.\n\n- Drop support for Python 3.3.\n\n1.4.2 (2018-03-14)\n------------------\n\n- Use relative imports in pkginfo modules.  Supports vendoring of the\n  package into setuptools.\n\n- Add support for ``Provides-Extra`` and ``Description-Content-Type`` fields.\n  Per https://packaging.python.org/specifications/.  See:  PEP 566.\n\n- Remove support for old setuptools leaving ``PKG-INFO`` in the root of\n  the project directory.\n\n1.4.1 (2016-11-07)\n------------------\n\n- Packaging only change (invalid sdist built for 1.4.0).\n\n1.4.0 (2016-11-04)\n------------------\n\n- Relicense under MIT license:  the PSF license is not suitable for\n  third-party libraries.\n\n1.3.2 (2016-05-24)\n------------------\n\n- Packaging-only change (automate fix for wheel built for 1.3.1).\n\n1.3.1 (2016-05-24)\n------------------\n\n- Packaging-only change (invalid wheel built for 1.3.0).\n\n1.3.0 (2016-05-23)\n------------------\n\n- Update homepage URL to point to Launchpad, rather than PyPI.\n\n- Add support for building wheels.\n\n- Add support for Python 3.5.\n\n- Drop support for Python 2.6 and 3.2.\n\n1.2.1 (2014-01-02)\n------------------\n\n- Add overlooked Trove classifier for Python 3.4.\n\n1.2 (2014-01-02)\n----------------\n\n- Add support for Python 3.4, PyPy3.\n\n- Add 100% coverage for ``pkginfo.commandline`` module.\n\n1.2b1 (2013-12-05)\n------------------\n\n- Add support for the \"wheel\" distribution format, along with minimal\n  metadata 2.0 support (not including new PEP 426 JSON properties).\n  Code (re-)borrowed from Donald Stuft's ``twine`` package.\n\n1.1 (2013-10-09)\n----------------\n\n- Fix tests to pass with current PyPy releases.\n\n1.1b1 (2013-05-05)\n------------------\n\n- Support \"develop\" packages which keep their ``*.egg-info`` in a subdirectory.\n  See https://bugs.launchpad.net/pkginfo/+bug/919147.\n\n- Add support for \"unpacked SDists\" (thanks to Mike Lundy for the patch).\n\n1.0 (2013-05-05)\n----------------\n\n- No changes from 1.0b2.\n\n1.0b2 (2012-12-28)\n------------------\n\n- Suppress resource warning leaks reported against clients.\n\n- Fix 'commandline' module under Py3k.\n\n1.0b1 (2012-12-28)\n------------------\n\n- Add support for Python 3.2 and 3.3, including testing them under ``tox``.\n\n- Add support for PyPy, including testing it under ``tox``.\n\n- Test supported Python versions under ``tox``.\n\n- Drop support for Python 2.5.\n\n- Add a ``setup.py dev`` alias:  runs ``setup.py develop`` and installs\n  testing extras (``nose`` and ``coverage``).\n\n0.9.1 (2012-10-22)\n------------------\n\n- Fix test failure under Python >= 2.7, which is enforcing\n  'metadata_version == 1.1' because we have classifiers.\n\n\n0.9 (2012-04-25)\n----------------\n\n- Fix introspection of installed namespace packages.\n  They may be installed as eggs or via dist-installed 'egg-info' files.\n  https://bugs.launchpad.net/pkginfo/+bug/934311\n\n- Avoid a regression in 0.8 under Python 2.6 / 2.7 when parsing unicode.\n  https://bugs.launchpad.net/pkginfo/+bug/733827/comments/3\n\n\n0.8 (2011-03-12)\n----------------\n\n- Work around Python 2.7's breakage of StringIO.  Fixes\n  https://bugs.launchpad.net/pkginfo/+bug/733827\n\n- Fix bug in introspection of installed packages missing the\n  ``__package__`` attribute.\n  \n\n0.7 (2010-11-04)\n----------------\n\n- Preserve newlines in the ``description`` field.  Thanks to Sridhar\n  Ratnakumar for the patch.\n\n- 100% test coverage.\n\n\n0.6 (2010-06-01)\n----------------\n\n- Replace use of ``StringIO.StringIO`` with ``io.StringIO``, where available\n  (Python >= 2.6).\n\n- Replace use of ``rfc822`` stdlib module with ``email.parser``, when\n  available (Python >= 2.5).  Ensured that distributions \"unfold\" wrapped\n  continuation lines, stripping any leading / trailing whitespace, no matter\n  which module was used for parsing.\n\n- Remove bogus testing dependency on ``zope.testing``.\n\n- Add tests that the \"environment markers\" spelled out in the approved\n  PEP 345 are captured.\n\n- Add ``Project-URL`` for ``1.2`` PKG-INFO metdata (defined in the accepted\n  version of PEP 345).\n\n\n0.5 (2009-09-11)\n----------------\n\n- Marked package as non-zip-safe.\n\n- Fix Trove metadata misspelling.\n\n- Restore compatibility with Python 2.4.\n\n- Note that the introspection of installed packages / modules works only\n  in Python 2.6 or later.\n\n- Add ``Index`` class as an abstraction over a collection of distributions.\n\n- Add ``download_url_prefix`` argument to ``pkginfo`` script.  If passed,\n  the script will use the prefix to synthesize a ``download_url`` for\n  distributions which do not supply that value directly.\n\n\n0.4.1 (2009-05-07)\n------------------\n\n- Fix bugs in handling of installed packages which lack ``__file__``\n  or ``PKG-INFO``.\n\n\n0.4 (2009-05-07)\n----------------\n\n- Extend the console script to allow output as CSV or INI.  Also, added\n  arguments to specify the metadata version and other parsing / output\n  policies.\n\n- Add support for the different metadata versions specified in PEPs\n  241, 314, and 345.  Distributions now parse and expose only the attributes\n  corresponding to their metadata version, which defaults to the version\n  parsed from the ``PKG-INFO`` file.  The programmer can override that version\n  when creating the distribution object.\n\n\n0.3 (2009-05-07)\n----------------\n\n- Add support for introspection of \"development eggs\" (checkouts with\n  ``PKG-INFO``, perhaps created via ``setup.py develop``).\n\n- Add a console script, ``pkginfo``, which takes one or more paths\n  on the command line and writes out the associated information.  Thanks\n  to ``runeh`` for the patch!\n\n- Add ``get_metadata`` helper function, which dispatches a given path or\n  module across the available distribution types, and returns a distribution\n  object.  Thanks to ``runeh`` for the patch!\n\n- Make distribution objects support iteration over the metadata fields.\n  Thanks to ``runeh`` for the patch!\n\n- Make ``Distribution`` and subclasses new-style classes.  Thanks to ``runeh``\n  for the patch!\n\n\n0.2 (2009-04-14)\n----------------\n\n- Add support for introspection of ``bdist_egg`` binary distributions.\n\n\n0.1.1 (2009-04-10)\n------------------\n\n- Fix packaging errors.\n\n\n0.1 (2009-04-10)\n----------------\n\n- Initial release.\n\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Query metadatdata from sdists / bdists / installed packages. Safer fork of pkginfo to avoid doing arbitrary imports and eval()",
    "version": "30.0.0",
    "split_keywords": [
        "distribution",
        "sdist",
        "installed",
        "metadata"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "md5": "08f225691729a9b3441cb955c82abce9",
                "sha256": "f1558f3ff71c99e8f362b6d079c15ef334dfce8ab2bc623a992341baeb1e7248"
            },
            "downloads": -1,
            "filename": "pkginfo2-30.0.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "08f225691729a9b3441cb955c82abce9",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 25701,
            "upload_time": "2022-01-27T23:56:11",
            "upload_time_iso_8601": "2022-01-27T23:56:11.381260Z",
            "url": "https://files.pythonhosted.org/packages/49/01/4e506c68c9ea09c702b1eac87e6d2cda6d6633e6ed42ec1f43662e246769/pkginfo2-30.0.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "md5": "8fd5bd0d69938534c9796195164b5928",
                "sha256": "5e1afbeb156febb407a9b5c16b51c5b4737c529eeda2b1607e1e277cf260669c"
            },
            "downloads": -1,
            "filename": "pkginfo2-30.0.0.tar.gz",
            "has_sig": false,
            "md5_digest": "8fd5bd0d69938534c9796195164b5928",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 364071,
            "upload_time": "2022-01-27T23:56:14",
            "upload_time_iso_8601": "2022-01-27T23:56:14.245448Z",
            "url": "https://files.pythonhosted.org/packages/90/8d/09cc1c99a30ac14050fc4e04e549e024be83ff72a7f63e75023501baf977/pkginfo2-30.0.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2022-01-27 23:56:14",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "nexB",
    "github_project": "pkginfo2",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "tox": true,
    "lcname": "pkginfo2"
}
        
Elapsed time: 0.02380s