Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds support for marshalling to and from Python-specific datatypes #50

Merged

Conversation

coddingtonbear
Copy link
Collaborator

Refactoring task instance handling to support marshalling to and from
python-specific (non-JSON) datatypes while retaining backward-compatible
behavior.

  • Adds 'marshal' kwarg to TaskWarriorShellout which instructs library
    to marshal TaskWarrior JSON into reasonable python datatypes.
    Note: Returned object always implements dictionary interface, and when
    when not using said kwarg, a standard dictionary (without automatic
    marshalling behavior) will be returned.
  • Adds a read-only version of TaskRC parser to provide easy access to
    UDAs. (Adapted from Inthe.AM)
  • Adds field classes and tests for said field classes. These allow
    automatic marshalling data between Taskwarrior's
    sometimes-inconsistent type handling and python datatypes.
  • Adds task change journaling for tasks returned when using marshalling.
    (This is not directly used in taskw, but will be useful for libraries
    utilizing this library including bugwarrior).

Minor Bugfixes:

  • Removes conversion of '\n' to ' ' in taskwarrior experimental
    encoding. Taskwarrior is capable of storing newlines.

python-specific (non-JSON) datatypes while retaining backward-compatible
behavior.

* Adds 'marshal' kwarg to TaskWarriorShellout which instructs library
  to marshal TaskWarrior JSON into reasonable python datatypes.
  Note: Returned object always implements dictionary interface, and when
  when not using said kwarg, a standard dictionary (without automatic
  marshalling behavior) will be returned.
* Adds a read-only version of TaskRC parser to provide easy access to
  UDAs. (Adapted from Inthe.AM)
* Adds field classes and tests for said field classes.  These allow
  automatic marshalling data between Taskwarrior's
  sometimes-inconsistent type handling and python datatypes.
* Adds task change journaling for tasks returned when using marshalling.
  (This is not directly used in taskw, but will be useful for libraries
  utilizing this library including bugwarrior).

Minor Bugfixes:

* Removes conversion of '\n' to ' ' in taskwarrior experimental
  encoding.  Taskwarrior is capable of storing newlines.
@ralphbean
Copy link
Owner

Excellent.

ralphbean added a commit that referenced this pull request Apr 3, 2014
Adds support for marshalling to and from Python-specific datatypes
@ralphbean ralphbean merged commit 46b2777 into ralphbean:develop Apr 3, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants