Skip to content

Decode slab statistics responses before parsing on Python 3 - #203

Open
omrzk wants to merge 1 commit into
linsomniac:masterfrom
omrzk:fix/decode-slab-statistics-163
Open

omrzk wants to merge 1 commit into
linsomniac:masterfrom
omrzk:fix/decode-slab-statistics-163

Conversation

@omrzk

@omrzk omrzk commented Nov 5, 2026

Copy link
Copy Markdown

get_slabs() splits the byte strings returned by _Host.readline() using string separators, raising TypeError on Python 3 even for an empty END response. Decode the ASCII response before parsing, matching get_stats() and get_slab_stats().

Fixes #163.

Validation: all 31 tests and 21 doctests pass on Python 3.14 against an isolated memcached 1.6.18 process. The exact regression tests produce three failures on current master. TCP fixtures also verify empty/multiple slab responses, reading the next statistics response on the same connection, EOF, and dead-server behavior. CI's critical Flake8 checks, new-test Flake8, compileall, and wheel/sdist builds pass. Full source/test Flake8 reports the same 24 existing style findings on master and this branch. No existing server or external deployment was used.

This branch has not been deployed

No deployments
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.

python3 - get_slabs throws TypeError

1 participant