File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11# Changelog
22
3+ ## 2.2.0
4+
5+ * Allow ` gh-issue 0 ` for "no changes" release entries by @hugovk in https://github.com/python/blurb/pull/92
6+
37## 2.1.0
48
59* Add support for Python 3.15 by @hugovk in https://github.com/python/blurb/pull/74
Original file line number Diff line number Diff line change @@ -151,7 +151,11 @@ def finish_entry() -> None:
151151 except (TypeError , ValueError ):
152152 throw (f'Invalid { issue_keys [key ]} number: { value !r} ' )
153153
154- if key == 'gh-issue' and int (value ) < lowest_possible_gh_issue_number :
154+ if (
155+ key == 'gh-issue'
156+ and not no_changes
157+ and int (value ) < lowest_possible_gh_issue_number
158+ ):
155159 throw (
156160 f'Invalid gh-issue number: { value !r} (must be >= { lowest_possible_gh_issue_number } )'
157161 )
Original file line number Diff line number Diff line change @@ -97,6 +97,26 @@ def test_parse():
9797 assert body == 'Hello world!\n '
9898
9999
100+ def test_parse_no_changes ():
101+ # Arrange
102+ contents = (
103+ '.. gh-issue: 0\n '
104+ '.. no changes: True\n '
105+ '.. section: Library\n '
106+ 'There were no new changes in version 3.15.0.'
107+ )
108+ blurbs = Blurbs ()
109+
110+ # Act
111+ blurbs .parse (contents )
112+
113+ # Assert
114+ metadata , body = blurbs [0 ]
115+ assert metadata ['gh-issue' ] == '0'
116+ assert metadata ['no changes' ] == 'True'
117+ assert body == 'There were no new changes in version 3.15.0.\n '
118+
119+
100120@pytest .mark .parametrize (
101121 'contents, expected_error' ,
102122 (
You can’t perform that action at this time.
0 commit comments