Comments (3)
I'm not able to reproduce that when I tweak your example to make it an actual runnable script:
#!/usr/bin/env python
from concurrent.futures import as_completed
from requests_futures.sessions import FuturesSession
futures=[]
session = FuturesSession(max_workers=5)
urls = [f'https://nghttp2.org/httpbin/?i={i}' for i in range(3)]
for url in urls:
future = session.get(url, timeout=60)
future.jobId = 42
futures.append(future)
for future in as_completed(futures, timeout=60):
resp = future.result()
if resp and resp.content:
print(f'resp {resp.request.url}')
del future
session.close()
(env) coho:tmp ross$ python thread.py
resp https://nghttp2.org/httpbin/?i=2
resp https://nghttp2.org/httpbin/?i=0
resp https://nghttp2.org/httpbin/?i=1
(env) coho:tmp ross$ python --version
Python 3.9.5
from requests-futures.
Are you trying to use requests_futures with gevent? When I search for that error message I get a bunch of results for it. They're likely incompatible as they're different ways of going about async.
from requests-futures.
This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 7 days.
from requests-futures.
Related Issues (20)
- No module named 'requests_futures.sessions' HOT 3
- OSError Issues when used within celery task (gevent) HOT 2
- Adding attribute to response via hook (as seen in examples) fails HOT 1
- Possibility to accept old SSL versions? HOT 1
- Problem with data field in header request HOT 1
- Making a future request and letting callback work with result - some are missing HOT 2
- Error When there is a large parallel Requests go. HOT 2
- Provide wheels on PyPI HOT 1
- How do we pass arguments to the hooks? HOT 3
- AttributeError: 'Future' object has no attribute 'status_code' HOT 1
- 1.0.0: missing git tag HOT 5
- Response for batched requests HOT 6
- Add type annotations HOT 4
- Not showing as updated on PyPI HOT 3
- On exception it returns xx (Caused By None), whereas the requests module returns xx (Caused By xx) HOT 4
- The elapsed time hook example does not work HOT 3
- 1.0.0: pytest is failing in two units HOT 6
- Use pytest-httpbin? HOT 8
- Attribute set via response hooks does not work with ProcessPoolExecutor HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from requests-futures.