Coder Social home page Coder Social logo

pyetcd's People

Contributors

akuzminsky avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

pyetcd's Issues

pyetcd.EtcdException: the JSON object must be str, not 'bytes'

Traceback (most recent call last):
  File "service.py", line 107, in <module>
    iface = Interface()
  File "service.py", line 16, in __init__
    amqp_url = etc.read("/services/amqp-url").node["value"]
  File "C:\Program Files\Python35\lib\site-packages\pyetcd\client.py", line 102, in read
    return self._request_key(key, params=kwargs)
  File "C:\Program Files\Python35\lib\site-packages\pyetcd\client.py", line 290, in _request_key
    return self._request_call(uri, method=method, **kwargs)
  File "C:\Program Files\Python35\lib\site-packages\pyetcd\client.py", line 302, in _request_call
    return EtcdResult(getattr(requests, method)(url, **kwargs))
  File "C:\Program Files\Python35\lib\site-packages\pyetcd\__init__.py", line 267, in __init__
    raise EtcdException(err)
pyetcd.EtcdException: the JSON object must be str, not 'bytes'

Came across this issue on Python 3, the response content is encoded as 'bytes' in version 3 and needs to be decoded to str.

module installation requires mock

  • pyetcd version: 1.0.1
  • Python version: 2.7.5
  • Operating System: CentOS 7.1.1503

Description

Installing the module requires unnecessary mock

What I Did

==> node: Notice: /Stage[main]/Profile::Base/Exec[setup]/returns: Searching for pyetcd
==> node: Notice: /Stage[main]/Profile::Base/Exec[setup]/returns: Reading https://pypi.python.org/simple/pyetcd/
==> node: Notice: /Stage[main]/Profile::Base/Exec[setup]/returns: Best match: pyetcd 1.0.1
==> node: Notice: /Stage[main]/Profile::Base/Exec[setup]/returns: Downloading https://pypi.python.org/packages/8f/47/49ff263349a0a0b6f38d778f2825e8b73fad919734c555989a0af2ec6671/pyetcd-1.0.1.tar.gz#md5=a7cd46602035c7bf102f6d86fd425685
==> node: Notice: /Stage[main]/Profile::Base/Exec[setup]/returns: Processing pyetcd-1.0.1.tar.gz
==> node: Notice: /Stage[main]/Profile::Base/Exec[setup]/returns: Writing /tmp/easy_install-o0BpBp/pyetcd-1.0.1/setup.cfg
==> node: Notice: /Stage[main]/Profile::Base/Exec[setup]/returns: Running pyetcd-1.0.1/setup.py -q bdist_egg --dist-dir /tmp/easy_install-o0BpBp/pyetcd-1.0.1/egg-dist-tmp-p1SUwR
==> node: Notice: /Stage[main]/Profile::Base/Exec[setup]/returns: warning: no previously-included files matching '__pycache__' found under directory '*'
==> node: Notice: /Stage[main]/Profile::Base/Exec[setup]/returns: warning: no previously-included files matching '*.py[co]' found under directory '*'
==> node: Notice: /Stage[main]/Profile::Base/Exec[setup]/returns: warning: no files found matching '*.jpg' under directory 'docs'
==> node: Notice: /Stage[main]/Profile::Base/Exec[setup]/returns: warning: no files found matching '*.png' under directory 'docs'
==> node: Notice: /Stage[main]/Profile::Base/Exec[setup]/returns: warning: no files found matching '*.gif' under directory 'docs'
==> node: Notice: /Stage[main]/Profile::Base/Exec[setup]/returns: Adding pyetcd 1.0.1 to easy-install.pth file
==> node: Notice: /Stage[main]/Profile::Base/Exec[setup]/returns:
==> node: Notice: /Stage[main]/Profile::Base/Exec[setup]/returns: Installed /usr/lib/python2.7/site-packages/pyetcd-1.0.1-py2.7.egg
==> node: Notice: /Stage[main]/Profile::Base/Exec[setup]/returns: Searching for mock
==> node: Notice: /Stage[main]/Profile::Base/Exec[setup]/returns: Reading https://pypi.python.org/simple/mock/
==> node: Notice: /Stage[main]/Profile::Base/Exec[setup]/returns: Best match: mock 2.0.0
==> node: Notice: /Stage[main]/Profile::Base/Exec[setup]/returns: Downloading https://pypi.python.org/packages/0c/53/014354fc93c591ccc4abff12c473ad565a2eb24dcd82490fae33dbf2539f/mock-2.0.0.tar.gz#md5=0febfafd14330c9dcaa40de2d82d40ad
==> node: Notice: /Stage[main]/Profile::Base/Exec[setup]/returns: Processing mock-2.0.0.tar.gz
==> node: Notice: /Stage[main]/Profile::Base/Exec[setup]/returns: Writing /tmp/easy_install-fpNc4_/mock-2.0.0/setup.cfg
==> node: Notice: /Stage[main]/Profile::Base/Exec[setup]/returns: Running mock-2.0.0/setup.py -q bdist_egg --dist-dir /tmp/easy_install-fpNc4_/mock-2.0.0/egg-dist-tmp-myRGr_
==> node: Notice: /Stage[main]/Profile::Base/Exec[setup]/returns: error: Installed distribution setuptools 0.9.8 conflicts with requirement setuptools>=17.1```

Client should accept params

  • pyetcd version: 1.6.0
  • Python version: all supported
  • Operating System: na

Description

read(), write() and other Client()'s methods should accept optional parameters.
for example,

c.read('/foo/bar', params={
    'waitIndex': 7    
}, wait=True)

subbort auth?

etcd version: 1.7.1
python version: 2.7.10
os version: ubuntu 16.04

Does pyetcd support auth? How to use?

Initial Update

Hi ๐Ÿ‘Š

This is my first visit to this fine repo, but it seems you have been working hard to keep all dependencies updated so far.

Once you have closed this issue, I'll create seperate pull requests for every update as soon as I find one.

That's it for now!

Happy merging! ๐Ÿค–

Client.version()

Implement version() method in Client. It should return version of etcd server

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.