ehmatthes / django-simple-deploy

A reusable Django app that configures your project for deployment
BSD 3-Clause "New" or "Revised" License
304 stars 26 forks source link

Replace requests with httpx? #294

Open ehmatthes opened 3 months ago

ehmatthes commented 3 months ago

I believe httpx is more actively maintained than requests. If it's a drop-in replacement, make that change now.

Mansur908 commented 3 months ago

Hi! Could I work on this?

ehmatthes commented 3 months ago

Hi @Mansur908! I will be happy to leave this for you, but I need to merge the changes in #285 before you make your changes. I don't need to finish every open task in that issue, but it's a big enough branch already that it should get merged before other changes are started. It's about tests, but I've done some significant refactoring as well.

I'm happy to ping you when I merge those changes, which I can hopefully do at the end of this week or next week.

Have you tried deploying a project with simple_deploy yet? Have you seen the Documenting a Test Run requested contribution, and issue template?

ehmatthes commented 3 months ago

Hi again @Mansur908. I merged that branch, so you are free to make this change any time you want.

If you have trouble running the tests, please let me know. Make sure you see the latest docs, not the stable docs. You should run all the unit and integration tests. I'll run the relevant e2e tests if you want.

Mansur908 commented 2 months ago

Hi. Sorry that I did not reply for a while. I'm having trouble rewriting requests to httpx. Can you please check Pull request

306

ehmatthes commented 2 months ago

Hi. Thank you for giving it a try. I can clarify that the goal is simply to replace the current usage of requests with httpx. If I understood your code correctly, it looks like you're making a single test function and then running it through async. That adds async overhead with no benefit. I don't have any plans to make that file async, as the tests there need to be run in that specific order.

The first change that needs to be made is to change the use of requests in the fly deploy script to httpx, and then make sure all tests, including e2e tests for fly, pass. Then we can look at modifying the tests to use httpx.

But again, if this shouldn't be much more than a drop-in replacement for requests as it's currently used in this project.

Does that help?

Mansur908 commented 1 month ago

Pull request #331

ehmatthes commented 1 month ago

The first change that needs to be made is to change the use of requests in the fly deploy script to httpx, and then make sure all tests, including e2e tests for fly, pass.

Have you run any of the tests for this project yet? What results do you get when you run the tests?

Mansur908 commented 1 month ago

Yes, I did the test. I got the result: --- All tested functionality works. --- image