@@ -11,6 +11,47 @@ to `semantic versioning`_.
1111.. _Keep a Changelog : http://keepachangelog.com/
1212.. _semantic versioning : http://semver.org/
1313
14+ `Release 7.2 `_ (2020-02-14)
15+ ---------------------------
16+
17+ Merged pull request `#23 `_ which makes it possible to customize the regular
18+ expression that's used to match timestamps in filenames using a new command
19+ line option ``rotate-backups --timestamp-pattern ``.
20+
21+ The pull request wasn't exactly complete (the code couldn't have run as
22+ written, although it showed the general idea clear enough) so I decided to
23+ treat `#23 `_ as more of a feature suggestion. However there was no reason no to
24+ merge the pull request and use it as a base for my changes, hence why I decided
25+ to do so despite rewriting the code.
26+
27+ Changes from the pull request:
28+
29+ - Renamed ``timestamp `` to :attr: `~rotate_backups.RotateBackups.timestamp_pattern `
30+ to make it less ambiguous.
31+
32+ - Added validation that custom patterns provided by callers define
33+ named capture groups corresponding to the required date components
34+ (year, month and day).
35+
36+ - Rewrote the mapping from capture groups to :class: `datetime.datetime `
37+ arguments as follows:
38+
39+ - Previously positional :class: `datetime.datetime ` arguments were used
40+ which depended on the order of capture groups in the hard coded
41+ regular expression pattern to function correctly.
42+
43+ - Now that users can define their own patterns, this is no longer a
44+ reasonable approach. As such the code now constructs and passes a
45+ dictionary of keyword arguments to :class: `datetime.datetime `.
46+
47+ - Updated the documentation and the command line interface usage message to
48+ describe the new command line option and configuration file option.
49+
50+ - Added tests for the new behavior.
51+
52+ .. _Release 7.2 : https://github.com/xolox/python-rotate-backups/compare/7.1...7.2
53+ .. _#23 : https://github.com/xolox/python-rotate-backups/pull/23
54+
1455`Release 7.1 `_ (2020-02-13)
1556---------------------------
1657
0 commit comments