scylladb / scylladb/python-rs-driver

Handle Python strings that are not valid UTF-8 during serialization

Open
#41 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area/serialization bug
Dominant language
Rust
Stars
6
Forks
7
Avg merge
5d 13h
Merged PRs (30d)
9

Description

Problem

Python strings are Unicode and may contain code points that are not representable as valid UTF-8. When serializing values, we currently attempt to convert Python strings into &str, which is fallible in Rust.

At the moment, this case is effectively ignored and may result in unexpected serialization errors.

Current behavior

Serialization assumes that all Python strings can be safely converted to &str.

Expected behavior

Serialization should explicitly handle Python strings that are not valid UTF-8.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No file or test is named in the issue. Start by locating the serialization path that converts Python strings to Rust string references, then inspect how conversion failures are currently handled. Done means invalid UTF-8 Python strings are handled explicitly without unexpected serialization errors, with coverage for that case.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.