From 7c2d51ae87c5ac2946c059090457a7623d250272 Mon Sep 17 00:00:00 2001 From: Arthit Suriyawongkul Date: Thu, 19 Mar 2026 13:57:17 +0000 Subject: [PATCH] Bump version 5.3.1 -> 5.3.2 Signed-off-by: Arthit Suriyawongkul --- CHANGELOG.md | 30 +++++++++++++++++++++++++++++- CITATION.cff | 2 +- README.md | 4 ++-- README_TH.md | 4 ++-- codemeta.json | 4 ++-- pyproject.toml | 4 ++-- pythainlp/__init__.py | 2 +- 7 files changed, 39 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 99a351715..8bd36c7d3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,7 +15,34 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - Full release notes: -- Commit history: +- Commit history: + +## [5.3.2] - 2026-03-19 + +This release focuses on security issues related to path traversal +and renaming functions to conform with PEP 8 and follow NLTK convention. +Old function names are still accessible, but migration to new names are +recommended as old function names will be removed in a future version. + +### Added + +- `pythainlp.chunk` module: canonical home for chunking/phrase-structure + parsing, following the NLTK `nltk.chunk` naming convention. + +### Deprecated + +The following names are deprecated and will be removed in 6.0 (#1339): + +- `pythainlp.util.isthaichar()`: use `pythainlp.util.is_thai_char()`. +- `pythainlp.util.isthai()`: use `pythainlp.util.is_thai()`. +- `pythainlp.util.countthai()`: use `pythainlp.util.count_thai()`. +- `pythainlp.tag.crfchunk.CRFchunk`: use `pythainlp.chunk.CRFChunkParser`. +- `pythainlp.tag.chunk_parse()`: use `pythainlp.chunk.chunk_parse()`. + +### Security + +- Prevent path traversal: validate that paths stay within + their expected base directory (#1342) ## [5.3.1] - 2026-03-14 @@ -212,6 +239,7 @@ The minimum requirement is now Python 3.9. - See +[5.3.2]: https://github.com/PyThaiNLP/pythainlp/compare/v5.3.1...v5.3.2 [5.3.1]: https://github.com/PyThaiNLP/pythainlp/compare/v5.3.0...v5.3.1 [5.3.0]: https://github.com/PyThaiNLP/pythainlp/compare/v5.2.0...v5.3.0 [5.2.0]: https://github.com/PyThaiNLP/pythainlp/compare/v5.1.2...v5.2.0 diff --git a/CITATION.cff b/CITATION.cff index a99d98d0d..6b23ef8f1 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -24,7 +24,7 @@ abstract: PyThaiNLP is a Thai natural language processing library for Python. It repository-code: "https://github.com/PyThaiNLP/pythainlp" type: software doi: 10.5281/zenodo.3519354 -version: 5.3.1 +version: 5.3.2 license-url: "https://spdx.org/licenses/Apache-2.0" keywords: - computational linguistics diff --git a/README.md b/README.md index b84b5bb8b..4c5ed3172 100644 --- a/README.md +++ b/README.md @@ -31,8 +31,8 @@ pip install pythainlp | Version | Python version | Changes | Documentation | |:-------:|:--------------:|:-------:|:-------------:| -| [5.3.1](https://github.com/PyThaiNLP/pythainlp/releases) | 3.9+ | [Log](https://github.com/PyThaiNLP/pythainlp/issues/1080) | [pythainlp.org/docs](https://pythainlp.org/docs) | -| [`dev`](https://github.com/PyThaiNLP/pythainlp/tree/dev) | 3.9+ | [Log](https://github.com/PyThaiNLP/pythainlp/issues/1169) | [pythainlp.org/dev-docs](https://pythainlp.org/dev-docs/) | +| [5.3.2](https://github.com/PyThaiNLP/pythainlp/releases) | 3.9+ | [Log](https://github.com/PyThaiNLP/pythainlp/blob/dev/CHANGELOG.md#532---2026-03-19) | [pythainlp.org/docs](https://pythainlp.org/docs) | +| [`dev`](https://github.com/PyThaiNLP/pythainlp/tree/dev) | 3.9+ | [Log](https://github.com/PyThaiNLP/pythainlp/compare/v5.3.2...HEAD) | [pythainlp.org/dev-docs](https://pythainlp.org/dev-docs/) | ## Features diff --git a/README_TH.md b/README_TH.md index a50457d78..f6a949250 100644 --- a/README_TH.md +++ b/README_TH.md @@ -29,8 +29,8 @@ pip install pythainlp | รุ่น | รุ่นของ Python | มีอะไรเปลี่ยน | เอกสาร | | :-: | :-: | :-: | :-: | -| [5.3.1](https://github.com/PyThaiNLP/pythainlp/releases) | 3.9+ | [Log](https://github.com/PyThaiNLP/pythainlp/issues/1080) | [pythainlp.org/docs](https://pythainlp.org/docs) | -| [`dev`](https://github.com/PyThaiNLP/pythainlp/tree/dev) | 3.9+ | [Log](https://github.com/PyThaiNLP/pythainlp/issues/1169) | [pythainlp.org/dev-docs](https://pythainlp.org/dev-docs/) | +| [5.3.2](https://github.com/PyThaiNLP/pythainlp/releases) | 3.9+ | [Log](https://github.com/PyThaiNLP/pythainlp/blob/dev/CHANGELOG.md#532---2026-03-19) | [pythainlp.org/docs](https://pythainlp.org/docs) | +| [`dev`](https://github.com/PyThaiNLP/pythainlp/tree/dev) | 3.9+ | [Log](https://github.com/PyThaiNLP/pythainlp/compare/v5.3.2...HEAD) | [pythainlp.org/dev-docs](https://pythainlp.org/dev-docs/) | ## ความสามารถ diff --git a/codemeta.json b/codemeta.json index a5d4bc243..41e3cbd73 100644 --- a/codemeta.json +++ b/codemeta.json @@ -47,7 +47,7 @@ "codeRepository": "https://github.com/PyThaiNLP/pythainlp", "copyrightYear": 2026, "dateCreated": "2016-06-27", - "dateModified": "2026-03-14", + "dateModified": "2026-03-19", "datePublished": "2016-06-27", "description": "PyThaiNLP is a Thai natural language processing library for Python. It provides standard linguistic analysis for the Thai language, including tokenization and part-of-speech tagging. Additionally, it offers standard Thai locale utility functions, such as Thai Buddhist Era date formatting and the conversion of numbers into Thai text.", "developmentStatus": "active", @@ -197,5 +197,5 @@ "https://pythainlp.org/Model-Cards/" ], "url": "https://pythainlp.org/", - "version": "5.3.1" + "version": "5.3.2" } diff --git a/pyproject.toml b/pyproject.toml index 0d9c98e16..f3c3f1b13 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -8,7 +8,7 @@ build-backend = "hatchling.build" [project] name = "pythainlp" -version = "5.3.1" +version = "5.3.2" description = "Thai Natural Language Processing library" readme = "README.md" requires-python = ">=3.9" @@ -313,7 +313,7 @@ include = [ # Bumpversion configuration [tool.bumpversion] -current_version = "5.3.1" +current_version = "5.3.2" commit = true tag = true parse = "(?P\\d+)\\.(?P\\d+)\\.(?P\\d+)(\\-(?P[a-z]+)(?P\\d+))?" diff --git a/pythainlp/__init__.py b/pythainlp/__init__.py index 6c4b4acd1..f7a81d545 100644 --- a/pythainlp/__init__.py +++ b/pythainlp/__init__.py @@ -1,7 +1,7 @@ # SPDX-FileCopyrightText: 2016-2026 PyThaiNLP Project # SPDX-FileType: SOURCE # SPDX-License-Identifier: Apache-2.0 -__version__ = "5.3.1" +__version__ = "5.3.2" thai_consonants: str = ( "กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรลวศษสหฬอฮ" # 44 chars