Edgewall Software

Opened 7 years ago

Closed 7 years ago

Last modified 6 years ago

#11982 closed enhancement (fixed)

Remove dependency on ConfigObj — at Version 3

Reported by: Ryan J Ollos Owned by: Ryan J Ollos
Priority: normal Milestone: 1.1.5
Component: general Version:
Severity: normal Keywords: authzpolicy configobj config
Cc: Branch:
Release Notes:

Removed dependency on ConfigObj.

API Changes:

Added OrderedDict to trac.compat module for Python 2.6 compatibility.

Internal Changes:

Description

It seems like the dependency on ConfigObj in tracopt.perm.authz_policy may be unnecessary. After extracting a class from the trac.config module that provides a thin wrapper over ConfigParser, we can use that class instead of ConfigObj.

Change History (3)

comment:1 by Ryan J Ollos, 7 years ago

Milestone: next-dev-1.1.x1.1.5
Owner: set to Ryan J Ollos
Status: newassigned

Proposed changes in log:rjollos.git:t11982-remove-configobj:

  • More testing is needed. I plan to add more tests before committing.
  • One test is commented out. The issue is already captured in #11538. ConfigParser doesn't throw an exception due to duplicate sections or options.
  • Further modifications are possible when #11339 is implemented. I'd like to extract a class that can read and write a configuration file but has no coupling the ComponentManager or Option classes. The class with knowledge of ComponentManager and Option would utilize this extracted class to read and write the environment configuration. The extracted class could be utilized by the authz_policy module so that we have the capability to write authz files as well as read them.
Last edited 7 years ago by Ryan J Ollos (previous) (diff)

comment:2 by Ryan J Ollos, 7 years ago

Revised changes in log:rjollos.git:t11982-remove-configobj.1. Tested so far on Mac OSX with Python 2.6 and Python 2.7.

comment:3 by Ryan J Ollos, 7 years ago

API Changes: modified (diff)
Release Notes: modified (diff)
Resolution: fixed
Status: assignedclosed

Tested also with Python 2.6 and 2.7 on Windows 7. Committed to trunk in [13993:13995]. More work on config module is forthcoming in #6551, and yet-to-be-created tickets.

I'll update the 1.1 documentation soon to remove ConfigObj from the optional dependencies.

Last edited 7 years ago by Ryan J Ollos (previous) (diff)
Note: See TracTickets for help on using tickets.