Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugs in Client constructor when the servers parameter is a string, and the set_servers docstring is wrong #180

Open
xtaje opened this issue Dec 5, 2020 · 0 comments

Comments

@xtaje
Copy link

xtaje commented Dec 5, 2020

See here https://github.com/linsomniac/python-memcached/blob/master/memcache.py#L280. The docstring indicates that when a string is passed in for the servers parameter, the client will treat it as a single host.

Instead what actually happens, is that it will iterate over the string and attempt to create a host for every letter in the string. Then one of two things is possible:

  • If the host name contains a port, the constructor will fail on trying to parse the ':' separator.
  • If the host name does not contain a port, the constructor will succeed, but set and get calls will run.
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

No branches or pull requests

1 participant