rrule attribute names

Bug #943509 reported by James Emerton
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
dateutil
New
Undecided
Unassigned

Bug Description

I would like to propose that the rrule object attributes that contain the rule specification (_freq, _bymonth, _byweekday, etc...) drop the underscore prefix and become a part of the public interface.

Rationale:

I am building a user interface for the creation/editing of RRULEs. I would like to start with an RRULE string, populate the UI, and ultimately convert the UI contents back into an RRULE string. (I'd also like a __str__() method, but that is a separate ticket.)

Revision history for this message
James Emerton (james-2qie2h1nj) wrote :

Upon further consideration, access to these fields may best be provided via a property descriptor; allowing clients to mutate the values requires invalidating the cache.

Revision history for this message
James Emerton (james-2qie2h1nj) wrote :

The attached patch adds property descriptors for RRULE components.

Revision history for this message
James Emerton (james-2qie2h1nj) wrote :

The updated patch addresses some issues accessing byhour, byminute, and bysecond when those components were unspecified in the original rule.

When an rrule component is synthesized from the dtstart, we are setting an _ignore attribute on the object so that the corresponding property accessor does not return the synthesized component.

Revision history for this message
christian geier (ubuntu-hwbqs6t) wrote :

any news on this?

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.