Shouldn't it raise ReadTimeout instead in models.py:752 ?

https://github.com/requests/requests/blob/e4fc3539b43416f9e9ba6837d73b1b7392d4b242/requests/models.py#L751-L752

Hey @VasiliPupkin256, this is actually intended behavior.

The reason we’re wrapping the `ReadTimeoutError` in a `ConnectionError` is because of namespacing. `ReadTimeoutError` is an exception raised by urllib3 but we want to only emit exceptions owned by Requests. Instead of implementing a mirror of every possible exception inside of Requests, we’ve created some more general exceptions as wrappers. This allows users to catch this `ConnectionError` without importing urllib3, and access the wrapped `ReadTimeoutException` via the `args` attribute if needed.

Requests already have specific ReadTimeout exception
https://github.com/requests/requests/blob/d55de2d391d1350766221ce0aa36e670dc2a0169/requests/exceptions.py#L60-L61
https://github.com/requests/requests/blob/d55de2d391d1350766221ce0aa36e670dc2a0169/requests/adapters.py#L525-L526
Why isn't it used there as well?

@VasiliPupkin256, the line of code you’re referencing was put in place over a year before that exception was created. It’s possible we could consider changing this in 3.0.0 to be more specific, but changing it now would result in an API breakage. If you’d like to propose a PR against the 3.0.0 branch, I’m happy to look it over.

I have no idea what 3.0.0 branch is. I am using it in a code wrapped into `try: except requests.exceptions.Timeout:` When I set stream to False it raise `ReadTimeout(ReadTimeoutError("HTTPSConnectionPool(...` and catches it, but if I set stream to True it raise `ConnectionError(ReadTimeoutError("HTTPSConnectionPool(...`. Isn't it a bug? Ok, mark it as feature request please.

It's not a bug. It is that way because we previously didn't have separate exceptions. We take backwards compatibility and stability seriously so we didn't break every single person's code that was relying on catching a `ConnectionError`. No it's not ideal. Yes we can change it in 3.0. 

The code that is relying on catching a `ConnectionError` while using timeouts is already broken because it can throw `ReadTimeout` from the send request function and this exception wouldn't be caught.

Also it is not true that the time separation between two lines of code was a year. They were committed only one month apart. The line to models.py was added with [this commit](https://github.com/requests/requests/commit/9eab9f7415e718cefc77f4bbe632abf8e089c555) on Jul 25 2014, and ReadTimeout exception was added by [this commit](https://github.com/requests/requests/commit/c2aeaa3959b5754f5b39a45bceff91b196b6c986) on Aug 23 2014.

The backward compatibility is important but this is a bug anyway. Do you have a separate repository for the 3.0 branch where this bug should be reported?

I've found a three years old bug on this issue #2392

@VasiliPupkin256, you’re correct, the git blame view has them listed as 4 years ago and 3 years ago respectively. The reality is still the same though, this has been the API for almost 4 years and it’s how our users expect it to work for now.

The 3.0.0 branch is a branch on this repository. You can find it listed under our branches section in the GitHub UI. As I said, we’re happy to review a PR correcting this. Otherwise, I’ll get it updated this evening.