Edgewall Software

Opened 6 years ago

Last modified 5 months ago

#11901 closed task

Remove deprecated code (Trac 1.3.1) — at Version 26

Reported by: Ryan J Ollos Owned by:
Priority: normal Milestone: 1.3.1
Component: general Version:
Severity: normal Keywords:
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description (last modified by Ryan J Ollos)

This ticket lists code that is scheduled for removal in Trac 1.3.1.

  • Removal of ipnr attribute in attachment and wiki modules: #9612.
  • Remove deprecated methods in trac.wiki.formatter: #11539.
  • Remove deprecated notification code (comment:21:ticket:3517).
  • Remove svn_fs.py and svn_prop.py (modules moved in #10712).
  • Remove since strings from code comments and option documentation for features added in Trac < 1.0 (as in [13889])

Other changes:

Building the list will be easier to do as we develop, and the changes can then be removed at the start of the milestone.

TracDev/ApiChanges/1.3 should be updated with the API changes before this ticket is closed.

Change History (26)

comment:1 by Peter Suter, 6 years ago

  • Notify, NotifyEmail, TicketNotifyEmail and BatchTicketNotifyEmail ([13578])
  • get_ticket_notification_recipients ([13609])

comment:2 by Ryan J Ollos, 6 years ago

I was going to make a list of code to remove in this ticket, but it seemed easier to just prepare a branch. I'll periodically rebase the branch against the trunk and commit the changes at the start of milestone:1.3.1. The first revision of the changes will be posted here after #11913 is committed at the start of milestone:1.0.4.

comment:3 by Ryan J Ollos, 6 years ago

Description: modified (diff)

in reply to:  2 comment:4 by Ryan J Ollos, 6 years ago

Replying to rjollos:

I was going to make a list of code to remove in this ticket, but it seemed easier to just prepare a branch.

Some changes have been staged in log:rjollos.git:t11901-remove-deprecated-code-in-1.3.1. I haven't removed all of the deprecated code, in particular the notification module code. The upgrade step for removing the ipnr columns from the database also hasn't been written yet (#11872 could help with that).

Last edited 6 years ago by Ryan J Ollos (previous) (diff)

comment:5 by Ryan J Ollos, 6 years ago

Description: modified (diff)

comment:6 by Ryan J Ollos, 6 years ago

Compatibility code can be removed in 1.3.1 if Python 2.6 support is dropped: [ba3d34ac/rjollos.git].

comment:7 by Ryan J Ollos, 5 years ago

comment:8 by Ryan J Ollos, 5 years ago

Description: modified (diff)

comment:9 by Ryan J Ollos, 5 years ago

Description: modified (diff)

comment:10 by Ryan J Ollos, 5 years ago

Description: modified (diff)
Milestone: next-major-releases1.3.1
Last edited 5 years ago by Ryan J Ollos (previous) (diff)

comment:11 by Ryan J Ollos, 5 years ago

Description: modified (diff)

comment:12 by Ryan J Ollos, 5 years ago

Description: modified (diff)

comment:13 by Jun Omae, 5 years ago

unit tests failing.

...
  File "./trac/test.py", line 391, in suite
    import tracopt.versioncontrol.svn.tests
  File "/run/shm/6d672f85ac8080ca247cc91cfb140c339863b711/py27-sqlite/tracopt/versioncontrol/svn/tests/__init__.py", line 16, in <module>
    from tracopt.versioncontrol.svn.tests import svn_fs
  File "/run/shm/6d672f85ac8080ca247cc91cfb140c339863b711/py27-sqlite/tracopt/versioncontrol/svn/tests/svn_fs.py", line 42, in <module>
    from trac.versioncontrol import svn_fs, svn_prop
ImportError: cannot import name svn_fs
make: *** [unit-test] Error 1

The svn_fs and svn_prop in trac.versioncontrol is still used from tracopt/versioncontrol/svn/tests/svn_fs.py.

$ git grep -w 'import.*svn_\(fs\|prop\)'
tracopt/versioncontrol/svn/tests/__init__.py:from tracopt.versioncontrol.svn.tests import svn_fs
tracopt/versioncontrol/svn/tests/svn_fs.py:from trac.versioncontrol import svn_fs, svn_prop

in reply to:  13 ; comment:14 by Jun Omae, 5 years ago

Replying to jomae:

The svn_fs and svn_prop in trac.versioncontrol is still used from tracopt/versioncontrol/svn/tests/svn_fs.py.

Ouch. That code is introduced in [12995] by me. I'm wrong. After 1.0.6 release, I'll fix it on 1.0-stable and trunk.

comment:15 by Ryan J Ollos, 5 years ago

in reply to:  14 comment:16 by Jun Omae, 5 years ago

Replying to jomae:

Replying to jomae:

The svn_fs and svn_prop in trac.versioncontrol is still used from tracopt/versioncontrol/svn/tests/svn_fs.py.

Ouch. That code is introduced in [12995] by me. I'm wrong. After 1.0.6 release, I'll fix it on 1.0-stable and trunk.

Fixed in [14101] and merged to trunk in [14102].

comment:17 by Ryan J Ollos, 5 years ago

Should we remove the deprecated cnum (#7145) from Ticket.save_changes in 1.3.1?: tags/trac-1.1.5/trac/ticket/model.py@:313-314#L306.

Last edited 5 years ago by Ryan J Ollos (previous) (diff)

comment:18 by Jun Omae, 5 years ago

I agree to removing cnum from Ticket.save_changes() in 1.3.1.

comment:19 by Ryan J Ollos, 5 years ago

comment:20 by Ryan J Ollos, 5 years ago

show_email_addresses was deprecated from the chrome data dictionary in #11474 / [14151#file2] and will be removed in the next set of proposed changes.

comment:21 by Ryan J Ollos, 5 years ago

[3751] may have some compatibility code to be removed, which we might even be able to do on the currently trunk. We'd have to replace HTTPInternalError with HTTPInternalServerError in the half-dozen or so instances that it appears in the Trac codebase. TracDev/Exceptions should be updated if the change is made.

comment:22 by Ryan J Ollos, 5 years ago

#12132 closed as a duplicate.

Latest changes in log:rjollos.git:t11901-remove-deprecated-code-in-1.3.1.7, incorporating changes from #12132 and comment:21.

comment:23 by Ryan J Ollos, 5 years ago

Description: modified (diff)

comment:24 by Ryan J Ollos, 5 years ago

It appears the following built-ins don't need to be passed in the data dictionary any longer: tags/trac-1.1.6/trac/web/chrome.py@:597-598,622,625#L594.

I've also considered that it would be generally useful to pass functools, itertools and operator in the chrome data dictionary. Previously we've discussed passing presentation (comment:15:ticket:8989).

comment:25 by Ryan J Ollos, 5 years ago

Description: modified (diff)

comment:26 by Ryan J Ollos, 5 years ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.