Giter Club home page Giter Club logo

Comments (9)

tomscytale avatar tomscytale commented on July 28, 2024 1

requests 2.4.2 was only released on 2014-10-05 so I guess it needs to be supported.

requests.post(url, json=data)

is really just a shortcut for

requests.post(url, data=json.dumps(data), headers={"content-type": "text/javascript"))

or something pretty similar.

So to support older versions of requests we could change to that

Alternatively we could go back to using query parameters but just make sure to translate booleans properly. However I think JSON's better.

from python-digitalocean.

koalalorenzo avatar koalalorenzo commented on July 28, 2024 1

Is this a problem related to python-digital ocean dependency? If so, I may need to understand the bug that you are reporting and which version is fixing this... or alternatively, change the code to work properly with the latest version available. Can somebody help me in this process?

from python-digitalocean.

koalalorenzo avatar koalalorenzo commented on July 28, 2024

I am thinking about that, because if we have to support older versions, then we need another solution. What about avoid requests and use another library? What if you install the latest version using pip?

from python-digitalocean.

koalalorenzo avatar koalalorenzo commented on July 28, 2024

@andrewsomething By running the tests with the dockerfile I wrote, it seems working properly on ubuntu 14.04 with both python 2 and python 3... can you check? Probably it is just a question of mocking the requests...

from python-digitalocean.

andrewsomething avatar andrewsomething commented on July 28, 2024

Installing requests with pip will get the latest version, and I can confirm that it allows the tests to pass. I can also confirm the Docker image successfully runs the tests (great idea!).

The problem for me is that I distribute digitalocean-indicator as Debian package. As it's a GUI app, asking end users to use pip isn't great. I guess I can backport requests though...

from python-digitalocean.

koalalorenzo avatar koalalorenzo commented on July 28, 2024

What about a specific environment?

from python-digitalocean.

p00j4 avatar p00j4 commented on July 28, 2024

2.7.6 also it doesn't work, but works on 2.7.11

from python-digitalocean.

koalalorenzo avatar koalalorenzo commented on July 28, 2024

Same problem? Should we update the requirement?

from python-digitalocean.

raghvendra95 avatar raghvendra95 commented on July 28, 2024

working fine with 2.7.6,issue with 2.7.9.

from python-digitalocean.

Related Issues (20)

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.