Comments you submit will be routed for moderation. If you have an account, please log in first.
Modify

Ticket #511 (new enhancement)

Opened 16 months ago

Last modified 16 months ago

Hookspath should be prepended to hooks.__path__, not appended

Reported by: anonymous Owned by: htgoebel
Priority: normal Milestone:
Component: Hooks Version: 1.5.1
Severity: normal Keywords:
Cc:

Description

In mf.py, the private hookpath gets appended to the module search path like so: (about line 438 in mf.py)

        if hookspath:
            hooks.__path__.extend(hookspath)

I propose it should be changed to:

        if hookspath:
            hooks.__path__ = hookspath + hooks.__path__

This gives priority to the user hooks rather than the built-in ones.

I wasted a good hour figuring out why my hook module wasn't called...

Attachments

Change History

comment:1 follow-up: ↓ 2 Changed 16 months ago by matysek

Should this change go also to next bugfix release of 1.5?

comment:2 in reply to: ↑ 1 Changed 16 months ago by htgoebel

Replying to matysek:

Should this change go also to next bugfix release of 1.5?

IMHO it's worth going into 1.5.2, too.

View

Add a comment

Modify Ticket

Action
as new
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.