zope.configuration.fields.Path doesn't handle home directories

Bug #494493 reported by Bert Vanderbauwhede
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Zope 3
Won't Fix
Undecided
Unassigned
zope.configuration
Won't Fix
Wishlist
Unassigned

Bug Description

The fieldtype Path from zope.configuration.fields doesn't handle home directories, indicated by a ~ in the path. The path ~/some.file will be interpreted as /path/to/some/package/~/some.file, while it should be something like /home/someuser/some.file.

Revision history for this message
Fred Drake (fdrake) wrote :

How much need is there for ~/some.file or ~user/some.file in ZCML?

If you're not using this from ZCML, could you describe you use case?

Revision history for this message
Bert Vanderbauwhede (batlock666) wrote : Re: [Bug 494493] Re: zope.configuration.fields.Path doesn't handle home directories

On Wed, Dec 9, 2009 at 2:44 PM, Fred Drake <email address hidden> wrote:

> How much need is there for ~/some.file or ~user/some.file in ZCML?
>
> If you're not using this from ZCML, could you describe you use case?
>
>
I use it in a custom ZCML-directive. The directive defines a
configuration-file in INI-format. The handler for the directive reads the
file, and makes the contents available in a global utility:

In ZCML, I define:

<ugent:configurationFile path="~/some.config.ini"
                         name="some_config" />

Then in Zope, I can do this:

>>> config = getUtility(IConfigurationFile, name="some_config")
>>> config.getSections()
['some_section', 'some_other_section']

I use this to define connection-settings for MySQL and LDAP.

--
Bert Vanderbauwhede

Tres Seaver (tseaver)
Changed in zope3:
status: New → Won't Fix
Changed in zope.configuration:
importance: Undecided → Wishlist
status: New → Triaged
Revision history for this message
Tres Seaver (tseaver) wrote :
Changed in zope.configuration:
status: Triaged → 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.