Skip to content

[Bug]: Python 3.14 emits SyntaxWarning from pinned jieba dependency #304

Description

@Yangtze-Seventh

Area

src/everos

What happened?

When running EverOS in a Python 3.14 virtual environment, importing the default jieba-backed tokenizer emits SyntaxWarning messages from the pinned jieba==0.42.1 dependency.

EverOS declares requires-python = ">=3.12", so Python 3.14 currently appears to be accepted by the package metadata, but this dependency is not warning-clean under that runtime.

Expected behavior: running/importing EverOS should not emit dependency warnings on supported Python versions, or the supported Python range should exclude versions where the pinned dependency is not compatible yet.

Steps to reproduce

  1. Create/use a Python 3.14 virtual environment.
  2. Install EverOS dependencies from the current project configuration.
  3. Run code that imports the jieba-backed tokenizer, for example anything that imports everos.component.tokenizer.jieba_provider or initializes the default tokenizer.
  4. Observe the SyntaxWarning output from jieba.

Environment

OS: macOS
Python: 3.14
EverOS dependency: jieba==0.42.1 from pyproject.toml / uv.lock
Commit: not captured

Logs or screenshots

.venv/lib/python3.14/site-packages/jieba/__init__.py:44: SyntaxWarning: "\." is an invalid escape sequence. Such sequences will not work in the future. Did you mean "\\."? A raw string is also an option.
  re_han_default = re.compile("([\u4E00-\u9FD5a-zA-Z0-9+#&\._%\-]+)", re.U)
.venv/lib/python3.14/site-packages/jieba/__init__.py:46: SyntaxWarning: "\s" is an invalid escape sequence. Such sequences will not work in the future. Did you mean "\\s"? A raw string is also an option.
  re_skip_default = re.compile("(\r\n|\s)", re.U)
.venv/lib/python3.14/site-packages/jieba/finalseg/__init__.py:78: SyntaxWarning: "\." is an invalid escape sequence. Such sequences will not work in the future. Did you mean "\\."? A raw string is also an option.
  re_skip = re.compile("([a-zA-Z0-9]+(?:\.\d+)?%?)")

Possible fix

Consider one of the following:

  • update or replace the pinned jieba dependency with a version that is warning-clean on Python 3.14;
  • patch the relevant regex literals upstream / via a compatibility shim;
  • narrow the declared Python support range until Python 3.14 is supported without dependency warnings.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions