Skip to content

v1.4.0

Latest
Compare
Choose a tag to compare
@mjmikulski mjmikulski released this 15 Dec 22:58
504faf8

1.4.0

Features and enhancements

  • If an exception is raised in a context or in a decorated function, information about time elapsed until
    the failure is printed like this: foo: 120 ms (failed)

Breaking API changes

  • Removed striping of whitespaces in unit name. So now ' h ' is not a valid unit name anymore.

Fixes

  • Proper handling of exceptions was added to timed decorator.

Tests and deployment

  • ParamSpec was used to annotate types more precisely in typed decorator.
  • Added 1 new test for time formatter.
  • Added 4 new tests for Timed context.
  • Added 4 new tests for timed decorator.
  • Restored 3 tests with actual delays with sleep and added rerun mechanism to contain their flakiness.

Fun

  • New image
  • New MIT license badge

Supported Python versions

  • Removed support for 3.8 and 3.9.
  • Added support for 3.12.

Supported python versions are 3.10-3.12.

1.3.0

Breaking API changes

  • Removed alternative names for time units.

Features and enhancements

  • Type hints were added to the whole codebase.

Fixes

  • Using interval property of Timing context before entering the context gives now a RuntimeError with an explanation.
  • Using total property of Timed iterable returns now zero as expected in case that the iteration was not yet started.

Docs

  • Added this CHANGELOG.

Tests and deployment

  • CI was migrated from CircleCI to GitHub Actions.
  • Automatic tests were added for macOS and windows (which were tested before only manually).
  • All tests were deeply refactored in this release. All sleeps were replaced with proper mocking of perf_counter.
  • Unittest and nose was replaced with pytest.
  • Static type checker (mypy) was added to CI.

Supported Python versions

  • Removed support for 3.6 and 3.7.
  • Added support for 3.10 and 3.11.

Supported python versions are 3.8-3.11.