Skip to content

Releases: byexamples/byexample

8.0.0

17 Feb 00:08
Compare
Choose a tag to compare

Changes from previous version:
Fixes

  • cling errors including ASCII escape sequences are interpreted
    correctly (210ee63)
  • Enhance the diff mapping ctrl unicodes to '?' and only mapping
    ctrl unicodes (e396b24)
  • Update Python's pretty print (pp) on a geometry change SIGWINCH
    (90e18b7)
  • Pass options to Concern.start hook (91fb6b3)
  • Avoid race condition in read/write cache from/to disk (73c1b01)
  • Ignore non-ascii chars in Python 2.7 with +term=ansi (fa506e5)
  • Fixed pathological regexs and incompatible ones with the Linear
    Expected optimization (0f7282f, ebba12a)
  • Warn if no files were passed/found instead of crashing (637162d)
  • Fix option parsing and defaults (e4c07ff, 38b9946)
  • Do not cache some internal objects (25ec8af)
  • Do not allow for abbreviations of long options (fae5ca8)
  • Perform a read even if timeout is 0 (_expect_prompt), fix
    the message of the timeout (eb2107e)
  • Best effort for shutdown the runners (3bc281d)
  • Count example once, even if finish_parse is called twice (a9322b5)

Enhancements

  • Capture greedy/non-greedy (heuristic): named tags are non-greedy as they
    are used to capture interesting, typically short strings; unnamed tags are
    non-greedy too except at the end of a line where typically capture
    longer uninteresting outputs. (c94def0, fb88961, 6d5178c)
  • Better support for cling (the C/C++ interpreter) using pyte (a
    terminal emulator). (210ee63)
  • Full support for unicode inputs (running byexample with Python 2.x
    and 3.x) (6cb12dd, 4b32b57, cd9b96e, 10421dc, 7906466).
  • Document the --encoding option (10421dc).
  • Send a SIGWINCH on +geometry change (90e18b7)
  • Support for terminal emulations: +term=as-is (no emulation), +term=dumb
    (removes any trailing whitespace, converts to spaces the tabs and uniforms
    the new lines) and +term=ansi (full terminal emulation, useful for ncurses based
    outputs). (9ca21ba, 2605f5d)
  • Improve to the cache system (still experimental) (99ff4d1,
    f36b085, 19978f7)
  • Reimplemented part of the expected parsing: the expected_tokenizer
    (052cb45)
  • Reimplemented the parser for the expected as a state machine
    (73ba50f, e07b787, 912290a, 02dc851, 6aebd27, 78096ea,
    6b6ee55, bc9bbf9, 1998b69, 233afd3, 641c88d)
  • The target/language of Finders/Parsers can be a collection
    (851b14f)
  • Simplify the check overlap (76cc8a8, e7e457b)
  • The original (7.x) +stop-on-silence stops the process only on
    timeout; it was renamed to +stop-on-timeout and the
    +stop-on-silence was fixed to do what it's supposed to do: stop
    after some period of inactivity or silence. (8b46779, ba7a0c2)
  • Default timeout for internal ops -x-dfl-timeout. (65c6c94,
    a058d0f)
  • Renamed +delaybeforesend to -x-delaybeforesend (b3b3009)
  • -x-min-rcount to control the sensitivity of the incremental match
    (fe57caf)
  • --shebang renamed to -x-shebang (86664f6)
  • Concern event generic event type; Process uses event for logging.
    (d20c140, 89a4624)
  • Deterministic output (pp) for Ruby Hashes. (9139d3e)
  • Ruby support: 2.0, 2.1, 2.2, 2.3, 2.4, 2.5 and 2.6; RVM environments
    too (4d9fc17).
  • Recover the runner after a timeout and do not abort. (47557f7)
  • Support for cancel an ongoing example. (802d88a)

Potential incompatible changes (examples)

  • The unnamed tag's regex is greedy; named tags are not (c94def0)
  • The C/C++ now require the use of a full terminal emulator
    (+terminal=ansi) always and its geometry cannot change. (210ee63,
    e6b2fa7)
  • Changed the default terminal emulation from +term=as-is to +term=dumb
    which it is more useful and reduce the need of +norm-ws (2605f5d).
  • The hacky # >> Ruby prompt is not supported, superseded by Zone
    Delimiter for Ruby files (.rb) (a5b5dcd)

Incompatible changes (examples)

  • Limit the number of output rows for C/C++ examples (bedef7e)
  • Do not allow an underscore in a tag name (38766d8)
  • Capture greedy/non-greedy (heuristic): named tags are non-greedy as they
    are used to capture interesting, typically short strings; unnamed tags are
    non-greedy too except at the end of a line (c94def0, fb88961, 6d5178c)
  • Zone Delimiter: defined find zones where to find examples -- byexample
    will not find examples anywhere anymore (b2adc93, fadc894). Examples
    can be found only in code blocks and comments of a Markdown file; in the
    docstrings of a Python file; in the comments of a Ruby file ... (see
    each language) (46ef5d9, c0d6e05, f064ac7). Only prompt based examples
    are supported. (bb86873, 0805192)
  • Use ?: and :: as primary and secondary prompts for C/C++ examples
    (582f33c)
  • Rename stop-on-silence by stop-on-timeout (8b46779)
  • Implement stop-on-silence for shell (incompatible with 7.x)
    (ba7a0c2)
  • To set options in the C/C++ examples, use // byexample: ... only
    (/* .. */ is not supported anymore) (21060dac0)

