z3c.dependencychecker


Namez3c.dependencychecker JSON
Version 2.14.3 PyPI version JSON
download
home_pagehttps://github.com/reinout/z3c.dependencychecker
SummaryReports on missing or unneeded python dependencies
upload_time2023-12-28 15:14:59
maintainer
docs_urlNone
authorReinout van Rees
requires_python>=3.8
licenseBSD
keywords dependencies requirements missing imports
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage
            
z3c.dependencychecker
=====================

Checks which imports are done and compares them to what's in ``setup.py`` and
warn when discovering missing or unneeded dependencies.

.. image:: https://github.com/reinout/z3c.dependencychecker/actions/workflows/testing.yml/badge.svg?branch=master
   :target: https://github.com/reinout/z3c.dependencychecker/actions/workflows/testing.yml

.. image:: https://coveralls.io/repos/github/reinout/z3c.dependencychecker/badge.svg?branch=master
   :target: https://coveralls.io/github/reinout/z3c.dependencychecker?branch=master

.. contents::


What it does
------------

z3c.dependencychecker reports on:

- **Missing (test) requirements**: imports without a corresponding requirement
  in the ``setup.py``.  There might be false alarms, but at least you've got a
  (hopefully short) list of items to check.

  Watch out for packages that have a different name than how they're imported.
  For instance a requirement on ``pydns`` which is used as ``import DNS`` in
  your code: pydns and DNS lead to separate "missing requirements: DNS" and
  "unneeded requirements: pydns" warnings.

- **Unneeded (test) requirements**: requirements in your setup.py that aren't
  imported anywhere in your code.  You *might* need them because not
  everything needs to be imported.  It at least gives you a much smaller list
  to check by hand.

- **Requirements that should be test-only**: if something is only imported in
  a test file, it shouldn't be in the generic defaults.  So you get a separate
  list of requirements that should be moved from the regular to the test
  requirements.

It checks the following locations:

- Python files for regular imports and their docstrings.

- ZCML files, Plone's generic setup files as well as FTI XML files.

- Python files, ``.txt`` and ``.rst`` files for imports in doctests.

- django settings files.

User mappings
-------------

Some packages available on pypi have a different name than the import
statement needed to use them, i.e. `python-dateutil` is imported as `import
dateutil`.  Others provide more than one package, i.e `Zope2` provides several
packages like `Products.Five` or `Products.OFSP`.

For those cases, z3c.dependencychecker has a solution: user mappings.

Add a `pyproject.toml` file on the root of your project with the following
content::

    [tool.dependencychecker]
    python-dateutil = ['dateutil']
    Zope2 = ['Products.Five', 'Products.OFSP' ]

z3c.dependencychecker will read this information and use it on its reports.

Ignore packages
---------------

Sometimes you need to add a package in `setup.py` although you are not
importing it directly, but maybe is an extra dependency of one of your
dependencies, or your package has a soft dependency on a package, and as a
soft dependency it is not mandatory to install it always.

`z3c.dependencychecker` would complain in both cases. It would report that a
dependency is not needed, or that a missing package is not listed on the
package requirements.

Fortunately, `z3c.dependencychecker` also has a solution for it.

Add a `pyproject.toml` file on the root of your project with the following
content::

    [tool.dependencychecker]
    ignore-packages = ['one-package', 'another.package' ]

`z3c.dependencychecker` will totally ignore those packages in its reports,
whether they're requirements that appear to be unused, or requirements that
appear to be missing.

Credits
-------

z3c.dependencychecker is a different application/packaging of zope's
importchecker utility.  It has been used in quite some projects, I grabbed a
copy from `lovely.recipe's checkout
<http://bazaar.launchpad.net/~vcs-imports/lovely.recipe/trunk/annotate/head%3A/src/lovely/recipe/importchecker/importchecker.py>`_.

- Martijn Faassen wrote the original importchecker script.

- `Reinout van Rees <http://reinout.vanrees.org>`_ added the dependency
  checker functionality and packaged it (mostly while working at `The Health
  Agency <http://www.thehealthagency.com>`_).

- Quite some fixes from `Jonas Baumann <https://github.com/jone>`_.

- Many updates (basically: rewriting the entire codebase to work with AST!) to
  work well with modern Plone versions by `Gil Forcada Codinachs
  <http://gil.badall.net/>`.


Source code, forking and reporting bugs
---------------------------------------

The source code can be found on github:
https://github.com/reinout/z3c.dependencychecker

You can fork and fix it from there. And you can add issues and feature
requests in the github issue tracker.

Every time you commit something, ``bin/code-analysis`` is automatically
run. Pay attention to the output and fix the problems that are reported. Or
fix the setup so that inappropriate reports are filtered out.


Local development setup
-----------------------

Create a virtualenv and install the requirements::

  $ python3 -m venv .
  $ bin/pip install -r requirements.txt

If you changed the actual requirements in ``setup.py`` or the development
requirements in ``requirements.in``, re-generate ``requirements.txt``::

  $ bin/pip-compile requirements.in

