Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expand user mappings (transitive dependencies) #111

Open
jensens opened this issue Apr 11, 2023 · 4 comments
Open

Expand user mappings (transitive dependencies) #111

jensens opened this issue Apr 11, 2023 · 4 comments

Comments

@jensens
Copy link

jensens commented Apr 11, 2023

Given I have defined my user mapping like so:

Zope = [
  # Zope own provided namespaces
  'App', 'OFS', 'Products.Five', 'Products.OFSP', 'Products.PageTemplates',
  'Products.SiteAccess', 'Shared', 'Testing', 'ZPublisher', 'ZTUtils',
  'Zope2', 'webdav', 'zmi',
  # Zope dependencies
  'AccessControl', 'Acquisition', 'AuthEncoding', 'beautifulsoup4', 'BTrees',
  'cffi', 'Chameleon', 'DateTime', 'DocumentTemplate', 'ExtensionClass',
  'MultiMapping', 'multipart', 'PasteDeploy', 'Persistence', 'persistent',
  'pycparser', 'python-gettext', 'pytz', 'RestrictedPython', 'roman', 'six',
  'soupsieve', 'transaction', 'waitress', 'WebOb', 'WebTest', 'WSGIProxy2',
  'z3c.pt', 'zc.lockfile', 'ZConfig', 'zExceptions', 'ZODB', 'zodbpickle',
  'zope.annotation', 'zope.browser', 'zope.browsermenu', 'zope.browserpage',
  'zope.browserresource', 'zope.cachedescriptors', 'zope.component',
  'zope.configuration', 'zope.container', 'zope.contentprovider',
  'zope.contenttype', 'zope.datetime', 'zope.deferredimport',
  'zope.deprecation', 'zope.dottedname', 'zope.event', 'zope.exceptions',
  'zope.filerepresentation', 'zope.globalrequest', 'zope.hookable',
  'zope.i18n', 'zope.i18nmessageid', 'zope.interface', 'zope.lifecycleevent',
  'zope.location', 'zope.pagetemplate', 'zope.processlifetime', 'zope.proxy',
  'zope.ptresource', 'zope.publisher', 'zope.schema', 'zope.security',
  'zope.sequencesort', 'zope.site', 'zope.size', 'zope.structuredtext',
  'zope.tal', 'zope.tales', 'zope.testbrowser', 'zope.testing',
  'zope.traversing', 'zope.viewlet'
]
'Products.CMFCore' = [
  'docutils', 'five.localsitemanager', 'Missing', 'Products.BTreeFolder2',
  'Products.GenericSetup', 'Products.MailHost', 'Products.PythonScripts',
  'Products.StandardCacheManagers', 'Products.ZCatalog', 'Record',
  'zope.sendmail', 'Zope'
]
'plone.base' = [
  'plone.batching', 'plone.registry', 'plone.schema','plone.z3cform',
  'Products.CMFCore', 'Products.CMFDynamicViewFTI',
]

and I depend on plone.base, dependencychecker should take the transitive dependencies into account, like it must not detect Products.GenericSetup or as missing dependency.

@jensens jensens changed the title Expand user mappings Expand user mappings (transitive dependencies) Apr 11, 2023
@gforcada
Copy link
Collaborator

I'm between +0 and -1 here 😕

The idea of a user mapping was mostly to cover Zope use case, i.e. a distribution that provide random namespaces: Testing, App, OFS, Products.XXX etc

Re-using it to hide declaring dependencies I consider it fair use as well.

But hiding +50 different distributions behind a single name? That's way too much for my taste. Fixing your use case would be than rather than having plone.base only on install_requires you would also have Products.CMFCore and maybe also Zope.

From 1 to 3 I consider a fine balance IMHO.

@jensens
Copy link
Author

jensens commented Apr 16, 2023

For frameworks this is very handy. If I base my stack on plone.base or CMF, why show all Zope deps? It just does not make sense nor does it add any value.

@gforcada
Copy link
Collaborator

That's why I'm saying/writing that if plone.app.dexterity, as a random example has to depend on plone.base, Products.CMFCore and Zope rather than only plone.base, in my opinion is not that bad 🤷🏾

@jensens
Copy link
Author

jensens commented Apr 17, 2023

Ok, this is really a matter of opinion. I prefer to depend on plone.base only.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants