redc 0.1.7__tar.gz → 0.1.8__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {redc-0.1.7 → redc-0.1.8}/PKG-INFO +1 -1
- {redc-0.1.7 → redc-0.1.8}/pyproject.toml +1 -1
- {redc-0.1.7 → redc-0.1.8}/redc/__init__.py +1 -1
- {redc-0.1.7 → redc-0.1.8}/redc/ext/redc.cpp +13 -13
- {redc-0.1.7 → redc-0.1.8}/redc/ext/redc.h +2 -2
- {redc-0.1.7 → redc-0.1.8}/.clang-format +0 -0
- {redc-0.1.7 → redc-0.1.8}/.github/workflows/before-all.sh +0 -0
- {redc-0.1.7 → redc-0.1.8}/.github/workflows/build_wheels.yml +0 -0
- {redc-0.1.7 → redc-0.1.8}/.gitignore +0 -0
- {redc-0.1.7 → redc-0.1.8}/CMake/PreventInSourceBuild.cmake +0 -0
- {redc-0.1.7 → redc-0.1.8}/CMakeLists.txt +0 -0
- {redc-0.1.7 → redc-0.1.8}/LICENSE +0 -0
- {redc-0.1.7 → redc-0.1.8}/README.md +0 -0
- {redc-0.1.7 → redc-0.1.8}/assets/images/redc-logo.png +0 -0
- {redc-0.1.7 → redc-0.1.8}/redc/callback.py +0 -0
- {redc-0.1.7 → redc-0.1.8}/redc/callbacks.py +0 -0
- {redc-0.1.7 → redc-0.1.8}/redc/client.py +0 -0
- {redc-0.1.7 → redc-0.1.8}/redc/codes.py +0 -0
- {redc-0.1.7 → redc-0.1.8}/redc/exceptions/__init__.py +0 -0
- {redc-0.1.7 → redc-0.1.8}/redc/ext/utils/concurrentqueue.h +0 -0
- {redc-0.1.7 → redc-0.1.8}/redc/ext/utils/curl_utils.h +0 -0
- {redc-0.1.7 → redc-0.1.8}/redc/ext/utils/memoryview.h +0 -0
- {redc-0.1.7 → redc-0.1.8}/redc/response.py +0 -0
- {redc-0.1.7 → redc-0.1.8}/redc/utils/__init__.py +0 -0
- {redc-0.1.7 → redc-0.1.8}/redc/utils/_io_utils.py +0 -0
- {redc-0.1.7 → redc-0.1.8}/redc/utils/headers.py +0 -0
- {redc-0.1.7 → redc-0.1.8}/redc/utils/http.py +0 -0
- {redc-0.1.7 → redc-0.1.8}/redc/utils/json_encoder.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.2
|
2
2
|
Name: redc
|
3
|
-
Version: 0.1.
|
3
|
+
Version: 0.1.8
|
4
4
|
Summary: RedC is a high-performance, asynchronous HTTP client library for Python, built on top of the powerful curl library
|
5
5
|
Keywords: asyncio,http,client,http-client,curl,libcurl
|
6
6
|
Author-Email: AYMEN Mohammed <let.me.code.safe@gmail.com>
|
@@ -4,7 +4,7 @@ build-backend = "scikit_build_core.build"
|
|
4
4
|
|
5
5
|
[project]
|
6
6
|
name = "redc"
|
7
|
-
version = "0.1.
|
7
|
+
version = "0.1.8"
|
8
8
|
description = "RedC is a high-performance, asynchronous HTTP client library for Python, built on top of the powerful curl library"
|
9
9
|
readme = "README.md"
|
10
10
|
authors = [{ name = "AYMEN Mohammed", email = "let.me.code.safe@gmail.com" }]
|
@@ -163,19 +163,19 @@ py_object RedC::request(const char *method, const char *url, const char *raw_dat
|
|
163
163
|
{
|
164
164
|
std::unique_lock<std::mutex> lock(mutex_);
|
165
165
|
auto [it, inserted] =
|
166
|
-
transfers_.
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
166
|
+
transfers_.emplace(easy, Data{
|
167
|
+
future,
|
168
|
+
loop_,
|
169
|
+
stream_callback,
|
170
|
+
progress_callback,
|
171
|
+
file_stream,
|
172
|
+
!stream_callback.is_none() && !is_nobody, // has_stream_callback
|
173
|
+
!progress_callback.is_none() && !is_nobody, // has_progress_callback
|
174
|
+
{}, // response headers
|
175
|
+
std::move(slist_headers),
|
176
|
+
std::move(curl_mime_),
|
177
|
+
{} // response
|
178
|
+
});
|
179
179
|
auto &d = it->second;
|
180
180
|
lock.unlock();
|
181
181
|
|
@@ -3,9 +3,9 @@
|
|
3
3
|
|
4
4
|
#include <atomic>
|
5
5
|
#include <cstring>
|
6
|
-
#include <map>
|
7
6
|
#include <mutex>
|
8
7
|
#include <thread>
|
8
|
+
#include <unordered_map>
|
9
9
|
#include <vector>
|
10
10
|
|
11
11
|
#include <curl/curl.h>
|
@@ -82,7 +82,7 @@ class RedC {
|
|
82
82
|
|
83
83
|
CURLM *multi_handle_;
|
84
84
|
|
85
|
-
std::
|
85
|
+
std::unordered_map<CURL *, Data> transfers_;
|
86
86
|
std::mutex mutex_;
|
87
87
|
std::thread worker_thread_;
|
88
88
|
std::atomic<bool> running_{false};
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|