Incompatible changes (lib)

  • Refactor _spawn_interpreter (3670321)
  • Refactor PexepctMixin/ExampleRunner passing options explicitly
    (_exec_and_wait, _expect_prompt, _change_terminal_geometry_ctx,
    _change_terminal_geometry, run and _get_output) (2cfe8b6)
  • Refactor and removed unused code in Expected (193a5a9, 426e480)
  • Explicit timeout value for _expect_prompt (28be774)

Incompatible changes (modules)

  • Each runner needs to implement its ExampleRunner.run in terms of
    PexepctMixin._run; PexepctMixin._run will delegate the runner-specific
    code calling PexepctMixin._run_impl (to be overridden by the runner)
    (bea45a2)
  • Pass options to Concern.start hook (91fb6b3)
  • Removed the concept of spurious endings and specific/generic finders
    (2ddfd1d)
  • Extend user_aborted to a more generic aborted hook; user_aborted is
    not supported anymore. (4356a9a)

Others

7.4.5

05 Dec 03:42
Compare
Choose a tag to compare

Changes from previous version:
Fixes:

  • Disable readline for irb (ruby interpreter). Fixes #70.

7.4.4

12 Nov 00:07
Compare
Choose a tag to compare

Changes from previous version:
Enhancements:

  • Use 'provisional' as alias for 'unstable'.

7.4.3

26 Oct 12:06
Compare
Choose a tag to compare

Changes from previous version:
Fixes:

  • Changed how the Ruby runner toggles the echo mode of IRB
    (+ruby-expr-print) due a change in Ruby 2.5 (see 539d3a1). Closes #62
  • Added a missing module (sys) and fixed a typo in one attr name (see
    d44d9b0)

7.4.2

23 Oct 02:17
Compare
Choose a tag to compare

Changes from previous version:
Enhancements:

  • Print a warning if a Parser/Finder/Runner/Concern is loaded but it
    has its key attibute (target, language, concerns) missing.
  • Print the Python version used to run byexample.

7.4.1

19 Oct 12:45
Compare
Choose a tag to compare

Changes from previous version:
Enhancements:

  • Extended the KeyboardInterrupt capture scope (see 0e8e09e)
  • Prevent sigints in critical paths (see 6dfbba7). Closes #54
  • Minor improvements to the progress report (see a43a0f3)

Fixes:

  • A KeyboardInterrupt (aka ^C) abort the whole execution in
    the most possible ordered way without printing a traceback (see
    c56f79d, 6dfbba7 and 0a33405)

Note:

  • Despite of be implemented #54, byexample is not race-condition free
    when an asynchronous SIGINT signal is received (aka KeyboardInterrupt or
    ^C). It was done in #54 a best effort to minimize the damage and the
    resources leaked or blocked.

7.4.0

15 Oct 00:35
Compare
Choose a tag to compare

Changes from previous version:
Enhancements:

  • Support report progress in parallel (see 48ef2c1).
  • Support run concurrently (see d6d2e42). Closes #45.
  • Experimental support for Javascript-nodejs (see 9febf82). Closes #55.

Fixes:

  • Fix "leak" of options' up (see a04fe83)

Possible incompatible changes (usability minor level)

  • Do not fake tqdm; disable ProgressBarReporter if tqdm is not
    installed.

7.3.0

12 Oct 19:18
Compare
Choose a tag to compare

Changes from previous version:
Enhancements:

Fixes:

  • A timeout is now considered an ABORT (see ab9c860). Closes #44.

Possible incompatible changes (modules)

  • Concern.finish will receive another parameter: timedout.
  • Python 3.3 support is gone.

Others:

  • New dependency: appdirs
  • Internal helper script r.py updated.
  • Updated the docs.

7.2.3

05 Oct 00:15
Compare
Choose a tag to compare

7.2.3

Changes from previous version:
Enhancements:

  • Small optimizations (see bd8a740, 92d8982)
  • Improved error message when two examples overlap (see 5e08f80)
  • Other minor optimization.
    Fixes:
  • Made Markdown examples compatible with others (see 38793dc)
  • Count new lines correctly avoiding hacks (see 2a67300)
  • Timeout (--timeout) accepts float now (see bfdd8e1)
  • Made optional the capture at the end (see 528a7c8, fixes #51 )

Others:

7.2.2

03 Sep 15:03
Compare
Choose a tag to compare

Changes from previous version:
Enhancements:

  • Cached the extension of the options parser (see bf8abfd)
  • Cached the already parsed options (see 4ee34e9)
  • Other minor optimization.

Note: the runtime should be reduced by a ~33% with these optimizations.