To run the tests (there's some pytest configuration in ``setup.cfg``)::

  $ bin/pytest

Some checks that are run by github actions::

  $ bin/black
  $ bin/codespell setup.py z3c/
  $ bin/flake8 setup.py z3c/


Usage of z3c.dependencychecker
==============================

.. :doctest:


Installation
------------

Either install z3c.dependencychecker globally (``easy_install
z3c.dependencychecker``) or install it in your buildout.


Usage
-----

Run the ``dependencychecker`` or ``bin/dependencychecker`` script from your
project's root folder and it will report on your dependencies.

You must have installed your project, as z3c.dependencychecker needs the
``YOURPROJECT.egg-info`` directory that setuptools generates. It looks for
that directory in the root folder and in the direct subdirectory (like
``src/`` or ``plone/``).

We have a sample project in a temp directory::

    >>> sample1_dir
    '/TESTTEMP/sample1'
    >>> ls(sample1_dir)
    setup.py
    src

For our test, we call the main() method, just like the ``dependencychecker``
script would::

    >>> import os
    >>> os.chdir(sample1_dir)
    >>> from z3c.dependencychecker import dependencychecker
    >>> dependencychecker.main()
    Unused imports
    ==============
    src/sample1/unusedimports.py:7:  tempfile
    src/sample1/unusedimports.py:4:  zest.releaser
    src/sample1/unusedimports.py:6:  os
    <BLANKLINE>
    Missing requirements
    ====================
         Products.GenericSetup.interfaces.EXTENSION
         missing.req
         other.generic.setup.dependency
         plone.app.content.interfaces.INameFromTitle
         plone.app.dexterity.behaviors.metadata.IBasic
         plone.random1.interfaces.IMySchema
         plone.random2.content.MyType
         some_django_app
         something.origname
         zope.exceptions
         zope.interface
    <BLANKLINE>
    Missing test requirements
    =========================
         plone.dexterity.browser.views.ContentTypeView
         plone.dexterity.interfaces.IContentType
         reinout.hurray
         transaction
         zope.filerepresentation.interfaces.IRawReadFile
    <BLANKLINE>
    Unneeded requirements
    =====================
         some.other.extension
         unneeded.req
    <BLANKLINE>
    Requirements that should be test requirements
    =============================================
         Needed.By.Test
    <BLANKLINE>
    Unneeded test requirements
    ==========================
         zope.testing
    <BLANKLINE>
    Note: requirements are taken from the egginfo dir, so you need
    to re-run buildout (or setup.py or whatever) for changes in
    setup.py to have effect.
    <BLANKLINE>


Changelog of z3c.dependencychecker
==================================

2.14.3 (2023-12-28)
-------------------

- Refactored other `modules.py` classes that needed the same fix from previous release.
  [gforcada]

2.14.1 (2023-12-28)
-------------------

- Ignore any dot leading folder (like `.tox` or `.git`) while scanning for files.
  [gforcada]

2.14 (2023-12-28)
-----------------

- Add support for distributions using implicit namespaces (PEP 420).
  [gforcada]

2.13 (2023-12-19)
-----------------

- Drop python 3.7 support, as our dependencies require 3.8 at least.
  [gforcada]

- Add python 3.12 support.
  [gforcada]

2.12 (2023-08-02)
-----------------

- Fix, hopefully finally, the Zope user mapping use case.
  [gforcada]

- Add `Plone` as an umbrella distribution, alongside `Zope`.
  [gforcada]

- Scan the `<implements` directive on `ZCML` files.
  [gforcada]

- Handle new distributions that no longer have a `setup.py`.
  Consider `pyproject.toml` and `setup.cfg` alongside `setup.py`.
  [gforcada]

2.11 (2023-03-03)
-----------------

- Ignore `node_modules` and `__pycache__` folders
  when scanning for files with dependencies.
  [gforcada]

- Do not scan Plone FTI files for behaviors with dotted names.
  [gforcada]

2.10 (2023-01-30)
-----------------

- Do not ignore `Zope` user mappings, fixes previous release.
  [gforcada]

2.9 (2023-01-23)
----------------

- Ignore `Zope` package, as otherwise it swallows all `zope.` namespace packages.
  [gforcada]

2.8 (2022-11-30)
----------------

- Drop python 2.7 support.
  [gforcada]

- Replace travis for GitHub actions.
  [gforcada]

- Test against python 3.7-3.11 and pypy3.
  [gforcada]

- Updated developer documentation.
  [reinout]


2.7 (2018-08-08)
----------------

- Fixed the 'requirement should be test requirement' report. There were corner
  cases when using user mappings.
  [gforcada]


2.6 (2018-07-09)
----------------

- Use the user mappings on the remaining reports:

  - unneeded dependencies
  - unneeded test dependencies
  - dependencies that should be test dependencies

  [gforcada]

- Always consider imports in python docstrings to be test dependencies.
  [gforcada]

2.5.1 (2018-07-06)
------------------

- Re-release 2.5 as it was a brown bag release.
  [gforcada]

2.5 (2018-07-06)
----------------

- Check in every top level folder if the .egg-info folder is in them.
  [gforcada]

2.4.4 (2018-07-04)
------------------

Note: this includes the 2.4.1 - 2.4.4 releases, we had to iterate a bit to get
the formatting right :-)

