Modify

Opened 8 years ago

Closed 6 years ago

#710 closed task (wontfix)

Python module name should be more explicit

Reported by: dackze+trac@… Owned by: mgood
Priority: normal Component: AccountManagerPlugin
Severity: minor Keywords:
Cc: Trac Release: 0.9

Description

Right now, the plugin's module name is "acct_mgr". It would make more sense for it to be named something like "tracaccountmanager", especially when installed into site-packages. It wouldn't be ambiguous and there probably wouldn't be any chance for it to conflict with other potential packages.

That, and PEP 8 says module names shouldn't contain underscores.

Attachments (1)

package_rename_to_accountmanager-trunk-r2547.patch (4.0 KB) - added by jluna 7 years ago.

Download all attachments as: .zip

Change History (5)

comment:1 Changed 8 years ago by mgood

  • Type changed from defect to task

Installing into site-packages will still put it in "TracAccountManager-version.egg", so it should be pretty clear. I'm not in a terrible rush to do this, since I've seen no real problems from the name, and changing it would break the config for current users.

comment:2 Changed 7 years ago by jluna

  • Owner changed from mgood to jluna
  • Status changed from new to assigned

I don't find it intuitive either.

I created a simple patch to rename the acct_mgr module to accountmanager. acct_mgr is left mapped to the accountmanager directory (see the Distutils package-dir specification).

Alternatively, without having to rely on Distutils magic, and retaining the ability to log a depreciation notice when acct_mgr is used...

class acct_mgr(Component):
    def __getattr__(self, attr):
        self.log.warning('Plugin \'acct_mgr\' was renamed to \'accountmanager\' and is subject to later removal.')
        return getattr(acountmanager, attr)

...added as an entry-point to plugins.trac.

comment:3 Changed 7 years ago by jluna

  • Owner changed from jluna to mgood
  • Status changed from assigned to new

comment:4 Changed 6 years ago by pacopablo

  • Resolution set to wontfix
  • Status changed from new to closed

I'm closing this as won't fix because most of account manager will be merged into core. Hopefully for 0.12, but most likely for 0.13. Doesn't make sense to jump through hoops for what will eventually become a non-issue.

Add Comment

Modify Ticket

Action
as closed The owner will remain mgood.
The resolution will be deleted. Next status will be 'reopened'.
Author


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

 
Note: See TracTickets for help on using tickets.