mozilla-services / syncstorage-rs

Sync Storage server in Rust
Mozilla Public License 2.0
894 stars 49 forks source link

Compilation issues with version of PyO3 #1502

Closed mreid-tt closed 1 month ago

mreid-tt commented 9 months ago

We have been updating the packaging of your Mozilla Sync Storage Rust application to support Synology devices. During testing, we found we needed to apply a patch to upgrade PyO3 to version 0.17.*

The issue stems from the currently locked PyO3 version 0.14.2 in Cargo.lock, which does not support Python 3.10 or 3.11. We encountered the following error indicating our configured Python interpreter version was too low for PyO3's minimum supported version:

error: the configured Python interpreter version (3.1) is lower than PyO3's minimum supported version (3.6)

This appears to occur because older PyO3 versions, like 0.14.5 which predates Python 3.10, truncate the minor version's second digit (so 3.11 becomes 3.1). Upgrading to PyO3 0.17.* resolved the issue for Python > 3.9 due to this version parsing issue. This in turn enabled the Rust application to be successfully packaged for Synology with modern Python interpreters.

We would like to propose that the team considers incrementing the PyO3 version to 0.17.* in Cargo.lock to maintain compatibility with the latest Python releases. This will ensure continued support for packaging the application for Synology platforms.

┆Issue is synchronized with this Jira Task