Skip to content

Commit

Permalink
v2.0.0 — {version_tuple} write + onbuild placeholder, et alii
Browse files Browse the repository at this point in the history
- The `{version}` placeholder in the "basic" `format` step has been renamed to `{base_version}`.  The old name remains usable, but is deprecated.
    - **Breaking**: The `version` argument passed to `Versioningit.do_format()` and `format` method callables has been renamed to `base_version`.
- A `{version_tuple}` field, along with the fields available in the `format` step, is now available for use in templates in the `write` and `onbuild` steps.
    - New step and subtable: "template-fields"
    - **Breaking**: The `version` arguments passed to `Versioningit.do_write()`, `Versioningit.do_onbuild()`, `run_onbuild()`, and `write` & `onbuild` method callables have been replaced with `template_fields` arguments
    - Added a `get_template_fields_from_distribution()` function for use by callers of `run_onbuild()`
- `Versioningit.get_version()` now takes optional `write` and `fallback` arguments
- The `onbuild` step is no longer run when building from an sdist; the configuration therefore no longer needs to be idempotent
- Drop setuptools runtime dependency
    - setuptools is only needed for `get_cmdclasses()`, which should only be called in an environment where setuptools is already installed.
- Prevent log messages from being printed twice under recent versions of setuptools
- Values supplied for the `require-match` parameters of the `tag2version` and `onbuild` steps must now actually be booleans; previously, values of any type were accepted and were converted to booleans.
- Added a `Versioningit.run()` method that returns a structure containing all intermediate & final values
- "git" method: `{author_date}` and `{committer_date}` are no longer "clamped" to less than or equal to `{build_date}`.  This undocumented behavior was based on a misinterpretation of the `SOURCE_DATE_EPOCH` spec, and was even applied when `SOURCE_DATE_EPOCH` was not set.
- When resolving entry points, if multiple entry points with the given group & name are found, error instead of using the first one returned
  • Loading branch information
jwodder committed Jun 12, 2022
1 parent 1e1b344 commit 893866f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
v2.0.0 (in development)
-----------------------
v2.0.0 (2022-06-12)
-------------------
- The `{version}` placeholder in the "basic" `format` step has been renamed to
`{base_version}`. The old name remains usable, but is deprecated.
- **Breaking**: The `version` argument passed to `Versioningit.do_format()`
Expand Down
4 changes: 2 additions & 2 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
Changelog
=========

v2.0.0 (in development)
-----------------------
v2.0.0 (2022-06-12)
-------------------
- The ``{version}`` placeholder in the "basic" ``format`` step has been renamed
to ``{base_version}``. The old name remains usable, but is deprecated.

Expand Down
2 changes: 1 addition & 1 deletion src/versioningit/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
<https://versioningit.rtfd.io> for more information.
"""

__version__ = "2.0.0.dev1"
__version__ = "2.0.0"
__author__ = "John Thorvald Wodder II"
__author_email__ = "versioningit@varonathe.org"
__license__ = "MIT"
Expand Down

0 comments on commit 893866f

Please sign in to comment.