Skip to content

Commit 6133e9c

Browse files
committed
Fix last version content parsing to end of string
1 parent e5c4fe2 commit 6133e9c

File tree

2 files changed

+63
-1
lines changed

2 files changed

+63
-1
lines changed

changerelease/changelog.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
RE_VERSION_NAME = r"\[?([^\[\]\s]+)\]?"
77
RE_VERSION_CONTENTS = r"([\s\S]+?)"
88
RE_LINK_DEFINITIONS = r"\[.+\]: "
9+
RE_END_STRING = r"\Z"
910
RE_VERSION_HEADING_LINE = f"^{RE_VERSION_HEADING}{RE_VERSION_NAME}.*$"
1011

1112

@@ -22,7 +23,7 @@ def parse_versions(self):
2223

2324
def parse_version_content(self, version):
2425
matches = re.findall(
25-
f"^{RE_VERSION_HEADING}\[?{version}\]?.*${RE_VERSION_CONTENTS}^({RE_VERSION_HEADING}|{RE_LINK_DEFINITIONS})",
26+
f"^{RE_VERSION_HEADING}\[?{version}\]?.*${RE_VERSION_CONTENTS}^({RE_VERSION_HEADING}|{RE_LINK_DEFINITIONS}|{RE_END_STRING})",
2627
self.contents,
2728
re.MULTILINE,
2829
)

tests/test_parsing.py

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,3 +66,64 @@ def test_parse_pandoc():
6666
- Fix sanitization of passwords in sentinel URIs. (#6765)
6767
- Add LOG_RECEIVED to customize logging. (#6758)"""
6868
)
69+
assert (
70+
cl.parse_version_content("5.1.0b1")
71+
== """release-date
72+
73+
: 2021-04-02 10.25 P.M UTC+6:00
74+
75+
release-by
76+
77+
: Asif Saif Uddin
78+
79+
- Add sentinel_kwargs to Redis Sentinel docs.
80+
- Depend on the maintained python-consul2 library. (#6544).
81+
- Use result_chord_join_timeout instead of hardcoded default value.
82+
- Upgrade AzureBlockBlob storage backend to use Azure blob storage
83+
library v12 (#6580).
84+
- Improved integration tests.
85+
- pass_context for handle_preload_options decorator (#6583).
86+
- Makes regen less greedy (#6589).
87+
- Pytest worker shutdown timeout (#6588).
88+
- Exit celery with non zero exit value if failing (#6602).
89+
- Raise BackendStoreError when set value is too large for Redis.
90+
- Trace task optimizations are now set via Celery app instance.
91+
- Make trace_task_ret and fast_trace_task public.
92+
- reset_worker_optimizations and create_request_cls has now app as
93+
optional parameter.
94+
- Small refactor in exception handling of on_failure (#6633).
95+
- Fix for issue #5030 \\"Celery Result backend on Windows OS\\".
96+
- Add store_eager_result setting so eager tasks can store result on
97+
the result backend (#6614).
98+
- Allow heartbeats to be sent in tests (#6632).
99+
- Fixed default visibility timeout note in sqs documentation.
100+
- Support Redis Sentinel with SSL.
101+
- Simulate more exhaustive delivery info in apply().
102+
- Start chord header tasks as soon as possible (#6576).
103+
- Forward shadow option for retried tasks (#6655).
104+
- \--quiet flag now actually makes celery avoid producing logs
105+
(#6599).
106+
- Update platforms.py \\"superuser privileges\\" check (#6600).
107+
- Remove unused property [autoregister]{.title-ref} from the Task
108+
class (#6624).
109+
- fnmatch.translate() already translates globs for us. (#6668).
110+
- Upgrade some syntax to Python 3.6+.
111+
- Add [azureblockblob_base_path]{.title-ref} config (#6669).
112+
- Fix checking expiration of X.509 certificates (#6678).
113+
- Drop the lzma extra.
114+
- Fix JSON decoding errors when using MongoDB as backend (#6675).
115+
- Allow configuration of RedisBackend\\'s health_check_interval
116+
(#6666).
117+
- Safeguard against schedule entry without kwargs (#6619).
118+
- Docs only - SQS broker - add STS support (#6693) through kombu.
119+
- Drop fun_accepts_kwargs backport.
120+
- Tasks can now have required kwargs at any order (#6699).
121+
- Min py-amqp 5.0.6.
122+
- min billiard is now 3.6.4.0.
123+
- Minimum kombu now is5.1.0b1.
124+
- Numerous docs fixes.
125+
- Moved CI to github action.
126+
- Updated deployment scripts.
127+
- Updated docker.
128+
- Initial support of python 3.9 added."""
129+
)

0 commit comments

Comments
 (0)