zope.config: Dotted name resolve accepts '/' (slash) as module name separator

Bug #161984 reported by Christian Theune
2
Affects Status Importance Assigned to Milestone
Zope 3
Won't Fix
Undecided
Unassigned
zope.configuration
Won't Fix
Undecided
Unassigned

Bug Description

It's possible to do something like this:

<include package="zope/config.config"/>

This will result in a separate import so that zope.config.config and zope/config.config are two different modules. This can lead to confusing errors because all the ZCML is executed but doesn't seem to apply (maybe even just partially doesn't apply).

It currently works this way because Python's __import__ function allows '/' and '.' to be used. However, I couldn't find any documentation on the __import__ function that says that '/' is being treated as a path separator. Maybe this should be reported to Python's tracker as well.

I propose to modify the definition of the schema field to not accept slashes.

Tres Seaver (tseaver)
Changed in zope3:
status: New → Won't Fix
Revision history for this message
Tres Seaver (tseaver) wrote :
Changed in zope.configuration:
status: New → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.