Giter Site home page Giter Site logo

pystalkd's People

Contributors

brian1125 avatar deepwalker avatar etg-ivan-chernov avatar maxwell-k avatar menezes- avatar rsicart avatar vmarkovtsev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

pystalkd's Issues

Make a peek_bytes

Currently you can work directly with bytes using the functions reserve_bytes and put_bytes. Since the 1.2.0 release the internals have been rewritten making it easy to support a "_bytes" version, so it shouldn't be too complex, just a matter of doing it.

Bug while installing recent release

After you've bumped a new version to a pypi, there is a bug, that i can't install package without globally installed pandoc.

  Using cached pystalkd-1.2.2.zip
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-build-q2wn0a3r/pystalkd/setup.py", line 10, in <module>
        process = subprocess.Popen(['pandoc', '--from=markdown', "--to=rst", "README.md"], stdout=subprocess.PIPE)
      File "/usr/lib/python3.5/subprocess.py", line 950, in __init__
        restore_signals, start_new_session)
      File "/usr/lib/python3.5/subprocess.py", line 1544, in _execute_child
        raise child_exception_type(errno_num, err_msg)
    FileNotFoundError: [Errno 2] No such file or directory: 'pandoc'

Socket error causes ValueError

recv() returns empty byte string when connection is lost (it's by design) and never generates socket.error. As a result, when connection is broken, SocketError.wrap() is not able to catch it and send() method fails with ValueError:

image

See also:
https://docs.python.org/2/howto/sockets.html

When a recv returns 0 bytes, it means the other side has closed (or is in the process of closing) the connection. You will not receive any more data on this connection. Ever. You may be able to send data successfully; I’ll talk more about this later.

How do I know if connection is lost?

lets say I made connection like:
c = Connection("localhost", 11300)
if after that I kill beanstalkd
and try for example:
c.stats()
my script halts forever.

Use of timedelta is incorrect

Passing a timedelta now only works when the timedelta is constructed using seconds. You're using the .seconds of a timedelta but that's only the "seconds" component of it. For example:

>>> d = timedelta(days=1)
>>> d.seconds
0

You should convert the timedelta to seconds using total_seconds():

>>> d.total_seconds()
86400.0

You may need to convert this to an integer to use it. Using this method means your project will require Python 2.7+ as that's when total_seconds() was introduced.

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.