Skip to content

Conversation

@zhixiangxue
Copy link

🔧 Changes

This PR addresses breaking changes and deprecations from upstream dependencies:

1. Chonkie API Update (v1.4.0)

2. Qdrant Client API Update (v1.16.0)

3. Python Datetime Deprecation

  • Issue: datetime.utcnow() deprecated in Python 3.12+
  • Change: Replace with datetime.now(timezone.utc)
  • File: src/memos/mem_os/core.py

4. Dependency Version Updates

  • chonkie: >=1.0.7>=1.4.0
  • qdrant-client: >=1.14.2>=1.16.0

✅ Testing

  • Tested with chonkie v1.4.0
  • Tested with qdrant-client v1.16.0
  • All affected components working as expected

📚 References

Copy link
Collaborator

@fridayL fridayL left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

need add some version compatibility code
and I will merge this pr

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think can not make direct changes package version , because our production environment uses chonkie >=1.0.7 and chonkie <1.4.0 versions. Changing the code and version requirements means the old environment will break , causing production system errors.
My suggestion is to add some version compatibility , check the chonkie version first and then add appropriate parameters.
Although this makes the code redundant, the system needs a transitional version.

我觉得这里不可以直接进行更改,因为我们内部的线上环境是使用的chonkie >=1.0.7 and chonkie <1.4.0版本,代码以及版本更改意味着老的环境会立即失效导致线上系统报错
我的建议是做一些版本兼容,或者判断一下版本然后传参数,虽然这样代码很冗余,但系统需要有个过渡版本

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Modified as suggested with try-except for version compatibility:
Try new API (v1.4.0+) first, fallback to legacy API on failure
Reverted pyproject.toml chonkie version to >=1.0.7,<2.0.0 for production compatibility
Code pushed, please review 🙏

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice
but code check error
image
just Run poetry lock to fix the lock file before commit code

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done~

@zhixiangxue zhixiangxue force-pushed the fix/update-deprecated-apis branch from 2b2cb30 to b5411af Compare December 25, 2025 13:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants