@kirsle kirsle released this Sep 21, 2017 · 1 commit to master since this release

Assets 3

Changes

This release fixes some regular expressions and adds better Unicode
compatibility for trigger matching.

  • Fix the regexp that matches {weight} tags in replies to use re.search()
    instead of re.match(). This ensures that random replies are chosen with the
    correct weighting applied (bug #102; PR #106)
  • Fix the way arrays are interpolated into triggers so that array names are
    now allowed to contain underscores (bug #101; PR #107)
  • Fix Unicode handling in regular expressions by using the re.UNICODE flag.
    This allows for a trigger containing optionals, like [*], to match
    correctly when adjacent to Unicode symbols such as umlauts (bug #37; PR #108)

@kirsle kirsle released this Sep 5, 2017 · 9 commits to master since this release

Assets 3

Changes

This release focuses on bug fixes and backwards compatible improvements.

  • Improvements to the new trigger sorting algorithm:
    • Triggers containing no text (wildcards only) are sorted nearer to the end
      (bug #94)
  • Trigger components containing an empty string between pipes (e.g. [|]) now
    raises a syntax error at parsing time (bug #87)
  • Fix the parsing of ^ when used on a +Trigger not being fully evaluated
    before syntax checking for the trigger was done (bug #86)
  • Remove extra space characters inside optionals (bug #98)
  • Improve the syntax checker by having it raise errors when certain "tag
    characters" are mismatched or opened and closed in the wrong order -- for
    example {<}> (PR #103)
  • Fix the deparse() and write() functions so they work again with the
    latest version of RiveScript (bug #76)

@kirsle kirsle released this May 19, 2017 · 35 commits to master since this release

Assets 4

Changes

  • Various fixes and improvements that catch RiveScript-Python up with the other
    implementations, to pass the RiveScript Test Suite (PR #89):
    • Implement arrays in replies -- so you could write a reply like
      My favorite color is (@colors) and the array gets expanded to a random
      item from the !array by the same name.
    • Fix the regexp for {weight} tag removal so that it still works if you
      include extra spaces on either end of the tag.
    • Fix the _ wildcard to allow matching Unicode letters.
    • Fix division with the <div> tag to use integer division for Python 3.
  • Improvements to the trigger sorting algorithm:
    • Add special handling so that a trigger of [*] gets sorted above the
      usual catch-all trigger of * (PR #92)
    • Fix a logic bug with bitwise operators for handling the case that a trigger
      contains * wildcards but does not contain any optionals or wildcards of
      different types (bug #90, PR #91)

@kirsle kirsle released this Mar 23, 2017 · 46 commits to master since this release

Assets 4

Changes

  • Fix regexp for validating RiveScript syntax to use re.search instead of
    re.match (bug #82).
  • Allow object macros to contain capital letters in their names (PR #83).

@kirsle kirsle released this Feb 21, 2017 · 51 commits to master since this release

Assets 4

Changes

  • Bugfix when storing the user's last_match variable when a %Previous is
    active (it was storing a regexp object and not a string), to help third party
    session drivers (e.g. Redis) to work.

@kirsle kirsle released this Dec 14, 2016 · 72 commits to master since this release

Assets 4

Changes

  • Fix the last_match() function so that it returns None when there was no
    match instead of "undefined" (PR #63).
  • Strip leading and trailing whitespace from user messages, and consolidate
    repeated whitespace into a single space character (PR #62).

@kirsle kirsle released this Dec 8, 2016 · 79 commits to master since this release

Assets 4

Changes

1.14.3 Dec 8 2016

  • Fix sorting algorithm for triggers with %Previous, making their sort order
    deterministic and correct regardless of the order they appeared in the
    source file (PR #60; bug #59)
  • Fix a possible crash when interpolating a <star> tag when the trigger
    had captured no stars. In this cases the <star> tag will become the string
    "None"; it is a user error that this situation arises anyway and this fix
    just prevents Python from crashing (bugs #51 and #54)
  • Fix a possible crash when calling random.choice on an empty list by
    wrapping it in a safety function at rivescript.utils.random_choice
    (bug #36)
  • Better error reporting on the JSON Interactive Mode: if there is an
    exception raised when decoding the input JSON, the output JSON now contains
    an error key with the text of the exception to help diagnose what went
    wrong.

@kirsle kirsle released this Oct 18, 2016 · 84 commits to master since this release

Assets 4

Changes

1.14.2 Oct 18 2016

  • Fix numeric tags like <add> raising a TypeError exception.

@kirsle kirsle released this Aug 9, 2016 · 86 commits to master since this release

Assets 4

Changes

1.14.1 Aug 9 2016

  • Fix a regression when handling Unicode strings under Python 2 (bug #40).

@kirsle kirsle released this Jul 24, 2016 · 89 commits to master since this release

Assets 4

Changes

1.14.0 Jul 23 2016

  • Make the session manager pluggable and replaceable. RiveScript still uses
    an in-memory store for user variables, but this can be swapped out with a
    replacement that puts user variables somewhere else, like Redis or MySQL.
    The constructor accepts a session_manager parameter to use your own
    session manager based on the rivescript.sessions.SessionManager class.
  • Make the RiveScript Parser module (rivescript.parser) more developer
    friendly by removing the parent RiveScript module as a dependency. The
    parser can be used as a stand-alone module if all you want to do is parse
    and validate RiveScript code.
  • The log parameter to the constructor may now be an already opened file
    handle (opened in write or append mode) instead of a string, if you already
    have a file handle ready.
  • Add two examples to the eg directory:
    • eg/sessions replaces the in-memory session store with one that uses
      a Redis cache instead.
    • eg/parser shows how to use the RiveScript Parser module.
  • Fix a bug where atomic triggers that contain a {weight} tag were unable
    to be matched properly.
  • Reorganize the unit tests into many smaller files instead of one large one.