- Fix rendering of long description in pypi.
  [gforcada, reinout]

- Documentation formatting fixes.
  [reinout]


2.4 (2018-06-30)
----------------

- Handle packages that have multiple top levels, i.e. packages like Zope2.
  [gforcada]

2.3 (2018-06-21)
----------------

- Add a new command line option ``--exit-zero``.
  It forces the program to always exit with a zero status code.
  Otherwise it will report ``1`` if the program does find anything to report.
  [gforcada]

- Fix ZCML parser to discard empty strings.
  [gforcada]

2.2 (2018-06-19)
----------------

- Ignore relative imports (i.e. from . import foo).
  [gforcada]

- Added ``ignore-packages`` config option to totally ignore one or more packages in the reports
  (whether unused imports or unneeded dependencies).
  Handy for soft dependencies.
  [gforcada]

2.1.1 (2018-03-10)
------------------

- Note: 2.1 had a technical release problem, hence 2.1.1.
  [reinout]

- We're releasing it as a wheel, too, now.
  [reinout]

- Small improvements to the debug logging (``-v/--verbose`` shows it).
  [reinout]

- Remove unused parameter in DottedName.
  [gforcada]

- All imports found by DocFiles imports extractor are marked as test ones.
  [gforcada]

- Handle multiple dotted names found in a single ZCML parameter.
  [gforcada]

- Use properties to make code more pythonic.
  [gforcada]

- Allow users to define their own mappings on a `pyproject.toml` file.
  See README.rst.

- Filter imports when adding them to the database, rather than on each report.
  [gforcada]


2.0 (2018-01-04)
----------------

- Complete rewrite: code does no longer use deprecated functionality,
  is more modular, more pythonic, easier to extend and hack, and above all,
  has a 100% test coverage to ensure that it works as expected.
  [gforcada]

- Add support for Python 3.
  [gforcada]


1.16 (2017-06-21)
-----------------

- Don't crash anymore on, for instance, django code that needs a django
  settings file to be available or that needs the django app config step to be
  finished.
  [reinout]

- Improved Django settings extraction.
  [reinout]

- Better detection of python built-in modules. ``logging/__init__.py`` style
  modules were previously missed.
  [reinout]


1.15 (2015-09-02)
-----------------

