Comments (2)
Is it necessary to mention every possible best practice a person must follow when writing python in any section of the documentation? I really don't believe we must explain that as people should already be able to understand best practices around managing open files.
What made you assume requests would close the file for you? Why did that seem like a reasonable assumption?
from requests.
When I was reading the documentation, it wasn't clear to me what the library exactly did with the file after passing it. After testing it out, I understood better and felt this might be a question other developers would ask too. I do get that this could make the examples a bit less straightforward, though. Thanks for taking the time to respond to me.
from requests.
Related Issues (20)
- requests library seems to ignore "Transfer-Encoding" header HOT 1
- ValueError: Timeout value connect was <object object at 0x7c6b5e484a80>, but it must be an int, float or None. HOT 1
- Requests v2.32.0 caused the error `Segmentation fault` when including the `cert` parameter HOT 3
- Check for codes HOT 1
- catch FileNotFoundError if there aren't any certificates HOT 2
- requests > 2.31.0 - Unhashable type 'list' for 'cert' parameter HOT 1
- RFC9113 - HTTP/2.0 HOT 1
- Possible .get bug in version 2.32.3 HOT 2
- PDF download is distorted using requests HOT 1
- Frequently hangs or times out when trying to fetch https://openssl.org/source/ HOT 3
- I am having error on requests.post HOT 1
- Error when headers return 'Location' as an app://xxxx although I have set disable redirects HOT 3
- requests library seems to ignore "Transfer-Encoding" header HOT 1
- Request can't get berkshirehathaway letters.html correctly HOT 1
- "Transfer-Encoding" header is ignored HOT 1
- Body with Special Characters Gets Cut HOT 9
- permission denied regression reading extracted certs with multiple users HOT 1
- 一个while True requests运行的爬虫程序,会报错:HTTPSConnectionPool(host='***', port=443): Max retries exceeded with url: /aa (Caused by SSLError(OSError(24, 'Too many open files'))) HOT 1
- Same code works with Python 3.10 but not with 3.11 HOT 2
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.