Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
v3.4.2
======

* fix #395: correctly transfer tag regex in the Configuration constructor

v3.4.1
======

Expand Down
2 changes: 1 addition & 1 deletion src/setuptools_scm/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def __init__(
self.fallback_version = fallback_version
self.fallback_root = fallback_root
self.parse = parse
self.tag_regex = DEFAULT_TAG_REGEX
self.tag_regex = tag_regex
self.git_describe_command = git_describe_command

@property
Expand Down
8 changes: 7 additions & 1 deletion testing/test_config.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from __future__ import unicode_literals

from setuptools_scm.config import Configuration

import re
import pytest


Expand All @@ -26,3 +26,9 @@ def test_config_from_pyproject(tmpdir):
fn = tmpdir / "pyproject.toml"
fn.write_text("[tool.setuptools_scm]\n", encoding="utf-8")
assert Configuration.from_file(str(fn))


def test_config_regex_init():
tag_regex = re.compile(r"v(\d+)")
conf = Configuration(tag_regex=tag_regex)
assert conf.tag_regex is tag_regex