- The name of a wrong package was sometimes found in case of a directory with
  multiple egg-info directories (like
  ``/usr/lib/python2.7/dist-packages/*.egg-info/``...). Now the
  ``top_level.txt`` file in the egg-info directories is checked if the
  top-level directory matches.
  [reinout]


1.14 (2015-09-01)
-----------------

- The debug logging (``-v``) is now printed to stdout instead of stderr. This
  makes it easier to grep or search in the verbose output for debugging
  purposes.
  [reinout]


1.13 (2015-08-29)
-----------------

- Import + semicolon + statement (like ``import
  transaction;transaction.commit()``) is now also detected correctly.
  [gforcada]

- The starting directory for packages with a dotted name (like
  ``zest.releaser``) is now also found automatically.
  [reinout]

- Internal code change: moved the code out of the ``src/``
  directory. Everything moved one level up.
  [reinout]

- Dependencychecker doesn't descend anymore into directories without an
  ``__init__.py``. This helps with website projects that sometimes have python
  files buried deep in directories that aren't actually part of the project's
  python code.
  [reinout]

- Multiple imports from similarly-named libraries on separate lines are now
  handled correctly. An import of ``zope.interface`` on one line could
  sometimes "hide" a ``zope.component`` import one line down.
  [gforcada]


1.12 (2015-08-16)
-----------------

- Improve ZCML imports coverage (look on ``for`` and ``class`` as well).
  [gforcada]

- Internal project updates (buildout version, test adjustments, etc).
  [gforcada]

- Add support for FTI dependencies (behaviors, schema and class).
  [gforcada]


1.11 (2013-04-16)
-----------------

- Support python installations without global setuptools installed
  by searching the name in the setup.py as fallback.


1.10 (2013-02-24)
-----------------

- Treat non-test extras_require like normal install_requires.


1.9 (2013-02-13)
----------------

- Improved detection for "Django-style" package names with a dash in
  them. Django doesn't deal well with namespace packages, so instead of
  ``zc.something``, you'll see packages like ``zc-something``. The import then
  uses an underscore, ``zc_something``.

- Added support for Django settings files. Anything that matches
  ``*settings.py`` is searched for Django settings like ``INSTALLED_APPS =
  [...]`` or ``MIDDLEWARE_CLASSES = (...)``.


1.8 (2013-02-13)
----------------

- Detect ZCML "provides", as used for generic setup profile registration.


1.7.1 (2012-11-26)
------------------

- Added travis.ci configuration. We're tested there, too, now!


1.7 (2012-11-26)
----------------

- Lookup package name for ZCML modules too, as it is done for python modules.

- Detect generic setup dependencies in ``metadata.xml`` files.


1.6 (2012-11-01)
----------------

- Fix AttributeError when "magic modules" like email.Header are imported.


1.5 (2012-07-03)
----------------

- Add support for zipped dists when looking up pkg name.


1.4 (2012-07-03)
----------------

- Lookup pkg name from egg-infos if possible (python >= 2.5). This helps for
  instance with the PIL problem (which can be ``Imaging`` instead when you
  import it).


1.3.2 (2012-06-29)
------------------

- Fixed broken 1.3.0 and 1.3.0 release: the ``MANIFEST.in`` was missing...


1.3.1 (2012-06-29)
------------------

- Documentation updates because we moved to github:
  https://github.com/reinout/z3c.dependencychecker .


1.3 (2012-06-29)
----------------

- Added fix for standard library detection on OSX when using the python
  buildout. (Patch by Jonas Baumann, as is the next item).

- Supporting ``[tests]`` in addition to ``[test]`` for test requirements.


1.2 (2011-09-19)
----------------

- Looking for a package directory named after the package name in preference
  to the src/ directory.

- Compensating for django-style 'django-something' package names with
  'django_something' package directories.  Dash versus underscore.


1.1 (2010-01-06)
----------------

- Zcml files are also searched for 'component=' patterns as that can be used
  by securitypolicy declarations.

- Dependencychecker is now case insensitive as pypi is too.

- Using optparse for parsing commandline now.  Added --help and --version.


1.0 (2009-12-10)
----------------

- Documentation update.

- Improved test coverage. The dependencychecker module self is at 100%, the
  original import checker module is at 91% coverage.


0.5 (2009-12-10)
----------------

- Searching in doctests (.py, .txt, .rst) for imports, too.  Regex-based by
  necessity, but it seems to catch what I can test it with.


0.4 (2009-12-10)
----------------

- Supporting "from zope import interface"-style imports where you really want
  to be told you're missing an "zope.interface" dependency instead of just
  "zope" (which is just a namespace package).


0.3 (2009-12-08)
----------------

- Sorted "unneeded requirements" reports and filtered out duplicates.

- Reporting separately on dependencies that should be moved from the regular
  to the test dependencies.


0.2 (2009-12-08)
----------------

- Added tests.  Initial quick test puts coverage at 86%.

- Fixed bug in test requirement detection.

- Added documentation.

- Moved source code to zope's svn repository.


0.1 (2009-12-02)
----------------

- Also reporting on unneeded imports.

- Added note on re-running buildout after a setup.py change.

- Added zcml lookup to detect even more missing imports.

- Added reporting on missing regular and test imports.

- Grabbing existing requirements from egginfo directory.

- Copied over Martijn Faassen's zope importchecker script.


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/reinout/z3c.dependencychecker",
    "name": "z3c.dependencychecker",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "",
    "keywords": "dependencies requirements missing imports",
    "author": "Reinout van Rees",
    "author_email": "reinout@vanrees.org",
    "download_url": "https://files.pythonhosted.org/packages/6c/c5/096a3c5b32f377b58aaadcab70046bf464cd31c0f7d5f0242e4a8f4e00ed/z3c.dependencychecker-2.14.3.tar.gz",
    "platform": null,
    "description": "\nz3c.dependencychecker\n=====================\n\nChecks which imports are done and compares them to what's in ``setup.py`` and\nwarn when discovering missing or unneeded dependencies.\n\n.. image:: https://github.com/reinout/z3c.dependencychecker/actions/workflows/testing.yml/badge.svg?branch=master\n   :target: https://github.com/reinout/z3c.dependencychecker/actions/workflows/testing.yml\n\n.. image:: https://coveralls.io/repos/github/reinout/z3c.dependencychecker/badge.svg?branch=master\n   :target: https://coveralls.io/github/reinout/z3c.dependencychecker?branch=master\n\n.. contents::\n\n\nWhat it does\n------------\n\nz3c.dependencychecker reports on:\n\n- **Missing (test) requirements**: imports without a corresponding requirement\n  in the ``setup.py``.  There might be false alarms, but at least you've got a\n  (hopefully short) list of items to check.\n\n  Watch out for packages that have a different name than how they're imported.\n  For instance a requirement on ``pydns`` which is used as ``import DNS`` in\n  your code: pydns and DNS lead to separate \"missing requirements: DNS\" and\n  \"unneeded requirements: pydns\" warnings.\n\n- **Unneeded (test) requirements**: requirements in your setup.py that aren't\n  imported anywhere in your code.  You *might* need them because not\n  everything needs to be imported.  It at least gives you a much smaller list\n  to check by hand.\n\n- **Requirements that should be test-only**: if something is only imported in\n  a test file, it shouldn't be in the generic defaults.  So you get a separate\n  list of requirements that should be moved from the regular to the test\n  requirements.\n\nIt checks the following locations:\n\n- Python files for regular imports and their docstrings.\n\n- ZCML files, Plone's generic setup files as well as FTI XML files.\n\n- Python files, ``.txt`` and ``.rst`` files for imports in doctests.\n\n- django settings files.\n\nUser mappings\n-------------\n\nSome packages available on pypi have a different name than the import\nstatement needed to use them, i.e. `python-dateutil` is imported as `import\ndateutil`.  Others provide more than one package, i.e `Zope2` provides several\npackages like `Products.Five` or `Products.OFSP`.\n\nFor those cases, z3c.dependencychecker has a solution: user mappings.\n\nAdd a `pyproject.toml` file on the root of your project with the following\ncontent::\n\n    [tool.dependencychecker]\n    python-dateutil = ['dateutil']\n    Zope2 = ['Products.Five', 'Products.OFSP' ]\n\nz3c.dependencychecker will read this information and use it on its reports.\n\nIgnore packages\n---------------\n\nSometimes you need to add a package in `setup.py` although you are not\nimporting it directly, but maybe is an extra dependency of one of your\ndependencies, or your package has a soft dependency on a package, and as a\nsoft dependency it is not mandatory to install it always.\n\n`z3c.dependencychecker` would complain in both cases. It would report that a\ndependency is not needed, or that a missing package is not listed on the\npackage requirements.\n\nFortunately, `z3c.dependencychecker` also has a solution for it.\n\nAdd a `pyproject.toml` file on the root of your project with the following\ncontent::\n\n    [tool.dependencychecker]\n    ignore-packages = ['one-package', 'another.package' ]\n\n`z3c.dependencychecker` will totally ignore those packages in its reports,\nwhether they're requirements that appear to be unused, or requirements that\nappear to be missing.\n\nCredits\n-------\n\nz3c.dependencychecker is a different application/packaging of zope's\nimportchecker utility.  It has been used in quite some projects, I grabbed a\ncopy from `lovely.recipe's checkout\n<http://bazaar.launchpad.net/~vcs-imports/lovely.recipe/trunk/annotate/head%3A/src/lovely/recipe/importchecker/importchecker.py>`_.\n\n- Martijn Faassen wrote the original importchecker script.\n\n- `Reinout van Rees <http://reinout.vanrees.org>`_ added the dependency\n  checker functionality and packaged it (mostly while working at `The Health\n  Agency <http://www.thehealthagency.com>`_).\n\n- Quite some fixes from `Jonas Baumann <https://github.com/jone>`_.\n\n- Many updates (basically: rewriting the entire codebase to work with AST!) to\n  work well with modern Plone versions by `Gil Forcada Codinachs\n  <http://gil.badall.net/>`.\n\n\nSource code, forking and reporting bugs\n---------------------------------------\n\nThe source code can be found on github:\nhttps://github.com/reinout/z3c.dependencychecker\n\nYou can fork and fix it from there. And you can add issues and feature\nrequests in the github issue tracker.\n\nEvery time you commit something, ``bin/code-analysis`` is automatically\nrun. Pay attention to the output and fix the problems that are reported. Or\nfix the setup so that inappropriate reports are filtered out.\n\n\nLocal development setup\n-----------------------\n\nCreate a virtualenv and install the requirements::\n\n  $ python3 -m venv .\n  $ bin/pip install -r requirements.txt\n\nIf you changed the actual requirements in ``setup.py`` or the development\nrequirements in ``requirements.in``, re-generate ``requirements.txt``::\n\n  $ bin/pip-compile requirements.in\n\nTo run the tests (there's some pytest configuration in ``setup.cfg``)::\n\n  $ bin/pytest\n\nSome checks that are run by github actions::\n\n  $ bin/black\n  $ bin/codespell setup.py z3c/\n  $ bin/flake8 setup.py z3c/\n\n\nUsage of z3c.dependencychecker\n==============================\n\n.. :doctest:\n\n\nInstallation\n------------\n\nEither install z3c.dependencychecker globally (``easy_install\nz3c.dependencychecker``) or install it in your buildout.\n\n\nUsage\n-----\n\nRun the ``dependencychecker`` or ``bin/dependencychecker`` script from your\nproject's root folder and it will report on your dependencies.\n\nYou must have installed your project, as z3c.dependencychecker needs the\n``YOURPROJECT.egg-info`` directory that setuptools generates. It looks for\nthat directory in the root folder and in the direct subdirectory (like\n``src/`` or ``plone/``).\n\nWe have a sample project in a temp directory::\n\n    >>> sample1_dir\n    '/TESTTEMP/sample1'\n    >>> ls(sample1_dir)\n    setup.py\n    src\n\nFor our test, we call the main() method, just like the ``dependencychecker``\nscript would::\n\n    >>> import os\n    >>> os.chdir(sample1_dir)\n    >>> from z3c.dependencychecker import dependencychecker\n    >>> dependencychecker.main()\n    Unused imports\n    ==============\n    src/sample1/unusedimports.py:7:  tempfile\n    src/sample1/unusedimports.py:4:  zest.releaser\n    src/sample1/unusedimports.py:6:  os\n    <BLANKLINE>\n    Missing requirements\n    ====================\n         Products.GenericSetup.interfaces.EXTENSION\n         missing.req\n         other.generic.setup.dependency\n         plone.app.content.interfaces.INameFromTitle\n         plone.app.dexterity.behaviors.metadata.IBasic\n         plone.random1.interfaces.IMySchema\n         plone.random2.content.MyType\n         some_django_app\n         something.origname\n         zope.exceptions\n         zope.interface\n    <BLANKLINE>\n    Missing test requirements\n    =========================\n         plone.dexterity.browser.views.ContentTypeView\n         plone.dexterity.interfaces.IContentType\n         reinout.hurray\n         transaction\n         zope.filerepresentation.interfaces.IRawReadFile\n    <BLANKLINE>\n    Unneeded requirements\n    =====================\n         some.other.extension\n         unneeded.req\n    <BLANKLINE>\n    Requirements that should be test requirements\n    =============================================\n         Needed.By.Test\n    <BLANKLINE>\n    Unneeded test requirements\n    ==========================\n         zope.testing\n    <BLANKLINE>\n    Note: requirements are taken from the egginfo dir, so you need\n    to re-run buildout (or setup.py or whatever) for changes in\n    setup.py to have effect.\n    <BLANKLINE>\n\n\nChangelog of z3c.dependencychecker\n==================================\n\n2.14.3 (2023-12-28)\n-------------------\n\n- Refactored other `modules.py` classes that needed the same fix from previous release.\n  [gforcada]\n\n2.14.1 (2023-12-28)\n-------------------\n\n- Ignore any dot leading folder (like `.tox` or `.git`) while scanning for files.\n  [gforcada]\n\n2.14 (2023-12-28)\n-----------------\n\n- Add support for distributions using implicit namespaces (PEP 420).\n  [gforcada]\n\n2.13 (2023-12-19)\n-----------------\n\n- Drop python 3.7 support, as our dependencies require 3.8 at least.\n  [gforcada]\n\n- Add python 3.12 support.\n  [gforcada]\n\n2.12 (2023-08-02)\n-----------------\n\n- Fix, hopefully finally, the Zope user mapping use case.\n  [gforcada]\n\n- Add `Plone` as an umbrella distribution, alongside `Zope`.\n  [gforcada]\n\n- Scan the `<implements` directive on `ZCML` files.\n  [gforcada]\n\n- Handle new distributions that no longer have a `setup.py`.\n  Consider `pyproject.toml` and `setup.cfg` alongside `setup.py`.\n  [gforcada]\n\n2.11 (2023-03-03)\n-----------------\n\n- Ignore `node_modules` and `__pycache__` folders\n  when scanning for files with dependencies.\n  [gforcada]\n\n- Do not scan Plone FTI files for behaviors with dotted names.\n  [gforcada]\n\n2.10 (2023-01-30)\n-----------------\n\n- Do not ignore `Zope` user mappings, fixes previous release.\n  [gforcada]\n\n2.9 (2023-01-23)\n----------------\n\n- Ignore `Zope` package, as otherwise it swallows all `zope.` namespace packages.\n  [gforcada]\n\n2.8 (2022-11-30)\n----------------\n\n- Drop python 2.7 support.\n  [gforcada]\n\n- Replace travis for GitHub actions.\n  [gforcada]\n\n- Test against python 3.7-3.11 and pypy3.\n  [gforcada]\n\n- Updated developer documentation.\n  [reinout]\n\n\n2.7 (2018-08-08)\n----------------\n\n- Fixed the 'requirement should be test requirement' report. There were corner\n  cases when using user mappings.\n  [gforcada]\n\n\n2.6 (2018-07-09)\n----------------\n\n- Use the user mappings on the remaining reports:\n\n  - unneeded dependencies\n  - unneeded test dependencies\n  - dependencies that should be test dependencies\n\n  [gforcada]\n\n- Always consider imports in python docstrings to be test dependencies.\n  [gforcada]\n\n2.5.1 (2018-07-06)\n------------------\n\n- Re-release 2.5 as it was a brown bag release.\n  [gforcada]\n\n2.5 (2018-07-06)\n----------------\n\n- Check in every top level folder if the .egg-info folder is in them.\n  [gforcada]\n\n2.4.4 (2018-07-04)\n------------------\n\nNote: this includes the 2.4.1 - 2.4.4 releases, we had to iterate a bit to get\nthe formatting right :-)\n\n- Fix rendering of long description in pypi.\n  [gforcada, reinout]\n\n- Documentation formatting fixes.\n  [reinout]\n\n\n2.4 (2018-06-30)\n----------------\n\n- Handle packages that have multiple top levels, i.e. packages like Zope2.\n  [gforcada]\n\n2.3 (2018-06-21)\n----------------\n\n- Add a new command line option ``--exit-zero``.\n  It forces the program to always exit with a zero status code.\n  Otherwise it will report ``1`` if the program does find anything to report.\n  [gforcada]\n\n- Fix ZCML parser to discard empty strings.\n  [gforcada]\n\n2.2 (2018-06-19)\n----------------\n\n- Ignore relative imports (i.e. from . import foo).\n  [gforcada]\n\n- Added ``ignore-packages`` config option to totally ignore one or more packages in the reports\n  (whether unused imports or unneeded dependencies).\n  Handy for soft dependencies.\n  [gforcada]\n\n2.1.1 (2018-03-10)\n------------------\n\n- Note: 2.1 had a technical release problem, hence 2.1.1.\n  [reinout]\n\n- We're releasing it as a wheel, too, now.\n  [reinout]\n\n- Small improvements to the debug logging (``-v/--verbose`` shows it).\n  [reinout]\n\n- Remove unused parameter in DottedName.\n  [gforcada]\n\n- All imports found by DocFiles imports extractor are marked as test ones.\n  [gforcada]\n\n- Handle multiple dotted names found in a single ZCML parameter.\n  [gforcada]\n\n- Use properties to make code more pythonic.\n  [gforcada]\n\n- Allow users to define their own mappings on a `pyproject.toml` file.\n  See README.rst.\n\n- Filter imports when adding them to the database, rather than on each report.\n  [gforcada]\n\n\n2.0 (2018-01-04)\n----------------\n\n- Complete rewrite: code does no longer use deprecated functionality,\n  is more modular, more pythonic, easier to extend and hack, and above all,\n  has a 100% test coverage to ensure that it works as expected.\n  [gforcada]\n\n- Add support for Python 3.\n  [gforcada]\n\n\n1.16 (2017-06-21)\n-----------------\n\n- Don't crash anymore on, for instance, django code that needs a django\n  settings file to be available or that needs the django app config step to be\n  finished.\n  [reinout]\n\n- Improved Django settings extraction.\n  [reinout]\n\n- Better detection of python built-in modules. ``logging/__init__.py`` style\n  modules were previously missed.\n  [reinout]\n\n\n1.15 (2015-09-02)\n-----------------\n\n- The name of a wrong package was sometimes found in case of a directory with\n  multiple egg-info directories (like\n  ``/usr/lib/python2.7/dist-packages/*.egg-info/``...). Now the\n  ``top_level.txt`` file in the egg-info directories is checked if the\n  top-level directory matches.\n  [reinout]\n\n\n1.14 (2015-09-01)\n-----------------\n\n- The debug logging (``-v``) is now printed to stdout instead of stderr. This\n  makes it easier to grep or search in the verbose output for debugging\n  purposes.\n  [reinout]\n\n\n1.13 (2015-08-29)\n-----------------\n\n- Import + semicolon + statement (like ``import\n  transaction;transaction.commit()``) is now also detected correctly.\n  [gforcada]\n\n- The starting directory for packages with a dotted name (like\n  ``zest.releaser``) is now also found automatically.\n  [reinout]\n\n- Internal code change: moved the code out of the ``src/``\n  directory. Everything moved one level up.\n  [reinout]\n\n- Dependencychecker doesn't descend anymore into directories without an\n  ``__init__.py``. This helps with website projects that sometimes have python\n  files buried deep in directories that aren't actually part of the project's\n  python code.\n  [reinout]\n\n- Multiple imports from similarly-named libraries on separate lines are now\n  handled correctly. An import of ``zope.interface`` on one line could\n  sometimes \"hide\" a ``zope.component`` import one line down.\n  [gforcada]\n\n\n1.12 (2015-08-16)\n-----------------\n\n- Improve ZCML imports coverage (look on ``for`` and ``class`` as well).\n  [gforcada]\n\n- Internal project updates (buildout version, test adjustments, etc).\n  [gforcada]\n\n- Add support for FTI dependencies (behaviors, schema and class).\n  [gforcada]\n\n\n1.11 (2013-04-16)\n-----------------\n\n- Support python installations without global setuptools installed\n  by searching the name in the setup.py as fallback.\n\n\n1.10 (2013-02-24)\n-----------------\n\n- Treat non-test extras_require like normal install_requires.\n\n\n1.9 (2013-02-13)\n----------------\n\n- Improved detection for \"Django-style\" package names with a dash in\n  them. Django doesn't deal well with namespace packages, so instead of\n  ``zc.something``, you'll see packages like ``zc-something``. The import then\n  uses an underscore, ``zc_something``.\n\n- Added support for Django settings files. Anything that matches\n  ``*settings.py`` is searched for Django settings like ``INSTALLED_APPS =\n  [...]`` or ``MIDDLEWARE_CLASSES = (...)``.\n\n\n1.8 (2013-02-13)\n----------------\n\n- Detect ZCML \"provides\", as used for generic setup profile registration.\n\n\n1.7.1 (2012-11-26)\n------------------\n\n- Added travis.ci configuration. We're tested there, too, now!\n\n\n1.7 (2012-11-26)\n----------------\n\n- Lookup package name for ZCML modules too, as it is done for python modules.\n\n- Detect generic setup dependencies in ``metadata.xml`` files.\n\n\n1.6 (2012-11-01)\n----------------\n\n- Fix AttributeError when \"magic modules\" like email.Header are imported.\n\n\n1.5 (2012-07-03)\n----------------\n\n- Add support for zipped dists when looking up pkg name.\n\n\n1.4 (2012-07-03)\n----------------\n\n- Lookup pkg name from egg-infos if possible (python >= 2.5). This helps for\n  instance with the PIL problem (which can be ``Imaging`` instead when you\n  import it).\n\n\n1.3.2 (2012-06-29)\n------------------\n\n- Fixed broken 1.3.0 and 1.3.0 release: the ``MANIFEST.in`` was missing...\n\n\n1.3.1 (2012-06-29)\n------------------\n\n- Documentation updates because we moved to github:\n  https://github.com/reinout/z3c.dependencychecker .\n\n\n1.3 (2012-06-29)\n----------------\n\n- Added fix for standard library detection on OSX when using the python\n  buildout. (Patch by Jonas Baumann, as is the next item).\n\n- Supporting ``[tests]`` in addition to ``[test]`` for test requirements.\n\n\n1.2 (2011-09-19)\n----------------\n\n- Looking for a package directory named after the package name in preference\n  to the src/ directory.\n\n- Compensating for django-style 'django-something' package names with\n  'django_something' package directories.  Dash versus underscore.\n\n\n1.1 (2010-01-06)\n----------------\n\n- Zcml files are also searched for 'component=' patterns as that can be used\n  by securitypolicy declarations.\n\n- Dependencychecker is now case insensitive as pypi is too.\n\n- Using optparse for parsing commandline now.  Added --help and --version.\n\n\n1.0 (2009-12-10)\n----------------\n\n- Documentation update.\n\n- Improved test coverage. The dependencychecker module self is at 100%, the\n  original import checker module is at 91% coverage.\n\n\n0.5 (2009-12-10)\n----------------\n\n- Searching in doctests (.py, .txt, .rst) for imports, too.  Regex-based by\n  necessity, but it seems to catch what I can test it with.\n\n\n0.4 (2009-12-10)\n----------------\n\n- Supporting \"from zope import interface\"-style imports where you really want\n  to be told you're missing an \"zope.interface\" dependency instead of just\n  \"zope\" (which is just a namespace package).\n\n\n0.3 (2009-12-08)\n----------------\n\n- Sorted \"unneeded requirements\" reports and filtered out duplicates.\n\n- Reporting separately on dependencies that should be moved from the regular\n  to the test dependencies.\n\n\n0.2 (2009-12-08)\n----------------\n\n- Added tests.  Initial quick test puts coverage at 86%.\n\n- Fixed bug in test requirement detection.\n\n- Added documentation.\n\n- Moved source code to zope's svn repository.\n\n\n0.1 (2009-12-02)\n----------------\n\n- Also reporting on unneeded imports.\n\n- Added note on re-running buildout after a setup.py change.\n\n- Added zcml lookup to detect even more missing imports.\n\n- Added reporting on missing regular and test imports.\n\n- Grabbing existing requirements from egginfo directory.\n\n- Copied over Martijn Faassen's zope importchecker script.\n\n",
    "bugtrack_url": null,
    "license": "BSD",
    "summary": "Reports on missing or unneeded python dependencies",
    "version": "2.14.3",
    "project_urls": {
        "Homepage": "https://github.com/reinout/z3c.dependencychecker"
    },
    "split_keywords": [
        "dependencies",
        "requirements",
        "missing",
        "imports"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "63b5167fb7fecaf80a80e4b5dad7737b56b230468fdd0a56af04247fd627290f",
                "md5": "f3e531a54edc5ceadbf400833df87d6a",
                "sha256": "86b4b2f209e103ad9eb4593572d1cd38d64e4a4519cb52c9e108864941edaa36"
            },
            "downloads": -1,
            "filename": "z3c.dependencychecker-2.14.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "f3e531a54edc5ceadbf400833df87d6a",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 56061,
            "upload_time": "2023-12-28T15:14:57",
            "upload_time_iso_8601": "2023-12-28T15:14:57.292080Z",
            "url": "https://files.pythonhosted.org/packages/63/b5/167fb7fecaf80a80e4b5dad7737b56b230468fdd0a56af04247fd627290f/z3c.dependencychecker-2.14.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "6cc5096a3c5b32f377b58aaadcab70046bf464cd31c0f7d5f0242e4a8f4e00ed",
                "md5": "87d9b47c306d3ec391ec1273eb686b06",
                "sha256": "15965493bf23517315b61dd0004c8531f95ad5960de26239c8149b4a428b0c1c"
            },
            "downloads": -1,
            "filename": "z3c.dependencychecker-2.14.3.tar.gz",
            "has_sig": false,
            "md5_digest": "87d9b47c306d3ec391ec1273eb686b06",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 46640,
            "upload_time": "2023-12-28T15:14:59",
            "upload_time_iso_8601": "2023-12-28T15:14:59.729655Z",
            "url": "https://files.pythonhosted.org/packages/6c/c5/096a3c5b32f377b58aaadcab70046bf464cd31c0f7d5f0242e4a8f4e00ed/z3c.dependencychecker-2.14.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-12-28 15:14:59",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "reinout",
    "github_project": "z3c.dependencychecker",
    "travis_ci": false,
    "coveralls": true,
    "github_actions": true,
    "requirements": [],
    "lcname": "z3c.dependencychecker"
}
        
Elapsed time: 1.62587s