Edgewall Software
Modify

Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#11823 closed enhancement (fixed)

Remove deprecated functionality and API functions and methods

Reported by: Ryan J Ollos Owned by: Ryan J Ollos
Priority: normal Milestone: 1.1.3
Component: general Version:
Severity: normal Keywords:
Cc: Branch:
Release Notes:
  • Removed deprecated compat attribute of InterTrac links.
  • Removed support for legacy admin pages contributed by the WebAdminPlugin (Trac < 0.11).
  • Removed support for Trac 0.10 ITimelineEventProviders.
API Changes:
Internal Changes:

Description

For milestone:1.1.2 deprecated code was removed in #11605 and #11494. For milestone:1.1.3 the changes will be captured in this ticket (along with #11703 and #11539).

Attachments (0)

Change History (20)

comment:1 by Ryan J Ollos, 10 years ago

Removal of InterTrac compat property in log:rjollos.git:t11823.

in reply to:  1 comment:2 by Ryan J Ollos, 10 years ago

Replying to rjollos:

Removal of InterTrac compat property in log:rjollos.git:t11823.

Documentation updated in 1.1/InterTrac@2.

comment:3 by Ryan J Ollos, 10 years ago

Release Notes: modified (diff)

Change from comment:1 committed in [13314].

comment:4 by Ryan J Ollos, 10 years ago

Spotted a comment about moving WikiMacroBase: tags/trac-1.0.2/trac/ticket/query.py@:50#L29. Opinions on whether it should be moved?

comment:6 by Ryan J Ollos, 10 years ago

Status: newassigned

in reply to:  5 ; comment:7 by Ryan J Ollos, 10 years ago

Release Notes: modified (diff)

Replying to rjollos:

It looks like support for legacy WebAdmin panels can be removed:

Removed in [13438].

Refactoring in [13439].

comment:8 by Ryan J Ollos, 10 years ago

TODO Consider resolving #9612 in this release.

comment:9 by Ryan J Ollos, 10 years ago

We could drop support for 0.10 ITimelineEventProviders:

  • trac/timeline/web_ui.py

    diff --git a/trac/timeline/web_ui.py b/trac/timeline/web_ui.py
    index cde9281..b072244 100644
    a b class TimelineModule(Component):  
    193193            try:
    194194                for event in provider.get_timeline_events(req, start, stop,
    195195                                                          filters) or []:
    196                     # Check for 0.10 events
    197                     author = (event[2 if len(event) < 6 else 4] or '').lower()
     196                    author = (event[2] or '').lower()
    198197                    if (not include or author in include) \
    199198                       and not author in exclude:
    200199                        events.append(self._event_data(provider, event))
    class TimelineModule(Component):  
    369368    def _event_data(self, provider, event):
    370369        """Compose the timeline event date from the event tuple and prepared
    371370        provider methods"""
    372         if len(event) == 6:  # 0.10 events
    373             kind, url, title, date, author, markup = event
    374             data = {'url': url, 'title': title, 'description': markup}
    375             render = lambda field, context: data.get(field)
    376         else:  # 0.11 events
    377             if len(event) == 5:  # with special provider
    378                 kind, date, author, data, provider = event
    379             else:
    380                 kind, date, author, data = event
    381             render = lambda field, context: \
    382                      provider.render_timeline_event(context, field, event)
     371        if len(event) == 5:  # with special provider
     372            kind, date, author, data, provider = event
     373        else:
     374            kind, date, author, data = event
     375        render = lambda field, context: \
     376                 provider.render_timeline_event(context, field, event)
    383377        if not isinstance(date, datetime):
    384378            date = datetime.fromtimestamp(date, utc)
    385379        dateuid = to_utimestamp(date)
Last edited 10 years ago by Ryan J Ollos (previous) (diff)

comment:10 by Ryan J Ollos, 10 years ago

Release Notes: modified (diff)

Patch from comment:9 committed in [13466].

in reply to:  8 comment:11 by Ryan J Ollos, 10 years ago

Replying to rjollos:

TODO Consider resolving #9612 in this release.

In comment:8:ticket:9612 I've proposed adding some notices to the code, and scheduling the parameters for removal in milestone:1.3.1.

comment:12 by Ryan J Ollos, 10 years ago

Some additional changes for the timeline module:

in reply to:  7 comment:13 by Ryan J Ollos, 10 years ago

Replying to rjollos:

Replying to rjollos:

It looks like support for legacy WebAdmin panels can be removed:

Removed in [13438].

Additional changes in [13573].

comment:14 by Peter Suter, 10 years ago

Do you think we should add deprecation notices to source:trunk/trac/notification/compat.py for milestone 1.3.1 as well? Or what time-frame would be appropriate?

comment:15 by Ryan J Ollos, 10 years ago

My feeling is that leaving a deprecation notice for one major release is good enough, and that appears to have been Christian's rule with deprecating code. The suggestion (wiki:TracDev/ApiChanges/1.1.1#OtherModificationsmadetothe1.0API) to remove the code early in the development release series seems good as well. I've been more conservative in removing old code, particularly for cases in which there wasn't a notice in the API docs.

comment:16 by Peter Suter, 10 years ago

Thanks. Added deprecation notices in [13578].

in reply to:  4 comment:17 by Ryan J Ollos, 10 years ago

Replying to rjollos:

Spotted a comment about moving WikiMacroBase: tags/trac-1.0.2/trac/ticket/query.py@:50#L29.

I'm still not sure whether this class should be moved. Moved the TODO to the module in which the class is defined in [13588].

in reply to:  12 comment:18 by Ryan J Ollos, 10 years ago

Resolution: fixed
Status: assignedclosed

Replying to rjollos:

Some additional changes for the timeline module:

Fixed in [13589].

in reply to:  16 ; comment:19 by Peter Suter, 10 years ago

Replying to psuter:

Thanks. Added deprecation notices in [13578].

I think I should also add a deprecation notice to get_ticket_notification_recipients.

in reply to:  19 comment:20 by Peter Suter, 10 years ago

Replying to psuter:

I think I should also add a deprecation notice to get_ticket_notification_recipients.

Added in [13609].

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Ryan J Ollos.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Ryan J Ollos to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.