Skip to content

Commit 92a2978

Browse files
committed
Prepare v1.14.4 for release
1 parent b47f37c commit 92a2978

3 files changed

Lines changed: 155 additions & 131 deletions

File tree

Changes.md

Lines changed: 153 additions & 129 deletions
Original file line numberDiff line numberDiff line change
@@ -1,131 +1,155 @@
1+
# Changes
2+
13
Revision history for the Python package RiveScript.
24

3-
1.14.3 Dec 8 2016
4-
- Fix sorting algorithm for triggers with `%Previous`, making their sort order
5-
deterministic and correct regardless of the order they appeared in the
6-
source file (PR #60; bug #59)
7-
- Fix a possible crash when interpolating a `<star>` tag when the trigger
8-
had captured no stars. In this cases the `<star>` tag will become the string
9-
`"None"`; it is a user error that this situation arises anyway and this fix
10-
just prevents Python from crashing (bugs #51 and #54)
11-
- Fix a possible crash when calling `random.choice` on an empty list by
12-
wrapping it in a safety function at `rivescript.utils.random_choice`
13-
(bug #36)
14-
- Better error reporting on the JSON Interactive Mode: if there is an
15-
exception raised when decoding the input JSON, the output JSON now contains
16-
an `error` key with the text of the exception to help diagnose what went
17-
wrong.
18-
19-
1.14.2 Oct 18 2016
20-
- Fix numeric tags like `<add>` raising a `TypeError` exception.
21-
22-
1.14.1 Aug 9 2016
23-
- Fix a regression when handling Unicode strings under Python 2 (bug #40).
24-
25-
1.14.0 Jul 23 2016
26-
- Make the session manager pluggable and replaceable. RiveScript still uses
27-
an in-memory store for user variables, but this can be swapped out with a
28-
replacement that puts user variables somewhere else, like Redis or MySQL.
29-
The constructor accepts a `session_manager` parameter to use your own
30-
session manager based on the `rivescript.sessions.SessionManager` class.
31-
- Make the RiveScript Parser module (`rivescript.parser`) more developer
32-
friendly by removing the parent RiveScript module as a dependency. The
33-
parser can be used as a stand-alone module if all you want to do is parse
34-
and validate RiveScript code.
35-
- The `log` parameter to the constructor may now be an already opened file
36-
handle (opened in write or append mode) instead of a string, if you already
37-
have a file handle ready.
38-
- Add two examples to the `eg` directory:
39-
- `eg/sessions` replaces the in-memory session store with one that uses
40-
a Redis cache instead.
41-
- `eg/parser` shows how to use the RiveScript Parser module.
42-
- Fix a bug where atomic triggers that contain a `{weight}` tag were unable
43-
to be matched properly.
44-
- Reorganize the unit tests into many smaller files instead of one large one.
45-
46-
1.13.0 Jul 21 2016
47-
- Restructure the code to keep it on par with the JavaScript and Go versions:
48-
- `rivescript.parser` now contains all the parsing code:
49-
`parse()` and `check_syntax()` are moved here.
50-
- Triggers are stored internally in only one place now, like in the
51-
JavaScript and Go versions. This makes some internal mappings simpler as
52-
they now point to common references and don't duplicate data in memory.
53-
- **Note:** Most of the new `rivescript.*` modules are still
54-
private-use-only, even though many internal functions lost their
55-
underscore prefixes. You should still only use the API functions exposed
56-
by `rivescript.rivescript` or what is exported by the top level package.
57-
The `rivescript.parser` API will be more public-facing in the future to
58-
help with third party integrations (currently it still relies on a Python
59-
object with methods `_say` and `_warn`).
60-
- Refactor the RiveScript interactive mode (`rivescript.interactive`) to use
61-
argparse instead of getopt and add a pretty ASCII logo.
62-
- Add `shell.py` as a possibly easier-to-access (and certainly
63-
easier-to-discover) shortcut to running RiveScript's interactive mode.
64-
It accepts all the same options and works the same as before.
65-
66-
1.12.3 Jul 8 2016
67-
- Fix the Python object macro handler to use `six.text_type` on the return
68-
value, allowing Python 2 objects to return Unicode strings.
69-
70-
1.12.2 May 31 2016
71-
- Fix a couple of bugs with `set_uservars()`.
72-
73-
1.12.1 May 31 2016
74-
- Added API functions: `get_global(name)`, `get_variable(name)`, and
75-
`set_uservars(user || dict[, dict])` -- the latter is for setting many
76-
variables for a user at once, or for setting many variables for many users.
77-
Refer to the API documentation for details.
78-
79-
1.12.0 May 10 2016
80-
- Add support for nested arrays, like `!array colors = @rgb white black`
81-
(PR #22)
82-
83-
1.10.0 Feb 16 2016
84-
- Add configurable `unicode_punctuation` attribute to strip out punctuation
85-
when running in UTF-8 mode.
86-
87-
1.8.1 Nov 19 2015
88-
- Add `@` to the list of characters that disqualifies a trigger from being
89-
considered "atomic"
90-
91-
1.8.0 Oct 10 2015
92-
- New algorithm for handling variable tags (<get>, <set>, <add>, <sub>,
93-
<mult>, <div>, <bot> and <env>) that allows for iterative nesting of
94-
these tags (for example, <set copy=<get orig>> will work now).
95-
- Fix sorting algorithm, so triggers with matching word counts will be
96-
sorted by length descending.
97-
- stream() function can accept a multiline string instead of an array
98-
- Speed optimization by precompiling as many regexps as possible (what was
99-
especially helpful was to precompile substitution and simple trigger
100-
regexps), taking the time-to-reply for the default brain from ~0.19s down
101-
to ~0.04s
102-
- Add support for `! local concat` option to override concatenation mode
103-
(file scoped)
104-
- Fix the regexp used when matching optionals so that the triggers don't match
105-
on inputs where they shouldn't. (RiveScript-JS issue #46)
106-
107-
1.06 Nov 25 2014
108-
- Change package name from python-rivescript to simply rivescript.
109-
- Change from the GPLv2 license to the MIT license.
110-
- Add compatibility with Python 3.
111-
- Add Unicode support for RiveScript documents.
112-
- Prefer the .rive extension for RS documents over the old .rs extension.
113-
- Track filenames and line numbers when parsing RiveScript documents.
114-
- Add Perl object handler example.
115-
- Add current_user() method accessible from inside an object macro.
116-
- Add unit tests.
117-
- Add deparse() function that dumps the active memory state of the bot.
118-
- Add write() method that writes the active memory state back to disk as a
119-
.rive file (uses deparse()).
120-
- Bugfix with substitution placeholders.
121-
- Bugfix with the <input> and <reply> tags.
122-
123-
1.01 May 20 2013
124-
- Small bugfix in _rot13 that caused crashes under certain circumstances.
125-
- Small bugfix regarding the {weight} tag and atomic triggers.
126-
- Restructure the RiveScript library (move rivescript.py into a package
127-
folder named 'rivescript', separate the interactive mode code into
128-
interactive.py)
129-
130-
1.00 Apr 22 2012
131-
- Initial version of rivescript.py
5+
## 1.14.4 - Dec 14 2016
6+
7+
- Fix the `last_match()` function so that it returns `None` when there was no
8+
match instead of `"undefined"` (PR #63).
9+
- Strip leading and trailing whitespace from user messages, and consolidate
10+
repeated whitespace into a single space character (PR #62).
11+
12+
## 1.14.3 - Dec 8 2016
13+
14+
- Fix sorting algorithm for triggers with `%Previous`, making their sort order
15+
deterministic and correct regardless of the order they appeared in the
16+
source file (PR #60; bug #59).
17+
- Fix a possible crash when interpolating a `<star>` tag when the trigger
18+
had captured no stars. In this cases the `<star>` tag will become the string
19+
`"None"`; it is a user error that this situation arises anyway and this fix
20+
just prevents Python from crashing (bugs #51 and #54).
21+
- Fix a possible crash when calling `random.choice` on an empty list by
22+
wrapping it in a safety function at `rivescript.utils.random_choice`
23+
(bug #36).
24+
- Better error reporting on the JSON Interactive Mode: if there is an
25+
exception raised when decoding the input JSON, the output JSON now contains
26+
an `error` key with the text of the exception to help diagnose what went
27+
wrong.
28+
29+
## 1.14.2 - Oct 18 2016
30+
31+
- Fix numeric tags like `<add>` raising a `TypeError` exception.
32+
33+
## 1.14.1 - Aug 9 2016
34+
35+
- Fix a regression when handling Unicode strings under Python 2 (bug #40).
36+
37+
## 1.14.0 - Jul 23 2016
38+
39+
- Make the session manager pluggable and replaceable. RiveScript still uses
40+
an in-memory store for user variables, but this can be swapped out with a
41+
replacement that puts user variables somewhere else, like Redis or MySQL.
42+
The constructor accepts a `session_manager` parameter to use your own
43+
session manager based on the `rivescript.sessions.SessionManager` class.
44+
- Make the RiveScript Parser module (`rivescript.parser`) more developer
45+
friendly by removing the parent RiveScript module as a dependency. The
46+
parser can be used as a stand-alone module if all you want to do is parse
47+
and validate RiveScript code.
48+
- The `log` parameter to the constructor may now be an already opened file
49+
handle (opened in write or append mode) instead of a string, if you already
50+
have a file handle ready.
51+
- Add two examples to the `eg` directory:
52+
- `eg/sessions` replaces the in-memory session store with one that uses
53+
a Redis cache instead.
54+
- `eg/parser` shows how to use the RiveScript Parser module.
55+
- Fix a bug where atomic triggers that contain a `{weight}` tag were unable
56+
to be matched properly.
57+
- Reorganize the unit tests into many smaller files instead of one large one.
58+
59+
## 1.13.0 - Jul 21 2016
60+
61+
- Restructure the code to keep it on par with the JavaScript and Go versions:
62+
- `rivescript.parser` now contains all the parsing code:
63+
`parse()` and `check_syntax()` are moved here.
64+
- Triggers are stored internally in only one place now, like in the
65+
JavaScript and Go versions. This makes some internal mappings simpler as
66+
they now point to common references and don't duplicate data in memory.
67+
- **Note:** Most of the new `rivescript.*` modules are still
68+
private-use-only, even though many internal functions lost their
69+
underscore prefixes. You should still only use the API functions exposed
70+
by `rivescript.rivescript` or what is exported by the top level package.
71+
The `rivescript.parser` API will be more public-facing in the future to
72+
help with third party integrations (currently it still relies on a Python
73+
object with methods `_say` and `_warn`).
74+
- Refactor the RiveScript interactive mode (`rivescript.interactive`) to use
75+
argparse instead of getopt and add a pretty ASCII logo.
76+
- Add `shell.py` as a possibly easier-to-access (and certainly
77+
easier-to-discover) shortcut to running RiveScript's interactive mode.
78+
It accepts all the same options and works the same as before.
79+
80+
## 1.12.3 - Jul 8 2016
81+
82+
- Fix the Python object macro handler to use `six.text_type` on the return
83+
value, allowing Python 2 objects to return Unicode strings.
84+
85+
## 1.12.2 - May 31 2016
86+
87+
- Fix a couple of bugs with `set_uservars()`.
88+
89+
## 1.12.1 - May 31 2016
90+
91+
- Added API functions: `get_global(name)`, `get_variable(name)`, and
92+
`set_uservars(user || dict[, dict])` -- the latter is for setting many
93+
variables for a user at once, or for setting many variables for many users.
94+
Refer to the API documentation for details.
95+
96+
## 1.12.0 - May 10 2016
97+
98+
- Add support for nested arrays, like `!array colors = @rgb white black`
99+
(PR #22)
100+
101+
## 1.10.0 - Feb 16 2016
102+
103+
- Add configurable `unicode_punctuation` attribute to strip out punctuation
104+
when running in UTF-8 mode.
105+
106+
## 1.8.1 - Nov 19 2015
107+
108+
- Add `@` to the list of characters that disqualifies a trigger from being
109+
considered "atomic"
110+
111+
## 1.8.0 - Oct 10 2015
112+
113+
- New algorithm for handling variable tags (<get>, <set>, <add>, <sub>,
114+
<mult>, <div>, <bot> and <env>) that allows for iterative nesting of
115+
these tags (for example, <set copy=<get orig>> will work now).
116+
- Fix sorting algorithm, so triggers with matching word counts will be
117+
sorted by length descending.
118+
- stream() function can accept a multiline string instead of an array
119+
- Speed optimization by precompiling as many regexps as possible (what was
120+
especially helpful was to precompile substitution and simple trigger
121+
regexps), taking the time-to-reply for the default brain from ~0.19s down
122+
to ~0.04s
123+
- Add support for `! local concat` option to override concatenation mode
124+
(file scoped)
125+
- Fix the regexp used when matching optionals so that the triggers don't match
126+
on inputs where they shouldn't. (RiveScript-JS issue #46)
127+
128+
## 1.06 - Nov 25 2014
129+
130+
- Change package name from python-rivescript to simply rivescript.
131+
- Change from the GPLv2 license to the MIT license.
132+
- Add compatibility with Python 3.
133+
- Add Unicode support for RiveScript documents.
134+
- Prefer the .rive extension for RS documents over the old .rs extension.
135+
- Track filenames and line numbers when parsing RiveScript documents.
136+
- Add Perl object handler example.
137+
- Add current_user() method accessible from inside an object macro.
138+
- Add unit tests.
139+
- Add deparse() function that dumps the active memory state of the bot.
140+
- Add write() method that writes the active memory state back to disk as a
141+
.rive file (uses deparse()).
142+
- Bugfix with substitution placeholders.
143+
- Bugfix with the <input> and <reply> tags.
144+
145+
## 1.01 - May 20 2013
146+
147+
- Small bugfix in \_rot13 that caused crashes under certain circumstances.
148+
- Small bugfix regarding the {weight} tag and atomic triggers.
149+
- Restructure the RiveScript library (move rivescript.py into a package
150+
folder named 'rivescript', separate the interactive mode code into
151+
interactive.py)
152+
153+
## 1.00 - Apr 22 2012
154+
155+
- Initial version of rivescript.py

python-rivescript.spec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
%global desc A scripting language to make it easy to write responses for a chatterbot.
44

55
Name: python-%{srcname}
6-
Version: 1.14.3
6+
Version: 1.14.4
77
Release: 1%{?dist}
88
Summary: %{sum}
99

rivescript/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
__docformat__ = 'plaintext'
2121

2222
__all__ = ['rivescript']
23-
__version__ = '1.14.3'
23+
__version__ = '1.14.4'
2424

2525
from .rivescript import RiveScript
2626
from .exceptions import (

0 commit comments

Comments
 (0)