Skip to content

Releases: Neoteroi/essentials

v1.1.9

23 Nov 20:34
be308d2

Choose a tag to compare

  • Remove support for Python 3.9 and add Python 3.14 to the build matrix.
  • Update type annotations to Python >= 3.10.

v1.1.8

04 Oct 06:54
b2096b9

Choose a tag to compare

  • Improve the Secret class to always encode strings before comparing to str. Otherwise it would throw exception for non-UTF8 strings (just like secrets.compare_digest - poor UX!). It ignores unicode errors in secrets that are likely received from external input.

v1.1.7

01 Oct 07:30
d79f99e

Choose a tag to compare

  • Add a Secret class to handle secrets in code instead of using plain str. This
    approach offers several advantages:
  1. It encourages loading secrets from environment variables, and discourages programmers
    from hardcoding secrets in source code.
  2. Avoids accidental exposure of secrets in logs or error messages, by overriding
    str and repr.
  3. It causes exception if someone tries to JSON encode it using the built-in JSON
    module, unlike str.
  4. For convenience, it can be compared directly to strings. It uses constant-time
    comparison to prevent timing attacks, with the built-in secrets.compare_digest.
  5. Environment variables can be changed at runtime, using this class applications can
    pick up secret changes without needing to be restarted.
  • Add an EnvironmentVariableNotFound exception that can be used when an expected env
    variable is not set.
  • Handle timedelta objects in the FriendlyEncoder class, by @arthurbrenno.
  • Improve the order of if statements in the FriendlyEncoder class to prioritize the
    most frequently encountered types first, which should provide better performance in
    typical use cases.

v1.1.6

29 Mar 16:02
9038f8f

Choose a tag to compare

  • Drop Python 3.6 and Python 3.7 support.
  • Use obj.model_dump instead of obj.dict for Pydantic V2.
  • Add support for Decimal in FriendlyEncoder.
  • Apply black, flake8, isort, mypy.
  • Replace setup.py with pyproject.toml.
  • Workflow maintenance.

Contributors: @waketzheng, @tyzhnenko, @RobertoPrevato

v1.1.5

14 Mar 16:57
8d49126

Choose a tag to compare

  • Adds py.typed file
  • Adds ConflictException

v1.1.4

08 Nov 20:28
d3faba7

Choose a tag to compare

v1.1.4 :octocat: