Skip to content

Commit

Permalink
chore: release v2.4.0
Browse files Browse the repository at this point in the history
Signed-off-by: Rongrong <[email protected]>
  • Loading branch information
Rongronggg9 committed Nov 20, 2023
1 parent 5a22be2 commit d1548fa
Show file tree
Hide file tree
Showing 3 changed files with 67 additions and 1 deletion.
33 changes: 33 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,38 @@
# Changelog

## Significant performance improvement, native blockquote and syntax highlighting (v2.4.0)

### BREAKING CHANGES

- **Drop Python 3.7 & 3.8 support**: The minimum Python version requirement is now 3.9.

### Highlights

#### Performance enhancements

- **Reuse SSL context**: Reuse SSL context as `aiohttp` does. This improves performance (reduce load average by ~40%) and reduces memory usage.
- **Lazy CookieJar**: Lazy creating CookieJar until there is really a Cookie. This improves performance (reduce load average by ~15%) and reduces memory usage.

### Additions

- **Native blockquote**: `<blockquote>` is now rendered as a native Telegram blockquote rather than a text block wrapped with horizontal rules.
- **Syntax highlighting**: `<pre>` is now rendered as a native Telegram code block with syntax highlighting, as long as the language is specified in the `class` attribute.

### Enhancements

- **Custom-title-aware OPML**: When importing and exporting OPML, the bot will try to distinguish if a feed is of a custom title, and preserve it if so.
- **`/lang` and `/test` as "remote" commands**: `/lang` and `/test` are now recognized as "remote" commands, which means you can use them in the private chat to make the operation actually apply to the channel/group you've specified in the command. Note: `/test` is only available to the bot manager.
- **`/user_info` UX enhancement**: `/user_info` now has a better UX. Note: `/user_info` is only available to the bot manager.
- **Minor enhancements**: The Docker image is now based on Debian bookworm.

### Bug fixes

- **Unexpected feed migration**: Fix a bug causing the bot to migrate feeds to a new URL unexpectedly. More specifically, the bot will now only migrate a feed if a redirection is considered permanent (HTTP status code 301 or 308).
- **WEBP sent with wrong color space**: Fix a bug causing WEBP images sent with a wrong color space.
- **Incorrect OPML format**: Fix incorrect OPML format making some RSS readers unable to import the OPML file exported by the bot.
- **Mistaken watchdog feed timing**: Fix a bug causing the watchdog to be feed at the wrong time.
- **Uncaught errors**: Fix some uncaught errors causing messages failed to be sent.

## Improved performance, subscription quantity limit, and more (v2.3.0)

This is a long-awaited release. Nice to meet you again in the changelog! This is the last release that supports Python 3.7, and there will not be any patch version for the v2.3.x series. Any fixes will only be applied to the next release, which will bump the minimum Python version requirement to 3.9.
Expand Down
33 changes: 33 additions & 0 deletions docs/CHANGELOG.zh.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,38 @@
# 更新日志

## 显著提高性能、原生块状引用和语法高亮(v2.4.0)

### 重大变更

- **取消对 Python 3.7 和 3.8 的支持**:最低的 Python 版本要求现在是 3.9。

### 亮点

#### 性能增强

- **SSL 上下文重用**:像 `aiohttp` 那样重用 SSL 上下文。这将提高性能(将平均负载降低约 40%)并减少内存使用量。
- **懒惰 CookieJar**:懒惰创建 CookieJar,直到真正有 Cookie。这将提高性能(将平均负载降低约 15%)并减少内存使用量。

### 新增功能

- **原生块状引用**`<blockquote>` 现在被渲染为原生的 Telegram 块状引用,取代用横线包裹的文本块。
- **语法高亮显示**:只要在 `class` 属性中指定了语言,`<pre>` 现在会呈现为带有语法高亮的 Telegram 原生代码块。

## 增强

- **可感知自定义标题的 OPML**:在导入和导出 OPML 时,bot 会尝试判断订阅源是否具有自定义标题,如果是,则会保留它。
- **`/lang``/test` 作为“远程”命令**`/lang``/test` 现在被认定为“远程”命令,这意味着您可以在私聊中使用它们,但使操作实际应用于您在命令中指定的频道/群组。注意:`/test` 仅适用于 bot 管理员。
- **`/user_info` UX 增强**`/user_info` 现在有了更好的 UX。注意:`/user_info` 仅对 bot 管理员有效。
- **次要的增强**: Docker 映像现在基于 Debian bookworm。

## Bug 修复

- **意外迁移订阅源**:修复一个导致 bot 意外将订阅源迁移到新 URL 的错误。更具体地说,bot 现在只会在重定向被视为永久性(HTTP 状态码为 301 或 308)的情况下迁移订阅源。
- **以错误的色彩空间发送 WEBP**:修复导致 WEBP 图像以错误色彩空间发送的错误。
- **不正确的 OPML 格式**:修正不正确的 OPML 格式,这导致某些 RSS 阅读器无法导入 bot 导出的 OPML 文件。
- **错误的看门狗饲喂时序**:修复导致看门狗在不正确的时间被饲喂的错误。
- **未捕获的错误**:修复一些导致消息发送失败的未捕获错误。

## 改进的性能、订阅数量限制等 (v2.3.0)

这是一个期待已久的版本。很高兴在变更日志中再次相遇!这是支持 Python 3.7 的最后一个版本,v2.3.x 系列不会有任何补丁版本。任何修复都将只应用于下一个版本,且下一个版本将使 Python 的最低版本要求提高到 3.9。
Expand Down
2 changes: 1 addition & 1 deletion src/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "2.3.0"
__version__ = "2.4.0"

0 comments on commit d1548fa

Please sign in to comment.