Version 6 (modified by 8 years ago) ( diff ) | ,
---|
Documenting API changes in 1.1.x
The next stable version of Trac will be named 1.2 and will contain the cumulative changes made in the successive 1.1.x releases.
These notes reflect the current status for 1.1.5, in trunk.
Proposed changes are prefixed with an OPEN mark and the paragraph is written in italics.
Summary
- Prerequisites
- Detailed List of Developer Visible Changes
- Other Modifications made to the 1.0 API
- New in the 1.1 API
Prerequisites
Only Python versions 2.6 and 2.7 are supported.
The following language features introduced in Python 2.6 can now be used and the related clean-ups can be done:
- use string format(),
print()
except Cls as val
- class decorators to avoid the
implements
hack? @prop.setter
/@prop.deleter
namedtuple
s!- there's no longer need of
from __future__ import with_statement
next(iterator, [default])
to clean-up some unit tests- timeout in smtplib
TODO List supported browsers. Consider using jQuery's list.
Modified Dependencies
See gmessage:trac-dev:nkMUY_8ILF0/rg1rsArDIewJ for a discussion about what dependencies will be supported in Trac 1.2.
jQuery and jQuery UI (bundled)
The bundled version of jQuery was updated from 1.7.2 in Trac 1.0-stable to:
- jQuery 1.8.2 in Trac 1.1.1 (r11412)
- jQuery 1.9 / 2.0 in Trac 1.1.2
See jQuery release notes for the corresponding major updates:
- 1.8
- 1.8.1
- 1.8.2
- 1.8.3
- http://blog.jquery.com/2013/01/15/jquery-1-9-final-jquery-2-0-beta-migrate-final-released/
The bundled version of the full minified jQuery UI package was upgraded from 1.8.21 in Trac 1.0-stable to:
Babel (optional)
The internationalization support (i18) for Trac is depending on Babel, version 1.0. (#10882) TODO
Babel ≥ 0.9.5 is still supported.
Genshi (mandatory)
OPEN Genshi 0.7
Genshi 0.6.x is still supported.
Databases
Database | |
SQLite | ≥ 3.0 |
PostgreSQL | ≥ 8.0 |
MySQL / MariaDB | ≥ 5.0 |
Database Bindings | |
pysqlite | ≥ 2.4.1 (version provided by Python 2.6), avoid 2.5.2 - 2.5.4 |
psycopg2 | ≥ 2.0 |
MySQLdb | ≥ 1.2.2 |
Other
Package | Req or Opt? | Version supported |
SetupTools | Required | ≥ 0.6, 5.4 - 5.6 are not recommended. |
Git | Optional | ≥ 1.5.6 |
Subversion | Optional | ≥ 1.6 |
DocUtils | Optional | ≥ 0.3.9 |
Textile | Optional | ≥ 2.0 |
Pygments | Optional | ≥ 0.6. Let's consider bumping the requirement to at least 1.0, released in 2008 |
Please add any dependencies overlooked.
ConfigObj
is no longer a required dependency for the AuthzPolicy
permission policy (tracopt.perm.authz_policy
) since Trac 1.1.5.
Deprecated Modules Removed
DONE Removed Enscript, SilverCity and PHP renderers in Trac 1.1.3. (#11795)
New Dependencies
None!
Detailed List of Developer Visible Changes
In Trac 1.1.1
Ticket | Summary |
---|---|
#10979 | Allow dynamic variables to be used in a report title and description |
API Changes |
New function |
Component: ticket system (1 match) |
|
Ticket | Summary |
#1942 | [patch] Add support for date type in custom ticket fields |
API Changes |
new |
Component: web frontend (1 match) |
|
Ticket | Summary |
#10976 | Compatibility issue between jQuery UI < 1.8.22 and jQuery 1.8 |
API Changes |
jQuery upgraded to 1.8.3, jQuery UI upgraded to 1.9.2 and jQuery UI Timepicker upgraded to 1.1.1. |
In Trac 1.1.2
Ticket | Summary |
---|---|
#10994 | Add drag and drop and other dynamic behavior to the admin panels containing enum lists |
API Changes |
The function |
#11519 | Allow default_handler to be set from the Basic Settings admin page |
API Changes |
The |
Component: database backend (1 match) |
|
Ticket | Summary |
#11581 | Add an abstract base class for connection classes |
API Changes |
Added an abstract base class |
Component: general (10 matches) |
|
Ticket | Summary |
#11056 | Disable submit buttons if required items are not selected |
API Changes |
To add a datepicker or datetimepicker to an element, add the
To disable a submit button associated with a set of checkboxes or a file selector, add the In both cases there is no need to add any specific JavaScript code to the page. |
#11129 | Handle CSS as text/css type |
API Changes |
The rendering |
#11406 | diff.css is added twice on the diff_view page |
API Changes |
Plugins using |
#11494 | Remove deprecated functions and methods from 0.10 and earlier |
API Changes |
Removed functions and methods that have been deprecated since Trac 0.11 or earlier.
Removed functions and methods that were deprecated and scheduled for removal in Trac 1.0 or earlier:
|
#11565 | Reduce code duplication in about and error pages |
API Changes |
|
#11568 | All Trac exceptions should inherit from a base class in Trac |
API Changes |
All exceptions defined in Trac inherit from |
#11587 | Implement ISystemInfoProvider in git connector and database connection classes |
API Changes |
The db, web server and git version info are not directly appended to |
#11600 | Remove Python 2.5 compatibility |
API Changes |
Removed Python 2.5 compatibility:
Utilized Python 2.6 features:
The function |
#11605 | Remove deprecated db parameters |
API Changes |
|
#11609 | Add realm attribute to Model classes |
API Changes |
Added |
Component: notification (1 match) |
|
Ticket | Summary |
#11636 | Refactoring of trac.notification |
API Changes |
|
Component: rendering (2 matches) |
|
Ticket | Summary |
#11126 | Some templates could override layout (and theme) stylesheets with own stylesheets |
API Changes |
|
#11169 | `render_resource_link` should add the "missing" class if the resource doesn't exist |
API Changes |
When
Added assertion with error message to check that the first argument to |
Component: report system (2 matches) |
|
Ticket | Summary |
#11246 | Having keywords in reports be followable |
API Changes |
|
#11697 | ReportModule uses magic number -1 where None should be used |
API Changes |
Added class attribute |
Component: ticket system (2 matches) |
|
Ticket | Summary |
#11145 | wrap author information for ticket change comments in a span to make them stylable |
API Changes |
|
#11499 | Eliminate redundant code in milestone and admin milestone templates / modules |
API Changes |
Added methods to
Added function
New template |
Component: version control (1 match) |
|
Ticket | Summary |
#11610 | Move Changeset, Node and Repository classes to model.py |
API Changes |
|
Component: wiki system (3 matches) |
|
Ticket | Summary |
#10834 | Option to add line numbers to code blocks |
API Changes |
The WikiProcessor argument parser supports dashes in the argument value. |
#11244 | Permissions: setting a Wiki page "read-only" does not restrict adding attachments |
API Changes |
Added methods |
#11544 | Version argument in Resource object is ignored when initializing a WikiPage |
API Changes |
|
In Trac 1.1.3
Ticket | Summary |
---|---|
#11859 | Add get_database_version and set_database_version methods to DatabaseManager class |
API Changes |
The database version for Trac and plugins can be retrieved using the |
#11893 | Add reset_tables method to ConnectionBase class |
API Changes |
Added |
#11894 | _parse_db_str should not be a protected member of module |
API Changes |
Renamed |
Component: general (4 matches) |
|
Ticket | Summary |
#11648 | Model classes should have a resource property |
API Changes |
Every model class has a |
#11707 | Module and other classes should have a realm attribute |
API Changes |
The |
#11815 | Test failures due to enabled unit test components in functional tests |
API Changes |
|
#11824 | Remove //Since// version information from TracIni documentation |
API Changes |
Leading and trailing whitespace is stripped from translatable string (plugin developers should use |
Component: notification (5 matches) |
|
Ticket | Summary |
#3517 | Notification plugin |
API Changes |
Added new API for notification distribution and extension points:
|
#4056 | Notification Preferences |
API Changes |
Added new extension point INotificationSubscriber. |
#11853 | Modular preference pages with child panels |
API Changes |
|
#11854 | Split up notification module |
API Changes |
Added mail notification helper functions |
#11869 | Add DB table for notification subscribers watching individual resources |
API Changes |
Added new |
Component: rendering (1 match) |
|
Ticket | Summary |
#11873 | Return a NamedTuple from Mimeview.get_supported_conversions |
API Changes |
|
Component: ticket system (6 matches) |
|
Ticket | Summary |
#10833 | ConfigurableTicketWorkflow's "Reassign To" ignores fine-grained permissions with restrict_owner=True |
API Changes |
|
#11699 | Use Chrome.authorinfo in render_ticket_action_controller |
API Changes |
|
#11717 | Highlight the whole referenced comment |
API Changes |
On the ticket page the id |
#11794 | Rename 'Comments only' label in #prefs on the ticket page |
API Changes |
On the ticket prefs form the |
#11839 | Allow groups to be specified in the set_owner workflow attribute |
API Changes |
The |
#11892 | Move group_milestones from trac.ticket.model to trac.ticket.roadmap |
API Changes |
Moved |
Component: version control (1 match) |
|
Ticket | Summary |
#11703 | Remove deprecated [trac] repository_dir option for configuring repository |
API Changes |
Removed deprecated |
Component: wiki system (1 match) |
|
Ticket | Summary |
#6573 | Allow change comment edit after commit. |
API Changes |
Added new optional method |
In Trac 1.1.4
Ticket | Summary |
---|---|
#11437 | Configuration sections from plugins should be written to trac.ini |
API Changes |
The |
Component: notification (2 matches) |
|
Ticket | Summary |
#11926 | Missing X-Trac-Ticket-URL header in ticket notification mail since 1.1.3 |
API Changes |
Add |
#11941 | Allow to reorder subscription rules using drag-and-drop and submit in bulk in notifications of preferences |
API Changes |
|
Component: rendering (1 match) |
|
Ticket | Summary |
#10841 | Less broad CSS rules for styling ticket #properties table |
API Changes |
On the ticket page, the CSS selectors descending from the |
Component: ticket system (1 match) |
|
Ticket | Summary |
#11931 | On BatchModify form workflow controls should be disabled until action is selected |
API Changes |
The |
Component: version control (1 match) |
|
Ticket | Summary |
#11849 | Move some repository-related configuration options |
API Changes |
Renamed |
In Trac 1.1.5
Ticket | Summary |
---|---|
#10975 | Enhancement for the contrib/htpasswd.py script |
API Changes |
|
Component: database backend (1 match) |
|
Ticket | Summary |
#11978 | Add drop_schema method to ConnectionBase class |
API Changes |
|
Component: general (4 matches) |
|
Ticket | Summary |
#6551 | IntOption and BoolOption values saved even when not differing from default |
API Changes |
|
#8172 | Plugin db upgrade infrastructure |
API Changes |
Added |
#11982 | Remove dependency on ConfigObj |
API Changes |
Added |
#12008 | Deleting unevaluated `@lazy` attribute raises KeyError |
API Changes |
Changed |
Component: notification (1 match) |
|
Ticket | Summary |
#11875 | Notification subscriber config section |
API Changes |
Added |
Component: rendering (1 match) |
|
Ticket | Summary |
#12010 | Pygments preferences template should be located in mimeview package |
API Changes |
|
Component: timeline (1 match) |
|
Ticket | Summary |
#12048 | [PATCH] Add scope to CSS rules in timeline.css |
API Changes |
Timeline CSS rules are scoped to the |
Component: version control (1 match) |
|
Ticket | Summary |
#11995 | Versioncontrol API for changeset bookmarks |
API Changes |
Add new |
In Trac 1.1.6
Ticket | Summary |
---|---|
#12105 | Add get_table_names method to DatabaseManager |
API Changes |
New method for retrieving database table names: |
Component: web frontend (2 matches) |
|
Ticket | Summary |
#11474 | Fine grained permission checks for EMAIL_VIEW are skipped when formatting author |
API Changes |
|
#12095 | Add is_xhr property to Request class |
API Changes |
Added |
Other Modifications made to the 1.0 API
Take the will be removed in version 1.1.1 comments in the code seriously. The earlier the planned API changes in 1.1.x, the better (gives more time to plugin authors to adapt). TODO
Modified Interfaces
IWikiChangeListener
(1.1.3) (1.0)
Wiki page version comments can now be edited, so wiki_page_comment_modified(page, old_comment)
has been added to allow plugins to be notified of this.
IPreferencePanelProvider
(1.1.3) (1.0)
IPreferencePanelProvider implementations can now provide child panels that appear as sections appended to other panels (proposal). This allows plugins to extend existing preference panels.
New Interfaces
trac.notification.api.INotificationDistributor
(1.1.3)
A new INotificationDistributor interface was added (proposal). It allows plugins to distribute notifications on different channels (e.g. over XMPP).
trac.notification.api.INotificationFormatter
(1.1.3)
A new INotificationFormatter interface was added (proposal). It allows plugins to format notifications (e.g. to HTML).
trac.notification.api.INotificationSubscriber
(1.1.3)
A new INotificationSubscriber interface was added (proposal). It allows plugins to provide more subscription preferences (e.g. to send or suppress notifications under special conditions).
trac.notification.api.IEmailAddressResolver
(1.1.3)
A new IEmailAddressResolver interface was added (proposal). It allows plugins to retrieve email addresses from users (e.g. from LDAP).
trac.notification.api.IEmailDecorator
(1.1.3)
A new IEmailDecorator interface was added (proposal). It allows plugins to add or tweak email headers.
Notification API Changes
To take advantage of the new notification related interfaces, code that sends notifications must use the new Notification API instead of the NotifyEmail
class hierarchy since Trac 1.1.3. (See proposal)
Database API Changes
In Trac 1.1.3 methods have been added to the DatabaseManager
class for settings and retrieving the database version for Trac and plugins: set_database_version
and get_database_version
(#11859).
In Trac 1.1.5 methods have been added to the DatabaseManager
class for upgrading the database: needs_upgrade
and upgrade
.
Environment.get_db_cnx
has been removed #get_db_cnx in Trac 1.1.2
Following the deprecation made in 0.12, the method Environment.get_db_cnx
has been removed (#11605).
One should now only use the context managers for retrieving a database Connection in read or write mode.
- a read-only Connection can be used to form queries:
a
with env.db_query as db: ...
db
instance obtained the above way should only be used for executing SELECT queries - a writable Connection can be used to modify the database content in a transaction:
a
with env.db_transaction as db: ...
db
instance obtained the above way can be used to execute INSERT/UPDATE/DELETE queries; they will be committed when the last such automatic transaction in the control flow completes successfully. See DatabaseApi for the full details.
Environment.get_read_db
and the decorators @with_transaction(env)
and env.with_transaction()
have been deprecated since Trac 1.0 and will be removed in Trac 1.3.1.
db
parameters removed from function and method signatures in Trac 1.1.2
With the introduction of @with_transaction(env)
decorators in 0.12 and continuing with the introduction of the database connection context managers in 1.0, the db
parameters passed as function and method arguments became deprecated.
The db
parameters have been removed from nearly all function and method signatures. The db
arguments are still present on methods of IEnvironmentParticipant
implementations, but are deprecated and should no longer be used. They will be removed in 1.3.1.
ConnectionBase
class in Trac 1.1.2
The ConnectionBase
class defines an abstract interface that database backends must adhere to when implementing a Connection
class.
Template and CSS changes in Trac 1.1.2
tt
tags are not supported in HTML5 and have been replaced with code
tags in Trac (#11094). The styling of tt
and code
tags is the same in Trac, but code
tags should be used, since the styling for tt
tags will be removed in a future version of Trac.
The about.css
stylesheet has been removed and the rules contained in that stylesheet have been moved to trac.css
. The table of environment information on the Error and About pages have been extracted to a new template environment_info.html
and the markup and associated rules in the stylesheet have been significantly changed.
Many more changes to be added, depending on how detailed we want to get. TracUpgrade#CustomizedTemplates claims that changes to id
s and CSS class
es will be documented in ApiChanges.
Uncategorized Changes
DONE Removed deprecated compatibility code for InterTrac links in Trac 1.1.4: trunk/trac/wiki/formatter.py@13050:703-712#L696, and remove documentation:
DONE Removed the deprecated authname
parameter from Environment.get_repository()
in Trac 1.1.3.
TODO Log warnings for deprecated functions and methods (comment:26:ticket:11605)
New in the 1.1 API
Be sure to have a look at the new ApiDocs (for latest trunk).
TODO Remove Since info from docstrings for Trac < 0.12.
This is a work in progress - coverage is not yet complete.