url stringlengths 50 53 | repository_url stringclasses 1 value | labels_url stringlengths 64 67 | comments_url stringlengths 59 62 | events_url stringlengths 57 60 | html_url stringlengths 38 43 | id int64 597k 2.65B | node_id stringlengths 18 32 | number int64 1 6.83k | title stringlengths 1 296 | user dict | labels listlengths 0 5 | state stringclasses 2 values | locked bool 2 classes | assignee dict | assignees listlengths 0 4 | milestone dict | comments int64 0 211 | created_at stringlengths 20 20 | updated_at stringlengths 20 20 | closed_at stringlengths 20 20 ⌀ | author_association stringclasses 3 values | active_lock_reason stringclasses 4 values | body stringlengths 0 65.6k ⌀ | closed_by dict | reactions dict | timeline_url stringlengths 59 62 | performed_via_github_app null | state_reason stringclasses 3 values | draft bool 2 classes | pull_request dict | is_pull_request bool 2 classes | issue_comments listlengths 0 30 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
https://api.github.com/repos/psf/requests/issues/4561 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4561/labels{/name} | https://api.github.com/repos/psf/requests/issues/4561/comments | https://api.github.com/repos/psf/requests/issues/4561/events | https://github.com/psf/requests/issues/4561 | 309,093,204 | MDU6SXNzdWUzMDkwOTMyMDQ= | 4,561 | Incompatibility with CX-Freeze and PyInstaller | {
"avatar_url": "https://avatars.githubusercontent.com/u/7429579?v=4",
"events_url": "https://api.github.com/users/dcsoft4/events{/privacy}",
"followers_url": "https://api.github.com/users/dcsoft4/followers",
"following_url": "https://api.github.com/users/dcsoft4/following{/other_user}",
"gists_url": "https://api.github.com/users/dcsoft4/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/dcsoft4",
"id": 7429579,
"login": "dcsoft4",
"node_id": "MDQ6VXNlcjc0Mjk1Nzk=",
"organizations_url": "https://api.github.com/users/dcsoft4/orgs",
"received_events_url": "https://api.github.com/users/dcsoft4/received_events",
"repos_url": "https://api.github.com/users/dcsoft4/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/dcsoft4/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/dcsoft4/subscriptions",
"type": "User",
"url": "https://api.github.com/users/dcsoft4",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 2 | 2018-03-27T18:59:36Z | 2021-09-08T03:00:28Z | 2018-03-27T19:06:22Z | NONE | resolved | As reported on [StackOverflow](https://stackoverflow.com/a/41718977/2073217), the latest Requests version dies on initialization in an app frozen app by CX-Freeze / PyInstaller. But Requests version 2.11.1 works OK.
## Expected Result
The current versions of Requests run without exception, like version 2.11.1 does.
## Actual Result
This exception occurred:
Traceback (most recent call last):
File "C:\PythonEnvs\CL\Client32\lib\site-packages\cx_Freeze\initscripts\__startup__.py", line 14, in run
module.run()
File "C:\PythonEnvs\CL\Client32\lib\site-packages\cx_Freeze\initscripts\Console.py", line 26, in run
exec(code, m.__dict__)
File "PythonSocketIoClient.py", line 5, in <module>
File "C:\PythonEnvs\CL\Client32\lib\site-packages\socketIO_client\__init__.py", line 14, in <module>
from .transports import (
File "C:\PythonEnvs\CL\Client32\lib\site-packages\socketIO_client\transports.py", line 1, in <module>
import requests
**File "C:\PythonEnvs\CL\Client32\lib\site-packages\requests\__init__.py", line 98, in <module>**
from . import packages
File "C:\PythonEnvs\CL\Client32\lib\site-packages\requests\packages.py", line 7, in <module>
locals()[package] = __import__(package)
File "C:\PythonEnvs\CL\Client32\lib\site-packages\idna\__init__.py", line 2, in <module>
from .core import *
File "C:\PythonEnvs\CL\Client32\lib\site-packages\idna\core.py", line 1, in <module>
from . import idnadata
**ImportError: cannot import name 'idnadata'**
## Reproduction Steps
Run CX-Freeze (or PyInstaller) with the appropriate Requests version installed, to compare the results.
## System Information
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "2.6"
},
"implementation": {
"name": "CPython",
"version": "3.6.4"
},
"platform": {
"release": "10",
"system": "Windows"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.18.4"
},
"system_ssl": {
"version": "100020bf"
},
"urllib3": {
"version": "1.22"
},
"using_pyopenssl": false
} | {
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4561/reactions"
} | https://api.github.com/repos/psf/requests/issues/4561/timeline | null | completed | null | null | false | [
"Hi @dcsoft4, this is either an issue with your local installation or PyInstaller. It can’t find resources for idna which are a requirement for modern versions of Requests. Ensure you have idna installed properly and see if that fixes the issue.\r\n\r\nIn the future, please route questions for assistance to [StackO... |
https://api.github.com/repos/psf/requests/issues/4560 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4560/labels{/name} | https://api.github.com/repos/psf/requests/issues/4560/comments | https://api.github.com/repos/psf/requests/issues/4560/events | https://github.com/psf/requests/pull/4560 | 309,049,166 | MDExOlB1bGxSZXF1ZXN0MTc3ODAxMTIw | 4,560 | Session timeout / Added the ability to set a default session timeout | {
"avatar_url": "https://avatars.githubusercontent.com/u/7135887?v=4",
"events_url": "https://api.github.com/users/yuvalbar/events{/privacy}",
"followers_url": "https://api.github.com/users/yuvalbar/followers",
"following_url": "https://api.github.com/users/yuvalbar/following{/other_user}",
"gists_url": "https://api.github.com/users/yuvalbar/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/yuvalbar",
"id": 7135887,
"login": "yuvalbar",
"node_id": "MDQ6VXNlcjcxMzU4ODc=",
"organizations_url": "https://api.github.com/users/yuvalbar/orgs",
"received_events_url": "https://api.github.com/users/yuvalbar/received_events",
"repos_url": "https://api.github.com/users/yuvalbar/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/yuvalbar/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/yuvalbar/subscriptions",
"type": "User",
"url": "https://api.github.com/users/yuvalbar",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 2 | 2018-03-27T16:47:16Z | 2021-09-03T00:11:06Z | 2018-03-27T17:48:16Z | NONE | resolved | This is a very minimal PR that aims to allow developers to assign a default timeout to requests made using `Requests`, while not breaking any existing usage of the library. I open it following bumping into the problem of a request hanging indefinitely several times and reading through the open issues - specifically @kennethreitz 's comment here regarding assigning a default timeout to the lib: https://github.com/requests/requests/issues/3070#issuecomment-318926146
In essence, it allows a user to set a default timeout for a `Session` object so that any request made using that session will default to the session timeout unless specifically assigned a timeout of its own. I attempted to circumvent the entire issue of breaking existing code or deciding on the right default timeout for the library itself, instead just giving the user a tool to set it per session where necessary, instead of once per request.
The only open issue I am aware of is that if a request is specifically assigned to never timeout (`timeout=None`) and the session it is sent from has a default timeout set, then the session timeout will take. However, I believe that in such a case it makes sense to send the request from a new session.
Happy to receive any feedback. Thanks in advance! | {
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 1,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 1,
"url": "https://api.github.com/repos/psf/requests/issues/4560/reactions"
} | https://api.github.com/repos/psf/requests/issues/4560/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/4560.diff",
"html_url": "https://github.com/psf/requests/pull/4560",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/4560.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/4560"
} | true | [
"Thanks for putting this together. I don’t think it will be accepted. In the past this library supported session-level timeouts but this proved to be unintuitive to most users as they expected various different things. We intentionally removed the feature, with prejudice. Adding it back at this time is unlikely.",
... |
https://api.github.com/repos/psf/requests/issues/4559 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4559/labels{/name} | https://api.github.com/repos/psf/requests/issues/4559/comments | https://api.github.com/repos/psf/requests/issues/4559/events | https://github.com/psf/requests/issues/4559 | 308,962,001 | MDU6SXNzdWUzMDg5NjIwMDE= | 4,559 | requests.exceptions.ConnectionError | {
"avatar_url": "https://avatars.githubusercontent.com/u/711060?v=4",
"events_url": "https://api.github.com/users/Everfighting/events{/privacy}",
"followers_url": "https://api.github.com/users/Everfighting/followers",
"following_url": "https://api.github.com/users/Everfighting/following{/other_user}",
"gists_url": "https://api.github.com/users/Everfighting/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Everfighting",
"id": 711060,
"login": "Everfighting",
"node_id": "MDQ6VXNlcjcxMTA2MA==",
"organizations_url": "https://api.github.com/users/Everfighting/orgs",
"received_events_url": "https://api.github.com/users/Everfighting/received_events",
"repos_url": "https://api.github.com/users/Everfighting/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Everfighting/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Everfighting/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Everfighting",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 2 | 2018-03-27T13:10:00Z | 2021-09-01T00:11:36Z | 2018-03-28T12:18:13Z | NONE | resolved | How can I deal with this error?
requests.exceptions.ConnectionError: HTTPConnectionPool(host='cloud.ocrsdk.com', port=80): Max retries exceeded with url getTaskStatus?taskId=5d9d39a9-4cd2-4528-aeeb-a1d84cc342c7 (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7fdc0f230320>: Failed to establish a new connection: [Errno 110] Connection timed out',))
| {
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4559/reactions"
} | https://api.github.com/repos/psf/requests/issues/4559/timeline | null | completed | null | null | false | [
"Hi there! Thanks for opening this issue. Unfortunately, it seems this is a request for help instead of a report of a defect in the project. Please use [StackOverflow](https://stackoverflow.com) for general usage questions instead and only report defects here.",
"@Everfighting I encountered the same problem, how... |
https://api.github.com/repos/psf/requests/issues/4558 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4558/labels{/name} | https://api.github.com/repos/psf/requests/issues/4558/comments | https://api.github.com/repos/psf/requests/issues/4558/events | https://github.com/psf/requests/issues/4558 | 308,831,713 | MDU6SXNzdWUzMDg4MzE3MTM= | 4,558 | urllib3 throws lots of warnings caused by SSLErrors using requests | {
"avatar_url": "https://avatars.githubusercontent.com/u/13929583?v=4",
"events_url": "https://api.github.com/users/vandernath/events{/privacy}",
"followers_url": "https://api.github.com/users/vandernath/followers",
"following_url": "https://api.github.com/users/vandernath/following{/other_user}",
"gists_url": "https://api.github.com/users/vandernath/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/vandernath",
"id": 13929583,
"login": "vandernath",
"node_id": "MDQ6VXNlcjEzOTI5NTgz",
"organizations_url": "https://api.github.com/users/vandernath/orgs",
"received_events_url": "https://api.github.com/users/vandernath/received_events",
"repos_url": "https://api.github.com/users/vandernath/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/vandernath/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/vandernath/subscriptions",
"type": "User",
"url": "https://api.github.com/users/vandernath",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2018-03-27T05:56:35Z | 2021-09-08T03:00:28Z | 2018-03-28T12:19:44Z | NONE | resolved | I have started using the logging library to catch potential performance issues, and my logs are flooded with urlllib3 warnings using requests, like those:
WARNING:urllib3.connectionpool:Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError("bad handsha
ke: SysCallError(-1, 'Unexpected EOF')",),)': /store/search?q=in+one+editor&c=apps&hl=en
This doesn't break the code or exit the program, but floods my logs with warnings and potentially affects performance. The warning appears when sending requests to https:/.play.google.com/store/search?q=query&c=apps&hl=en. I'm not too good with SSL and the like, so I'm unsure of what's happening.
After reading about similar issues on this git, I have tried using the adapter below, which uses extra ciphers:
## Reproduction Steps
```# -*- coding: utf-8 -*-
"""
requests_toolbelt.source_adapter
================================
This file contains an implementation of the SourceAddressAdapter originally
demonstrated on the Requests GitHub page.
"""
from requests.adapters import HTTPAdapter
from .._compat import poolmanager, basestring
import ssl
from requests.packages.urllib3.util.ssl_ import create_urllib3_context
# This is the 2.11 Requests cipher string, containing 3DES.
CIPHERS = (
'ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:ECDH+HIGH:'
'DH+HIGH:ECDH+3DES:DH+3DES:RSA+AESGCM:RSA+AES:RSA+HIGH:RSA+3DES:!aNULL:'
'!eNULL:!MD5'
)
class SourceAddressAdapter(HTTPAdapter):
"""
A Source Address Adapter for Python Requests that enables you to choose the
local address to bind to. This allows you to send your HTTP requests from a
specific interface and IP address.
Two address formats are accepted. The first is a string: this will set the
local IP address to the address given in the string, and will also choose a
semi-random high port for the local port number.
The second is a two-tuple of the form (ip address, port): for example,
``('10.10.10.10', 8999)``. This will set the local IP address to the first
element, and the local port to the second element. If ``0`` is used as the
port number, a semi-random high port will be selected.
.. warning:: Setting an explicit local port can have negative interactions
with connection-pooling in Requests: in particular, it risks
the possibility of getting "Address in use" errors. The
string-only argument is generally preferred to the tuple-form.
Example usage:
.. code-block:: python
import requests
from requests_toolbelt.adapters.source import SourceAddressAdapter
s = requests.Session()
s.mount('http://', SourceAddressAdapter('10.10.10.10'))
s.mount('https://', SourceAddressAdapter(('10.10.10.10', 8999))
"""
def __init__(self, source_address, **kwargs):
if isinstance(source_address, basestring):
self.source_address = (source_address, 0)
elif isinstance(source_address, tuple):
self.source_address = source_address
else:
raise TypeError(
"source_address must be IP address string or (ip, port) tuple"
)
super(SourceAddressAdapter, self).__init__(**kwargs)
def init_poolmanager(self, connections, maxsize, block=False, **kwargs):
context = create_urllib3_context(ciphers=CIPHERS)
kwargs['ssl_context'] = context
self.poolmanager = poolmanager.PoolManager(
num_pools=connections,
maxsize=maxsize,
block=block,
source_address=self.source_address,
**kwargs)
def proxy_manager_for(self, *args, **kwargs):
context = create_urllib3_context(ciphers=CIPHERS)
kwargs['ssl_context'] = context
kwargs['source_address'] = self.source_address
return super(SourceAddressAdapter, self).proxy_manager_for(
*args, **kwargs)
```
## System Information
$ python -m requests.help
```
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": "2.2.1"
},
"idna": {
"version": "2.6"
},
"implementation": {
"name": "CPython",
"version": "3.5.2"
},
"platform": {
"release": "4.4.0-112-generic",
"system": "Linux"
},
"pyOpenSSL": {
"openssl_version": "1010007f",
"version": "17.5.0"
},
"requests": {
"version": "2.18.4"
},
"system_ssl": {
"version": "1000207f"
},
"urllib3": {
"version": "1.22"
},
"using_pyopenssl": true
}
```
This command is only available on Requests v2.16.4 and greater. Otherwise,
please provide some basic information about your system (Python version,
operating system, &c). | {
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4558/reactions"
} | https://api.github.com/repos/psf/requests/issues/4558/timeline | null | completed | null | null | false | [
"Hi there! Thanks for opening this issue. Unfortunately, it seems this is a request for help instead of a report of a defect in the project. Please use [StackOverflow](https://stackoverflow.com) for general usage questions instead and only report defects here."
] |
https://api.github.com/repos/psf/requests/issues/4557 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4557/labels{/name} | https://api.github.com/repos/psf/requests/issues/4557/comments | https://api.github.com/repos/psf/requests/issues/4557/events | https://github.com/psf/requests/issues/4557 | 308,773,752 | MDU6SXNzdWUzMDg3NzM3NTI= | 4,557 | wrong condition returning true only if there's the same domain repeated | {
"avatar_url": "https://avatars.githubusercontent.com/u/10619637?v=4",
"events_url": "https://api.github.com/users/e-humbert/events{/privacy}",
"followers_url": "https://api.github.com/users/e-humbert/followers",
"following_url": "https://api.github.com/users/e-humbert/following{/other_user}",
"gists_url": "https://api.github.com/users/e-humbert/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/e-humbert",
"id": 10619637,
"login": "e-humbert",
"node_id": "MDQ6VXNlcjEwNjE5NjM3",
"organizations_url": "https://api.github.com/users/e-humbert/orgs",
"received_events_url": "https://api.github.com/users/e-humbert/received_events",
"repos_url": "https://api.github.com/users/e-humbert/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/e-humbert/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/e-humbert/subscriptions",
"type": "User",
"url": "https://api.github.com/users/e-humbert",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 2 | 2018-03-26T23:49:56Z | 2021-09-05T00:07:01Z | 2019-02-14T14:22:51Z | NONE | resolved | https://github.com/requests/requests/blob/b66908e7b647689793e299edc111bf9910e93ad3/requests/cookies.py#L295 | {
"avatar_url": "https://avatars.githubusercontent.com/u/20226361?v=4",
"events_url": "https://api.github.com/users/inishchith/events{/privacy}",
"followers_url": "https://api.github.com/users/inishchith/followers",
"following_url": "https://api.github.com/users/inishchith/following{/other_user}",
"gists_url": "https://api.github.com/users/inishchith/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/inishchith",
"id": 20226361,
"login": "inishchith",
"node_id": "MDQ6VXNlcjIwMjI2MzYx",
"organizations_url": "https://api.github.com/users/inishchith/orgs",
"received_events_url": "https://api.github.com/users/inishchith/received_events",
"repos_url": "https://api.github.com/users/inishchith/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/inishchith/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/inishchith/subscriptions",
"type": "User",
"url": "https://api.github.com/users/inishchith",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4557/reactions"
} | https://api.github.com/repos/psf/requests/issues/4557/timeline | null | completed | null | null | false | [
"Hi @kamiswim, you’re right that this doesn’t look correct. The behavior doesn’t match the doctstring and doesn’t make much sense.\r\n\r\nWe don’t utilize domains in our cookie implementation but it’s been a goal for a while. It’s likely this method has seen little usage which is why it’s escaped notice this long. ... |
https://api.github.com/repos/psf/requests/issues/4556 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4556/labels{/name} | https://api.github.com/repos/psf/requests/issues/4556/comments | https://api.github.com/repos/psf/requests/issues/4556/events | https://github.com/psf/requests/issues/4556 | 308,644,466 | MDU6SXNzdWUzMDg2NDQ0NjY= | 4,556 | Line break in cookies breaks headers | {
"avatar_url": "https://avatars.githubusercontent.com/u/10137?v=4",
"events_url": "https://api.github.com/users/ghost/events{/privacy}",
"followers_url": "https://api.github.com/users/ghost/followers",
"following_url": "https://api.github.com/users/ghost/following{/other_user}",
"gists_url": "https://api.github.com/users/ghost/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/ghost",
"id": 10137,
"login": "ghost",
"node_id": "MDQ6VXNlcjEwMTM3",
"organizations_url": "https://api.github.com/users/ghost/orgs",
"received_events_url": "https://api.github.com/users/ghost/received_events",
"repos_url": "https://api.github.com/users/ghost/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/ghost/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ghost/subscriptions",
"type": "User",
"url": "https://api.github.com/users/ghost",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 0 | 2018-03-26T16:29:22Z | 2021-09-08T03:00:29Z | 2018-03-26T16:33:11Z | NONE | resolved | I am posting data to an API. I came across a weird issue where the site returned a cookie with a 'line break' in it. Now the site wasn't purposefully trying to give cookies with line breaks, it just happened by chance. This is a authentication cookie and therefore stripping out the newline doesn't work.
## Expected Result
The post to work as expected.
## Actual Result
ValueError: Invalid header value '__urqm=37855709~a7638d6cc5309346d88260d67bc5aacd~BfI-nlTM1zqM; __urqc=3d2ff94a-7737-439e-ab33-5098cb7f1b6d; __urqi=b488782e25c7908\nd88648ac0bdb39b0138c8b6f851b65bba410f9e836b9e9b2de449b73dac3c091fc06a070e52ec282b71017c06a2164dd0ab4208294e2b18b9'
I eventually debugged the '\n' inside of the _urqi cookie.
## Reproduction Steps
```python
import requests
cookies = {
'__urqc': '3d2ff94a-7737-439e-ab33-5098cb7f1b6d',
'__urqm': '37855709~a7638d6cc5309346d88260d67bc5aacd~BfI-nlTM1zqM',
'__urqi': 'b488782e25c7908\nd88648ac0bdb39b0138c8b6f851b65bba410f9e836b9e9b2de449b73dac3c091fc06a070e52ec282b71017c06a2164dd0ab4208294e2b18b9'
}
headers = {
'Origin': 'https://www.mypoints.com',
'Accept-Encoding': 'gzip, deflate, br',
'Accept-Language': 'en-AU,en;q=0.9,fr;q=0.8,en-US;q=0.7',
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.181 Safari/537.36',
'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',
'Accept': '*/*',
'Referer': 'https://www.mypoints.com/videos',
'Connection': 'keep-alive',
'DNT': '1',
}
params = (
('cmd', 'mp-wa-playlist'),
)
data = [
('playlistid', '9226'),
('__mBfuPAgT', '2b674ad0ee62707f2236e12c2cadb44d62f6a9019d50437bb5c9c8b0096e4491'),
]
response = requests.post('https://api.mypoints.com/', headers=headers, params=params, cookies=cookies, data=data)
```
## Workaround
Simply changing the '\n' inside the cookie to '\\n' the request works. | null | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4556/reactions"
} | https://api.github.com/repos/psf/requests/issues/4556/timeline | null | completed | null | null | false | [] |
https://api.github.com/repos/psf/requests/issues/4555 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4555/labels{/name} | https://api.github.com/repos/psf/requests/issues/4555/comments | https://api.github.com/repos/psf/requests/issues/4555/events | https://github.com/psf/requests/issues/4555 | 308,450,415 | MDU6SXNzdWUzMDg0NTA0MTU= | 4,555 | redirects should respect rety-after header | {
"avatar_url": "https://avatars.githubusercontent.com/u/1790880?v=4",
"events_url": "https://api.github.com/users/kgk/events{/privacy}",
"followers_url": "https://api.github.com/users/kgk/followers",
"following_url": "https://api.github.com/users/kgk/following{/other_user}",
"gists_url": "https://api.github.com/users/kgk/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kgk",
"id": 1790880,
"login": "kgk",
"node_id": "MDQ6VXNlcjE3OTA4ODA=",
"organizations_url": "https://api.github.com/users/kgk/orgs",
"received_events_url": "https://api.github.com/users/kgk/received_events",
"repos_url": "https://api.github.com/users/kgk/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kgk/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kgk/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kgk",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 0 | 2018-03-26T06:45:39Z | 2021-09-08T03:00:28Z | 2018-03-28T12:05:36Z | NONE | resolved | Summary.
A response header can be included with redirects to slow the rate that are redirects done.
## Expected Result
automated redirect handling should respect the retry-after header
## Actual Result
max_redirect reached immediately.
See https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Retry-After | {
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4555/reactions"
} | https://api.github.com/repos/psf/requests/issues/4555/timeline | null | completed | null | null | false | [] |
https://api.github.com/repos/psf/requests/issues/4554 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4554/labels{/name} | https://api.github.com/repos/psf/requests/issues/4554/comments | https://api.github.com/repos/psf/requests/issues/4554/events | https://github.com/psf/requests/issues/4554 | 308,396,516 | MDU6SXNzdWUzMDgzOTY1MTY= | 4,554 | Custom multipart/form-data Content-Type header silently discards file upload | {
"avatar_url": "https://avatars.githubusercontent.com/u/4543115?v=4",
"events_url": "https://api.github.com/users/wlerin/events{/privacy}",
"followers_url": "https://api.github.com/users/wlerin/followers",
"following_url": "https://api.github.com/users/wlerin/following{/other_user}",
"gists_url": "https://api.github.com/users/wlerin/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/wlerin",
"id": 4543115,
"login": "wlerin",
"node_id": "MDQ6VXNlcjQ1NDMxMTU=",
"organizations_url": "https://api.github.com/users/wlerin/orgs",
"received_events_url": "https://api.github.com/users/wlerin/received_events",
"repos_url": "https://api.github.com/users/wlerin/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/wlerin/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/wlerin/subscriptions",
"type": "User",
"url": "https://api.github.com/users/wlerin",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 5 | 2018-03-25T23:27:53Z | 2021-09-08T03:00:27Z | 2018-03-28T12:08:41Z | NONE | resolved | Summary.
## Expected Result
```
{
"args": {},
"data": "",
"files": {
"logo": "data:image/jpeg;base64,<base64 image data>"
},
"form": {},
"headers": {
"Accept": "application/json",
"Accept-Encoding": "gzip, deflate",
"Connection": "close",
"Content-Length": "154247",
"Content-Type": "multipart/form-data; boundary=------------------------<some boundary>",
"Host": "httpbin.org",
"User-Agent": "python-requests/2.18.4"
},
"json": null,
"url": "https://httpbin.org/post"
}
```
## Actual Result
```
{
"args": {},
"data": "",
"files": {},
"form": {},
"headers": {
"Accept": "application/json",
"Accept-Encoding": "gzip, deflate",
"Connection": "close",
"Content-Length": "154247",
"Content-Type": "multipart/form-data",
"Host": "httpbin.org",
"User-Agent": "python-requests/2.18.4"
},
"json": null,
"url": "https://httpbin.org/post"
}
```
## Reproduction Steps
```python
import requests
headers = {
'Content-Type': 'multipart/form-data',
'Accept': 'application/json'
}
file = open('path_to_file.jpg', 'rb')
files = {"logo": file}
endpoint = "https://httpbin.org/post"
r = requests.post(endpoint, files=files, headers=headers)
print(r.json())
```
## System Information
$ python -m requests.help
```
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "2.6"
},
"implementation": {
"name": "CPython",
"version": "3.6.0"
},
"platform": {
"release": "4.4.0-103-generic",
"system": "Linux"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.18.4"
},
"system_ssl": {
"version": "1000207f"
},
"urllib3": {
"version": "1.22"
},
"using_pyopenssl": false
}
```
---------------------------
Reading some previous issues regarding multi-part file upload, I see that the usual response is something along the lines of "don't specify that header, requests will add it just fine". That's true, and currently works just fine on the user end, *if they realise that's the problem*, *if the docs they are using were tested even slightly instead of just copy-pasted from other clients* (e.g. curl, which handles this fine).
But isn't this a case that requests can handle just fine on its own, 100% correctly? It doesn't seem to me that silently failing to upload any file at all is the correct response here. Even throwing an exception or a warning would be preferable.
Note also that the Content-Length header lists the length correctly in both cases (with or without the custom header), but with the custom header requests fails to upload anything (presumably because it can't or won't set a boundary). | {
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
} | {
"+1": 3,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 3,
"url": "https://api.github.com/repos/psf/requests/issues/4554/reactions"
} | https://api.github.com/repos/psf/requests/issues/4554/timeline | null | completed | null | null | false | [
"More specifically, what would break if [this](https://github.com/requests/requests/blob/master/requests/models.py#L508): \r\n\r\n```python\r\n if content_type and ('content-type' not in self.headers):\r\n self.headers['Content-Type'] = content_type\r\n```\r\n\r\nwere changed to this:\r\n\r\n```python\r\n... |
https://api.github.com/repos/psf/requests/issues/4553 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4553/labels{/name} | https://api.github.com/repos/psf/requests/issues/4553/comments | https://api.github.com/repos/psf/requests/issues/4553/events | https://github.com/psf/requests/issues/4553 | 307,649,982 | MDU6SXNzdWUzMDc2NDk5ODI= | 4,553 | [python 2.7][requests 2.18.4] Header memory leak? | {
"avatar_url": "https://avatars.githubusercontent.com/u/1421214?v=4",
"events_url": "https://api.github.com/users/ptgreg/events{/privacy}",
"followers_url": "https://api.github.com/users/ptgreg/followers",
"following_url": "https://api.github.com/users/ptgreg/following{/other_user}",
"gists_url": "https://api.github.com/users/ptgreg/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/ptgreg",
"id": 1421214,
"login": "ptgreg",
"node_id": "MDQ6VXNlcjE0MjEyMTQ=",
"organizations_url": "https://api.github.com/users/ptgreg/orgs",
"received_events_url": "https://api.github.com/users/ptgreg/received_events",
"repos_url": "https://api.github.com/users/ptgreg/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/ptgreg/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ptgreg/subscriptions",
"type": "User",
"url": "https://api.github.com/users/ptgreg",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 11 | 2018-03-22T13:46:25Z | 2022-02-26T04:00:38Z | 2021-11-28T03:12:19Z | NONE | resolved | While debugging some memory leaks in our webservers, I noticed that I had a lot of headers (or things that very much look like headers) in `gc.garbage`.
I did a simple script to try to investigate the issue and it seems that it comes from the `requests` lib.
Doing a simple `requests.get('http://www.google.com')` will lead to a list of headers not collected.
## Expected Result
When doing `requests.get('http://www.google.com')`, and then calling `gc.garbage`, I expect not to have a list of headers staying in memory.
## Actual Result
When doing a simple GET request, I have a bunch of headers not collectable.
## Reproduction Steps
```python
import requests
import gc
import operator
gc.set_debug(gc.DEBUG_LEAK)
def collect():
gc.collect()
modules = dict()
objects = dict()
for g in gc.garbage:
key = type(g).__name__
modules[key] = modules.get(key, 0) + 1
if key not in objects:
objects[key] = []
objects[key].append(g)
sorted_modules = sorted(modules.items(), key=operator.itemgetter(1))
print 'Modules: ', sorted_modules
print 'First 10 lists:', objects.get('list', [])[:10]
def make_requests():
# The bigger the range, the bigger the final list
for _ in range(0, 10):
requests.get('http://www.google.com')
make_requests()
collect()
```
Here is the result from the 2 prints.
I just print the first 10 headers, but as you can see, there are 808 objects lists (all headers)
```
Modules: [('FastDictCache', 1), ('deque', 1), ('Buffer', 1), ('InMemoryHistory', 1), ('Event', 3), ('dict', 6), ('PoolKey', 20), *('list', 808)*]
First 10 lists: [[[[[[[...], [...], 'connection'], [...], 'accept-encoding'], [...], 'accept'], [...], 'user-agent'], [[...], [[...], [[...], [[...], [...], 'user-agent'], 'accept'], 'accept-encoding'], 'connection'], None], [[[[[[...], [...], 'accept-encoding'], [...], 'accept'], [...], 'user-agent'], [...], None], [[...], [[...], [[...], [[...], [...], None], 'user-agent'], 'accept'], 'accept-encoding'], 'connection'], [[[[[[...], [...], 'accept'], [...], 'user-agent'], [...], None], [...], 'connection'], [[...], [[...], [[...], [[...], [...], 'connection'], None], 'user-agent'], 'accept'], 'accept-encoding'], [[[[[[...], [...], 'user-agent'], [...], None], [...], 'connection'], [...], 'accept-encoding'], [[...], [[...], [[...], [[...], [...], 'accept-encoding'], 'connection'], None], 'user-agent'], 'accept'], [[[[[[...], [...], None], [...], 'connection'], [...], 'accept-encoding'], [...], 'accept'], [[...], [[...], [[...], [[...], [...], 'accept'], 'accept-encoding'], 'connection'], None], 'user-agent'], [[...], [...], None], [[[[[[[[...], [...], 'cache-control'], [...], 'content-type'], [...], 'referrer-policy'], [...], 'location'], [...], 'content-length'], [...], 'date'], [[...], [[...], [[...], [[...], [[...], [[...], [...], 'date'], 'content-length'], 'location'], 'referrer-policy'], 'content-type'], 'cache-control'], None], [[[[[[[[...], [...], 'content-type'], [...], 'referrer-policy'], [...], 'location'], [...], 'content-length'], [...], 'date'], [...], None], [[...], [[...], [[...], [[...], [[...], [[...], [...], None], 'date'], 'content-length'], 'location'], 'referrer-policy'], 'content-type'], 'cache-control'], [[[[[[[[...], [...], 'referrer-policy'], [...], 'location'], [...], 'content-length'], [...], 'date'], [...], None], [...], 'cache-control'], [[...], [[...], [[...], [[...], [[...], [[...], [...], 'cache-control'], None], 'date'], 'content-length'], 'location'], 'referrer-policy'], 'content-type'], [[[[[[[[...], [...], 'location'], [...], 'content-length'], [...], 'date'], [...], None], [...], 'cache-control'], [...], 'content-type'], [[...], [[...], [[...], [[...], [[...], [[...], [...], 'content-type'], 'cache-control'], None], 'date'], 'content-length'], 'location'], 'referrer-policy']]
```
## System Information
$ python -m requests.help
```
python -m requests.help
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "2.6"
},
"implementation": {
"name": "CPython",
"version": "2.7.14"
},
"platform": {
"release": "16.7.0",
"system": "Darwin"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.18.4"
},
"system_ssl": {
"version": "100020cf"
},
"urllib3": {
"version": "1.22"
},
"using_pyopenssl": false
}
```
| {
"avatar_url": "https://avatars.githubusercontent.com/u/18519037?v=4",
"events_url": "https://api.github.com/users/sethmlarson/events{/privacy}",
"followers_url": "https://api.github.com/users/sethmlarson/followers",
"following_url": "https://api.github.com/users/sethmlarson/following{/other_user}",
"gists_url": "https://api.github.com/users/sethmlarson/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sethmlarson",
"id": 18519037,
"login": "sethmlarson",
"node_id": "MDQ6VXNlcjE4NTE5MDM3",
"organizations_url": "https://api.github.com/users/sethmlarson/orgs",
"received_events_url": "https://api.github.com/users/sethmlarson/received_events",
"repos_url": "https://api.github.com/users/sethmlarson/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sethmlarson/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sethmlarson/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sethmlarson",
"user_view_type": "public"
} | {
"+1": 5,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 5,
"url": "https://api.github.com/repos/psf/requests/issues/4553/reactions"
} | https://api.github.com/repos/psf/requests/issues/4553/timeline | null | completed | null | null | false | [
"Using your script verbatim, I see:\r\n\r\n```\r\nModules: [] \r\nTraceback (most recent call last): ... |
https://api.github.com/repos/psf/requests/issues/4552 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4552/labels{/name} | https://api.github.com/repos/psf/requests/issues/4552/comments | https://api.github.com/repos/psf/requests/issues/4552/events | https://github.com/psf/requests/issues/4552 | 307,615,800 | MDU6SXNzdWUzMDc2MTU4MDA= | 4,552 | cannot import name "async" Python 3.6 with gevent | {
"avatar_url": "https://avatars.githubusercontent.com/u/34658341?v=4",
"events_url": "https://api.github.com/users/akravetz/events{/privacy}",
"followers_url": "https://api.github.com/users/akravetz/followers",
"following_url": "https://api.github.com/users/akravetz/following{/other_user}",
"gists_url": "https://api.github.com/users/akravetz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/akravetz",
"id": 34658341,
"login": "akravetz",
"node_id": "MDQ6VXNlcjM0NjU4MzQx",
"organizations_url": "https://api.github.com/users/akravetz/orgs",
"received_events_url": "https://api.github.com/users/akravetz/received_events",
"repos_url": "https://api.github.com/users/akravetz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/akravetz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/akravetz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/akravetz",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2018-03-22T12:06:08Z | 2021-09-08T03:00:29Z | 2018-03-22T12:11:45Z | NONE | resolved | the line: `from requests import async`
fails with the following message: `ImportError: cannot import name 'async`
on my linux install with Python 3.6.3, gevent 1.2.2. and requests 12.18.4
## Expected Result
Expected the module to successfully load
## Actual Result
Error message thrown
## Reproduction Steps
from the command line:
`pip install gevent requests`
then from the interpreter
```python
from requests import async
```
## System Information
$ python -m requests.help
```
(venv) akcom@ubuntu:~/Projects$ python -m requests.help
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "2.6"
},
"implementation": {
"name": "CPython",
"version": "3.6.3"
},
"platform": {
"release": "4.13.0-37-generic",
"system": "Linux"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.18.4"
},
"system_ssl": {
"version": "1000207f"
},
"urllib3": {
"version": "1.22"
},
"using_pyopenssl": false
}
```
Likewise
```
pip freeze | egrep -i '(gevent|request)'
```
returns
```
gevent==1.2.2
requests==2.18.4
``` | {
"avatar_url": "https://avatars.githubusercontent.com/u/34658341?v=4",
"events_url": "https://api.github.com/users/akravetz/events{/privacy}",
"followers_url": "https://api.github.com/users/akravetz/followers",
"following_url": "https://api.github.com/users/akravetz/following{/other_user}",
"gists_url": "https://api.github.com/users/akravetz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/akravetz",
"id": 34658341,
"login": "akravetz",
"node_id": "MDQ6VXNlcjM0NjU4MzQx",
"organizations_url": "https://api.github.com/users/akravetz/orgs",
"received_events_url": "https://api.github.com/users/akravetz/received_events",
"repos_url": "https://api.github.com/users/akravetz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/akravetz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/akravetz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/akravetz",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4552/reactions"
} | https://api.github.com/repos/psf/requests/issues/4552/timeline | null | completed | null | null | false | [
"Edit: somehow google took me to the v0.10.6 documentation (http://docs.python-requests.org/en/v0.10.6/user/advanced/) which is out of date. For anyone else who sees this, please use [this](https://github.com/kennethreitz/grequests) or [this](https://github.com/requests/requests-threads) instead."
] |
https://api.github.com/repos/psf/requests/issues/4551 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4551/labels{/name} | https://api.github.com/repos/psf/requests/issues/4551/comments | https://api.github.com/repos/psf/requests/issues/4551/events | https://github.com/psf/requests/pull/4551 | 307,390,175 | MDExOlB1bGxSZXF1ZXN0MTc2NTg4MTk0 | 4,551 | Updated types in __init__.py according to types.py | {
"avatar_url": "https://avatars.githubusercontent.com/u/10801618?v=4",
"events_url": "https://api.github.com/users/RatanShreshtha/events{/privacy}",
"followers_url": "https://api.github.com/users/RatanShreshtha/followers",
"following_url": "https://api.github.com/users/RatanShreshtha/following{/other_user}",
"gists_url": "https://api.github.com/users/RatanShreshtha/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/RatanShreshtha",
"id": 10801618,
"login": "RatanShreshtha",
"node_id": "MDQ6VXNlcjEwODAxNjE4",
"organizations_url": "https://api.github.com/users/RatanShreshtha/orgs",
"received_events_url": "https://api.github.com/users/RatanShreshtha/received_events",
"repos_url": "https://api.github.com/users/RatanShreshtha/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/RatanShreshtha/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/RatanShreshtha/subscriptions",
"type": "User",
"url": "https://api.github.com/users/RatanShreshtha",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 3 | 2018-03-21T19:38:06Z | 2021-09-02T00:07:45Z | 2018-06-14T14:39:14Z | NONE | resolved | {
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4551/reactions"
} | https://api.github.com/repos/psf/requests/issues/4551/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/4551.diff",
"html_url": "https://github.com/psf/requests/pull/4551",
"merged_at": "2018-06-14T14:39:14Z",
"patch_url": "https://github.com/psf/requests/pull/4551.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/4551"
} | true | [
"# [Codecov](https://codecov.io/gh/requests/requests/pull/4551?src=pr&el=h1) Report\n> Merging [#4551](https://codecov.io/gh/requests/requests/pull/4551?src=pr&el=desc) into [3.0](https://codecov.io/gh/requests/requests/commit/8f3f022c54db7c8348c84c079dfe7f7c354f1062?src=pr&el=desc) will **increase** coverage by `0... | |
https://api.github.com/repos/psf/requests/issues/4550 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4550/labels{/name} | https://api.github.com/repos/psf/requests/issues/4550/comments | https://api.github.com/repos/psf/requests/issues/4550/events | https://github.com/psf/requests/issues/4550 | 306,632,376 | MDU6SXNzdWUzMDY2MzIzNzY= | 4,550 | wget --no-check-certificate http://cdn.grupomabis.inet/cfssl/ca.pem -O /usr/local/etc/openssl/certs/cfssl-ca.pem wget --no-check-certificate http://cdn.grupomabis.inet/certs/web.pem -O /usr/local/etc/openssl/certs/cfssl-web.pem /usr/local/opt/openssl/bin/c_rehash | {
"avatar_url": "https://avatars.githubusercontent.com/u/617700?v=4",
"events_url": "https://api.github.com/users/seattle/events{/privacy}",
"followers_url": "https://api.github.com/users/seattle/followers",
"following_url": "https://api.github.com/users/seattle/following{/other_user}",
"gists_url": "https://api.github.com/users/seattle/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/seattle",
"id": 617700,
"login": "seattle",
"node_id": "MDQ6VXNlcjYxNzcwMA==",
"organizations_url": "https://api.github.com/users/seattle/orgs",
"received_events_url": "https://api.github.com/users/seattle/received_events",
"repos_url": "https://api.github.com/users/seattle/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/seattle/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/seattle/subscriptions",
"type": "User",
"url": "https://api.github.com/users/seattle",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 0 | 2018-03-19T20:57:29Z | 2021-09-08T03:00:30Z | 2018-03-19T21:40:05Z | NONE | resolved | Summary.
## Expected Result
What you expected.
## Actual Result
What happened instead.
## Reproduction Steps
```python
import requests
```
## System Information
$ python -m requests.help
```
<paste here>
```
This command is only available on Requests v2.16.4 and greater. Otherwise,
please provide some basic information about your system (Python version,
operating system, &c). | {
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 2,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 2,
"url": "https://api.github.com/repos/psf/requests/issues/4550/reactions"
} | https://api.github.com/repos/psf/requests/issues/4550/timeline | null | completed | null | null | false | [] |
https://api.github.com/repos/psf/requests/issues/4549 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4549/labels{/name} | https://api.github.com/repos/psf/requests/issues/4549/comments | https://api.github.com/repos/psf/requests/issues/4549/events | https://github.com/psf/requests/issues/4549 | 306,606,127 | MDU6SXNzdWUzMDY2MDYxMjc= | 4,549 | [RFC for 3.0] Make `verify=False` less desireable for users | {
"avatar_url": "https://avatars.githubusercontent.com/u/717901?v=4",
"events_url": "https://api.github.com/users/t-8ch/events{/privacy}",
"followers_url": "https://api.github.com/users/t-8ch/followers",
"following_url": "https://api.github.com/users/t-8ch/following{/other_user}",
"gists_url": "https://api.github.com/users/t-8ch/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/t-8ch",
"id": 717901,
"login": "t-8ch",
"node_id": "MDQ6VXNlcjcxNzkwMQ==",
"organizations_url": "https://api.github.com/users/t-8ch/orgs",
"received_events_url": "https://api.github.com/users/t-8ch/received_events",
"repos_url": "https://api.github.com/users/t-8ch/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/t-8ch/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/t-8ch/subscriptions",
"type": "User",
"url": "https://api.github.com/users/t-8ch",
"user_view_type": "public"
} | [
{
"color": "1cff91",
"default": false,
"description": "",
"id": 860696300,
"name": "3.0",
"node_id": "MDU6TGFiZWw4NjA2OTYzMDA=",
"url": "https://api.github.com/repos/psf/requests/labels/3.0"
}
] | closed | true | null | [] | null | 2 | 2018-03-19T19:41:52Z | 2021-09-08T03:00:25Z | 2018-04-04T18:32:54Z | CONTRIBUTOR | resolved | Maybe we could use the opportunity of breaking with things in 3.0 to nag users about reverting many users behaviour of specifying `verify=False` and squelching the resulting warnings by default.
One way would be to introduce a new warning or putting `verify=False` into eternal deprecation mode.
Pros:
* May lead users to adapt their code to be more secure
Cons:
* Will probably lead to more tickets here and questions on SO
* Could be interpreted as a intentional breaking existing stuff, ill meaning
* Could lead users to inhibit all `DeprecationWarning`s by default
I am actually not completely convinced this is worth the hassle to be honest, but think it is worthy of a discussion.
(Counting a short "The heck?! no way!" as a discussion here)
Cc @sigmavirus24 @Lukasa @kennethreitz | {
"avatar_url": "https://avatars.githubusercontent.com/u/717901?v=4",
"events_url": "https://api.github.com/users/t-8ch/events{/privacy}",
"followers_url": "https://api.github.com/users/t-8ch/followers",
"following_url": "https://api.github.com/users/t-8ch/following{/other_user}",
"gists_url": "https://api.github.com/users/t-8ch/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/t-8ch",
"id": 717901,
"login": "t-8ch",
"node_id": "MDQ6VXNlcjcxNzkwMQ==",
"organizations_url": "https://api.github.com/users/t-8ch/orgs",
"received_events_url": "https://api.github.com/users/t-8ch/received_events",
"repos_url": "https://api.github.com/users/t-8ch/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/t-8ch/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/t-8ch/subscriptions",
"type": "User",
"url": "https://api.github.com/users/t-8ch",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4549/reactions"
} | https://api.github.com/repos/psf/requests/issues/4549/timeline | null | completed | null | null | false | [
"I intend to have no change here, personally.",
"I think there are legitimate reasons to verify=False (sometimes you just legitimately don't care), and we shouldn't disempower those use cases. "
] |
https://api.github.com/repos/psf/requests/issues/4548 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4548/labels{/name} | https://api.github.com/repos/psf/requests/issues/4548/comments | https://api.github.com/repos/psf/requests/issues/4548/events | https://github.com/psf/requests/issues/4548 | 306,445,287 | MDU6SXNzdWUzMDY0NDUyODc= | 4,548 | socks5 not work for session proxies property | {
"avatar_url": "https://avatars.githubusercontent.com/u/1969345?v=4",
"events_url": "https://api.github.com/users/dust8/events{/privacy}",
"followers_url": "https://api.github.com/users/dust8/followers",
"following_url": "https://api.github.com/users/dust8/following{/other_user}",
"gists_url": "https://api.github.com/users/dust8/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/dust8",
"id": 1969345,
"login": "dust8",
"node_id": "MDQ6VXNlcjE5NjkzNDU=",
"organizations_url": "https://api.github.com/users/dust8/orgs",
"received_events_url": "https://api.github.com/users/dust8/received_events",
"repos_url": "https://api.github.com/users/dust8/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/dust8/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/dust8/subscriptions",
"type": "User",
"url": "https://api.github.com/users/dust8",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2018-03-19T12:37:55Z | 2021-09-08T03:00:31Z | 2018-03-19T15:47:44Z | NONE | resolved | this is not work,
```python
import requests
sess = requests.session()
proxy = 'socks5://1.1.1.1:9994'
sess.proxies = {'http': proxy, 'https': proxy}
res = sess.get('https://httpbin.org/ip', verify=False)
print(res.text)
```
but this is ok
```python
import requests
sess = requests.session()
proxy = 'socks5://1.1.1.1:9994'
proxies = {'http': proxy, 'https': proxy}
res = sess.get('https://httpbin.org/ip', verify=False,proxies=proxies)
print(res.text)
```
if requests that use socks5 too many,many port in TIME_WAIT,how to fix it? | {
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4548/reactions"
} | https://api.github.com/repos/psf/requests/issues/4548/timeline | null | completed | null | null | false | [
"Hi there! Thanks for opening this issue. Unfortunately, it seems this is a request for help instead of a report of a defect in the project. Please use [StackOverflow](https://stackoverflow.com) for general usage questions instead and only report defects here."
] |
https://api.github.com/repos/psf/requests/issues/4547 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4547/labels{/name} | https://api.github.com/repos/psf/requests/issues/4547/comments | https://api.github.com/repos/psf/requests/issues/4547/events | https://github.com/psf/requests/pull/4547 | 306,053,523 | MDExOlB1bGxSZXF1ZXN0MTc1NjI4MzEw | 4,547 | add comment about json parameter changing content-type | {
"avatar_url": "https://avatars.githubusercontent.com/u/22812329?v=4",
"events_url": "https://api.github.com/users/saraislet/events{/privacy}",
"followers_url": "https://api.github.com/users/saraislet/followers",
"following_url": "https://api.github.com/users/saraislet/following{/other_user}",
"gists_url": "https://api.github.com/users/saraislet/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/saraislet",
"id": 22812329,
"login": "saraislet",
"node_id": "MDQ6VXNlcjIyODEyMzI5",
"organizations_url": "https://api.github.com/users/saraislet/orgs",
"received_events_url": "https://api.github.com/users/saraislet/received_events",
"repos_url": "https://api.github.com/users/saraislet/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/saraislet/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/saraislet/subscriptions",
"type": "User",
"url": "https://api.github.com/users/saraislet",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2018-03-16T19:40:11Z | 2021-09-03T00:11:06Z | 2018-03-16T19:42:56Z | NONE | resolved | This comment clarifies that the json parameter in a post request automatically changes the content-type in the headers to application/json. Closes #4538. | {
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4547/reactions"
} | https://api.github.com/repos/psf/requests/issues/4547/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/4547.diff",
"html_url": "https://github.com/psf/requests/pull/4547",
"merged_at": "2018-03-16T19:42:56Z",
"patch_url": "https://github.com/psf/requests/pull/4547.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/4547"
} | true | [
"Thanks @Saraislet!"
] |
https://api.github.com/repos/psf/requests/issues/4546 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4546/labels{/name} | https://api.github.com/repos/psf/requests/issues/4546/comments | https://api.github.com/repos/psf/requests/issues/4546/events | https://github.com/psf/requests/pull/4546 | 305,722,564 | MDExOlB1bGxSZXF1ZXN0MTc1MzgxMjk1 | 4,546 | 3.0 | {
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
} | [
{
"color": "fbca04",
"default": false,
"description": null,
"id": 44501249,
"name": "Needs BDFL Input",
"node_id": "MDU6TGFiZWw0NDUwMTI0OQ==",
"url": "https://api.github.com/repos/psf/requests/labels/Needs%20BDFL%20Input"
},
{
"color": "e11d21",
"default": false,
"descrip... | closed | true | null | [] | null | 7 | 2018-03-15T21:16:24Z | 2022-02-26T04:00:41Z | 2021-11-28T03:24:03Z | CONTRIBUTOR | resolved | I'll be logging what I'm working on in this pull request.
So far:
- Removed all Python 2-specific code.
- Ran codebase through Black (White, actually) (new `setup.py format` command).
- Converted many `str.format`s to f-strings.
- Removed many "if bytes" code paths.
- Integrated rfc3986 for URL Parsing (needs to be done in `utils.py` still.
- Integrated new `HTTPHeaderDict`.
- Typed out `api.py` and `utils.py` (I think, correctly), added a new types module, `types.py`.
- Updated test suite to use a session fixture.
- Added `__slots__` to most heavily-used classes.
**This pull request is not a request for feedback.**
All tests passing.
Think that's everything. Will add comments as I go. | {
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
} | {
"+1": 2,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 2,
"laugh": 0,
"rocket": 0,
"total_count": 4,
"url": "https://api.github.com/repos/psf/requests/issues/4546/reactions"
} | https://api.github.com/repos/psf/requests/issues/4546/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/4546.diff",
"html_url": "https://github.com/psf/requests/pull/4546",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/4546.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/4546"
} | true | [
"Need to clean up AppVeyor, apparently.",
"AppVeyor's working! ✨🍰✨",
"Name–squatted \"requests3\" on PyPI. I'm liking that idea more and more for v3.",
"Are the imports and checks of chardet, pyopenssl & cryptography still needed once Python 2 is dropped?\r\n\r\nI ask, as my CLI applications are really sensi... |
https://api.github.com/repos/psf/requests/issues/4545 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4545/labels{/name} | https://api.github.com/repos/psf/requests/issues/4545/comments | https://api.github.com/repos/psf/requests/issues/4545/events | https://github.com/psf/requests/issues/4545 | 305,718,193 | MDU6SXNzdWUzMDU3MTgxOTM= | 4,545 | AttributeError: 'NoneType' object has no attribute 'read' (client.py:612) | {
"avatar_url": "https://avatars.githubusercontent.com/u/26305795?v=4",
"events_url": "https://api.github.com/users/Vacant0mens/events{/privacy}",
"followers_url": "https://api.github.com/users/Vacant0mens/followers",
"following_url": "https://api.github.com/users/Vacant0mens/following{/other_user}",
"gists_url": "https://api.github.com/users/Vacant0mens/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Vacant0mens",
"id": 26305795,
"login": "Vacant0mens",
"node_id": "MDQ6VXNlcjI2MzA1Nzk1",
"organizations_url": "https://api.github.com/users/Vacant0mens/orgs",
"received_events_url": "https://api.github.com/users/Vacant0mens/received_events",
"repos_url": "https://api.github.com/users/Vacant0mens/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Vacant0mens/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Vacant0mens/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Vacant0mens",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 2 | 2018-03-15T21:01:55Z | 2021-09-08T03:00:32Z | 2018-03-16T02:51:28Z | NONE | resolved | ## Expected Result
Sending a request with request.get(url, data=data) should return a normal web response.
## Actual Result
```
File "d:\VSWorkspace\MyWebClient.py", line 64, in query_api
response = requests.get(url, data=query)
File "C:\Program Files\Python36\lib\site-packages\requests\api.py", line 72, in get
return request('get', url, params=params, **kwargs)
File "C:\Program Files\Python36\lib\site-packages\requests\api.py", line 58, in request
return session.request(method=method, url=url, **kwargs)
File "C:\Program Files\Python36\lib\site-packages\requests\sessions.py", line 508, in request
resp = self.send(prep, **send_kwargs)
File "C:\Program Files\Python36\lib\site-packages\requests\sessions.py", line 658, in send
r.content
File "C:\Program Files\Python36\lib\site-packages\requests\models.py", line 823, in content
self._content = bytes().join(self.iter_content(CONTENT_CHUNK_SIZE)) or bytes()
File "C:\Program Files\Python36\lib\site-packages\requests\models.py", line 745, in generate
for chunk in self.raw.stream(chunk_size, decode_content=True):
File "C:\Program Files\Python36\lib\site-packages\urllib3\response.py", line 432, in stream
for line in self.read_chunked(amt, decode_content=decode_content):
File "C:\Program Files\Python36\lib\site-packages\urllib3\response.py", line 601, in read_chunked
chunk = self._handle_chunk(amt)
File "C:\Program Files\Python36\lib\site-packages\urllib3\response.py", line 566, in _handle_chunk
returned_chunk = self._fp._safe_read(self.chunk_left)
File "C:\Program Files\Python36\lib\http\client.py", line 612, in _safe_read
chunk = self.fp.read(min(amt, MAXAMOUNT))
AttributeError: 'NoneType' object has no attribute 'read'
```
## System Information
```
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "2.6"
},
"implementation": {
"name": "CPython",
"version": "3.6.4"
},
"platform": {
"release": "10",
"system": "Windows"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.18.4"
},
"system_ssl": {
"version": "100020bf"
},
"urllib3": {
"version": "1.22"
},
"using_pyopenssl": false
}
```
side note: my pylint in Visual Studio Code shows 8 errors in client.py: 6 constants that are undeclared, one global variable that's undeclared, and one index error that looks to be related to not declaring the variable type in the method definition. But I'm using python 3.6.4, so it could just be a compatibility issue in my pylint version. | {
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4545/reactions"
} | https://api.github.com/repos/psf/requests/issues/4545/timeline | null | completed | null | null | false | [
"Duplicate of #3698",
"So, if I'm understanding this correctly...\r\n\r\nrequests isn't handling `ERR_EMPTY_RESPONSE` (that you'd see in a browser) properly?"
] |
https://api.github.com/repos/psf/requests/issues/4544 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4544/labels{/name} | https://api.github.com/repos/psf/requests/issues/4544/comments | https://api.github.com/repos/psf/requests/issues/4544/events | https://github.com/psf/requests/issues/4544 | 305,536,049 | MDU6SXNzdWUzMDU1MzYwNDk= | 4,544 | possibly rely on rfc3986 in 3.0 | {
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
} | [
{
"color": "1cff91",
"default": false,
"description": "",
"id": 860696300,
"name": "3.0",
"node_id": "MDU6TGFiZWw4NjA2OTYzMDA=",
"url": "https://api.github.com/repos/psf/requests/labels/3.0"
}
] | closed | true | null | [] | null | 1 | 2018-03-15T12:39:36Z | 2021-11-24T07:00:24Z | 2021-08-26T06:49:23Z | CONTRIBUTOR | resolved | https://github.com/python-hyper/rfc3986 | {
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4544/reactions"
} | https://api.github.com/repos/psf/requests/issues/4544/timeline | null | completed | null | null | false | [
"This was incorporated into urllib3's url parsing logic in 1.25 and shouldn't be needed in Requests itself."
] |
https://api.github.com/repos/psf/requests/issues/4543 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4543/labels{/name} | https://api.github.com/repos/psf/requests/issues/4543/comments | https://api.github.com/repos/psf/requests/issues/4543/events | https://github.com/psf/requests/pull/4543 | 305,273,586 | MDExOlB1bGxSZXF1ZXN0MTc1MDQzMDA1 | 4,543 | Type annoted requests/__init__.py. | {
"avatar_url": "https://avatars.githubusercontent.com/u/10801618?v=4",
"events_url": "https://api.github.com/users/RatanShreshtha/events{/privacy}",
"followers_url": "https://api.github.com/users/RatanShreshtha/followers",
"following_url": "https://api.github.com/users/RatanShreshtha/following{/other_user}",
"gists_url": "https://api.github.com/users/RatanShreshtha/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/RatanShreshtha",
"id": 10801618,
"login": "RatanShreshtha",
"node_id": "MDQ6VXNlcjEwODAxNjE4",
"organizations_url": "https://api.github.com/users/RatanShreshtha/orgs",
"received_events_url": "https://api.github.com/users/RatanShreshtha/received_events",
"repos_url": "https://api.github.com/users/RatanShreshtha/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/RatanShreshtha/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/RatanShreshtha/subscriptions",
"type": "User",
"url": "https://api.github.com/users/RatanShreshtha",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 4 | 2018-03-14T18:15:21Z | 2021-09-03T00:11:07Z | 2018-03-14T18:16:10Z | NONE | resolved | {
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4543/reactions"
} | https://api.github.com/repos/psf/requests/issues/4543/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/4543.diff",
"html_url": "https://github.com/psf/requests/pull/4543",
"merged_at": "2018-03-14T18:16:09Z",
"patch_url": "https://github.com/psf/requests/pull/4543.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/4543"
} | true | [
"✨🍰✨",
"@kennethreitz Shouldn't there be a step listing to run mypy before submitting the contribution for 3.0 as other things are listed in http://docs.python-requests.org/en/master/dev/contributing/#steps-for-submitting-code?",
"one thing at a time.",
"i'm planning on doing most of the type annotations my... | |
https://api.github.com/repos/psf/requests/issues/4542 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4542/labels{/name} | https://api.github.com/repos/psf/requests/issues/4542/comments | https://api.github.com/repos/psf/requests/issues/4542/events | https://github.com/psf/requests/pull/4542 | 304,645,311 | MDExOlB1bGxSZXF1ZXN0MTc0NTcwNTI4 | 4,542 | Added type hints for help.py. | {
"avatar_url": "https://avatars.githubusercontent.com/u/10801618?v=4",
"events_url": "https://api.github.com/users/RatanShreshtha/events{/privacy}",
"followers_url": "https://api.github.com/users/RatanShreshtha/followers",
"following_url": "https://api.github.com/users/RatanShreshtha/following{/other_user}",
"gists_url": "https://api.github.com/users/RatanShreshtha/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/RatanShreshtha",
"id": 10801618,
"login": "RatanShreshtha",
"node_id": "MDQ6VXNlcjEwODAxNjE4",
"organizations_url": "https://api.github.com/users/RatanShreshtha/orgs",
"received_events_url": "https://api.github.com/users/RatanShreshtha/received_events",
"repos_url": "https://api.github.com/users/RatanShreshtha/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/RatanShreshtha/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/RatanShreshtha/subscriptions",
"type": "User",
"url": "https://api.github.com/users/RatanShreshtha",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 5 | 2018-03-13T06:43:00Z | 2021-09-03T00:11:08Z | 2018-03-13T13:52:06Z | NONE | resolved | This my first PR to this project please review and give feedback to me how can I improve. | {
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4542/reactions"
} | https://api.github.com/repos/psf/requests/issues/4542/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/4542.diff",
"html_url": "https://github.com/psf/requests/pull/4542",
"merged_at": "2018-03-13T13:52:06Z",
"patch_url": "https://github.com/psf/requests/pull/4542.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/4542"
} | true | [
"Is Dict proper here, or MutableMapping? Learning myself :)",
"Actually, let's have this import from `requests.types`",
"@RatanShreshtha made some changes, please review for future PRs :)",
"thanks, @kennethreitz so for future I should use the types .py?",
"@RatanShreshtha correct!"
] |
https://api.github.com/repos/psf/requests/issues/4541 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4541/labels{/name} | https://api.github.com/repos/psf/requests/issues/4541/comments | https://api.github.com/repos/psf/requests/issues/4541/events | https://github.com/psf/requests/issues/4541 | 304,628,437 | MDU6SXNzdWUzMDQ2Mjg0Mzc= | 4,541 | SSL Error when request the https site: requests.exceptions.SSLError('SSL routines', 'ssl3_get_record', 'wrong version number') | {
"avatar_url": "https://avatars.githubusercontent.com/u/29752283?v=4",
"events_url": "https://api.github.com/users/nickliqian/events{/privacy}",
"followers_url": "https://api.github.com/users/nickliqian/followers",
"following_url": "https://api.github.com/users/nickliqian/following{/other_user}",
"gists_url": "https://api.github.com/users/nickliqian/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nickliqian",
"id": 29752283,
"login": "nickliqian",
"node_id": "MDQ6VXNlcjI5NzUyMjgz",
"organizations_url": "https://api.github.com/users/nickliqian/orgs",
"received_events_url": "https://api.github.com/users/nickliqian/received_events",
"repos_url": "https://api.github.com/users/nickliqian/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nickliqian/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nickliqian/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nickliqian",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 2 | 2018-03-13T04:58:48Z | 2021-09-08T03:00:23Z | 2018-04-01T18:04:55Z | NONE | resolved | Summary.
When I request the HTTPS site with proxy, **raise SSL Error sometimes**.
Yes it's **sometimes** throwing error. For example I reqeust 50 times, 30 times of that will raise SSL Error.
I also tried remove **pyopenssl** lib and it raise other Error too.
And it must be explained that I have a proxy pool, it will get new proxy ip to request each 10s.
## Expected Result
Request https site normaly and return normal response.
## Actual Result
### Env1: Raise Exception (I already installed **pyopenssl**).
```
Traceback (most recent call last):
File "/root/.virtualenvs/spider/lib/python3.5/site-packages/urllib3/contrib/pyopenssl.py", line 441, in wrap_socket
cnx.do_handshake()
File "/root/.virtualenvs/spider/lib/python3.5/site-packages/OpenSSL/SSL.py", line 1806, in do_handshake
self._raise_ssl_error(self._ssl, result)
File "/root/.virtualenvs/spider/lib/python3.5/site-packages/OpenSSL/SSL.py", line 1546, in _raise_ssl_error
_raise_current_error()
File "/root/.virtualenvs/spider/lib/python3.5/site-packages/OpenSSL/_util.py", line 54, in exception_from_error_queue
raise exception_type(errors)
OpenSSL.SSL.Error: [('SSL routines', 'ssl3_get_record', 'wrong version number')]
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/root/.virtualenvs/spider/lib/python3.5/site-packages/urllib3/connectionpool.py", line 595, in urlopen
self._prepare_proxy(conn)
File "/root/.virtualenvs/spider/lib/python3.5/site-packages/urllib3/connectionpool.py", line 816, in _prepare_proxy
conn.connect()
File "/root/.virtualenvs/spider/lib/python3.5/site-packages/urllib3/connection.py", line 326, in connect
ssl_context=context)
File "/root/.virtualenvs/spider/lib/python3.5/site-packages/urllib3/util/ssl_.py", line 329, in ssl_wrap_socket
return context.wrap_socket(sock, server_hostname=server_hostname)
File "/root/.virtualenvs/spider/lib/python3.5/site-packages/urllib3/contrib/pyopenssl.py", line 448, in wrap_socket
raise ssl.SSLError('bad handshake: %r' % e)
ssl.SSLError: ("bad handshake: Error([('SSL routines', 'ssl3_get_record', 'wrong version number')],)",)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/root/.virtualenvs/spider/lib/python3.5/site-packages/requests/adapters.py", line 440, in send
timeout=timeout
File "/root/.virtualenvs/spider/lib/python3.5/site-packages/urllib3/connectionpool.py", line 639, in urlopen
_stacktrace=sys.exc_info()[2])
File "/root/.virtualenvs/spider/lib/python3.5/site-packages/urllib3/util/retry.py", line 388, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='sp0.baidu.com', port=443): Max retries exceeded with url: xxxxxx (Caused by SSLError(SSLError("bad handshake: Error([('SSL routines', 'ssl3_get_record', 'wrong version number')],)",),))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "test_run.py", line 68, in <module>
timeout=6)
File "/root/.virtualenvs/spider/lib/python3.5/site-packages/requests/api.py", line 72, in get
return request('get', url, params=params, **kwargs)
File "/root/.virtualenvs/spider/lib/python3.5/site-packages/requests/api.py", line 58, in request
return session.request(method=method, url=url, **kwargs)
File "/root/.virtualenvs/spider/lib/python3.5/site-packages/requests/sessions.py", line 508, in request
resp = self.send(prep, **send_kwargs)
File "/root/.virtualenvs/spider/lib/python3.5/site-packages/requests/sessions.py", line 618, in send
r = adapter.send(request, **kwargs)
File "/root/.virtualenvs/spider/lib/python3.5/site-packages/requests/adapters.py", line 506, in send
raise SSLError(e, request=request)
requests.exceptions.SSLError: HTTPSConnectionPool(host='sp0.baidu.com', port=443): Max retries exceeded with url: xxxxxx (Caused by SSLError(SSLError("bad handshake: Error([('SSL routines', 'ssl3_get_record', 'wrong version number')],)",),))
```
### Env2: Raise Exception after removed **pyopenssl**.
```
Traceback (most recent call last):
File "/root/.virtualenvs/spider/lib/python3.5/site-packages/urllib3/connectionpool.py", line 595, in urlopen
self._prepare_proxy(conn)
File "/root/.virtualenvs/spider/lib/python3.5/site-packages/urllib3/connectionpool.py", line 816, in _prepare_proxy
conn.connect()
File "/root/.virtualenvs/spider/lib/python3.5/site-packages/urllib3/connection.py", line 326, in connect
ssl_context=context)
File "/root/.virtualenvs/spider/lib/python3.5/site-packages/urllib3/util/ssl_.py", line 329, in ssl_wrap_socket
return context.wrap_socket(sock, server_hostname=server_hostname)
File "/usr/lib/python3.5/ssl.py", line 377, in wrap_socket
_context=self)
File "/usr/lib/python3.5/ssl.py", line 752, in __init__
self.do_handshake()
File "/usr/lib/python3.5/ssl.py", line 988, in do_handshake
self._sslobj.do_handshake()
File "/usr/lib/python3.5/ssl.py", line 633, in do_handshake
self._sslobj.do_handshake()
ssl.SSLError: [SSL: UNKNOWN_PROTOCOL] unknown protocol (_ssl.c:645)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/root/.virtualenvs/spider/lib/python3.5/site-packages/requests/adapters.py", line 440, in send
timeout=timeout
File "/root/.virtualenvs/spider/lib/python3.5/site-packages/urllib3/connectionpool.py", line 639, in urlopen
_stacktrace=sys.exc_info()[2])
File "/root/.virtualenvs/spider/lib/python3.5/site-packages/urllib3/util/retry.py", line 388, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='sp0.baidu.com', port=443): Max retries exceeded with url: xxxxxx (Caused by SSLError(SSLError(1, '[SSL: UNKNOWN_PROTOCOL] unknown protocol (_ssl.c:645)'),))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "test_run.py", line 67, in <module>
response = requests.get(url=url, headers=headers, params=params, proxies={"https": get_proxy(CONN_REDIS)}, timeout=6)
File "/root/.virtualenvs/spider/lib/python3.5/site-packages/requests/api.py", line 72, in get
return request('get', url, params=params, **kwargs)
File "/root/.virtualenvs/spider/lib/python3.5/site-packages/requests/api.py", line 58, in request
return session.request(method=method, url=url, **kwargs)
File "/root/.virtualenvs/spider/lib/python3.5/site-packages/requests/sessions.py", line 508, in request
resp = self.send(prep, **send_kwargs)
File "/root/.virtualenvs/spider/lib/python3.5/site-packages/requests/sessions.py", line 618, in send
r = adapter.send(request, **kwargs)
File "/root/.virtualenvs/spider/lib/python3.5/site-packages/requests/adapters.py", line 506, in send
raise SSLError(e, request=request)
requests.exceptions.SSLError: HTTPSConnectionPool(host='sp0.baidu.com', port=443): Max retries exceeded with url: xxxxxx (Caused by SSLError(SSLError(1, '[SSL: UNKNOWN_PROTOCOL] unknown protocol (_ssl.c:645)'),))
```
## Reproduction Steps
```python3
import requests
response = requests.get(url=url, headers=headers, params=params,
proxies={"https": get_proxy(CONN_REDIS)}, timeout=6)
```
## System Information
```
System Version: ubuntu 16.04.4
Python Version: Python 3.5.2
```
$ python -m requests.help
```
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": "2.1.4"
},
"idna": {
"version": "2.6"
},
"implementation": {
"name": "CPython",
"version": "3.5.2"
},
"platform": {
"release": "4.4.0-62-generic",
"system": "Linux"
},
"pyOpenSSL": {
"openssl_version": "1010007f",
"version": "17.5.0"
},
"requests": {
"version": "2.18.4"
},
"system_ssl": {
"version": "1000207f"
},
"urllib3": {
"version": "1.22"
},
"using_pyopenssl": true
}
```
According to the traceback, i just found this excepiton happend on the first handshake when run _prepare_proxy().
urllib3 1.22 source code is:
```
~/.virtualenv/virname/lib/python3.5/site-packages/urllib3/connectionpool.py 800~816
def _prepare_proxy(self, conn):
"""
Establish tunnel connection early, because otherwise httplib
would improperly set Host: header to proxy's IP:port.
"""
# Python 2.7+
try:
set_tunnel = conn.set_tunnel
except AttributeError: # Platform-specific: Python 2.6
set_tunnel = conn._set_tunnel
if sys.version_info <= (2, 6, 4) and not self.proxy_headers: # Python 2.6.4 and older
set_tunnel(self._proxy_host, self.port)
else:
set_tunnel(self._proxy_host, self.port, self.proxy_headers)
conn.connect()
```
So I suspect it is proxy issue when run _prepare_proxy(), but why it got successful respnose sometimes?
Thanks all! | {
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4541/reactions"
} | https://api.github.com/repos/psf/requests/issues/4541/timeline | null | completed | null | null | false | [
"Hi there @nickliqian \r\n\r\nSorry for the delayed response. I think we lost track of this issue. In general, this is what we would call an ask for help, as there doesn't appear to be a defect in Requests. Instead, it seems like the TLS version that the proxies are sending in the handshake, sometimes, is not accep... |
https://api.github.com/repos/psf/requests/issues/4540 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4540/labels{/name} | https://api.github.com/repos/psf/requests/issues/4540/comments | https://api.github.com/repos/psf/requests/issues/4540/events | https://github.com/psf/requests/issues/4540 | 304,145,127 | MDU6SXNzdWUzMDQxNDUxMjc= | 4,540 | Text nodes are cut | {
"avatar_url": "https://avatars.githubusercontent.com/u/28842854?v=4",
"events_url": "https://api.github.com/users/ArthaTi/events{/privacy}",
"followers_url": "https://api.github.com/users/ArthaTi/followers",
"following_url": "https://api.github.com/users/ArthaTi/following{/other_user}",
"gists_url": "https://api.github.com/users/ArthaTi/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/ArthaTi",
"id": 28842854,
"login": "ArthaTi",
"node_id": "MDQ6VXNlcjI4ODQyODU0",
"organizations_url": "https://api.github.com/users/ArthaTi/orgs",
"received_events_url": "https://api.github.com/users/ArthaTi/received_events",
"repos_url": "https://api.github.com/users/ArthaTi/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/ArthaTi/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ArthaTi/subscriptions",
"type": "User",
"url": "https://api.github.com/users/ArthaTi",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 4 | 2018-03-11T09:55:53Z | 2018-03-12T21:06:45Z | 2018-03-11T13:36:27Z | NONE | off-topic | On one of html files I requested to a website, some html text nodes were cut.
I don't understand why is this happening, mostly because requests is not only for HTML requests right? It doesn't parse HTML. And I didn't have the problem earlier.
## Expected Result
when requested with Chrome I got
```
<div class="thread"><a href="thread?id=272021&thread_page=1" class="mbtn mb2 attached "><img src="http://144.76.127.94/view/image/icons/chatattached_read.png" class="icon" /> [Arch][Beta] Eriah 73</a></div><div class="thread"><a href="thread?id=272286&thread_page=1" class="mbtn mb2 attached "><img src="http://144.76.127.94/view/image/icons/chatattached_read.png" class="icon" /> Modyfikacje do Sargonii</a></div><div class="thread"><a href="thread?id=272295&thread_page=1" class="mbtn mb2 attached "><img src="http://144.76.127.94/view/image/icons/chatattached_read.png" class="icon" /> [Beta] Profile Borumus</a></div>
```
Note the text nodes: `[Arch][Beta] Eriah 73`, `Modyfikacje do Sargonii`, `[Beta] Profile Borumus`
## Actual Result
Requests (both `.text` and `.content`) returned
```
<div class="thread"><a href="thread?id=272021&thread_page=1" class="mbtn mb2 attached "><img src="http://144.76.127.94/view/image/icons/chatattached.png" class="icon" /> [Arch][Beta] Eria...</a></div><div class="thread"><a href="thread?id=272286&thread_page=1" class="mbtn mb2 attached "><img src="http://144.76.127.94/view/image/icons/chatattached.png" class="icon" /> Modyfikacje do Sa...</a></div><div class="thread"><a href="thread?id=272295&thread_page=1" class="mbtn mb2 attached "><img src="http://144.76.127.94/view/image/icons/chatattached.png" class="icon" /> [Beta] Profile Bo...</a></div>
```
Note the text nodes: `[Arch][Beta] Eria...`, `Modyfikacje do Sa...`, `[Beta] Profile Bo...`
## Reproduction Steps
This script works, just note that you need first to create an account ("start game" button), otherwise game won't let you access any content. If you login in Chrome and request the url, you'll get the expected, uncut result. If you run the code below, printed result will have cut text nodes.
```python
import requests
session = requests.Session()
session.post('http://mrush.pl/login', {"name":"NICKNAME", "password":"PASSWORD"})
r = session.get("http://mrush.pl/threads?id=8993&page=1")
print(r.text)
```
## System Information
PyCharm, Windows 10, Python 3.6 with
Package | Version | Latest
-- | -- | --
certifi | 2018.1.18 | 2018.1.18
chardet | 3.0.4 | 3.0.4
colorama | 0.3.9 | 0.3.9
cssselect | 1.0.3 | 1.0.3
idna | 2.6 | 2.6
lxml | 4.1.1 | 4.1.1
pip | 9.0.1 | 9.0.1
pyquery | 1.4.0 | 1.4.0
requests | 2.18.4 | 2.18.4
setuptools | 28.8.0 | 38.5.2
urllib3 | 1.22 | 1.22
| {
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4540/reactions"
} | https://api.github.com/repos/psf/requests/issues/4540/timeline | null | completed | null | null | false | [
"Hi there! Thanks for opening this issue. Unfortunately, it seems this is a request for help instead of a report of a defect in the project. Please use [StackOverflow](https://stackoverflow.com) for general usage questions instead and only report defects here.\r\n\r\nIt's entirely likely that you need to use a diff... |
https://api.github.com/repos/psf/requests/issues/4539 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4539/labels{/name} | https://api.github.com/repos/psf/requests/issues/4539/comments | https://api.github.com/repos/psf/requests/issues/4539/events | https://github.com/psf/requests/issues/4539 | 304,094,832 | MDU6SXNzdWUzMDQwOTQ4MzI= | 4,539 | http redirect to non http causes exception | {
"avatar_url": "https://avatars.githubusercontent.com/u/12158777?v=4",
"events_url": "https://api.github.com/users/philborman/events{/privacy}",
"followers_url": "https://api.github.com/users/philborman/followers",
"following_url": "https://api.github.com/users/philborman/following{/other_user}",
"gists_url": "https://api.github.com/users/philborman/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/philborman",
"id": 12158777,
"login": "philborman",
"node_id": "MDQ6VXNlcjEyMTU4Nzc3",
"organizations_url": "https://api.github.com/users/philborman/orgs",
"received_events_url": "https://api.github.com/users/philborman/received_events",
"repos_url": "https://api.github.com/users/philborman/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/philborman/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/philborman/subscriptions",
"type": "User",
"url": "https://api.github.com/users/philborman",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 5 | 2018-03-10T18:55:04Z | 2021-09-08T03:00:34Z | 2018-03-10T20:16:38Z | NONE | resolved | Summary.
If a http page redirects via 301 to a non-http location, eg a magnet link, requests raises exception and the redirect link is not available except in the error text
## Expected Result
Would be better if it returned status_code=301 and content=redirect link
## Actual Result
exception No connection adapters were found for 'magnet:?xt=urn:btih... | {
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4539/reactions"
} | https://api.github.com/repos/psf/requests/issues/4539/timeline | null | completed | null | null | false | [
"Hi @philborman, thanks for reporting this. This is actually a duplicate of #4362, which I think @kennethreitz's needs to take a look at. The `request.next` feature broke handling custom schemes, so until that's resolved, Requests 2.16+ isn't able to handle non-http style URI redirects.",
"Not quite, I haven't di... |
https://api.github.com/repos/psf/requests/issues/4538 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4538/labels{/name} | https://api.github.com/repos/psf/requests/issues/4538/comments | https://api.github.com/repos/psf/requests/issues/4538/events | https://github.com/psf/requests/issues/4538 | 304,009,547 | MDU6SXNzdWUzMDQwMDk1NDc= | 4,538 | Please update docs to reflect that using the json kwarg in requests results in Content-Type being set to application/json | {
"avatar_url": "https://avatars.githubusercontent.com/u/5161502?v=4",
"events_url": "https://api.github.com/users/lorenmh/events{/privacy}",
"followers_url": "https://api.github.com/users/lorenmh/followers",
"following_url": "https://api.github.com/users/lorenmh/following{/other_user}",
"gists_url": "https://api.github.com/users/lorenmh/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/lorenmh",
"id": 5161502,
"login": "lorenmh",
"node_id": "MDQ6VXNlcjUxNjE1MDI=",
"organizations_url": "https://api.github.com/users/lorenmh/orgs",
"received_events_url": "https://api.github.com/users/lorenmh/received_events",
"repos_url": "https://api.github.com/users/lorenmh/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/lorenmh/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/lorenmh/subscriptions",
"type": "User",
"url": "https://api.github.com/users/lorenmh",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 2 | 2018-03-09T23:11:46Z | 2021-09-08T03:00:31Z | 2018-03-16T19:42:56Z | NONE | resolved | Wanted to make sure that the Content-Type was set to application/json when the json kwarg is used `requests.post(..., json=some_data)`, but could not find this anywhere in the documentation.
## Expected Result
Expected to find at least a short one sentence blurb about this in the documentation | {
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4538/reactions"
} | https://api.github.com/repos/psf/requests/issues/4538/timeline | null | completed | null | null | false | [
"Pull requests accepted :)",
"I'll update this!"
] |
https://api.github.com/repos/psf/requests/issues/4537 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4537/labels{/name} | https://api.github.com/repos/psf/requests/issues/4537/comments | https://api.github.com/repos/psf/requests/issues/4537/events | https://github.com/psf/requests/issues/4537 | 303,797,420 | MDU6SXNzdWUzMDM3OTc0MjA= | 4,537 | POST request with 400 response throws ConnectionError | {
"avatar_url": "https://avatars.githubusercontent.com/u/10137?v=4",
"events_url": "https://api.github.com/users/ghost/events{/privacy}",
"followers_url": "https://api.github.com/users/ghost/followers",
"following_url": "https://api.github.com/users/ghost/following{/other_user}",
"gists_url": "https://api.github.com/users/ghost/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/ghost",
"id": 10137,
"login": "ghost",
"node_id": "MDQ6VXNlcjEwMTM3",
"organizations_url": "https://api.github.com/users/ghost/orgs",
"received_events_url": "https://api.github.com/users/ghost/received_events",
"repos_url": "https://api.github.com/users/ghost/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/ghost/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ghost/subscriptions",
"type": "User",
"url": "https://api.github.com/users/ghost",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 5 | 2018-03-09T10:39:49Z | 2021-09-08T03:00:34Z | 2018-03-09T15:43:31Z | NONE | resolved | I make a POST request to an internal API. When some preconditions are not met the API responds with 400.
## Expected Result
Getting a response object with status_code == 400
## Actual Result
requests throws excpetion with ConnectionError
## System Information
$ python -m requests.help
```
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "2.6"
},
"implementation": {
"name": "CPython",
"version": "3.6.4"
},
"platform": {
"release": "4.4.0-81-generic",
"system": "Linux"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.18.4"
},
"system_ssl": {
"version": "20000000"
},
"urllib3": {
"version": "1.22"
},
"using_pyopenssl": false
}
``` | {
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 1,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 1,
"url": "https://api.github.com/repos/psf/requests/issues/4537/reactions"
} | https://api.github.com/repos/psf/requests/issues/4537/timeline | null | completed | null | null | false | [
"Additional information: This happens when the payload of the request was not received, yet. So it seems, requests can't handle this interruption.",
"Even more information: Only happens when data parameter is a file object created with open.",
"@sebastianbauer there isn't enough information here to properly deb... |
https://api.github.com/repos/psf/requests/issues/4536 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4536/labels{/name} | https://api.github.com/repos/psf/requests/issues/4536/comments | https://api.github.com/repos/psf/requests/issues/4536/events | https://github.com/psf/requests/issues/4536 | 303,552,707 | MDU6SXNzdWUzMDM1NTI3MDc= | 4,536 | TypeError: 'str' does not support the buffer interface | {
"avatar_url": "https://avatars.githubusercontent.com/u/36162221?v=4",
"events_url": "https://api.github.com/users/aedelbro/events{/privacy}",
"followers_url": "https://api.github.com/users/aedelbro/followers",
"following_url": "https://api.github.com/users/aedelbro/following{/other_user}",
"gists_url": "https://api.github.com/users/aedelbro/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/aedelbro",
"id": 36162221,
"login": "aedelbro",
"node_id": "MDQ6VXNlcjM2MTYyMjIx",
"organizations_url": "https://api.github.com/users/aedelbro/orgs",
"received_events_url": "https://api.github.com/users/aedelbro/received_events",
"repos_url": "https://api.github.com/users/aedelbro/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/aedelbro/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/aedelbro/subscriptions",
"type": "User",
"url": "https://api.github.com/users/aedelbro",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 2 | 2018-03-08T16:54:07Z | 2021-09-08T03:00:35Z | 2018-03-08T20:21:50Z | NONE | resolved | When following the standard (as shown in the quickstart) method of `requests.put(path, data=json.dumps(payload))` is used, and then replayed using `requests.Session().send(res.request)`, this method will *occasionally* fail inside of the `ssl.py` with the type error: `'str' does not support the buffer interface`.
I believe this also *might* be related to [this issue opened](https://github.com/requests/requests/issues/4503). If it is related to this encoding error, would a proper solution be to use `json=payload` instead of doing `data=json.dumps(payload)`? Except in the linked issue, there it can fail consistently, whereas mine cannot.
Is there a more proper way change headers in a prepared request to then resend said request?
If the issue is on requests' end, I feel like it [might be in here somewhere](https://github.com/requests/requests/blob/master/requests/models.py#L444).
## Use case and explanation
So we're using requests to talk with our REST API in JSON (standard stuff). Everything works peachy (thanks for providing such a great lib), until our token expires. So once our bearer token expires, I get a new one, and save the token. However, I now want to resend the request that just failed, but with the new token in the header. I have been using `requests.Session().send(res.request)` to resend the prepared request (after changing the header in the prepared request). When replaying using the `Session().send()`, it hits the above type error *occasionally*, like once every 30ish times (it's hard to measure, it'll go a week or two without erroring, but then come back when you least expect).
Note: it only occurs when PUTing (I would assume also with POSTing, but I haven't seen it)
Here's our general setup:
```python
class A:
def authenticate(self):
res = requests.post(url, headers=headers, data=json.dumps(payload))
if res.status_code != 200:
raise Exception("Error authenticating")
self.token = "Bearer " + res.json()['payload']['data']['token']
def headers(self):
return {
'Authorization': self.token,
'Content-Type': 'application/json'
}
def put(self, path, payload):
res = requests.put(self.url(path), headers=self.headers(), data=json.dumps(payload))
return self.handle_response(res)
def handle_response(self, res, auth=True):
if res.status_code == 200:
return res.json()
elif res.status_code == 401 and auth:
print("Got 401, attempting to reauth", flush=True)
self.authenticate()
res.request.headers = self.headers()
return self.handle_response(requests.Session().send(res.request), auth=False)
else:
raise Exception('Error making request ' + res.url + ':' + res.request.method + ' - ' + str(res.status_code))
```
## Expected Result
It to replay the request with the updated header, and either fail constantly or not at all. The hardest part is it doesn't happen consistently. Like I mentioned above, once every 30ish times does this happen.
## Actual Result
Here is a stack trace:
```
File "/app/behavior/b.py"
self.a.put(path, payload)
File "/app/behavior/a.py"
return self.handle_response(res)
File "/app/behavior/a.py" line 89 in handle_response
return self.handle_response(requests.Session().send(res.request), auth=False)
File "/usr/local/lib/python3.4/dist-packages/requests/sessions.py" line 618 in send
r = adapter.send(request, **kwargs)
File "/usr/local/lib/python3.4/dist-packages/requests/adapters.py" line 463 in send
low_conn.send(i)
File "/usr/lib/python3.4/http/client.py" line 921 in send
self.sock.sendall(d)
File "/usr/local/lib/python3.4/dist-packages/eventlet/green/ssl.py" line 168 in sendall
v = self.send(data_to_send)
File "/usr/local/lib/python3.4/dist-packages/eventlet/green/ssl.py" line 143 in send
super(GreenSSLSocket, self).send, data, flags)
File "/usr/local/lib/python3.4/dist-packages/eventlet/green/ssl.py" line 110 in _call_trampolining
return func(*a, **kw)
File "/usr/lib/python3.4/ssl.py" line 702 in send
v = self._sslobj.write(data)
TypeError: 'str' does not support the buffer interface
```
The payload is simple dictionary of dictionary:
```python
{
"a": {
"b": "Yes",
"c": "No"
}
}
```
no fancy things, just ascii strings
## Reproduction Steps
Create a put request using `res = requests.put(self.url(path), headers=self.headers(), data=json.dumps(payload))`
Change header dictionary `self.authenticate()`
Update headers in prepared request `res.request.headers = self.headers()`
Resend request `requests.Session().send(res.request)`
Cross fingers it fails?
## System Information
```
Python 3.4.3
requests==2.18.4
urllib3==1.22
Linux version 4.9.60-linuxkit-aufs (gcc version 6.3.0 (Alpine 6.3.0) )
```
This is running on flask inside of linux docker container.
This also happened with requests version 2.2.1 (we thought updating might have solved the issue, but alas...) | {
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4536/reactions"
} | https://api.github.com/repos/psf/requests/issues/4536/timeline | null | completed | null | null | false | [
"I'm pretty certain that the problem here is that you are rarely getting a 401 and when you replace the headers, you're replacing them with unicode, not bytes. `send` doesn't prepare things appropriately.\r\n\r\nYou're using python 3 so all of those \"ascii strings\" are actually UTF-8 text. The closest to \"ascii ... |
https://api.github.com/repos/psf/requests/issues/4535 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4535/labels{/name} | https://api.github.com/repos/psf/requests/issues/4535/comments | https://api.github.com/repos/psf/requests/issues/4535/events | https://github.com/psf/requests/pull/4535 | 303,036,917 | MDExOlB1bGxSZXF1ZXN0MTczNDA1MjU5 | 4,535 | Issue #4518 - Update MANIFEST.in | {
"avatar_url": "https://avatars.githubusercontent.com/u/13031534?v=4",
"events_url": "https://api.github.com/users/Yashs744/events{/privacy}",
"followers_url": "https://api.github.com/users/Yashs744/followers",
"following_url": "https://api.github.com/users/Yashs744/following{/other_user}",
"gists_url": "https://api.github.com/users/Yashs744/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Yashs744",
"id": 13031534,
"login": "Yashs744",
"node_id": "MDQ6VXNlcjEzMDMxNTM0",
"organizations_url": "https://api.github.com/users/Yashs744/orgs",
"received_events_url": "https://api.github.com/users/Yashs744/received_events",
"repos_url": "https://api.github.com/users/Yashs744/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Yashs744/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Yashs744/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Yashs744",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2018-03-07T10:09:28Z | 2021-09-03T00:11:09Z | 2018-03-08T17:59:50Z | NONE | resolved | Update MANIFEST.in (Issue #4518) | {
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4535/reactions"
} | https://api.github.com/repos/psf/requests/issues/4535/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/4535.diff",
"html_url": "https://github.com/psf/requests/pull/4535",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/4535.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/4535"
} | true | [
"# [Codecov](https://codecov.io/gh/requests/requests/pull/4535?src=pr&el=h1) Report\n> Merging [#4535](https://codecov.io/gh/requests/requests/pull/4535?src=pr&el=desc) into [master](https://codecov.io/gh/requests/requests/commit/5daa6cc63c23ea3e880b52666715e501679537e3?src=pr&el=desc) will **not change** coverage.... |
https://api.github.com/repos/psf/requests/issues/4534 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4534/labels{/name} | https://api.github.com/repos/psf/requests/issues/4534/comments | https://api.github.com/repos/psf/requests/issues/4534/events | https://github.com/psf/requests/issues/4534 | 302,973,684 | MDU6SXNzdWUzMDI5NzM2ODQ= | 4,534 | Connection aborted., error(104, 'Connection reset by peer') | {
"avatar_url": "https://avatars.githubusercontent.com/u/1022358?v=4",
"events_url": "https://api.github.com/users/aavrug/events{/privacy}",
"followers_url": "https://api.github.com/users/aavrug/followers",
"following_url": "https://api.github.com/users/aavrug/following{/other_user}",
"gists_url": "https://api.github.com/users/aavrug/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/aavrug",
"id": 1022358,
"login": "aavrug",
"node_id": "MDQ6VXNlcjEwMjIzNTg=",
"organizations_url": "https://api.github.com/users/aavrug/orgs",
"received_events_url": "https://api.github.com/users/aavrug/received_events",
"repos_url": "https://api.github.com/users/aavrug/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/aavrug/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/aavrug/subscriptions",
"type": "User",
"url": "https://api.github.com/users/aavrug",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 2 | 2018-03-07T05:54:31Z | 2021-09-08T03:00:37Z | 2018-03-07T06:10:32Z | NONE | resolved | I have created a api in Django and inside that calling a third party api which accepts xml data. With 30 rows of XML it is working fine, for more rows throwing the error "Connection aborted.', error(104, 'Connection reset by peer')". The third party also provided a UI so I can test that upto 5000 rows they are accepting and returning proper result.
## Expected Result
The post request should work properly for more data in the request as it is working fine for less data.
## Actual Result
```
ConnectionError at /v1/send-sms/
('Connection aborted.', error(104, 'Connection reset by peer'))
Request Method: POST
Request URL: http://example.com/v1/send-sms/
Django Version: 1.11
Exception Type: ConnectionError
Exception Value:
('Connection aborted.', error(104, 'Connection reset by peer'))
Exception Location: /home/user-135/sandbox/venv/local/lib/python2.7/site-packages/requests/adapters.py in send, line 490
Python Executable: /home/user-135/sandbox/venv/bin/python
Python Version: 2.7.12
Python Path:
['/home/user-135/public_html/MyProject',
'/home/user-135/sandbox/venv/lib/python2.7',
'/home/user-135/sandbox/venv/lib/python2.7/plat-x86_64-linux-gnu',
'/home/user-135/sandbox/venv/lib/python2.7/lib-tk',
'/home/user-135/sandbox/venv/lib/python2.7/lib-old',
'/home/user-135/sandbox/venv/lib/python2.7/lib-dynload',
'/usr/lib/python2.7',
'/usr/lib/python2.7/plat-x86_64-linux-gnu',
'/usr/lib/python2.7/lib-tk',
'/home/user-135/sandbox/venv/local/lib/python2.7/site-packages',
'/home/user-135/public_html/MyProject',
'/home/user-135/public_html/MyProject']
Server time: Wed, 7 Mar 2018 10:55:19 +0530
```
## Reproduction Steps
```python
import requests
recievers = ''
url = 'https://example.com/sms/'
for x in xrange(0, len(users)):
y = x + 1
body_content = body
phone = mobile_no
recievers = recievers + "<SMS>.......</SMS>"
xml = "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>\n<!DOCTYPE MESSAGE SYSTEM \"http://127.0.0.1:80/sms/ttr/sms.ptp\">\n<MESSAGE VER=\"1.2\">\n<USER USERNAME=\""+username+"\" PASSWORD=\""+password+"\" />"+recievers+"\n</MESSAGE>"
querystring = {"data": xml,"action":"send"}
headers = {'content-type': "application/xml"}
response = requests.request("POST", url, headers=headers, params=querystring)
```
## System Information
$ python -m requests.help
```
{
"chardet": {
"version": "2.3.0"
},
"cryptography": {
"version": ""
},
"idna": {
"version": ""
},
"implementation": {
"name": "CPython",
"version": "2.7.12"
},
"platform": {
"release": "4.4.0-112-generic",
"system": "Linux"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.18.4"
},
"system_ssl": {
"version": "1000207f"
},
"urllib3": {
"version": "1.21.1"
},
"using_pyopenssl": false
}
```
This command is only available on Requests v2.16.4 and greater. Otherwise,
please provide some basic information about your system (Python version,
operating system, &c). | {
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4534/reactions"
} | https://api.github.com/repos/psf/requests/issues/4534/timeline | null | completed | null | null | false | [
"Hi @aavrug, thanks for opening this issue. Unfortunately, it seems this is a request for help instead of a report of a defect in the project. Please use [StackOverflow](https://stackoverflow.com) for general usage questions instead and only report defects here.\r\n\r\nFrom a brief look, this is the server choosing... |
https://api.github.com/repos/psf/requests/issues/4533 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4533/labels{/name} | https://api.github.com/repos/psf/requests/issues/4533/comments | https://api.github.com/repos/psf/requests/issues/4533/events | https://github.com/psf/requests/issues/4533 | 302,243,954 | MDU6SXNzdWUzMDIyNDM5NTQ= | 4,533 | SSL Error; bad handshake; no ssl cipher list | {
"avatar_url": "https://avatars.githubusercontent.com/u/33327698?v=4",
"events_url": "https://api.github.com/users/muhzii/events{/privacy}",
"followers_url": "https://api.github.com/users/muhzii/followers",
"following_url": "https://api.github.com/users/muhzii/following{/other_user}",
"gists_url": "https://api.github.com/users/muhzii/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/muhzii",
"id": 33327698,
"login": "muhzii",
"node_id": "MDQ6VXNlcjMzMzI3Njk4",
"organizations_url": "https://api.github.com/users/muhzii/orgs",
"received_events_url": "https://api.github.com/users/muhzii/received_events",
"repos_url": "https://api.github.com/users/muhzii/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/muhzii/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/muhzii/subscriptions",
"type": "User",
"url": "https://api.github.com/users/muhzii",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2018-03-05T10:23:23Z | 2021-09-08T03:00:37Z | 2018-03-05T14:01:59Z | NONE | resolved | When trying to install some 3rd party apps with something like `pip install` or run apps that uses this module I end up with this error:
`requests.exceptions.SSLError: ("bad handshake: Error([('SSL routines', 'ssl_cipher_list_to_bytes', 'no ciphers available')],)",)`
## System Information
`python -m requests.help`
```
/usr/bin/python: No module named requests.help
```
## Operating System info
`Linux kali 4.14.0-kali3-amd64 #1 SMP Debian 4.14.17-1kali1 (2018-02-16) x86_64 GNU/Linux`
## python version
`Python 2.7.14+`
Output of pip freeze:
```
Warning: cannot find svn location for chirp===daily-20170714
alembic==0.8.8
androguard==3.0.1
anyjson==0.3.3
argcomplete==1.8.1
argh==0.26.2
asn1crypto==0.24.0
attrs==17.4.0
Automat==0.6.0
backdoor-factory==0.0.0
backports-abc==0.5
backports.shutil-get-terminal-size==1.0.0
backports.ssl-match-hostname==3.5.0.1
BBQSQL==1.0
bdfproxy==0.0.0
BeautifulSoup==3.2.1
beautifulsoup4==4.5.3
binwalk==2.1.2
BlindElephant==1.0
blinker==1.4
capstone==3.0.5rc2
certifi==2018.1.18
chardet==2.3.0
## FIXME: could not find svn URL in dependency_links for this package:
chirp===daily-20170714
click==6.6
colorama==0.3.7
ConfigArgParse==0.11.0
configobj==5.0.6
configparser==3.5.0
constantly==15.1.0
construct==2.8.16
couchdbkit==0.6.5
cryptography==2.1.4
Cuckoo==2.0.5.3
decorator==4.1.2
dicttoxml==1.7.4
dissy==9
distorm3==3.3.4
Django==1.8.4
django-extensions==1.6.7
dnslib==0.9.7
dnspython==1.15.0
docutils==0.14
dpkt==1.8.7
droidbot==1.0.2b3
ecdsa==0.13
egghatch==0.2.1
elasticsearch==5.3.0
enum34==1.1.6
et-xmlfile==1.0.1
feedparser==5.2.1
Flask==0.12.2
Flask-SQLAlchemy==2.1
functools32==3.2.3.post2
fuse-python==0.2.1
future==0.15.2
futures==3.2.0
GeoIP==1.3.2
gevent==1.2.2
github3.py==0.9.6
greenlet==0.4.12
h2==2.5.2
hpack==3.0.0
html2text==2018.1.9
html5lib==0.999999999
http-parser==0.8.3
httplib2==0.9.2
HTTPReplay==0.2.2
hyperframe==4.0.1
hyperlink==17.3.1
idna==2.6
impacket==0.9.15
incremental==16.10.1
ipaddress==1.0.17
IPy==0.83
ipython==5.5.0
ipython-genutils==0.2.0
itsdangerous==0.24
jdcal==1.0
Jinja2==2.9.6
jsbeautifier==1.6.2
jsonpickle==0.9.5
jsonrpclib==0.1.7
jsonschema==2.6.0
keepnote==0.7.8
keyring==10.6.0
keyrings.alt==3.0
killerbee==1.0
lxml==4.1.0
M2Crypto==0.27.0
Mako==1.0.7
MarkupSafe==1.0
mechanize==0.2.5
mercurial==4.4.1
mockito==0.5.2
nassl==0.12
netaddr==0.7.19
networkx==2.1
NfSpy==1.0
numpy==1.13.3
olefile==0.43
oletools==0.51
openpyxl==2.4.9
PAM==0.4.2
paramiko==2.0.0
passlib==1.7.1
pathlib2==2.3.0
pathtools==0.1.2
pcapy==0.10.8
peepdf==0.3.6
pefile==2017.11.5
pefile2==1.2.11
pexpect==4.2.1
pickleshare==0.7.4
Pillow==3.2.0
prettytable==0.7.2
prompt-toolkit==1.0.15
psutil==5.4.2
psycopg2==2.7.4
py==1.4.34
pyasn1==0.4.2
pyasn1-modules==0.2.1
pycairo==1.16.2
pycrypto==2.6.1
pycurl==7.43.0.1
pydns==2.3.6
pyelftools==0.24
pyenchant==2.0.0
Pygments==2.2.0
pygobject==3.26.1
pygtkspellcheck==4.0.5
pyinotify==0.9.6
PyJWT==1.5.3
pyliblzma==0.5.3
pymisp==2.4.54
pymongo==3.0.3
pymssql==2.1.3
pyOpenSSL==17.5.0
pyparsing==2.2.0
PyPDF2==1.26.0
pyperclip==1.6.0
pyscard==1.9.6
pyserial==3.4
PySocks==1.6.5
pysqlite==2.7.0
pytest==3.2.5
python-apt==1.4.0b3+b1
python-dateutil==2.4.2
python-editor==1.0.3
python-magic==0.4.12
pythonaes==1.0
pytz==2018.3
pyusb==1.0.0b2
PyX==0.12.1
pyxdg==0.25
PyYAML==3.12
qrcode==5.3
requests==2.13.0
restkit==4.2.2
rfidiot==1.0
roman==2.0.0
rpm==4.14.0
scandir==1.7
scapy==2.3.2
SecretStorage==2.3.1
service-identity==16.0.0
SFlock==0.2.20
simplegeneric==0.8.1
simplejson==3.13.2
singledispatch==3.4.0.3
six==1.11.0
slowaes==0.1a1
socketpool==0.5.3
SQLAlchemy==1.0.8
tcpwatch==1.3.1
termcolor==1.1.0
tlslite-ng==0.6.0
tornado==4.5.3
traitlets==4.3.2
Twisted==17.9.0
typing==3.6.2
uncompyle2==1.1
unicodecsv==0.14.1
unicorn==1.0.1
unpyclib==0.8.1
uritemplate==3.0.0
uritemplate.py==3.0.2
urlgrabber==3.10.2
urllib3==1.22
urwid==1.3.1
uTidylib==0.3
vinetto==0.7b0
virtualenv==15.1.0
volatility==2.6
wakeonlan==0.2.2
wapiti==2.3.0
watchdog==0.8.3
wcwidth==0.1.7
webencodings==0.5
webunit==1.3.10
Werkzeug==0.14.1
wfuzz==2.2.9
Whoosh==2.7.4
wxPython==3.0.2.0
wxPython-common==3.0.2.0
XlsxWriter==0.9.6
xmlbuilder==1.0
yara-python==3.6.3
yenc==0.4.0
yum-metadata-parser==1.1.4
zenmap==7.60
zim==0.68rc1
zope.interface==4.3.2
```
## openssl:
`OpenSSL 1.1.1-pre2-dev xx XXX xxxx`
-usage of s_client:
```
root@kali:~# openssl s_client -connect google.com:443
CONNECTED(00000003)
depth=2 C = US, O = GeoTrust Inc., CN = GeoTrust Global CA
verify error:num=20:unable to get local issuer certificate
Certificate chain
0 s:C = US, ST = California, L = Mountain View, O = Google Inc, CN = *.google.com
i:C = US, O = Google Inc, CN = Google Internet Authority G2
1 s:C = US, O = Google Inc, CN = Google Internet Authority G2
i:C = US, O = GeoTrust Inc., CN = GeoTrust Global CA
2 s:C = US, O = GeoTrust Inc., CN = GeoTrust Global CA
i:C = US, O = Equifax, OU = Equifax Secure Certificate Authority
Server certificate
-----BEGIN CERTIFICATE-----
MIIHgzCCBmugAwIBAgIIBsBhgzb7buIwDQYJKoZIhvcNAQELBQAwSTELMAkGA1UE
BhMCVVMxEzARBgNVBAoTCkdvb2dsZSBJbmMxJTAjBgNVBAMTHEdvb2dsZSBJbnRl
cm5ldCBBdXRob3JpdHkgRzIwHhcNMTgwMjEzMTA0NDU5WhcNMTgwNTA4MTA0MDAw
WjBmMQswCQYDVQQGEwJVUzETMBEGA1UECAwKQ2FsaWZvcm5pYTEWMBQGA1UEBwwN
TW91bnRhaW4gVmlldzETMBEGA1UECgwKR29vZ2xlIEluYzEVMBMGA1UEAwwMKi5n
b29nbGUuY29tMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEWuc20suu0HzHRNSm
nmbyB0/APWpLlb7wQfxtGOOeM6YTrvUBlwoFZ55PAXaUwil/5Efv43+fbVNVpNOi
q4v94qOCBRswggUXMBMGA1UdJQQMMAoGCCsGAQUFBwMBMA4GA1UdDwEB/wQEAwIH
gDCCA+EGA1UdEQSCA9gwggPUggwqLmdvb2dsZS5jb22CDSouYW5kcm9pZC5jb22C
FiouYXBwZW5naW5lLmdvb2dsZS5jb22CEiouY2xvdWQuZ29vZ2xlLmNvbYIUKi5k
YjgzMzk1My5nb29nbGUuY26CBiouZy5jb4IOKi5nY3AuZ3Z0Mi5jb22CFiouZ29v
Z2xlLWFuYWx5dGljcy5jb22CCyouZ29vZ2xlLmNhggsqLmdvb2dsZS5jbIIOKi5n
b29nbGUuY28uaW6CDiouZ29vZ2xlLmNvLmpwgg4qLmdvb2dsZS5jby51a4IPKi5n
b29nbGUuY29tLmFygg8qLmdvb2dsZS5jb20uYXWCDyouZ29vZ2xlLmNvbS5icoIP
Ki5nb29nbGUuY29tLmNvgg8qLmdvb2dsZS5jb20ubXiCDyouZ29vZ2xlLmNvbS50
coIPKi5nb29nbGUuY29tLnZuggsqLmdvb2dsZS5kZYILKi5nb29nbGUuZXOCCyou
Z29vZ2xlLmZyggsqLmdvb2dsZS5odYILKi5nb29nbGUuaXSCCyouZ29vZ2xlLm5s
ggsqLmdvb2dsZS5wbIILKi5nb29nbGUucHSCEiouZ29vZ2xlYWRhcGlzLmNvbYIP
Ki5nb29nbGVhcGlzLmNughQqLmdvb2dsZWNvbW1lcmNlLmNvbYIRKi5nb29nbGV2
aWRlby5jb22CDCouZ3N0YXRpYy5jboINKi5nc3RhdGljLmNvbYIKKi5ndnQxLmNv
bYIKKi5ndnQyLmNvbYIUKi5tZXRyaWMuZ3N0YXRpYy5jb22CDCoudXJjaGluLmNv
bYIQKi51cmwuZ29vZ2xlLmNvbYIWKi55b3V0dWJlLW5vY29va2llLmNvbYINKi55
b3V0dWJlLmNvbYIWKi55b3V0dWJlZWR1Y2F0aW9uLmNvbYIHKi55dC5iZYILKi55
dGltZy5jb22CGmFuZHJvaWQuY2xpZW50cy5nb29nbGUuY29tggthbmRyb2lkLmNv
bYIbZGV2ZWxvcGVyLmFuZHJvaWQuZ29vZ2xlLmNughxkZXZlbG9wZXJzLmFuZHJv
aWQuZ29vZ2xlLmNuggRnLmNvggZnb28uZ2yCFGdvb2dsZS1hbmFseXRpY3MuY29t
ggpnb29nbGUuY29tghJnb29nbGVjb21tZXJjZS5jb22CGHNvdXJjZS5hbmRyb2lk
Lmdvb2dsZS5jboIKdXJjaGluLmNvbYIKd3d3Lmdvby5nbIIIeW91dHUuYmWCC3lv
dXR1YmUuY29tghR5b3V0dWJlZWR1Y2F0aW9uLmNvbYIFeXQuYmUwaAYIKwYBBQUH
AQEEXDBaMCsGCCsGAQUFBzAChh9odHRwOi8vcGtpLmdvb2dsZS5jb20vR0lBRzIu
Y3J0MCsGCCsGAQUFBzABhh9odHRwOi8vY2xpZW50czEuZ29vZ2xlLmNvbS9vY3Nw
MB0GA1UdDgQWBBRokYWZlXwh7Lo8ynlod1KCH6D3mjAMBgNVHRMBAf8EAjAAMB8G
A1UdIwQYMBaAFErdBhYbvPZotXb1gba7Yhq6WoEvMCEGA1UdIAQaMBgwDAYKKwYB
BAHWeQIFATAIBgZngQwBAgIwMAYDVR0fBCkwJzAloCOgIYYfaHR0cDovL3BraS5n
b29nbGUuY29tL0dJQUcyLmNybDANBgkqhkiG9w0BAQsFAAOCAQEAC+ybpk7WgMLM
KqpLP0hd8hKkTCVS9GwKCleQV6EAAQUOpKr66vh+YRIIFu1IFVP9ZgVZgNzdj/FL
SdXLAxnGrR9rSrDAQdwCwWiUDdGL850M06y0wmGjo2VUuuj2+fvxpW6OW86SRnM3
aglWNTDLCeBGXIxtcQ1bj6qbIgJCCcB0Ae4oRzADsiXnOQkBtGCVHfRkZZvdY+yu
QDb0nHvJTZOkeFgXOaz+aaq8ea3lAiTzLW1ECTvmHZ8Nmyg3LrgbhVn+Naa3tzLv
nLJG+8aVmvAPbbzUFZbJXUOIM31uQRZdyqcG/C1mrS7bHeTJMvcsKMAEDr6YnxkD
G4hIyqACzg==
-----END CERTIFICATE-----
subject=C = US, ST = California, L = Mountain View, O = Google Inc, CN = *.google.com
issuer=C = US, O = Google Inc, CN = Google Internet Authority G2
No client certificate CA names sent
Peer signing digest: SHA256
Peer signature type: ECDSA
Server Temp Key: X25519, 253 bits
SSL handshake has read 4386 bytes and written 393 bytes
Verification error: unable to get local issuer certificate
New, TLSv1.2, Cipher is ECDHE-ECDSA-CHACHA20-POLY1305
Server public key is 256 bit
Secure Renegotiation IS supported
Compression: NONE
Expansion: NONE
No ALPN negotiated
SSL-Session:
Protocol : TLSv1.2
Cipher : ECDHE-ECDSA-CHACHA20-POLY1305
Session-ID: 42B58B9FCB13D7C6281368DF4CD27D2984B06B0BBCAF533FFCEDBFB85AD76E48
Session-ID-ctx:
Master-Key: 33C934168C5B7D853AAF2BA341F85D298F97A7F966E3F7DE04668072183A5B10854DF64FCB4CF87E78AD9169D6CDD951
PSK identity: None
PSK identity hint: None
SRP username: None
TLS session ticket lifetime hint: 100800 (seconds)
``` | {
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4533/reactions"
} | https://api.github.com/repos/psf/requests/issues/4533/timeline | null | completed | null | null | false | [
"```\r\nrequests==2.13.0\r\n```\r\n\r\n2.13.0 isn't officially supported any longer. Feel free to ask for help with this on [StackOverflow](https://stackoverflow.com>"
] |
https://api.github.com/repos/psf/requests/issues/4532 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4532/labels{/name} | https://api.github.com/repos/psf/requests/issues/4532/comments | https://api.github.com/repos/psf/requests/issues/4532/events | https://github.com/psf/requests/issues/4532 | 301,509,264 | MDU6SXNzdWUzMDE1MDkyNjQ= | 4,532 | ChunkedEncodingError: Connection broken: error 54 ECONNREST | {
"avatar_url": "https://avatars.githubusercontent.com/u/22584891?v=4",
"events_url": "https://api.github.com/users/yzlasu/events{/privacy}",
"followers_url": "https://api.github.com/users/yzlasu/followers",
"following_url": "https://api.github.com/users/yzlasu/following{/other_user}",
"gists_url": "https://api.github.com/users/yzlasu/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/yzlasu",
"id": 22584891,
"login": "yzlasu",
"node_id": "MDQ6VXNlcjIyNTg0ODkx",
"organizations_url": "https://api.github.com/users/yzlasu/orgs",
"received_events_url": "https://api.github.com/users/yzlasu/received_events",
"repos_url": "https://api.github.com/users/yzlasu/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/yzlasu/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/yzlasu/subscriptions",
"type": "User",
"url": "https://api.github.com/users/yzlasu",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 2 | 2018-03-01T18:23:25Z | 2021-09-08T03:00:37Z | 2018-03-01T20:17:13Z | NONE | resolved | Summary.
When using requests.request('Get', 'https://hazards.fema.gov/gis/nfhl/services/public/NFHLWMS/MapServer/WMSServer?REQUEST=GetCapabilities&service=WMS&version=1.1.0'), the described error was thrown out.
## Expected Result
The true value should be a XML document, which could be preview using the Chrome browser to open the link in the request.
## Actual Result
What happened instead. The described error was thrown.
## Reproduction Steps
```python
import requests
requests.request('Get', 'https://hazards.fema.gov/gis/nfhl/services/public/NFHLWMS/MapServer/WMSServer?REQUEST=GetCapabilities&service=WMS&version=1.1.0')
```
## System Information
$ python -m requests.help
```
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": "2.1.3"
},
"idna": {
"version": "2.6"
},
"implementation": {
"name": "CPython",
"version": "2.7.14"
},
"platform": {
"release": "15.6.0",
"system": "Darwin"
},
"pyOpenSSL": {
"openssl_version": "1010007f",
"version": "17.3.0"
},
"requests": {
"version": "2.18.4"
},
"system_ssl": {
"version": "100020ef"
},
"urllib3": {
"version": "1.22"
},
"using_pyopenssl": true
}
```
This command is only available on Requests v2.16.4 and greater. Otherwise,
please provide some basic information about your system (Python version,
operating system, &c). | {
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4532/reactions"
} | https://api.github.com/repos/psf/requests/issues/4532/timeline | null | completed | null | null | false | [
"Hi there! Thanks for opening this issue. Unfortunately, it seems this is a request for help instead of a report of a defect in the project. Please use [StackOverflow](https://stackoverflow.com) for general usage questions instead and only report defects here.\r\n\r\nFurther, `ECONNRESET` means that the server is r... |
https://api.github.com/repos/psf/requests/issues/4531 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4531/labels{/name} | https://api.github.com/repos/psf/requests/issues/4531/comments | https://api.github.com/repos/psf/requests/issues/4531/events | https://github.com/psf/requests/issues/4531 | 301,452,323 | MDU6SXNzdWUzMDE0NTIzMjM= | 4,531 | timeout does not apply to name resolution | {
"avatar_url": "https://avatars.githubusercontent.com/u/51059?v=4",
"events_url": "https://api.github.com/users/cancan101/events{/privacy}",
"followers_url": "https://api.github.com/users/cancan101/followers",
"following_url": "https://api.github.com/users/cancan101/following{/other_user}",
"gists_url": "https://api.github.com/users/cancan101/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/cancan101",
"id": 51059,
"login": "cancan101",
"node_id": "MDQ6VXNlcjUxMDU5",
"organizations_url": "https://api.github.com/users/cancan101/orgs",
"received_events_url": "https://api.github.com/users/cancan101/received_events",
"repos_url": "https://api.github.com/users/cancan101/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/cancan101/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/cancan101/subscriptions",
"type": "User",
"url": "https://api.github.com/users/cancan101",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 2 | 2018-03-01T15:42:21Z | 2021-09-08T03:00:38Z | 2018-03-01T18:03:59Z | NONE | resolved | `timeout` does not seem to be respected at all stages in the request. This goes above and beyond incremental data being received issues.
## Expected Result
Call returns after 0.1 s with an error.
## Actual Result
Call hangs for a long time and eventually returns with:
```
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/urllib3/connection.py", line 141, in _new_conn
(self.host, self.port), self.timeout, **extra_kw)
File "/usr/local/lib/python3.6/site-packages/urllib3/util/connection.py", line 60, in create_connection
for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
File "/usr/local/lib/python3.6/socket.py", line 745, in getaddrinfo
for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -3] Temporary failure in name resolution
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/urllib3/connectionpool.py", line 601, in urlopen
chunked=chunked)
File "/usr/local/lib/python3.6/site-packages/urllib3/connectionpool.py", line 357, in _make_request
conn.request(method, url, **httplib_request_kw)
File "/usr/local/lib/python3.6/http/client.py", line 1239, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/usr/local/lib/python3.6/http/client.py", line 1285, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "/usr/local/lib/python3.6/http/client.py", line 1234, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/usr/local/lib/python3.6/http/client.py", line 1026, in _send_output
self.send(msg)
File "/usr/local/lib/python3.6/http/client.py", line 964, in send
self.connect()
File "/usr/local/lib/python3.6/site-packages/urllib3/connection.py", line 166, in connect
conn = self._new_conn()
File "/usr/local/lib/python3.6/site-packages/urllib3/connection.py", line 150, in _new_conn
self, "Failed to establish a new connection: %s" % e)
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x7fcbf63ce0f0>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/requests/adapters.py", line 440, in send
timeout=timeout
File "/usr/local/lib/python3.6/site-packages/urllib3/connectionpool.py", line 639, in urlopen
_stacktrace=sys.exc_info()[2])
File "/usr/local/lib/python3.6/site-packages/urllib3/util/retry.py", line 388, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='google.com', port=80): Max retries exceeded with url: / (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7fcbf63ce0f0>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution',))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.6/site-packages/requests/api.py", line 72, in get
return request('get', url, params=params, **kwargs)
File "/usr/local/lib/python3.6/site-packages/requests/api.py", line 58, in request
return session.request(method=method, url=url, **kwargs)
File "/usr/local/lib/python3.6/site-packages/requests/sessions.py", line 508, in request
resp = self.send(prep, **send_kwargs)
File "/usr/local/lib/python3.6/site-packages/requests/sessions.py", line 618, in send
r = adapter.send(request, **kwargs)
File "/usr/local/lib/python3.6/site-packages/requests/adapters.py", line 508, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPConnectionPool(host='google.com', port=80): Max retries exceeded with url: / (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7fcbf63ce0f0>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution',))
```
## Reproduction Steps
In inside a Docker container with no internet:
```
docker network create --internal --subnet 10.1.1.0/24 no-internet
docker run -it --rm --net no-internet python-with-req
```
```python
import requests
requests.get('http://google.com', timeout=0.1)
```
## System Information
$ python -m requests.help
```
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "2.6"
},
"implementation": {
"name": "CPython",
"version": "3.6.4"
},
"platform": {
"release": "4.9.75-linuxkit-aufs",
"system": "Linux"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.18.4"
},
"system_ssl": {
"version": "1000114f"
},
"urllib3": {
"version": "1.22"
},
"using_pyopenssl": false
}
```
Looks like some others having related issues: https://github.com/requests/requests/issues/290#issuecomment-4795401 | {
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4531/reactions"
} | https://api.github.com/repos/psf/requests/issues/4531/timeline | null | completed | null | null | false | [
"Might be an upstream issue in urllib3: https://github.com/shazow/urllib3/issues/1334",
"This does belong in urllib3"
] |
https://api.github.com/repos/psf/requests/issues/4530 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4530/labels{/name} | https://api.github.com/repos/psf/requests/issues/4530/comments | https://api.github.com/repos/psf/requests/issues/4530/events | https://github.com/psf/requests/issues/4530 | 301,384,523 | MDU6SXNzdWUzMDEzODQ1MjM= | 4,530 | Trying to install requests | {
"avatar_url": "https://avatars.githubusercontent.com/u/36956950?v=4",
"events_url": "https://api.github.com/users/LucienRapilly/events{/privacy}",
"followers_url": "https://api.github.com/users/LucienRapilly/followers",
"following_url": "https://api.github.com/users/LucienRapilly/following{/other_user}",
"gists_url": "https://api.github.com/users/LucienRapilly/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/LucienRapilly",
"id": 36956950,
"login": "LucienRapilly",
"node_id": "MDQ6VXNlcjM2OTU2OTUw",
"organizations_url": "https://api.github.com/users/LucienRapilly/orgs",
"received_events_url": "https://api.github.com/users/LucienRapilly/received_events",
"repos_url": "https://api.github.com/users/LucienRapilly/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/LucienRapilly/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/LucienRapilly/subscriptions",
"type": "User",
"url": "https://api.github.com/users/LucienRapilly",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2018-03-01T12:20:26Z | 2021-09-08T03:00:38Z | 2018-03-01T18:17:31Z | NONE | resolved | I tried to install requests with
cd /tmp && curl -OL https://github.com/kennethreitz/requests/zipball/master && unzip master && cd requests* && sudo python setup.py install
and i got this :
curl: (35) error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version
I also tried :
curl "https://bootstrap.pypa.io/get-pip.py" -o "get-pip.py"
sudo python get-pip.py #install pip packet manager for python
sudo pip install request
and I got :
python: can't open file 'get-pip.py': [Errno 2] No such file or directory
Thanks for your help !
| {
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4530/reactions"
} | https://api.github.com/repos/psf/requests/issues/4530/timeline | null | completed | null | null | false | [
"Hi there! Thanks for opening this issue. Unfortunately, it seems this is a request for help instead of a report of a defect in the project. Please use [StackOverflow](https://stackoverflow.com) for general usage questions instead and only report defects here.\r\n\r\nTo note, all of the errors you're getting are co... |
https://api.github.com/repos/psf/requests/issues/4529 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4529/labels{/name} | https://api.github.com/repos/psf/requests/issues/4529/comments | https://api.github.com/repos/psf/requests/issues/4529/events | https://github.com/psf/requests/issues/4529 | 301,106,787 | MDU6SXNzdWUzMDExMDY3ODc= | 4,529 | getting an Attribute Error while testing api using python | {
"avatar_url": "https://avatars.githubusercontent.com/u/28529639?v=4",
"events_url": "https://api.github.com/users/makwanaparth94/events{/privacy}",
"followers_url": "https://api.github.com/users/makwanaparth94/followers",
"following_url": "https://api.github.com/users/makwanaparth94/following{/other_user}",
"gists_url": "https://api.github.com/users/makwanaparth94/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/makwanaparth94",
"id": 28529639,
"login": "makwanaparth94",
"node_id": "MDQ6VXNlcjI4NTI5NjM5",
"organizations_url": "https://api.github.com/users/makwanaparth94/orgs",
"received_events_url": "https://api.github.com/users/makwanaparth94/received_events",
"repos_url": "https://api.github.com/users/makwanaparth94/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/makwanaparth94/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/makwanaparth94/subscriptions",
"type": "User",
"url": "https://api.github.com/users/makwanaparth94",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2018-02-28T17:09:21Z | 2021-09-08T03:00:39Z | 2018-02-28T17:52:47Z | NONE | resolved | hey i am facing the same isuues but not able to get where i am facing attribute errors:
[self.token= 'ywlGaT0X44WGEps98WDN8xyFMmJgfGTehKxT5heiq_A7yqa_xwM9z6s2ouB1R7LprEYaTtXoILzx713kYhvoOxQrPLsRuvEAhnHfpc0sRonNXRYJgD91P8c2_mJJJ58MYs2TiMCEXlByG2ODRrb9e5OA35l74HXAegMabFJE7GnLX_4ZCxD2EygFP8LKqamdfao66QXAmXW60nwWYOF7g3bPdQNH3eK2siY9yODd_pFJ2IpLxBiadEFvAWZj5Y'
self.headers = {'content-type': 'application/json',
'Authorization': 'token {}'.format(self.token)}
](url)getting an error like +1
def test_api_get(self):
# A get request (json example):
response = requests.get(self.myurl, headers=self.header)
E AttributeError: 'CL_API' object has no attribute 'header'
Please give me some inputs on it
| {
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4529/reactions"
} | https://api.github.com/repos/psf/requests/issues/4529/timeline | null | completed | null | null | false | [
"Hi @makwanaparth94, this is an issue in your code and your use of `self`. Whatever class you’re calling this with does not have a headers attribute.\r\n\r\nFor future reference, this ticket tracker is reserved for reporting defects in Requests. Please direct any inquiries for help to [StackOverflow](https://stacko... |
https://api.github.com/repos/psf/requests/issues/4528 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4528/labels{/name} | https://api.github.com/repos/psf/requests/issues/4528/comments | https://api.github.com/repos/psf/requests/issues/4528/events | https://github.com/psf/requests/issues/4528 | 300,978,607 | MDU6SXNzdWUzMDA5Nzg2MDc= | 4,528 | I am unable to run tests on threedotoh branch. | {
"avatar_url": "https://avatars.githubusercontent.com/u/10801618?v=4",
"events_url": "https://api.github.com/users/RatanShreshtha/events{/privacy}",
"followers_url": "https://api.github.com/users/RatanShreshtha/followers",
"following_url": "https://api.github.com/users/RatanShreshtha/following{/other_user}",
"gists_url": "https://api.github.com/users/RatanShreshtha/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/RatanShreshtha",
"id": 10801618,
"login": "RatanShreshtha",
"node_id": "MDQ6VXNlcjEwODAxNjE4",
"organizations_url": "https://api.github.com/users/RatanShreshtha/orgs",
"received_events_url": "https://api.github.com/users/RatanShreshtha/received_events",
"repos_url": "https://api.github.com/users/RatanShreshtha/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/RatanShreshtha/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/RatanShreshtha/subscriptions",
"type": "User",
"url": "https://api.github.com/users/RatanShreshtha",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 6 | 2018-02-28T10:54:46Z | 2021-09-08T03:00:33Z | 2018-03-09T21:10:26Z | NONE | resolved | I am unable to run tests on threedotoh branch.
## Expected Result
Al tests should pass.
## Actual Result
```
Traceback (most recent call last):
File "/home/rkulshreshtha/.local/share/virtualenvs/requests-mRwENnZg/lib/python3.6/site-packages/_pytest/config.py", line 329, in _getconftestmodules
return self._path2confmods[path]
KeyError: local('/home/rkulshreshtha/Desktop/foss/requests/tests')
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/rkulshreshtha/.local/share/virtualenvs/requests-mRwENnZg/lib/python3.6/site-packages/_pytest/config.py", line 360, in _importconftest
return self._conftestpath2mod[conftestpath]
KeyError: local('/home/rkulshreshtha/Desktop/foss/requests/tests/conftest.py')
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/rkulshreshtha/.local/share/virtualenvs/requests-mRwENnZg/lib/python3.6/site-packages/_pytest/config.py", line 366, in _importconftest
mod = conftestpath.pyimport()
File "/home/rkulshreshtha/.local/share/virtualenvs/requests-mRwENnZg/lib/python3.6/site-packages/py/_path/local.py", line 668, in pyimport
__import__(modname)
File "/home/rkulshreshtha/.local/share/virtualenvs/requests-mRwENnZg/lib/python3.6/site-packages/_pytest/assertion/rewrite.py", line 213, in load_module
py.builtin.exec_(co, mod.__dict__)
File "/home/rkulshreshtha/Desktop/foss/requests/tests/conftest.py", line 4, in <module>
from requests.compat import urljoin
ImportError: cannot import name 'urljoin'
ERROR: could not load /home/rkulshreshtha/Desktop/foss/requests/tests/conftest.py
```
## Reproduction Steps
```bash
$ git checkout threedotoh
$ pipenv --three
$ pipenv shell
$ pipenv install --dev
$ py.test
```
## System Information
$ python -m requests.help
```
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "2.6"
},
"implementation": {
"name": "CPython",
"version": "3.6.4"
},
"platform": {
"release": "4.15.4-300.fc27.x86_64",
"system": "Linux"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "3.0.0"
},
"system_ssl": {
"version": "1010007f"
},
"urllib3": {
"version": "1.22"
},
"using_pyopenssl": false
}
```
This command is only available on Requests v2.16.4 and greater. Otherwise,
please provide some basic information about your system (Python version,
operating system, &c). | {
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4528/reactions"
} | https://api.github.com/repos/psf/requests/issues/4528/timeline | null | completed | null | null | false | [
"it is being worked on :)",
"Check out the 3.0 branch, tests are passing there. ",
"thanks, @kennethreitz so is 3.0 branch will be used for further development?\r\n\r\nAnd I would like to help in type annotation the library how I should proceed?",
"@RatanShreshtha send pull requests to that branch! ",
"✨🍰... |
https://api.github.com/repos/psf/requests/issues/4527 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4527/labels{/name} | https://api.github.com/repos/psf/requests/issues/4527/comments | https://api.github.com/repos/psf/requests/issues/4527/events | https://github.com/psf/requests/issues/4527 | 300,888,096 | MDU6SXNzdWUzMDA4ODgwOTY= | 4,527 | Question about requests and cacert.pem | {
"avatar_url": "https://avatars.githubusercontent.com/u/4270624?v=4",
"events_url": "https://api.github.com/users/prabcs/events{/privacy}",
"followers_url": "https://api.github.com/users/prabcs/followers",
"following_url": "https://api.github.com/users/prabcs/following{/other_user}",
"gists_url": "https://api.github.com/users/prabcs/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/prabcs",
"id": 4270624,
"login": "prabcs",
"node_id": "MDQ6VXNlcjQyNzA2MjQ=",
"organizations_url": "https://api.github.com/users/prabcs/orgs",
"received_events_url": "https://api.github.com/users/prabcs/received_events",
"repos_url": "https://api.github.com/users/prabcs/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/prabcs/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/prabcs/subscriptions",
"type": "User",
"url": "https://api.github.com/users/prabcs",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2018-02-28T04:32:34Z | 2021-09-08T03:00:39Z | 2018-02-28T13:28:05Z | NONE | resolved | Since version 2.12.3, there have been a bunch of awesome changes done to requests till v 2.18.4.
But, 1 thing that has changed considerably is that the `cacert.pem` that used to come packaged with 2.12.3 is not available now. Hence, the alternate option is to use [`certifi.where()`](https://pypi.python.org/pypi/certifi) to find the `cacert.pem`.
But, a lot of libraries were written based on 2.12.3 and not all of them have caught up to the changes made till 2.184, especially finding the right `cacert.pem` leading to this error -
```python
IOError: Could not find a suitable TLS CA certificate bundle, invalid path: /<path>/virtualenv/lib/python2.7/site-packages/requests/cacert.pem
```
One way to get around this problem is to fix those libraries. Few (but not all) examples -
1. https://github.com/simple-salesforce/simple-salesforce/
2. https://github.com/john-kurkowski/tldextract
This also means all those libraries should be fixed/upgraded to using the latest version of requests. https://github.com/simple-salesforce/simple-salesforce/pull/228 is an attempt in that direction. But, this may not be scalable.
But, is it somehow possible to make the libraries using the older versions of requests agnostic of the changes to requests. Something like backward compatibility. This will greatly help people using those libraries.
What does the contributor community think of this ? Maybe there could be better ways of solving backward compatibility ?
Thanks !
| {
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4527/reactions"
} | https://api.github.com/repos/psf/requests/issues/4527/timeline | null | completed | null | null | false | [
"`requests.certs.where()` has always existed. In more recent versions it's just `certifi.where` imported into that namespace."
] |
https://api.github.com/repos/psf/requests/issues/4526 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4526/labels{/name} | https://api.github.com/repos/psf/requests/issues/4526/comments | https://api.github.com/repos/psf/requests/issues/4526/events | https://github.com/psf/requests/issues/4526 | 300,732,323 | MDU6SXNzdWUzMDA3MzIzMjM= | 4,526 | Not recognized as Javascript browser | {
"avatar_url": "https://avatars.githubusercontent.com/u/30607?v=4",
"events_url": "https://api.github.com/users/aborruso/events{/privacy}",
"followers_url": "https://api.github.com/users/aborruso/followers",
"following_url": "https://api.github.com/users/aborruso/following{/other_user}",
"gists_url": "https://api.github.com/users/aborruso/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/aborruso",
"id": 30607,
"login": "aborruso",
"node_id": "MDQ6VXNlcjMwNjA3",
"organizations_url": "https://api.github.com/users/aborruso/orgs",
"received_events_url": "https://api.github.com/users/aborruso/received_events",
"repos_url": "https://api.github.com/users/aborruso/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/aborruso/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/aborruso/subscriptions",
"type": "User",
"url": "https://api.github.com/users/aborruso",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2018-02-27T17:56:08Z | 2021-09-08T03:00:40Z | 2018-02-27T18:04:39Z | NONE | resolved | Hi,
first of all thank for your product.
I have written this code to navigate a website.
```python
URLbase='http://albopretorio.comune.palermo.it/albopretorio'
from requests_html import BrowserHTMLSession
session = BrowserHTMLSession()
# open the first page
r = session.get('http://albopretorio.comune.palermo.it/albopretorio/jsp/home.jsp?modo=info&info=servizi.jsp&ARECOD=70&SERCOD=-1&sportello=albopretorio')
# open the second page
URL=URLbase+(link[0].attrs["href"])[2:]
r = session.get(URL)
# open the third page
URLMobilita=URLbase+(link[3].attrs["href"])[2:]
r = session.get(URLMobilita)
r.html.html
```
It works, but at the third opened URL, the website give me (in Italian) a warning related to javascript: "ATTENZIONE - Il browser in uso non supporta le applicazioni Javascript".
In english is something like "Warning- The browser in use does not support Javascript applications".
Is there a way to pass this kind of barrier?
Thank you | {
"avatar_url": "https://avatars.githubusercontent.com/u/30607?v=4",
"events_url": "https://api.github.com/users/aborruso/events{/privacy}",
"followers_url": "https://api.github.com/users/aborruso/followers",
"following_url": "https://api.github.com/users/aborruso/following{/other_user}",
"gists_url": "https://api.github.com/users/aborruso/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/aborruso",
"id": 30607,
"login": "aborruso",
"node_id": "MDQ6VXNlcjMwNjA3",
"organizations_url": "https://api.github.com/users/aborruso/orgs",
"received_events_url": "https://api.github.com/users/aborruso/received_events",
"repos_url": "https://api.github.com/users/aborruso/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/aborruso/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/aborruso/subscriptions",
"type": "User",
"url": "https://api.github.com/users/aborruso",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4526/reactions"
} | https://api.github.com/repos/psf/requests/issues/4526/timeline | null | completed | null | null | false | [
"I'm closing there are some errors of mine"
] |
https://api.github.com/repos/psf/requests/issues/4525 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4525/labels{/name} | https://api.github.com/repos/psf/requests/issues/4525/comments | https://api.github.com/repos/psf/requests/issues/4525/events | https://github.com/psf/requests/issues/4525 | 300,717,699 | MDU6SXNzdWUzMDA3MTc2OTk= | 4,525 | Support Brotli algorithm encoding | {
"avatar_url": "https://avatars.githubusercontent.com/u/13152860?v=4",
"events_url": "https://api.github.com/users/ThomasProctor/events{/privacy}",
"followers_url": "https://api.github.com/users/ThomasProctor/followers",
"following_url": "https://api.github.com/users/ThomasProctor/following{/other_user}",
"gists_url": "https://api.github.com/users/ThomasProctor/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/ThomasProctor",
"id": 13152860,
"login": "ThomasProctor",
"node_id": "MDQ6VXNlcjEzMTUyODYw",
"organizations_url": "https://api.github.com/users/ThomasProctor/orgs",
"received_events_url": "https://api.github.com/users/ThomasProctor/received_events",
"repos_url": "https://api.github.com/users/ThomasProctor/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/ThomasProctor/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ThomasProctor/subscriptions",
"type": "User",
"url": "https://api.github.com/users/ThomasProctor",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 17 | 2018-02-27T17:12:46Z | 2021-11-05T03:00:27Z | 2021-08-07T02:39:42Z | NONE | resolved | Right now, only gzip and deflate are supported. Brotli is pretty common, it ought to be too.
## Expected Result
Responses encoded with the Brotli Algorithm should be decoded
## Actual Result
Brotli responses need to be manually decoded
## Reproduction Steps
```python
import requests
headers = {'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
'Accept-Encoding': 'br',
'Accept-Language': 'en-US,en;q=0.5',
'Connection': 'keep-alive',
'DNT': '1',
'Upgrade-Insecure-Requests': '1',
'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64; rv:53.0) Gecko/20100101 Firefox/53.0'}
print(requests.get('https://www.google.com', headers=test_headers).text```
prints an encoded page.
## System Information
```
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": "2.0.3"
},
"idna": {
"version": "2.6"
},
"implementation": {
"name": "CPython",
"version": "3.4.3"
},
"platform": {
"release": "3.13.0-142-generic",
"system": "Linux"
},
"pyOpenSSL": {
"openssl_version": "1010006f",
"version": "17.2.0"
},
"requests": {
"version": "2.18.4"
},
"system_ssl": {
"version": "1000106f"
},
"urllib3": {
"version": "1.22"
},
"using_pyopenssl": true
}
``` | {
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
} | {
"+1": 3,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 3,
"url": "https://api.github.com/repos/psf/requests/issues/4525/reactions"
} | https://api.github.com/repos/psf/requests/issues/4525/timeline | null | completed | null | null | false | [
"This is dependent upon https://github.com/shazow/urllib3/pull/713 which has stalled. Until then, we cannot add it ourselves and the work must be tracked in urllib3.",
"similiar problem\r\n\r\n>>> import json\r\n>>> import brotli\r\n>>> pobj(r.headers)\r\n{\r\n 'Server': 'openresty',\r\n 'Date': 'Fri, 13 Apr 2018... |
https://api.github.com/repos/psf/requests/issues/4524 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4524/labels{/name} | https://api.github.com/repos/psf/requests/issues/4524/comments | https://api.github.com/repos/psf/requests/issues/4524/events | https://github.com/psf/requests/issues/4524 | 300,530,645 | MDU6SXNzdWUzMDA1MzA2NDU= | 4,524 | I would like to contribute. | {
"avatar_url": "https://avatars.githubusercontent.com/u/10801618?v=4",
"events_url": "https://api.github.com/users/RatanShreshtha/events{/privacy}",
"followers_url": "https://api.github.com/users/RatanShreshtha/followers",
"following_url": "https://api.github.com/users/RatanShreshtha/following{/other_user}",
"gists_url": "https://api.github.com/users/RatanShreshtha/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/RatanShreshtha",
"id": 10801618,
"login": "RatanShreshtha",
"node_id": "MDQ6VXNlcjEwODAxNjE4",
"organizations_url": "https://api.github.com/users/RatanShreshtha/orgs",
"received_events_url": "https://api.github.com/users/RatanShreshtha/received_events",
"repos_url": "https://api.github.com/users/RatanShreshtha/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/RatanShreshtha/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/RatanShreshtha/subscriptions",
"type": "User",
"url": "https://api.github.com/users/RatanShreshtha",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 4 | 2018-02-27T08:15:06Z | 2021-09-08T03:00:40Z | 2018-02-27T15:36:46Z | NONE | resolved | Hey I have requests and I really love that and I would like to contribute and I think one way by which I can contribute is by type annotating the code base if this is something that I should do please help in getting started. | {
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4524/reactions"
} | https://api.github.com/repos/psf/requests/issues/4524/timeline | null | completed | null | null | false | [
"Hi @RatanShreshtha, thanks so much for reaching out about contributing! We've reviewed interest in adding type annotations directly in the Requests codebase, and [decided against it in the past](https://github.com/requests/requests/issues/3855#issuecomment-277931774). I think that is probably still the case now, b... |
https://api.github.com/repos/psf/requests/issues/4523 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4523/labels{/name} | https://api.github.com/repos/psf/requests/issues/4523/comments | https://api.github.com/repos/psf/requests/issues/4523/events | https://github.com/psf/requests/issues/4523 | 300,469,499 | MDU6SXNzdWUzMDA0Njk0OTk= | 4,523 | why conversion `sys.modules` to list?? | {
"avatar_url": "https://avatars.githubusercontent.com/u/15053284?v=4",
"events_url": "https://api.github.com/users/wsqy/events{/privacy}",
"followers_url": "https://api.github.com/users/wsqy/followers",
"following_url": "https://api.github.com/users/wsqy/following{/other_user}",
"gists_url": "https://api.github.com/users/wsqy/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/wsqy",
"id": 15053284,
"login": "wsqy",
"node_id": "MDQ6VXNlcjE1MDUzMjg0",
"organizations_url": "https://api.github.com/users/wsqy/orgs",
"received_events_url": "https://api.github.com/users/wsqy/received_events",
"repos_url": "https://api.github.com/users/wsqy/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/wsqy/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/wsqy/subscriptions",
"type": "User",
"url": "https://api.github.com/users/wsqy",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 2 | 2018-02-27T02:19:57Z | 2021-09-08T03:00:41Z | 2018-02-27T06:35:53Z | NONE | resolved | why conversion `sys.modules` to list??
https://github.com/requests/requests/blob/master/requests/packages.py#L10
| {
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4523/reactions"
} | https://api.github.com/repos/psf/requests/issues/4523/timeline | null | completed | null | null | false | [
"Hey @wsqy, thanks for the question. I don't know if there is a specific reason `sys.modules` was cast as a list other than to ensure it's iterable. It's likely something that slipped through during code review.",
"If we didn't, we'd end up modifying the object we're iterating and Python 3 would blow up. That's n... |
https://api.github.com/repos/psf/requests/issues/4522 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4522/labels{/name} | https://api.github.com/repos/psf/requests/issues/4522/comments | https://api.github.com/repos/psf/requests/issues/4522/events | https://github.com/psf/requests/pull/4522 | 300,418,738 | MDExOlB1bGxSZXF1ZXN0MTcxNTA4Njgw | 4,522 | Add PURGE verb | {
"avatar_url": "https://avatars.githubusercontent.com/u/4165819?v=4",
"events_url": "https://api.github.com/users/val314159/events{/privacy}",
"followers_url": "https://api.github.com/users/val314159/followers",
"following_url": "https://api.github.com/users/val314159/following{/other_user}",
"gists_url": "https://api.github.com/users/val314159/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/val314159",
"id": 4165819,
"login": "val314159",
"node_id": "MDQ6VXNlcjQxNjU4MTk=",
"organizations_url": "https://api.github.com/users/val314159/orgs",
"received_events_url": "https://api.github.com/users/val314159/received_events",
"repos_url": "https://api.github.com/users/val314159/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/val314159/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/val314159/subscriptions",
"type": "User",
"url": "https://api.github.com/users/val314159",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 2 | 2018-02-26T22:21:04Z | 2021-09-03T00:11:09Z | 2018-02-27T06:29:14Z | NONE | resolved | Many packages have established PURGE as a defacto HTTP verb for flushing caches.
This implements the new verb. | {
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4522/reactions"
} | https://api.github.com/repos/psf/requests/issues/4522/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/4522.diff",
"html_url": "https://github.com/psf/requests/pull/4522",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/4522.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/4522"
} | true | [
"# [Codecov](https://codecov.io/gh/requests/requests/pull/4522?src=pr&el=h1) Report\n> Merging [#4522](https://codecov.io/gh/requests/requests/pull/4522?src=pr&el=desc) into [master](https://codecov.io/gh/requests/requests/commit/6e76aaea4595d7c2a953fea5d624344e8c11f93a?src=pr&el=desc) will **decrease** coverage by... |
https://api.github.com/repos/psf/requests/issues/4521 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4521/labels{/name} | https://api.github.com/repos/psf/requests/issues/4521/comments | https://api.github.com/repos/psf/requests/issues/4521/events | https://github.com/psf/requests/issues/4521 | 300,338,434 | MDU6SXNzdWUzMDAzMzg0MzQ= | 4,521 | cannot load requests at all | {
"avatar_url": "https://avatars.githubusercontent.com/u/29975766?v=4",
"events_url": "https://api.github.com/users/rzvn2600/events{/privacy}",
"followers_url": "https://api.github.com/users/rzvn2600/followers",
"following_url": "https://api.github.com/users/rzvn2600/following{/other_user}",
"gists_url": "https://api.github.com/users/rzvn2600/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/rzvn2600",
"id": 29975766,
"login": "rzvn2600",
"node_id": "MDQ6VXNlcjI5OTc1NzY2",
"organizations_url": "https://api.github.com/users/rzvn2600/orgs",
"received_events_url": "https://api.github.com/users/rzvn2600/received_events",
"repos_url": "https://api.github.com/users/rzvn2600/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/rzvn2600/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/rzvn2600/subscriptions",
"type": "User",
"url": "https://api.github.com/users/rzvn2600",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 3 | 2018-02-26T18:02:41Z | 2021-09-08T03:00:41Z | 2018-02-26T18:08:31Z | NONE | resolved | Summary.
not working
## Expected Result
able to lead requests and use it
## Actual Result
cannot use it due to the following error message:
Traceback (most recent call last):
File "/Users/testing/Python/string.py", line 4, in <module>
import requests
File "/Library/Python/2.7/site-packages/requests/__init__.py", line 43, in <module>
import urllib3
File "/Library/Python/2.7/site-packages/urllib3/__init__.py", line 8, in <module>
from .connectionpool import (
File "/Library/Python/2.7/site-packages/urllib3/connectionpool.py", line 11, in <module>
from .exceptions import (
File "/Library/Python/2.7/site-packages/urllib3/exceptions.py", line 2, in <module>
from .packages.six.moves.http_client import (
File "/Library/Python/2.7/site-packages/urllib3/packages/six.py", line 203, in load_module
mod = mod._resolve()
File "/Library/Python/2.7/site-packages/urllib3/packages/six.py", line 115, in _resolve
return _import_module(self.mod)
File "/Library/Python/2.7/site-packages/urllib3/packages/six.py", line 82, in _import_module
__import__(name)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 1241, in <module>
import ssl
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ssl.py", line 90, in <module>
import textwrap
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/textwrap.py", line 10, in <module>
import string, re
File "/Users/testing/Python/string.py", line 13, in <module>
urlFile = requests.get(url)
AttributeError: 'module' object has no attribute 'get'
[Finished in 0.1s with exit code 1]
[shell_cmd: python -u "/Users/testing/Python/string.py"]
[dir: /Users/testing/Python]
[path: /Users/testing/bin:/usr/local/homebrew/bin:/usr/local/bin:/opt/local/bin:/opt/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/Wireshark.app/Contents/MacOS:/Users/testing/bin]
## Reproduction Steps
installing with pip and pip3:
Requirement already satisfied: requests in /Library/Python/2.7/site-packages
Requirement already satisfied: idna<2.7,>=2.5 in /Library/Python/2.7/site-packages (from requests)
Requirement already satisfied: urllib3<1.23,>=1.21.1 in /Library/Python/2.7/site-packages (from requests)
Requirement already satisfied: certifi>=2017.4.17 in /Library/Python/2.7/site-packages (from requests)
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in /Library/Python/2.7/site-packages (from requests)
----
Requirement already satisfied: requests in /usr/local/homebrew/lib/python3.6/site-packages
Requirement already satisfied: idna<2.6,>=2.5 in /usr/local/homebrew/lib/python3.6/site-packages (from requests)
Requirement already satisfied: certifi>=2017.4.17 in /usr/local/homebrew/lib/python3.6/site-packages (from requests)
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in /usr/local/homebrew/lib/python3.6/site-packages (from requests)
Requirement already satisfied: urllib3<1.22,>=1.21.1 in /usr/local/homebrew/lib/python3.6/site-packages (from requests)
```python
#! /usr/bin/env python3
import json
import requests
class JSONObject:
def __init__(self, d):
self.__dict__ = d
# for testing, this url has the appropriate data formats
url="https://raw.githubusercontent.com/kovidgoyal/build-calibre/master/scripts/sources.json"
urlFile = requests.get(url)
print('URL Return Code: ', urlFile.status_code)
print('Content Type: ', urlFile.headers["content-type"])
#json_data = urlFile.json # NOT WORKING
#data = json.loads(urlFile.content.decode('utf-8')) #WORKS
data = requests.get(url).json() #WORKS
### Print "name" and "unix-->filename" from json data
#for key, value in json_data.iteritems():
# something???
# print("%s: %s", name, filename)
### later - store in python list and process
count = 3 # for testing just print first 3
for key, value in data.items():
print('key: {}, value: {}'.format(key, value))
count -= 1
if count == 0:
break
```
## System Information
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": "2.1.4"
},
"idna": {
"version": "2.6"
},
"implementation": {
"name": "CPython",
"version": "2.7.10"
},
"platform": {
"release": "16.7.0",
"system": "Darwin"
},
"pyOpenSSL": {
"openssl_version": "9081df",
"version": "0.13.1"
},
"requests": {
"version": "2.18.4"
},
"system_ssl": {
"version": "9081df"
},
"urllib3": {
"version": "1.22"
},
"using_pyopenssl": true
```
<paste here>
```
This command is only available on Requests v2.16.4 and greater. Otherwise,
please provide some basic information about your system (Python version,
operating system, &c). | {
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4521/reactions"
} | https://api.github.com/repos/psf/requests/issues/4521/timeline | null | completed | null | null | false | [
"Hi @rzvn2600, this is almost certainly a result of you having a file named `requests.py` somewhere in your project or path. Since this is a request for help and not a defect in Requests, we’d ask that any follow up on this be moved to [StackOverflow](https://stackoverflow.com). Thanks!",
"Correction this is your... |
https://api.github.com/repos/psf/requests/issues/4520 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4520/labels{/name} | https://api.github.com/repos/psf/requests/issues/4520/comments | https://api.github.com/repos/psf/requests/issues/4520/events | https://github.com/psf/requests/issues/4520 | 300,266,611 | MDU6SXNzdWUzMDAyNjY2MTE= | 4,520 | Multiple Set-Cookie headers folded into one value | {
"avatar_url": "https://avatars.githubusercontent.com/u/1361529?v=4",
"events_url": "https://api.github.com/users/DanHoerst/events{/privacy}",
"followers_url": "https://api.github.com/users/DanHoerst/followers",
"following_url": "https://api.github.com/users/DanHoerst/following{/other_user}",
"gists_url": "https://api.github.com/users/DanHoerst/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/DanHoerst",
"id": 1361529,
"login": "DanHoerst",
"node_id": "MDQ6VXNlcjEzNjE1Mjk=",
"organizations_url": "https://api.github.com/users/DanHoerst/orgs",
"received_events_url": "https://api.github.com/users/DanHoerst/received_events",
"repos_url": "https://api.github.com/users/DanHoerst/repos",
"site_admin": true,
"starred_url": "https://api.github.com/users/DanHoerst/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/DanHoerst/subscriptions",
"type": "User",
"url": "https://api.github.com/users/DanHoerst",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 4 | 2018-02-26T14:49:16Z | 2021-09-04T00:06:25Z | 2018-02-27T06:12:02Z | NONE | resolved | When Python Requests is used to contact a server which returns multiple `Set-Cookie` response headers, Python Requests combines them into one header field with the values separated by commas.
## Expected Result
Using Nginx as my origin server with the following config:
```
location / {
root /usr/share/nginx/html;
index index.html index.htm;
add_header Set-Cookie cookieone=test;
add_header Set-Cookie cookietwo=testing;
}
```
Contacting this origin server I expect to receive two separate `Set-Cookie` headers with their corresponding values. As per [RFC6265](https://tools.ietf.org/html/rfc6265#section-3):
> Origin servers SHOULD NOT fold multiple Set-Cookie header fields into
a single header field. The usual mechanism for folding HTTP headers
fields (i.e., as defined in [RFC2616]) might change the semantics of
the Set-Cookie header field because the %x2C (",") character is used
by Set-Cookie in a way that conflicts with such folding.
When using the browser my response from this origin has multiple `Set-Cookie` headers:

## Actual Result
Python Requests folds the multiple `Set-Cookie` headers into a single header field separated by comma(s). For example:
```
>>> import requests
>>> r = requests.get('http://localhost')
>>> r
<Response [200]>
>>> r.headers
{'Content-Length': '612', 'Set-Cookie': 'cookieone=test, cookietwo=testing', 'Accept-Ranges': 'bytes', 'Server': 'nginx/1.13.9', 'Last-Modified': 'Tue, 20 Feb 2018 12:21:20 GMT', 'Connection': 'keep-alive', 'ETag': '"5a8c12c0-264"', 'Date': 'Mon, 26 Feb 2018 14:21:59 GMT', 'Content-Type': 'text/html'}
>>> r.cookies
<RequestsCookieJar[Cookie(version=0, name='cookieone', value='test', port=None, port_specified=False, domain='localhost.local', domain_specified=False, domain_initial_dot=False, path='/', path_specified=False, secure=False, expires=None, discard=True, comment=None, comment_url=None, rest={}, rfc2109=False), Cookie(version=0, name='cookietwo', value='testing', port=None, port_specified=False, domain='localhost.local', domain_specified=False, domain_initial_dot=False, path='/', path_specified=False, secure=False, expires=None, discard=True, comment=None, comment_url=None, rest={}, rfc2109=False)]>
```
## Reproduction Steps
- Set up Nginx locally (using Docker `docker run -itd -p 80:80 nginx`)
- Use the Nginx location config above with multiple `Set-Cookie` headers
- Call the Nginx url from the browser and notice multiple `Set-Cookie` headers (screenshot above)
- Call the Nginx url from requests and notice a single, folded, `Set-Cookie` header (code above)
## System Information
```
➜ python -m requests.help
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "2.6"
},
"implementation": {
"name": "CPython",
"version": "2.7.10"
},
"platform": {
"release": "17.4.0",
"system": "Darwin"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.18.4"
},
"system_ssl": {
"version": "20000000"
},
"urllib3": {
"version": "1.22"
},
"using_pyopenssl": false
}
```
Jupyterhub is an example of where this is a problem in the wild: https://github.com/jupyterhub/jupyterhub/issues/1657 | {
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4520/reactions"
} | https://api.github.com/repos/psf/requests/issues/4520/timeline | null | completed | null | null | false | [
"Hi @DanHoerst, thanks for bringing this up. This is actually a duplicate of #3957 and yes it is a current issue with Requests header parsing implementation. As noted in the tracking issue, the cookies are still available separately in the cookie jar which is the preferred interface for this. I'm gonna close this a... |
https://api.github.com/repos/psf/requests/issues/4519 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4519/labels{/name} | https://api.github.com/repos/psf/requests/issues/4519/comments | https://api.github.com/repos/psf/requests/issues/4519/events | https://github.com/psf/requests/issues/4519 | 300,015,399 | MDU6SXNzdWUzMDAwMTUzOTk= | 4,519 | AttributeError: module 'requests' has no attribute 'SESSION' | {
"avatar_url": "https://avatars.githubusercontent.com/u/10656461?v=4",
"events_url": "https://api.github.com/users/hanachan1026/events{/privacy}",
"followers_url": "https://api.github.com/users/hanachan1026/followers",
"following_url": "https://api.github.com/users/hanachan1026/following{/other_user}",
"gists_url": "https://api.github.com/users/hanachan1026/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/hanachan1026",
"id": 10656461,
"login": "hanachan1026",
"node_id": "MDQ6VXNlcjEwNjU2NDYx",
"organizations_url": "https://api.github.com/users/hanachan1026/orgs",
"received_events_url": "https://api.github.com/users/hanachan1026/received_events",
"repos_url": "https://api.github.com/users/hanachan1026/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/hanachan1026/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/hanachan1026/subscriptions",
"type": "User",
"url": "https://api.github.com/users/hanachan1026",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 0 | 2018-02-25T10:35:38Z | 2021-09-08T03:00:41Z | 2018-02-25T11:46:31Z | NONE | resolved | I'm using MacOS
I installed requests using pip3
And I get
" AttributeError: module 'requests' has no attribute 'SESSION' "
% python3 --version
Python 3.5.3
## Reproduction Steps
```python
# login.py
import requests
session = requests.SESSION()
```
python3 login.py
## System Information
$ python -m requests.help
```
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": "2.1.4"
},
"idna": {
"version": "2.6"
},
"implementation": {
"name": "CPython",
"version": "3.5.3"
},
"platform": {
"release": "17.2.0",
"system": "Darwin"
},
"pyOpenSSL": {
"openssl_version": "1010007f",
"version": "17.5.0"
},
"requests": {
"version": "2.18.4"
},
"system_ssl": {
"version": "9081df"
},
"urllib3": {
"version": "1.22"
},
"using_pyopenssl": true
}
```
| {
"avatar_url": "https://avatars.githubusercontent.com/u/10656461?v=4",
"events_url": "https://api.github.com/users/hanachan1026/events{/privacy}",
"followers_url": "https://api.github.com/users/hanachan1026/followers",
"following_url": "https://api.github.com/users/hanachan1026/following{/other_user}",
"gists_url": "https://api.github.com/users/hanachan1026/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/hanachan1026",
"id": 10656461,
"login": "hanachan1026",
"node_id": "MDQ6VXNlcjEwNjU2NDYx",
"organizations_url": "https://api.github.com/users/hanachan1026/orgs",
"received_events_url": "https://api.github.com/users/hanachan1026/received_events",
"repos_url": "https://api.github.com/users/hanachan1026/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/hanachan1026/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/hanachan1026/subscriptions",
"type": "User",
"url": "https://api.github.com/users/hanachan1026",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4519/reactions"
} | https://api.github.com/repos/psf/requests/issues/4519/timeline | null | completed | null | null | false | [] |
https://api.github.com/repos/psf/requests/issues/4518 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4518/labels{/name} | https://api.github.com/repos/psf/requests/issues/4518/comments | https://api.github.com/repos/psf/requests/issues/4518/events | https://github.com/psf/requests/issues/4518 | 299,985,472 | MDU6SXNzdWUyOTk5ODU0NzI= | 4,518 | Update MANIFEST.in | {
"avatar_url": "https://avatars.githubusercontent.com/u/6080782?v=4",
"events_url": "https://api.github.com/users/Annouar/events{/privacy}",
"followers_url": "https://api.github.com/users/Annouar/followers",
"following_url": "https://api.github.com/users/Annouar/following{/other_user}",
"gists_url": "https://api.github.com/users/Annouar/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Annouar",
"id": 6080782,
"login": "Annouar",
"node_id": "MDQ6VXNlcjYwODA3ODI=",
"organizations_url": "https://api.github.com/users/Annouar/orgs",
"received_events_url": "https://api.github.com/users/Annouar/received_events",
"repos_url": "https://api.github.com/users/Annouar/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Annouar/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Annouar/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Annouar",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 0 | 2018-02-25T00:32:01Z | 2021-09-08T03:00:36Z | 2018-03-08T17:59:45Z | NONE | resolved | Hey !
As requests no longer uses 'requierements.txt' file to manage dependancies, I think we need to update MANIFEST.in to add 'Pipfile' and 'Pipfile.lock' instead of 'requirements.txt'.
Moreover, I've also noticed the 'NOTICE' file no longer exists too.
## Expected Result
MANIFEST.in :
> include README.rst LICENSE HISTORY.rst pytest.ini Pipfile Pipfile.lock
> recursive-include tests *.py
## Actual Result
MANIFEST.in :
> include README.rst LICENSE NOTICE HISTORY.rst pytest.ini requirements.txt
> recursive-include tests *.py | {
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4518/reactions"
} | https://api.github.com/repos/psf/requests/issues/4518/timeline | null | completed | null | null | false | [] |
https://api.github.com/repos/psf/requests/issues/4517 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4517/labels{/name} | https://api.github.com/repos/psf/requests/issues/4517/comments | https://api.github.com/repos/psf/requests/issues/4517/events | https://github.com/psf/requests/issues/4517 | 298,535,956 | MDU6SXNzdWUyOTg1MzU5NTY= | 4,517 | python3 requests “freezes” but urllib.request.urlopen does not? | {
"avatar_url": "https://avatars.githubusercontent.com/u/24755597?v=4",
"events_url": "https://api.github.com/users/OlafEichstaedt/events{/privacy}",
"followers_url": "https://api.github.com/users/OlafEichstaedt/followers",
"following_url": "https://api.github.com/users/OlafEichstaedt/following{/other_user}",
"gists_url": "https://api.github.com/users/OlafEichstaedt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/OlafEichstaedt",
"id": 24755597,
"login": "OlafEichstaedt",
"node_id": "MDQ6VXNlcjI0NzU1NTk3",
"organizations_url": "https://api.github.com/users/OlafEichstaedt/orgs",
"received_events_url": "https://api.github.com/users/OlafEichstaedt/received_events",
"repos_url": "https://api.github.com/users/OlafEichstaedt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/OlafEichstaedt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/OlafEichstaedt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/OlafEichstaedt",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 2 | 2018-02-20T10:10:09Z | 2021-09-08T04:00:37Z | 2018-02-21T11:34:37Z | NONE | resolved | For a certain website, results.get will not return a result but urllib.request.urlopen will. There is no error message (unless a timeout limit is set for the call), the control is simply not returned to the calling frame.
Is this a bug or some hidden feature I have failed to grasp yet?
Does it happen only for me or can other users reproduce the same result with the mentioned url?
Do you have any suggestions how to debug/investigate this further to make the report more useful?
## Expected Result
I expected to get the same result/behavior both on the Windows and the Linux machine,.
## Actual Result
(1) for a certain website, requests.get will return a result on Windows, but it "freezes" on Linux. When I say "freezes" it means that control is not returned to the calling frame.
(2) urllib.request.urlopen works for the website on both Windows and Linux
## Reproduction Steps
```
import requests
import time
time1 = time.time()
response=requests.get('https://www.tagheuer.com/en/watches/tag-heuer-carrera-calibre-5-automatic-watch-39-mm-war211a-ba0782')
time2 = time.time()
print(response.status_code)
print(time2-time1)
```
On the Windows system, the requests takes about 0.68s, on the Linux machine it takes forever.
On the Linux system, the following works:
```
from urllib.request import urlopen
import time
url='https://www.tagheuer.com/en/watches/tag-heuer-carrera-calibre-5-automatic-watch-39-mm-war211a-ba0782'
time1 = time.time()
f = urlopen(url)
myfile = f.read()
time2 = time.time()
print(f.status)
print(time2-time1)
```
and returns status 200 after about 0.23 seconds.
## System Information from "python -m requests.help"
**Linux System**
```
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "2.6"
},
"implementation": {
"name": "CPython",
"version": "3.5.2"
},
"platform": {
"release": "4.4.0-112-generic",
"system": "Linux"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.18.4"
},
"system_ssl": {
"version": "1000207f"
},
"urllib3": {
"version": "1.22"
},
"using_pyopenssl": false
}
```
**Windows System**
```
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": "2.0.3"
},
"idna": {
"version": "2.6"
},
"implementation": {
"name": "CPython",
"version": "3.6.3"
},
"platform": {
"release": "10",
"system": "Windows"
},
"pyOpenSSL": {
"openssl_version": "100020cf",
"version": "17.2.0"
},
"requests": {
"version": "2.18.4"
},
"system_ssl": {
"version": "100020bf"
},
"urllib3": {
"version": "1.22"
},
"using_pyopenssl": true
}
``` | {
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4517/reactions"
} | https://api.github.com/repos/psf/requests/issues/4517/timeline | null | completed | null | null | false | [
"Hi @OlafEichstaedt:\r\n\r\nYour issue did not happen on Mac OS(unix), below is my testing result:\r\n##\r\n>>> import requests\r\n>>> import time\r\n>>> \r\n>>> time1 = time.time()\r\n>>> response=requests.get('https://www.tagheuer.com/en/watches/tag-heuer-carrera-calibre-5-automatic-watch-39-mm-war211a-ba0782')\r... |
https://api.github.com/repos/psf/requests/issues/4516 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4516/labels{/name} | https://api.github.com/repos/psf/requests/issues/4516/comments | https://api.github.com/repos/psf/requests/issues/4516/events | https://github.com/psf/requests/issues/4516 | 297,602,795 | MDU6SXNzdWUyOTc2MDI3OTU= | 4,516 | version 2.18.4 server certificate verify fails with CA cert folder | {
"avatar_url": "https://avatars.githubusercontent.com/u/714800?v=4",
"events_url": "https://api.github.com/users/ww9rivers/events{/privacy}",
"followers_url": "https://api.github.com/users/ww9rivers/followers",
"following_url": "https://api.github.com/users/ww9rivers/following{/other_user}",
"gists_url": "https://api.github.com/users/ww9rivers/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/ww9rivers",
"id": 714800,
"login": "ww9rivers",
"node_id": "MDQ6VXNlcjcxNDgwMA==",
"organizations_url": "https://api.github.com/users/ww9rivers/orgs",
"received_events_url": "https://api.github.com/users/ww9rivers/received_events",
"repos_url": "https://api.github.com/users/ww9rivers/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/ww9rivers/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ww9rivers/subscriptions",
"type": "User",
"url": "https://api.github.com/users/ww9rivers",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 4 | 2018-02-15T21:29:08Z | 2021-09-05T00:06:53Z | 2018-02-17T12:59:43Z | NONE | resolved | I created a Python 3.5.2 virtual environment, installed requests with pip3, followed the documentation to set up an "ssl" folder with all the signing certificates for https://www.umich.edu/.
Then I run a simple test script (see Reproduction Steps below) in python interactive mode.
## Expected Result
A normal response with status 200 is expected -- which is what I get outside the virtual environment, where in Ubuntu 16.04, the `python-requests` package pulls in version 2.9.1.
When I remove the `python-requests` package (2.9.1) and used pip3 to install version 2.18.4, I get the same cert verification failure.
I am able to work around the issue by concatenating the CA certs I need onto the end of `.../lib/python3.5/site-packages/certifi/cacert.pem` file installed in the virtual environment.
## Actual Result
A stack dump with CERTIFICATE_VERIFY_FAILED error:
```
>>> requests.get('https://www.umich.edu', verify='./ssl')
Traceback (most recent call last):
File "/home/weiwang/oss/venv/netopy/lib/python3.5/site-packages/urllib3/connectionpool.py", line 601, in urlopen
chunked=chunked)
File "/home/weiwang/oss/venv/netopy/lib/python3.5/site-packages/urllib3/connectionpool.py", line 346, in _make_request
self._validate_conn(conn)
File "/home/weiwang/oss/venv/netopy/lib/python3.5/site-packages/urllib3/connectionpool.py", line 850, in _validate_conn
conn.connect()
File "/home/weiwang/oss/venv/netopy/lib/python3.5/site-packages/urllib3/connection.py", line 326, in connect
ssl_context=context)
File "/home/weiwang/oss/venv/netopy/lib/python3.5/site-packages/urllib3/util/ssl_.py", line 329, in ssl_wrap_socket
return context.wrap_socket(sock, server_hostname=server_hostname)
File "/usr/lib/python3.5/ssl.py", line 377, in wrap_socket
_context=self)
File "/usr/lib/python3.5/ssl.py", line 752, in __init__
self.do_handshake()
File "/usr/lib/python3.5/ssl.py", line 988, in do_handshake
self._sslobj.do_handshake()
File "/usr/lib/python3.5/ssl.py", line 633, in do_handshake
self._sslobj.do_handshake()
ssl.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:645)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/weiwang/oss/venv/netopy/lib/python3.5/site-packages/requests/adapters.py", line 440, in send
timeout=timeout
File "/home/weiwang/oss/venv/netopy/lib/python3.5/site-packages/urllib3/connectionpool.py", line 639, in urlopen
_stacktrace=sys.exc_info()[2])
File "/home/weiwang/oss/venv/netopy/lib/python3.5/site-packages/urllib3/util/retry.py", line 388, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='www.umich.edu', port=443): Max retries exceeded with url: / (Caused by SSLError(SSLError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:645)'),))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/weiwang/oss/venv/netopy/lib/python3.5/site-packages/requests/api.py", line 72, in get
return request('get', url, params=params, **kwargs)
File "/home/weiwang/oss/venv/netopy/lib/python3.5/site-packages/requests/api.py", line 58, in request
return session.request(method=method, url=url, **kwargs)
File "/home/weiwang/oss/venv/netopy/lib/python3.5/site-packages/requests/sessions.py", line 508, in request
resp = self.send(prep, **send_kwargs)
File "/home/weiwang/oss/venv/netopy/lib/python3.5/site-packages/requests/sessions.py", line 618, in send
r = adapter.send(request, **kwargs)
File "/home/weiwang/oss/venv/netopy/lib/python3.5/site-packages/requests/adapters.py", line 506, in send
raise SSLError(e, request=request)
requests.exceptions.SSLError: HTTPSConnectionPool(host='www.umich.edu', port=443): Max retries exceeded with url: / (Caused by SSLError(SSLError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:645)'),))
```
## Reproduction Steps
```python
import requests
requests.get('https://www.umich.edu', verify='./ssl')
```
## System Information
$ python -m requests.help
```
$ python -m requests.help
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "2.6"
},
"implementation": {
"name": "CPython",
"version": "3.5.2"
},
"platform": {
"release": "4.4.0-36-generic",
"system": "Linux"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.18.4"
},
"system_ssl": {
"version": "1000207f"
},
"urllib3": {
"version": "1.22"
},
"using_pyopenssl": false
}
```
This command is only available on Requests v2.16.4 and greater. Otherwise,
please provide some basic information about your system (Python version,
operating system, &c). | {
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4516/reactions"
} | https://api.github.com/repos/psf/requests/issues/4516/timeline | null | completed | null | null | false | [
"Hi there! Thanks for opening this issue. Unfortunately, it seems this is a request for help instead of a report of a defect in the project. Please use [StackOverflow](https://stackoverflow.com) for general usage questions instead and only report defects here. Let me give you a few hints though\r\n\r\n> I created a... |
https://api.github.com/repos/psf/requests/issues/4515 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4515/labels{/name} | https://api.github.com/repos/psf/requests/issues/4515/comments | https://api.github.com/repos/psf/requests/issues/4515/events | https://github.com/psf/requests/issues/4515 | 297,401,234 | MDU6SXNzdWUyOTc0MDEyMzQ= | 4,515 | POST changed to GET when request got HTTP/3xx | {
"avatar_url": "https://avatars.githubusercontent.com/u/238977?v=4",
"events_url": "https://api.github.com/users/airween/events{/privacy}",
"followers_url": "https://api.github.com/users/airween/followers",
"following_url": "https://api.github.com/users/airween/following{/other_user}",
"gists_url": "https://api.github.com/users/airween/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/airween",
"id": 238977,
"login": "airween",
"node_id": "MDQ6VXNlcjIzODk3Nw==",
"organizations_url": "https://api.github.com/users/airween/orgs",
"received_events_url": "https://api.github.com/users/airween/received_events",
"repos_url": "https://api.github.com/users/airween/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/airween/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/airween/subscriptions",
"type": "User",
"url": "https://api.github.com/users/airween",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 4 | 2018-02-15T10:48:27Z | 2021-09-08T03:00:34Z | 2018-02-15T14:09:30Z | NONE | resolved | A POST request changed to GET request when the Request object got 3xx answer from server.
I don't know the RFC exactly, but the expected result would be that request repeat as POST at new URL.
Here is the code:
```
r = requests.post("http://foobar.com/script", data={'foo': 'bar'})
```
The server answer:
```
HTTP/1.1 302 Found
Date: Thu, 15 Feb 2018 10:42:16 GMT
Server: Apache/2.4.25 (Debian)
Location: https://foobar.com/script
Content-Length: 222
Content-Type: text/html; charset=iso-8859-1
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
```
Then Request repeats the request as GET.
Debian Linux 9.3
Python3 (3.5.3)
Apache2.4 (the server where Request sends the request)
```
>>> requests.__version__
'2.12.4'
```
I've changed the url to https schema, then it works. | {
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4515/reactions"
} | https://api.github.com/repos/psf/requests/issues/4515/timeline | null | completed | null | null | false | [
"In the future, please search **closed and** open issues before creating new ones that are duplicates. \r\n\r\nDuplicate of #4251 \r\nDuplicate of #4236 \r\nDuplicate of #3915 \r\n\r\nThis behaviour protects you against Requests sending sensitive data to the wrong server, see also\r\n\r\n- [CVE 2014-1829](http://ww... |
https://api.github.com/repos/psf/requests/issues/4514 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4514/labels{/name} | https://api.github.com/repos/psf/requests/issues/4514/comments | https://api.github.com/repos/psf/requests/issues/4514/events | https://github.com/psf/requests/issues/4514 | 297,285,393 | MDU6SXNzdWUyOTcyODUzOTM= | 4,514 | Hooks aren't called each time with retrying | {
"avatar_url": "https://avatars.githubusercontent.com/u/7013593?v=4",
"events_url": "https://api.github.com/users/Brett55/events{/privacy}",
"followers_url": "https://api.github.com/users/Brett55/followers",
"following_url": "https://api.github.com/users/Brett55/following{/other_user}",
"gists_url": "https://api.github.com/users/Brett55/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Brett55",
"id": 7013593,
"login": "Brett55",
"node_id": "MDQ6VXNlcjcwMTM1OTM=",
"organizations_url": "https://api.github.com/users/Brett55/orgs",
"received_events_url": "https://api.github.com/users/Brett55/received_events",
"repos_url": "https://api.github.com/users/Brett55/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Brett55/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Brett55/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Brett55",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 2 | 2018-02-14T23:42:59Z | 2021-09-08T04:00:38Z | 2018-02-16T17:12:25Z | NONE | resolved | Summary.
Hooks aren't called on each retry, only at the end of retrying
requests==2.18.4
requests-oauthlib==0.8.0
Is this intended functionality, how do I get a hook called on each retry? Here is my code
```
retries = Retry(total=2,
backoff_factor=0.1,
status_forcelist=[404],
raise_on_status=False
)
self.gbdx_connection.mount(self.root_url, HTTPAdapter(max_retries=retries))
self.gbdx_connection.hooks['response'].append(refresh_token)
```
| {
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4514/reactions"
} | https://api.github.com/repos/psf/requests/issues/4514/timeline | null | completed | null | null | false | [
"Using the `Retry` object means you're interacting with `urllib3`. Hooks are handled only in Requests. There's no plan to make hooks fire on retries inside of urllib3 when urllib3 doesn't have the concept of hooks.",
"@sigmavirus24 doh that makes sense"
] |
https://api.github.com/repos/psf/requests/issues/4513 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4513/labels{/name} | https://api.github.com/repos/psf/requests/issues/4513/comments | https://api.github.com/repos/psf/requests/issues/4513/events | https://github.com/psf/requests/pull/4513 | 297,166,469 | MDExOlB1bGxSZXF1ZXN0MTY5MTYyNjUz | 4,513 | Copy cookie policy when copying a CookieJar | {
"avatar_url": "https://avatars.githubusercontent.com/u/65053?v=4",
"events_url": "https://api.github.com/users/laurentb/events{/privacy}",
"followers_url": "https://api.github.com/users/laurentb/followers",
"following_url": "https://api.github.com/users/laurentb/following{/other_user}",
"gists_url": "https://api.github.com/users/laurentb/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/laurentb",
"id": 65053,
"login": "laurentb",
"node_id": "MDQ6VXNlcjY1MDUz",
"organizations_url": "https://api.github.com/users/laurentb/orgs",
"received_events_url": "https://api.github.com/users/laurentb/received_events",
"repos_url": "https://api.github.com/users/laurentb/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/laurentb/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/laurentb/subscriptions",
"type": "User",
"url": "https://api.github.com/users/laurentb",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 6 | 2018-02-14T16:45:26Z | 2021-09-02T00:07:47Z | 2018-06-12T05:13:08Z | CONTRIBUTOR | resolved | {
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4513/reactions"
} | https://api.github.com/repos/psf/requests/issues/4513/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/4513.diff",
"html_url": "https://github.com/psf/requests/pull/4513",
"merged_at": "2018-06-12T05:13:08Z",
"patch_url": "https://github.com/psf/requests/pull/4513.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/4513"
} | true | [
"# [Codecov](https://codecov.io/gh/requests/requests/pull/4513?src=pr&el=h1) Report\n> Merging [#4513](https://codecov.io/gh/requests/requests/pull/4513?src=pr&el=desc) into [master](https://codecov.io/gh/requests/requests/commit/fe8290b3d0ca21dd8ae5471a59a8bf13d3dcb31e?src=pr&el=desc) will **increase** coverage by... | |
https://api.github.com/repos/psf/requests/issues/4512 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4512/labels{/name} | https://api.github.com/repos/psf/requests/issues/4512/comments | https://api.github.com/repos/psf/requests/issues/4512/events | https://github.com/psf/requests/issues/4512 | 296,562,658 | MDU6SXNzdWUyOTY1NjI2NTg= | 4,512 | requests.exceptions.ConnectionError: HTTPConnectionPool | {
"avatar_url": "https://avatars.githubusercontent.com/u/1758365?v=4",
"events_url": "https://api.github.com/users/mehtajaghvi/events{/privacy}",
"followers_url": "https://api.github.com/users/mehtajaghvi/followers",
"following_url": "https://api.github.com/users/mehtajaghvi/following{/other_user}",
"gists_url": "https://api.github.com/users/mehtajaghvi/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/mehtajaghvi",
"id": 1758365,
"login": "mehtajaghvi",
"node_id": "MDQ6VXNlcjE3NTgzNjU=",
"organizations_url": "https://api.github.com/users/mehtajaghvi/orgs",
"received_events_url": "https://api.github.com/users/mehtajaghvi/received_events",
"repos_url": "https://api.github.com/users/mehtajaghvi/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/mehtajaghvi/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/mehtajaghvi/subscriptions",
"type": "User",
"url": "https://api.github.com/users/mehtajaghvi",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2018-02-12T23:32:56Z | 2021-09-08T04:00:38Z | 2018-02-14T12:54:40Z | NONE | resolved | Summary.
## Expected Result
I am expecting the connection to be established with port 4000
What you expected.
## Actual Result
What happened instead.
File "/home/bl3-rqir-150-fi/inspection/url.py", line 20, in trigger_camera
trigger_data = requests.get(self.url)
File "/usr/local/lib/python2.7/dist-packages/requests/api.py", line 72, in get
return request('get', url, params=params, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/requests/api.py", line 58, in request
return session.request(method=method, url=url, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 508, in request
resp = self.send(prep, **send_kwargs)
File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 618, in send
r = adapter.send(request, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/requests/adapters.py", line 508, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPConnectionPool(host='localhost', port=4000): Max retries exceeded with url: /trigger_something/ (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7fa0100dea90>: Failed to establish a new connection: [Errno 111] Connection refused',))
## Reproduction Steps
It is not happening all the times, I am doing a httpPost to localport:4000. Multiple posts are done to this port but they are not simultaneous.
```python
import requests
```
## System Information
$ python -m requests.help
```
<paste here>
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "2.6"
},
"implementation": {
"name": "CPython",
"version": "2.7.12"
},
"platform": {
"release": "4.13.0-32-generic",
"system": "Linux"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.18.4"
},
"system_ssl": {
"version": "1000207f"
},
"urllib3": {
"version": "1.22"
},
"using_pyopenssl": false
}
```
This command is only available on Requests v2.16.4 and greater. Otherwise,
please provide some basic information about your system (Python version,
operating system, &c). | {
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4512/reactions"
} | https://api.github.com/repos/psf/requests/issues/4512/timeline | null | completed | null | null | false | [
"Without knowing what your actually doing, there's nothing we can do to help.\r\n\r\nFor example, if you're using a single-threaded server locally that can only handle one connection at a time and sending multiple requests to it simultaneously, of course you'll see this.\r\n\r\nSince this seems to not actually be a... |
https://api.github.com/repos/psf/requests/issues/4511 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4511/labels{/name} | https://api.github.com/repos/psf/requests/issues/4511/comments | https://api.github.com/repos/psf/requests/issues/4511/events | https://github.com/psf/requests/issues/4511 | 296,377,323 | MDU6SXNzdWUyOTYzNzczMjM= | 4,511 | Setting Allow Redirects on Session Class | {
"avatar_url": "https://avatars.githubusercontent.com/u/5131271?v=4",
"events_url": "https://api.github.com/users/achapkowski/events{/privacy}",
"followers_url": "https://api.github.com/users/achapkowski/followers",
"following_url": "https://api.github.com/users/achapkowski/following{/other_user}",
"gists_url": "https://api.github.com/users/achapkowski/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/achapkowski",
"id": 5131271,
"login": "achapkowski",
"node_id": "MDQ6VXNlcjUxMzEyNzE=",
"organizations_url": "https://api.github.com/users/achapkowski/orgs",
"received_events_url": "https://api.github.com/users/achapkowski/received_events",
"repos_url": "https://api.github.com/users/achapkowski/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/achapkowski/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/achapkowski/subscriptions",
"type": "User",
"url": "https://api.github.com/users/achapkowski",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2018-02-12T13:38:10Z | 2021-09-08T04:00:39Z | 2018-02-12T15:50:36Z | NONE | resolved | Question:
On the session class, how do I set allow_redirects to be true?
Thank you | {
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4511/reactions"
} | https://api.github.com/repos/psf/requests/issues/4511/timeline | null | completed | null | null | false | [
"Hi there! Thanks for opening this issue. Unfortunately, it seems this is a request for help instead of a report of a defect in the project. Please use [StackOverflow](https://stackoverflow.com) for general usage questions instead and only report defects here."
] |
https://api.github.com/repos/psf/requests/issues/4510 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4510/labels{/name} | https://api.github.com/repos/psf/requests/issues/4510/comments | https://api.github.com/repos/psf/requests/issues/4510/events | https://github.com/psf/requests/pull/4510 | 295,852,058 | MDExOlB1bGxSZXF1ZXN0MTY4MjI1Mjc3 | 4,510 | Fix for iOS | {
"avatar_url": "https://avatars.githubusercontent.com/u/13103826?v=4",
"events_url": "https://api.github.com/users/mucke5/events{/privacy}",
"followers_url": "https://api.github.com/users/mucke5/followers",
"following_url": "https://api.github.com/users/mucke5/following{/other_user}",
"gists_url": "https://api.github.com/users/mucke5/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/mucke5",
"id": 13103826,
"login": "mucke5",
"node_id": "MDQ6VXNlcjEzMTAzODI2",
"organizations_url": "https://api.github.com/users/mucke5/orgs",
"received_events_url": "https://api.github.com/users/mucke5/received_events",
"repos_url": "https://api.github.com/users/mucke5/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/mucke5/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/mucke5/subscriptions",
"type": "User",
"url": "https://api.github.com/users/mucke5",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2018-02-09T12:16:37Z | 2021-09-03T00:11:10Z | 2018-02-12T15:50:18Z | NONE | resolved | In addition to #4434 I found a possible solution not only for Kodi. Could you try such idea jsergio123/script.module.resolveurl@2e3f773 to solve the iOS issue 'No child processes' ? | {
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4510/reactions"
} | https://api.github.com/repos/psf/requests/issues/4510/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/4510.diff",
"html_url": "https://github.com/psf/requests/pull/4510",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/4510.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/4510"
} | true | [
"@mucke5 did you mean to open a pull request here?"
] |
https://api.github.com/repos/psf/requests/issues/4509 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4509/labels{/name} | https://api.github.com/repos/psf/requests/issues/4509/comments | https://api.github.com/repos/psf/requests/issues/4509/events | https://github.com/psf/requests/issues/4509 | 295,523,864 | MDU6SXNzdWUyOTU1MjM4NjQ= | 4,509 | Involving retry machinery causes `requests` to hide original cause of problem | {
"avatar_url": "https://avatars.githubusercontent.com/u/3613180?v=4",
"events_url": "https://api.github.com/users/tribals/events{/privacy}",
"followers_url": "https://api.github.com/users/tribals/followers",
"following_url": "https://api.github.com/users/tribals/following{/other_user}",
"gists_url": "https://api.github.com/users/tribals/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/tribals",
"id": 3613180,
"login": "tribals",
"node_id": "MDQ6VXNlcjM2MTMxODA=",
"organizations_url": "https://api.github.com/users/tribals/orgs",
"received_events_url": "https://api.github.com/users/tribals/received_events",
"repos_url": "https://api.github.com/users/tribals/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/tribals/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/tribals/subscriptions",
"type": "User",
"url": "https://api.github.com/users/tribals",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 2 | 2018-02-08T14:05:03Z | 2021-09-08T04:00:39Z | 2018-02-09T00:27:39Z | NONE | resolved | I'm trying to better understand how retry machinery works, and how (and when) to use it in production environments. Some of my experiments leads me to realize the fact that involving retry machinery causes `requests` to _hide_ actual cause of problem occurred when retrying some request. I think, it is important to distinguish between not to sending request at all (`ConnectionError`) and sending request but not to receiving response (`ReadTimeout`, for example).
## Expected Result
When I retrying request with retry machinery involved, I expect it to raise appropriate exception when retrying is also failed.
## Actual Result
Seems like in such case the exception which will be raised is always `ConnectionError`.
## Reproduction Steps
```python
import logging
import requests
from urllib3.util import Retry
logging.basicConfig(format='%(asctime)s:%(levelname)s:%(name)s - %(message)s')
logging.getLogger().setLevel(logging.DEBUG)
adapter = requests.adapters.HTTPAdapter(max_retries=Retry(total=3))
session = requests.Session()
session.mount('https://', adapter)
session.get('https://httpbin.org/delay/3', timeout=2)
```
Received exception is `ConnectionError`, but actual cause of problem is `ReadTimeot`, see [retry.log](https://github.com/requests/requests/files/1707261/retry.log)
## System Information
$ python -m requests.help
```
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": "2.1.4"
},
"idna": {
"version": ""
},
"implementation": {
"name": "CPython",
"version": "3.6.4"
},
"platform": {
"release": "4.14.17-50.current",
"system": "Linux"
},
"pyOpenSSL": {
"openssl_version": "100020ef",
"version": "17.5.0"
},
"requests": {
"version": "2.18.4"
},
"system_ssl": {
"version": "100020ef"
},
"urllib3": {
"version": "1.22"
},
"using_pyopenssl": true
}
```
| {
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4509/reactions"
} | https://api.github.com/repos/psf/requests/issues/4509/timeline | null | completed | null | null | false | [
"This reports in urllib3. The retry functionality is actually theirs.",
"But the logic of translating their exceptions (`ReadTimeoutError`) into `requests` exceptions belongs to `requests` itself. It is `requests` who raise wrong(?) exception, not `urllib3`."
] |
https://api.github.com/repos/psf/requests/issues/4508 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4508/labels{/name} | https://api.github.com/repos/psf/requests/issues/4508/comments | https://api.github.com/repos/psf/requests/issues/4508/events | https://github.com/psf/requests/issues/4508 | 295,316,980 | MDU6SXNzdWUyOTUzMTY5ODA= | 4,508 | Version 2.12.4 | {
"avatar_url": "https://avatars.githubusercontent.com/u/34985014?v=4",
"events_url": "https://api.github.com/users/Edgie70/events{/privacy}",
"followers_url": "https://api.github.com/users/Edgie70/followers",
"following_url": "https://api.github.com/users/Edgie70/following{/other_user}",
"gists_url": "https://api.github.com/users/Edgie70/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Edgie70",
"id": 34985014,
"login": "Edgie70",
"node_id": "MDQ6VXNlcjM0OTg1MDE0",
"organizations_url": "https://api.github.com/users/Edgie70/orgs",
"received_events_url": "https://api.github.com/users/Edgie70/received_events",
"repos_url": "https://api.github.com/users/Edgie70/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Edgie70/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Edgie70/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Edgie70",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2018-02-07T22:29:59Z | 2021-09-08T04:00:40Z | 2018-02-07T23:57:30Z | NONE | resolved | Hi all , running kodi 16.1 , I keep getting an update for requests to version 2.18.4 but it keeps failing , currently I'm on version 2.12.4 , is the newer version only for a higher kodi version ?? Thanks | {
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4508/reactions"
} | https://api.github.com/repos/psf/requests/issues/4508/timeline | null | completed | null | null | false | [
"If I recall correctly, `kodi` is not a directly supported platform. You need to talk to whomever is maintaining the package for that platform."
] |
https://api.github.com/repos/psf/requests/issues/4507 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4507/labels{/name} | https://api.github.com/repos/psf/requests/issues/4507/comments | https://api.github.com/repos/psf/requests/issues/4507/events | https://github.com/psf/requests/pull/4507 | 295,247,563 | MDExOlB1bGxSZXF1ZXN0MTY3Nzc0ODk4 | 4,507 | Minor | {
"avatar_url": "https://avatars.githubusercontent.com/u/832917?v=4",
"events_url": "https://api.github.com/users/ss18/events{/privacy}",
"followers_url": "https://api.github.com/users/ss18/followers",
"following_url": "https://api.github.com/users/ss18/following{/other_user}",
"gists_url": "https://api.github.com/users/ss18/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/ss18",
"id": 832917,
"login": "ss18",
"node_id": "MDQ6VXNlcjgzMjkxNw==",
"organizations_url": "https://api.github.com/users/ss18/orgs",
"received_events_url": "https://api.github.com/users/ss18/received_events",
"repos_url": "https://api.github.com/users/ss18/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/ss18/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ss18/subscriptions",
"type": "User",
"url": "https://api.github.com/users/ss18",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 2 | 2018-02-07T18:38:39Z | 2021-09-03T00:11:10Z | 2018-02-08T00:25:23Z | CONTRIBUTOR | resolved | Fixed typos:
nonexistant -> nonexistent
neccessary -> necessary | {
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4507/reactions"
} | https://api.github.com/repos/psf/requests/issues/4507/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/4507.diff",
"html_url": "https://github.com/psf/requests/pull/4507",
"merged_at": "2018-02-08T00:25:23Z",
"patch_url": "https://github.com/psf/requests/pull/4507.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/4507"
} | true | [
"# [Codecov](https://codecov.io/gh/requests/requests/pull/4507?src=pr&el=h1) Report\n> Merging [#4507](https://codecov.io/gh/requests/requests/pull/4507?src=pr&el=desc) into [master](https://codecov.io/gh/requests/requests/commit/654da610e1137246d9f5e5ccb9979bbfeffc6949?src=pr&el=desc) will **not change** coverage.... |
https://api.github.com/repos/psf/requests/issues/4506 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4506/labels{/name} | https://api.github.com/repos/psf/requests/issues/4506/comments | https://api.github.com/repos/psf/requests/issues/4506/events | https://github.com/psf/requests/issues/4506 | 295,188,422 | MDU6SXNzdWUyOTUxODg0MjI= | 4,506 | Closed keep-alive connections cause exception on re-use | {
"avatar_url": "https://avatars.githubusercontent.com/u/44789?v=4",
"events_url": "https://api.github.com/users/candlerb/events{/privacy}",
"followers_url": "https://api.github.com/users/candlerb/followers",
"following_url": "https://api.github.com/users/candlerb/following{/other_user}",
"gists_url": "https://api.github.com/users/candlerb/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/candlerb",
"id": 44789,
"login": "candlerb",
"node_id": "MDQ6VXNlcjQ0Nzg5",
"organizations_url": "https://api.github.com/users/candlerb/orgs",
"received_events_url": "https://api.github.com/users/candlerb/received_events",
"repos_url": "https://api.github.com/users/candlerb/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/candlerb/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/candlerb/subscriptions",
"type": "User",
"url": "https://api.github.com/users/candlerb",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 2 | 2018-02-07T15:50:23Z | 2021-09-08T04:00:39Z | 2018-02-08T00:39:00Z | NONE | resolved | Problem description:
I am running code in AWS Lambda. It uses [simple_salesforce](https://github.com/simple-salesforce/simple-salesforce), which in turn uses `requests[security]`, to make HTTPS connections to the Salesforce REST API.
If the Lambda function makes a request to Salesforce, sits idle for more than 10 minutes, and then makes another request, the second request fails with the following error:
**When not using pyOpenSSL**
~~~
ConnectionError: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))
Backtrace:
[
"/var/task/simple_salesforce/api.py",
721,
"_call_salesforce",
"result = self.session.request(method, url, headers=headers, **kwargs)"
],
[
"/var/task/requests/sessions.py",
508,
"request",
"resp = self.send(prep, **send_kwargs)"
],
[
"/var/task/requests/sessions.py",
618,
"send",
"r = adapter.send(request, **kwargs)"
],
[
"/var/task/requests/adapters.py",
490,
"send",
"raise ConnectionError(err, request=request)"
]
]
~~~
**When using pyOpenSSL**
~~~
ConnectionError: ('Connection aborted.', OSError("(104, 'ECONNRESET')",))
Backtrace:
[
"/var/task/simple_salesforce/api.py",
721,
"_call_salesforce",
"result = self.session.request(method, url, headers=headers, **kwargs)"
],
[
"/var/task/requests/sessions.py",
508,
"request",
"resp = self.send(prep, **send_kwargs)"
],
[
"/var/task/requests/sessions.py",
618,
"send",
"r = adapter.send(request, **kwargs)"
],
[
"/var/task/requests/adapters.py",
490,
"send",
"raise ConnectionError(err, request=request)"
]
~~~
My suspicion is that the idle HTTPS connection is being closed by the Salesforce server (*) after 10 minutes, but the client doesn't notice this, tries to re-use it, and then fails. This is hard to prove directly because running tcpdump inside AWS Lambda is hard - you don't get root.
Possibly related to https://github.com/shazow/urllib3/issues/728, which also involved OpenSSL and keepalive timeouts. That issue was fixed; also it had `OpenSSL.SSL.SysCallError` propagating upwards rather than the `ECONNRESET` that I see now.
(*) Or by the AWS NAT gateway. I am running Lambda functions inside a VPC, and the VPC has a [NAT gateway](https://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/vpc-nat-gateway.html) for accessing the outside world. However the [documented timeout](https://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/vpc-nat-gateway.html#nat-gateway-troubleshooting-timeout) is 5 minutes, not 10 minutes.
## Expected Result
I expected that closed HTTPS connections would be silently closed and removed from the keepalive pool, and fresh connections opened when needed. This may not be possible if the problem is NAT gateway dropping state without actually sending a RST.
If the client had a configurable keepalive timeout and actively closed idle connections after that time, that would provide a workaround. However that idea was rejected in #3661
Maybe the solution is to mount HTTPAdapter with `max_retries > 0`, if I can push this option down through simple_salesforce somehow.
Setting the [socket option](http://urllib3.readthedocs.io/en/latest/reference/#urllib3.connection.HTTPConnection) to enable TCP keepalives might help if this is the NAT gateway timing out. Again, this needs to be pushed down through simple_salesforce and requests to urllib3.
## Actual Result
See above
## Reproduction Steps
If I write a Lambda function which does a single simple_salesforce call, and invoke it twice with an interval of 600 seconds between, the second one raises an exception as shown above. With an interval of 500 seconds, the second call works fine.
I cannot fully reproduce outside AWS, on local Ubuntu 16.04. I can get something similar like this (requires a Salesforce account):
~~~
import simple_salesforce
import datetime
import time
sf = simple_salesforce.Salesforce(
username="XXXXXX",
password="XXXXXX",
security_token="XXXXXX",
sandbox=True,
)
while True:
print(datetime.datetime.now().isoformat())
sf.Account.get_by_custom_id("Account_Number__c", "XXX") # customise
print("ok")
time.sleep(3)
~~~
and then in a different window run `tcpkill -9 'tcp port 443'` (tcpkill is in the "dsniff" package). Since tcpkill will kill every connection it sees, even if requests were to automatically retry it would probably kill those as well.
But this does appear to give a more useful backtrace:
~~~
Traceback (most recent call last):
File "/home/ubuntu/test/venv/lib/python3.5/site-packages/urllib3/connectionpool.py", line 601, in urlopen
chunked=chunked)
File "/home/ubuntu/test/venv/lib/python3.5/site-packages/urllib3/connectionpool.py", line 387, in _make_request
six.raise_from(e, None)
File "<string>", line 2, in raise_from
File "/home/ubuntu/test/venv/lib/python3.5/site-packages/urllib3/connectionpool.py", line 383, in _make_request
httplib_response = conn.getresponse()
File "/usr/lib/python3.5/http/client.py", line 1197, in getresponse
response.begin()
File "/usr/lib/python3.5/http/client.py", line 297, in begin
version, status, reason = self._read_status()
File "/usr/lib/python3.5/http/client.py", line 258, in _read_status
line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
File "/usr/lib/python3.5/socket.py", line 575, in readinto
return self._sock.recv_into(b)
File "/home/ubuntu/test/venv/lib/python3.5/site-packages/urllib3/contrib/pyopenssl.py", line 285, in recv_into
raise SocketError(str(e))
OSError: (104, 'ECONNRESET')
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/ubuntu/test/venv/lib/python3.5/site-packages/requests/adapters.py", line 440, in send
timeout=timeout
File "/home/ubuntu/test/venv/lib/python3.5/site-packages/urllib3/connectionpool.py", line 639, in urlopen
_stacktrace=sys.exc_info()[2])
File "/home/ubuntu/test/venv/lib/python3.5/site-packages/urllib3/util/retry.py", line 357, in increment
raise six.reraise(type(error), error, _stacktrace)
File "/home/ubuntu/test/venv/lib/python3.5/site-packages/urllib3/packages/six.py", line 685, in reraise
raise value.with_traceback(tb)
File "/home/ubuntu/test/venv/lib/python3.5/site-packages/urllib3/connectionpool.py", line 601, in urlopen
chunked=chunked)
File "/home/ubuntu/test/venv/lib/python3.5/site-packages/urllib3/connectionpool.py", line 387, in _make_request
six.raise_from(e, None)
File "<string>", line 2, in raise_from
File "/home/ubuntu/test/venv/lib/python3.5/site-packages/urllib3/connectionpool.py", line 383, in _make_request
httplib_response = conn.getresponse()
File "/usr/lib/python3.5/http/client.py", line 1197, in getresponse
response.begin()
File "/usr/lib/python3.5/http/client.py", line 297, in begin
version, status, reason = self._read_status()
File "/usr/lib/python3.5/http/client.py", line 258, in _read_status
line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
File "/usr/lib/python3.5/socket.py", line 575, in readinto
return self._sock.recv_into(b)
File "/home/ubuntu/test/venv/lib/python3.5/site-packages/urllib3/contrib/pyopenssl.py", line 285, in recv_into
raise SocketError(str(e))
urllib3.exceptions.ProtocolError: ('Connection aborted.', OSError("(104, 'ECONNRESET')",))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "test_delay_sa.py", line 14, in <module>
sf.Account.get_by_custom_id("Account_Number__c", "A-0000002094") # customise
File "/home/ubuntu/test/venv/lib/python3.5/site-packages/simple_salesforce/api.py", line 579, in get_by_custom_id
method='GET', url=custom_url, headers=headers
File "/home/ubuntu/test/venv/lib/python3.5/site-packages/simple_salesforce/api.py", line 721, in _call_salesforce
result = self.session.request(method, url, headers=headers, **kwargs)
File "/home/ubuntu/test/venv/lib/python3.5/site-packages/requests/sessions.py", line 508, in request
resp = self.send(prep, **send_kwargs)
File "/home/ubuntu/test/venv/lib/python3.5/site-packages/requests/sessions.py", line 618, in send
r = adapter.send(request, **kwargs)
File "/home/ubuntu/test/venv/lib/python3.5/site-packages/requests/adapters.py", line 490, in send
raise ConnectionError(err, request=request)
~~~
## System Information
These values obtained by printing `requests.help.info()` inside AWS Lambda.
**When not using pyOpenSSL**
> {'platform': {'system': 'Linux', 'release': '4.9.77-31.58.amzn1.x86_64'}, 'implementation': {'name': 'CPython', 'version': '3.6.1'}, 'system_ssl': {'version': '10000003'}, 'using_pyopenssl': False, 'pyOpenSSL': {'version': None, 'openssl_version': ''}, 'urllib3': {'version': '1.22'}, 'chardet': {'version': '3.0.4'}, 'cryptography': {'version': ''}, 'idna': {'version': '2.6'}, 'requests': {'version': '2.18.4'}}
**When using pyOpenSSL**
> {'platform': {'system': 'Linux', 'release': '4.9.77-31.58.amzn1.x86_64'}, 'implementation': {'name': 'CPython', 'version': '3.6.1'}, 'system_ssl': {'version': '10000003'}, 'using_pyopenssl': True, 'pyOpenSSL': {'version': '17.5.0', 'openssl_version': '1010007f'}, 'urllib3': {'version': '1.22'}, 'chardet': {'version': '3.0.4'}, 'cryptography': {'version': '2.1.4'}, 'idna': {'version': '2.6'}, 'requests': {'version': '2.18.4'}}
NOTE: getting requests in AWS Lambda to use pyOpenSSL is a bit tricky. I am building the code under Ubuntu 16.04 (which has python 3.5) and uploading it using [serverless](https://github.com/serverless/serverless/). However AWS has python 3.6, and ignores the cffi built for 3.5, which means pyOpenSSL cannot dynamically link to libssl.
It's therefore necessary to [build](
https://github.com/JFox/aws-lambda-lxml) cffi inside a container which has the same libraries as Lambda:
~~~
docker run -v $(pwd):/outputs -it lambci/lambda:build-python3.6 pip install cffi -t /outputs/
~~~
Then include the generated `_cffi_backend.cpython-36m-x86_64-linux-gnu.so` and `libffi-d78936b1.so.6.0.4` as part of the serverless bundle, along with the rest of the requirements. | {
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4506/reactions"
} | https://api.github.com/repos/psf/requests/issues/4506/timeline | null | completed | null | null | false | [
"Turns out that simple_salesforce exposes a way to override `requests.Session` so it's straightforward to set `max_retries`:\r\n\r\n~~~\r\nimport requests\r\nsession = requests.Session()\r\nadapter = requests.adapters.HTTPAdapter(max_retries=2)\r\nsession.mount('https://', adapter)\r\nsf = simple_salesforce.Salesfo... |
https://api.github.com/repos/psf/requests/issues/4505 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4505/labels{/name} | https://api.github.com/repos/psf/requests/issues/4505/comments | https://api.github.com/repos/psf/requests/issues/4505/events | https://github.com/psf/requests/pull/4505 | 294,991,788 | MDExOlB1bGxSZXF1ZXN0MTY3NTg3ODQx | 4,505 | use dumb reason decoding on Python 2 | {
"avatar_url": "https://avatars.githubusercontent.com/u/222162?v=4",
"events_url": "https://api.github.com/users/thomasnoel/events{/privacy}",
"followers_url": "https://api.github.com/users/thomasnoel/followers",
"following_url": "https://api.github.com/users/thomasnoel/following{/other_user}",
"gists_url": "https://api.github.com/users/thomasnoel/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/thomasnoel",
"id": 222162,
"login": "thomasnoel",
"node_id": "MDQ6VXNlcjIyMjE2Mg==",
"organizations_url": "https://api.github.com/users/thomasnoel/orgs",
"received_events_url": "https://api.github.com/users/thomasnoel/received_events",
"repos_url": "https://api.github.com/users/thomasnoel/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/thomasnoel/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/thomasnoel/subscriptions",
"type": "User",
"url": "https://api.github.com/users/thomasnoel",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 2 | 2018-02-07T03:10:47Z | 2022-02-26T04:00:41Z | 2021-11-28T03:25:18Z | NONE | resolved | Try to fix #4489 : Python 2.x IOError cannot handle unicode argument, and HTTPError is a IOError. | {
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4505/reactions"
} | https://api.github.com/repos/psf/requests/issues/4505/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/4505.diff",
"html_url": "https://github.com/psf/requests/pull/4505",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/4505.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/4505"
} | true | [
"# [Codecov](https://codecov.io/gh/requests/requests/pull/4505?src=pr&el=h1) Report\n> Merging [#4505](https://codecov.io/gh/requests/requests/pull/4505?src=pr&el=desc) into [master](https://codecov.io/gh/requests/requests/commit/654da610e1137246d9f5e5ccb9979bbfeffc6949?src=pr&el=desc) will **increase** coverage by... |
https://api.github.com/repos/psf/requests/issues/4504 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4504/labels{/name} | https://api.github.com/repos/psf/requests/issues/4504/comments | https://api.github.com/repos/psf/requests/issues/4504/events | https://github.com/psf/requests/issues/4504 | 294,855,439 | MDU6SXNzdWUyOTQ4NTU0Mzk= | 4,504 | Python2 vs Python3 octet-stream request error | {
"avatar_url": "https://avatars.githubusercontent.com/u/29578811?v=4",
"events_url": "https://api.github.com/users/lrodri29/events{/privacy}",
"followers_url": "https://api.github.com/users/lrodri29/followers",
"following_url": "https://api.github.com/users/lrodri29/following{/other_user}",
"gists_url": "https://api.github.com/users/lrodri29/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/lrodri29",
"id": 29578811,
"login": "lrodri29",
"node_id": "MDQ6VXNlcjI5NTc4ODEx",
"organizations_url": "https://api.github.com/users/lrodri29/orgs",
"received_events_url": "https://api.github.com/users/lrodri29/received_events",
"repos_url": "https://api.github.com/users/lrodri29/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/lrodri29/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/lrodri29/subscriptions",
"type": "User",
"url": "https://api.github.com/users/lrodri29",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2018-02-06T17:56:41Z | 2021-09-08T04:00:41Z | 2018-02-06T18:11:29Z | NONE | resolved | Hello!
I am using requests to access some data from a localhost. When I run the code I have attached below on Python2, it seems to work perfectly, however when I switch to Python3, r.content displays a much larger octet_stream length string. Perhaps this is due to the data type being pulled by requests? Any recommendations? It seems requests is not consistent across Python2 and Python3
```import matplotlib.pyplot as plt
import requests
import numpy as np
def get_cutout(chan, res, xspan, yspan, zspan, api = "http://localhost:8000"):
"""
ID MUST BE STRING ""
xpix = "x" how many pixels traveled in x
ypix = "y" how many pixels traveled in y
zpix = "z" how many pixels traveled in z
xo, yo, zo (x,y,z offsets)
type = "raw"
scale = "grayscale"
"""
#Defining used variables
chan = chan.split("/")
UUID = chan[0]
exp = chan[1]
xpix = xspan[1]-xspan[0]
print(xpix)
xo = xspan[0]
ypix = yspan[1]-yspan[0]
yo = yspan[0]
zpix = zspan[1]-zspan[0]
zo = zspan[0]
size = str(xpix) + "_" + str(ypix) + "_" + str(zpix)
offset = str(xo) + "_" + str(yo) + "_" + str(zo)
#User entered IP address with added octet-stream line to obtain data from api in octet-stream form
#0_1_2 specifies a 3 dimensional octet-stream "xy" "xz" "yz"
address = api + "/api/node/" + UUID + "/" + exp + "/raw/0_1_2/" + size + "/" + offset + "/octet-stream"
r = requests.get(address)
octet_stream = str(r.content)
print(len(octet_stream))
#Converts obtained octet-stream into a numpy array of specified type uint8
block = np.fromstring(octet_stream, dtype = np.uint8)
print(block.shape)
#Specifies the 3 dimensional shape of the numpy array of the size given by the user
volumeOut = block.reshape(zpix,ypix,xpix)
#Returns a 3-dimensional numpy array to the user
return volumeOut
def get_channel(UUID, coll, exp):
"""
Method to input all channel hierarchy requirememnts, works as a dummy
for BossRemote Parallelism.
Args:
UUID (str) : Root UUID of the repository
col (str) : Name of collection
exp (str) : Name of experiment
Returns:
chan (str) : String of UUID/col/exp
"""
chan = UUID + "/" + coll + "/" + exp
return chan
UUID = "30eb"
volumeD = get_cutout(
get_channel(UUID, "dyer15_3_maskim_DUmmy", "dyer15_3_maskim_DUmmy"), 0,
[0,2560], [0,2560], [290,292]
)
``` | {
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4504/reactions"
} | https://api.github.com/repos/psf/requests/issues/4504/timeline | null | completed | null | null | false | [
"Hey @lrodri29, this has to do with your use of string casting. A “str” in python 2 is a bytes representation of the data, in python 3 it’s a utf-8 encoded string. This is almost certainly what’s causing the variance. I’d perform your check on the raw r.content rather than the str wrapped value.\r\n\r\nI’m going to... |
https://api.github.com/repos/psf/requests/issues/4503 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4503/labels{/name} | https://api.github.com/repos/psf/requests/issues/4503/comments | https://api.github.com/repos/psf/requests/issues/4503/events | https://github.com/psf/requests/issues/4503 | 294,759,599 | MDU6SXNzdWUyOTQ3NTk1OTk= | 4,503 | POST body: argument 'data' of type 'str' works, except when it doesn't | {
"avatar_url": "https://avatars.githubusercontent.com/u/44789?v=4",
"events_url": "https://api.github.com/users/candlerb/events{/privacy}",
"followers_url": "https://api.github.com/users/candlerb/followers",
"following_url": "https://api.github.com/users/candlerb/following{/other_user}",
"gists_url": "https://api.github.com/users/candlerb/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/candlerb",
"id": 44789,
"login": "candlerb",
"node_id": "MDQ6VXNlcjQ0Nzg5",
"organizations_url": "https://api.github.com/users/candlerb/orgs",
"received_events_url": "https://api.github.com/users/candlerb/received_events",
"repos_url": "https://api.github.com/users/candlerb/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/candlerb/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/candlerb/subscriptions",
"type": "User",
"url": "https://api.github.com/users/candlerb",
"user_view_type": "public"
} | [] | closed | false | null | [] | null | 8 | 2018-02-06T13:30:22Z | 2024-05-19T19:06:00Z | 2024-05-19T19:05:59Z | NONE | null | In python3, if you pass `data=<str>` to `requests.request` then often it works - except when `<str>` contains high codepoints and then it barfs.
[Documentation](http://docs.python-requests.org/en/master/api/#requests.request) says that `data` must be "Dictionary or list of tuples, bytes, or file-like object", so passing `str` is technically invalid; it would be helpful to catch the error sooner though.
## Expected Result
I understood the python3 philosophy to be that if you use `str` where `bytes` is expected, or vice versa, then it should "fail fast" and raise an exception immediately. I was (wrongly) passing str to the data arg, but it worked fine... until the first time it happened to include a high unicode character.
So I think that either:
* `requests` should fail if passed data=str; or
* it should be documented that data=str is permitted, but only if str can be encoded into iso-latin-1; or
* it should be documented that data=str is permitted, along with a way to specify the encoding (if there is one, I couldn't find it - if Content-Type header specifies the charset, this is ignored)
Aside 1: I see that the automatic iso-8859-1 fallback for response bodies was removed in #2086, so this could be considered a corresponding issue for request bodies.
Aside 2: in the real application, the data I was sending was some XML generated by `xmltodict.unparse()`, which generates a `str`.
## Actual Result
* `data="hello"` is fine
* `data="hello\ufffd"` barfs with `UnicodeEncodeError: 'latin-1' codec can't encode character`
* `json="hello\ufffd"` is fine
## Reproduction Steps
```python
>>> import requests
>>> requests.post("http://localhost", data="hello world")
(it works)
>>> v = "!@#$%^&*()+_\ufffd"
>>> requests.post("http://localhost", json=v)
(it works)
>>> requests.post("http://localhost", data=v)
...
UnicodeEncodeError: 'latin-1' codec can't encode character '\ufffd' in position 12: Body ('�') is not valid Latin-1. Use body.encode('utf-8') if you want to send it encoded in UTF-8.
>>> requests.post("http://localhost", data=v, headers={"Content-Type": "text/xml; charset=utf-8"})
...
UnicodeEncodeError: 'latin-1' codec can't encode character '\ufffd' in position 12: Body ('�') is not valid Latin-1. Use body.encode('utf-8') if you want to send it encoded in UTF-8.
```
## System Information
$ python -m requests.help
```
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "2.6"
},
"implementation": {
"name": "CPython",
"version": "3.5.2"
},
"platform": {
"release": "4.4.0-109-generic",
"system": "Linux"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.18.4"
},
"system_ssl": {
"version": "1000207f"
},
"urllib3": {
"version": "1.22"
},
"using_pyopenssl": false
}
```
| {
"avatar_url": "https://avatars.githubusercontent.com/u/18519037?v=4",
"events_url": "https://api.github.com/users/sethmlarson/events{/privacy}",
"followers_url": "https://api.github.com/users/sethmlarson/followers",
"following_url": "https://api.github.com/users/sethmlarson/following{/other_user}",
"gists_url": "https://api.github.com/users/sethmlarson/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sethmlarson",
"id": 18519037,
"login": "sethmlarson",
"node_id": "MDQ6VXNlcjE4NTE5MDM3",
"organizations_url": "https://api.github.com/users/sethmlarson/orgs",
"received_events_url": "https://api.github.com/users/sethmlarson/received_events",
"repos_url": "https://api.github.com/users/sethmlarson/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sethmlarson/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sethmlarson/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sethmlarson",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 2,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 2,
"url": "https://api.github.com/repos/psf/requests/issues/4503/reactions"
} | https://api.github.com/repos/psf/requests/issues/4503/timeline | null | completed | null | null | false | [
"This is a change already slated for 3.0 if I remember correctly. @nateprewitt can you confirm?",
"@sigmavirus24 it doesn't look like we have anything merged into 3.0.0 and I couldn't find an issue around that off hand. Looking at the stack trace, this is a problem in http/client.py assuming any string it receive... |
https://api.github.com/repos/psf/requests/issues/4502 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4502/labels{/name} | https://api.github.com/repos/psf/requests/issues/4502/comments | https://api.github.com/repos/psf/requests/issues/4502/events | https://github.com/psf/requests/issues/4502 | 294,375,394 | MDU6SXNzdWUyOTQzNzUzOTQ= | 4,502 | cannot import name set_file_position | {
"avatar_url": "https://avatars.githubusercontent.com/u/2385157?v=4",
"events_url": "https://api.github.com/users/ror6ax/events{/privacy}",
"followers_url": "https://api.github.com/users/ror6ax/followers",
"following_url": "https://api.github.com/users/ror6ax/following{/other_user}",
"gists_url": "https://api.github.com/users/ror6ax/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/ror6ax",
"id": 2385157,
"login": "ror6ax",
"node_id": "MDQ6VXNlcjIzODUxNTc=",
"organizations_url": "https://api.github.com/users/ror6ax/orgs",
"received_events_url": "https://api.github.com/users/ror6ax/received_events",
"repos_url": "https://api.github.com/users/ror6ax/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/ror6ax/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ror6ax/subscriptions",
"type": "User",
"url": "https://api.github.com/users/ror6ax",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2018-02-05T12:26:13Z | 2021-09-08T04:00:41Z | 2018-02-05T15:29:12Z | NONE | resolved | Summary.
## Expected Result
```
python > import requests > working
```
## Actual Result
```
$ python
Python 2.7.14 (default, Dec 11 2017, 16:08:01)
[GCC 7.2.1 20170915 (Red Hat 7.2.1-2)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import requests
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python2.7/site-packages/requests/__init__.py", line 60, in <module>
from .packages.urllib3.exceptions import DependencyWarning
File "/usr/lib/python2.7/site-packages/requests/packages/__init__.py", line 29, in <module>
import urllib3
File "/usr/lib/python2.7/site-packages/urllib3/__init__.py", line 8, in <module>
from .connectionpool import (
File "/usr/lib/python2.7/site-packages/urllib3/connectionpool.py", line 39, in <module>
from .util.request import set_file_position
ImportError: cannot import name set_file_position
```
## Reproduction Steps
```python
import requests
```
## System Information
```
$ $ python -m requests.help
/usr/bin/python: cannot import name set_file_position
```
| {
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4502/reactions"
} | https://api.github.com/repos/psf/requests/issues/4502/timeline | null | completed | null | null | false | [
"@ror6ax [set_file_position](https://github.com/shazow/urllib3/blob/d9898fb39e6c6037dea12d7226813d35b40f0947/urllib3/util/request.py#L77) definitely exists in urllib3. It appears you have an outdated version of urllib3, so I suggest updating to 1.22.\r\n\r\nSince this seems to be a request for help rather than a de... |
https://api.github.com/repos/psf/requests/issues/4501 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4501/labels{/name} | https://api.github.com/repos/psf/requests/issues/4501/comments | https://api.github.com/repos/psf/requests/issues/4501/events | https://github.com/psf/requests/pull/4501 | 294,269,668 | MDExOlB1bGxSZXF1ZXN0MTY3MDU0ODE4 | 4,501 | Separate collections from collections.abc | {
"avatar_url": "https://avatars.githubusercontent.com/u/1623689?v=4",
"events_url": "https://api.github.com/users/rhettinger/events{/privacy}",
"followers_url": "https://api.github.com/users/rhettinger/followers",
"following_url": "https://api.github.com/users/rhettinger/following{/other_user}",
"gists_url": "https://api.github.com/users/rhettinger/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/rhettinger",
"id": 1623689,
"login": "rhettinger",
"node_id": "MDQ6VXNlcjE2MjM2ODk=",
"organizations_url": "https://api.github.com/users/rhettinger/orgs",
"received_events_url": "https://api.github.com/users/rhettinger/received_events",
"repos_url": "https://api.github.com/users/rhettinger/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/rhettinger/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/rhettinger/subscriptions",
"type": "User",
"url": "https://api.github.com/users/rhettinger",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 3 | 2018-02-05T04:19:41Z | 2021-09-02T00:07:47Z | 2018-06-12T05:15:01Z | CONTRIBUTOR | resolved | In Python 3.7, there is a warning that the abstract bases in collections.abc will no longer be accessible through the regular collections module in Python 3.8. This patch future-proofs requests.
I wasn't able to run the test suite locally, so this needs a thorough test going forward. | {
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4501/reactions"
} | https://api.github.com/repos/psf/requests/issues/4501/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/4501.diff",
"html_url": "https://github.com/psf/requests/pull/4501",
"merged_at": "2018-06-12T05:15:01Z",
"patch_url": "https://github.com/psf/requests/pull/4501.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/4501"
} | true | [
"# [Codecov](https://codecov.io/gh/requests/requests/pull/4501?src=pr&el=h1) Report\n> Merging [#4501](https://codecov.io/gh/requests/requests/pull/4501?src=pr&el=desc) into [master](https://codecov.io/gh/requests/requests/commit/8da118dfeb15989c47241d6ad6b7c429a34a51f3?src=pr&el=desc) will **decrease** coverage by... |
https://api.github.com/repos/psf/requests/issues/4500 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4500/labels{/name} | https://api.github.com/repos/psf/requests/issues/4500/comments | https://api.github.com/repos/psf/requests/issues/4500/events | https://github.com/psf/requests/pull/4500 | 294,262,247 | MDExOlB1bGxSZXF1ZXN0MTY3MDQ5NzY5 | 4,500 | Remove requests.packages for v3.0.0 | {
"avatar_url": "https://avatars.githubusercontent.com/u/347634?v=4",
"events_url": "https://api.github.com/users/jdufresne/events{/privacy}",
"followers_url": "https://api.github.com/users/jdufresne/followers",
"following_url": "https://api.github.com/users/jdufresne/following{/other_user}",
"gists_url": "https://api.github.com/users/jdufresne/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jdufresne",
"id": 347634,
"login": "jdufresne",
"node_id": "MDQ6VXNlcjM0NzYzNA==",
"organizations_url": "https://api.github.com/users/jdufresne/orgs",
"received_events_url": "https://api.github.com/users/jdufresne/received_events",
"repos_url": "https://api.github.com/users/jdufresne/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jdufresne/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jdufresne/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jdufresne",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 3 | 2018-02-05T03:16:18Z | 2021-09-02T00:07:49Z | 2018-03-08T18:00:50Z | CONTRIBUTOR | resolved | As v3.0.0 already includes other backwards incompatible changes, it is a good time to remove the old entry point for vendored packages. Cleans up compatibility shims. | {
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4500/reactions"
} | https://api.github.com/repos/psf/requests/issues/4500/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/4500.diff",
"html_url": "https://github.com/psf/requests/pull/4500",
"merged_at": "2018-03-08T18:00:50Z",
"patch_url": "https://github.com/psf/requests/pull/4500.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/4500"
} | true | [
"# [Codecov](https://codecov.io/gh/requests/requests/pull/4500?src=pr&el=h1) Report\n> Merging [#4500](https://codecov.io/gh/requests/requests/pull/4500?src=pr&el=desc) into [proposed/3.0.0](https://codecov.io/gh/requests/requests/commit/a58b1e66cbf6479cdf57ef4c4b1e57b1e3176daa?src=pr&el=desc) will **decrease** cov... |
https://api.github.com/repos/psf/requests/issues/4499 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4499/labels{/name} | https://api.github.com/repos/psf/requests/issues/4499/comments | https://api.github.com/repos/psf/requests/issues/4499/events | https://github.com/psf/requests/pull/4499 | 294,259,227 | MDExOlB1bGxSZXF1ZXN0MTY3MDQ3Njkz | 4,499 | Remove remaining references to removed, vendored packages | {
"avatar_url": "https://avatars.githubusercontent.com/u/347634?v=4",
"events_url": "https://api.github.com/users/jdufresne/events{/privacy}",
"followers_url": "https://api.github.com/users/jdufresne/followers",
"following_url": "https://api.github.com/users/jdufresne/following{/other_user}",
"gists_url": "https://api.github.com/users/jdufresne/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jdufresne",
"id": 347634,
"login": "jdufresne",
"node_id": "MDQ6VXNlcjM0NzYzNA==",
"organizations_url": "https://api.github.com/users/jdufresne/orgs",
"received_events_url": "https://api.github.com/users/jdufresne/received_events",
"repos_url": "https://api.github.com/users/jdufresne/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jdufresne/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jdufresne/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jdufresne",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 2 | 2018-02-05T02:50:07Z | 2021-09-02T00:07:49Z | 2018-02-17T14:15:55Z | CONTRIBUTOR | resolved | As the vendored packages were removing in version 2.16, all remaining
doc references should be replaced with newer practices. | {
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4499/reactions"
} | https://api.github.com/repos/psf/requests/issues/4499/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/4499.diff",
"html_url": "https://github.com/psf/requests/pull/4499",
"merged_at": "2018-02-17T14:15:55Z",
"patch_url": "https://github.com/psf/requests/pull/4499.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/4499"
} | true | [
"# [Codecov](https://codecov.io/gh/requests/requests/pull/4499?src=pr&el=h1) Report\n> Merging [#4499](https://codecov.io/gh/requests/requests/pull/4499?src=pr&el=desc) into [master](https://codecov.io/gh/requests/requests/commit/cafa3c16c261066c01d7f5699ff0172fc1a605af?src=pr&el=desc) will **increase** coverage by... |
https://api.github.com/repos/psf/requests/issues/4498 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4498/labels{/name} | https://api.github.com/repos/psf/requests/issues/4498/comments | https://api.github.com/repos/psf/requests/issues/4498/events | https://github.com/psf/requests/pull/4498 | 294,225,226 | MDExOlB1bGxSZXF1ZXN0MTY3MDI2NzU1 | 4,498 | Trim trialing white space throughout the project | {
"avatar_url": "https://avatars.githubusercontent.com/u/347634?v=4",
"events_url": "https://api.github.com/users/jdufresne/events{/privacy}",
"followers_url": "https://api.github.com/users/jdufresne/followers",
"following_url": "https://api.github.com/users/jdufresne/following{/other_user}",
"gists_url": "https://api.github.com/users/jdufresne/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jdufresne",
"id": 347634,
"login": "jdufresne",
"node_id": "MDQ6VXNlcjM0NzYzNA==",
"organizations_url": "https://api.github.com/users/jdufresne/orgs",
"received_events_url": "https://api.github.com/users/jdufresne/received_events",
"repos_url": "https://api.github.com/users/jdufresne/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jdufresne/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jdufresne/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jdufresne",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 3 | 2018-02-04T19:57:42Z | 2021-09-03T00:11:11Z | 2018-02-05T16:37:19Z | CONTRIBUTOR | resolved | Many editors clean up trailing white space on save. By removing it all in one go, it helps keep future diffs cleaner by avoiding spurious white space changes on unrelated lines. | {
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4498/reactions"
} | https://api.github.com/repos/psf/requests/issues/4498/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/4498.diff",
"html_url": "https://github.com/psf/requests/pull/4498",
"merged_at": "2018-02-05T16:37:19Z",
"patch_url": "https://github.com/psf/requests/pull/4498.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/4498"
} | true | [
"# [Codecov](https://codecov.io/gh/requests/requests/pull/4498?src=pr&el=h1) Report\n> Merging [#4498](https://codecov.io/gh/requests/requests/pull/4498?src=pr&el=desc) into [master](https://codecov.io/gh/requests/requests/commit/8da118dfeb15989c47241d6ad6b7c429a34a51f3?src=pr&el=desc) will **not change** coverage.... |
https://api.github.com/repos/psf/requests/issues/4497 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4497/labels{/name} | https://api.github.com/repos/psf/requests/issues/4497/comments | https://api.github.com/repos/psf/requests/issues/4497/events | https://github.com/psf/requests/pull/4497 | 294,059,842 | MDExOlB1bGxSZXF1ZXN0MTY2OTMwNjA3 | 4,497 | Clarify docs that Requests always uses certs from certifi | {
"avatar_url": "https://avatars.githubusercontent.com/u/347634?v=4",
"events_url": "https://api.github.com/users/jdufresne/events{/privacy}",
"followers_url": "https://api.github.com/users/jdufresne/followers",
"following_url": "https://api.github.com/users/jdufresne/following{/other_user}",
"gists_url": "https://api.github.com/users/jdufresne/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jdufresne",
"id": 347634,
"login": "jdufresne",
"node_id": "MDQ6VXNlcjM0NzYzNA==",
"organizations_url": "https://api.github.com/users/jdufresne/orgs",
"received_events_url": "https://api.github.com/users/jdufresne/received_events",
"repos_url": "https://api.github.com/users/jdufresne/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jdufresne/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jdufresne/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jdufresne",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 5 | 2018-02-03T00:01:39Z | 2021-09-02T00:07:49Z | 2018-02-16T01:56:01Z | CONTRIBUTOR | resolved | Since commit 0d7de6430eef0cf09f9662746daf0c28d83f144e, certifi is always used for certificates. Certify became a hard dependency of the package in 628633143d5b8590b1dbdf5371fe81fb8250dffd.
Now update the docs to clarify that Request will always use certificates from certifi. | {
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4497/reactions"
} | https://api.github.com/repos/psf/requests/issues/4497/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/4497.diff",
"html_url": "https://github.com/psf/requests/pull/4497",
"merged_at": "2018-02-16T01:56:01Z",
"patch_url": "https://github.com/psf/requests/pull/4497.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/4497"
} | true | [
"# [Codecov](https://codecov.io/gh/requests/requests/pull/4497?src=pr&el=h1) Report\n> Merging [#4497](https://codecov.io/gh/requests/requests/pull/4497?src=pr&el=desc) into [master](https://codecov.io/gh/requests/requests/commit/3c1d36b827417fdeaf5a1c106129de30dac371d7?src=pr&el=desc) will **not change** coverage.... |
https://api.github.com/repos/psf/requests/issues/4496 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4496/labels{/name} | https://api.github.com/repos/psf/requests/issues/4496/comments | https://api.github.com/repos/psf/requests/issues/4496/events | https://github.com/psf/requests/pull/4496 | 293,979,228 | MDExOlB1bGxSZXF1ZXN0MTY2ODcwNjEy | 4,496 | Pass kwargs from adapter send call to add_headers, per documentation | {
"avatar_url": "https://avatars.githubusercontent.com/u/933960?v=4",
"events_url": "https://api.github.com/users/jonblum/events{/privacy}",
"followers_url": "https://api.github.com/users/jonblum/followers",
"following_url": "https://api.github.com/users/jonblum/following{/other_user}",
"gists_url": "https://api.github.com/users/jonblum/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jonblum",
"id": 933960,
"login": "jonblum",
"node_id": "MDQ6VXNlcjkzMzk2MA==",
"organizations_url": "https://api.github.com/users/jonblum/orgs",
"received_events_url": "https://api.github.com/users/jonblum/received_events",
"repos_url": "https://api.github.com/users/jonblum/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jonblum/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jonblum/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jonblum",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 2 | 2018-02-02T18:21:57Z | 2021-09-03T00:11:13Z | 2018-02-03T13:40:45Z | CONTRIBUTOR | resolved | The docstring for `HTTPAdapter.add_headers` implies that keyword args from the `send` call will be passed into `add_headers` – this change passes them in. This would be helpful, particularly for kwargs like `timeout`, which may influence the headers that need to be added by an `HTTPAdapter` subclass. | {
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4496/reactions"
} | https://api.github.com/repos/psf/requests/issues/4496/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/4496.diff",
"html_url": "https://github.com/psf/requests/pull/4496",
"merged_at": "2018-02-03T13:40:45Z",
"patch_url": "https://github.com/psf/requests/pull/4496.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/4496"
} | true | [
"# [Codecov](https://codecov.io/gh/requests/requests/pull/4496?src=pr&el=h1) Report\n> Merging [#4496](https://codecov.io/gh/requests/requests/pull/4496?src=pr&el=desc) into [master](https://codecov.io/gh/requests/requests/commit/512066488e039e048ff255d8322fbb53642166bd?src=pr&el=desc) will **not change** coverage.... |
https://api.github.com/repos/psf/requests/issues/4495 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4495/labels{/name} | https://api.github.com/repos/psf/requests/issues/4495/comments | https://api.github.com/repos/psf/requests/issues/4495/events | https://github.com/psf/requests/issues/4495 | 293,970,634 | MDU6SXNzdWUyOTM5NzA2MzQ= | 4,495 | InvalidSchema should be InvalidScheme | {
"avatar_url": "https://avatars.githubusercontent.com/u/543934?v=4",
"events_url": "https://api.github.com/users/kurtbrose/events{/privacy}",
"followers_url": "https://api.github.com/users/kurtbrose/followers",
"following_url": "https://api.github.com/users/kurtbrose/following{/other_user}",
"gists_url": "https://api.github.com/users/kurtbrose/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kurtbrose",
"id": 543934,
"login": "kurtbrose",
"node_id": "MDQ6VXNlcjU0MzkzNA==",
"organizations_url": "https://api.github.com/users/kurtbrose/orgs",
"received_events_url": "https://api.github.com/users/kurtbrose/received_events",
"repos_url": "https://api.github.com/users/kurtbrose/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kurtbrose/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kurtbrose/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kurtbrose",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2018-02-02T17:50:18Z | 2021-09-08T04:00:42Z | 2018-02-02T18:08:54Z | NONE | resolved | Summary.
## Expected Result
If requests cannot determine what *scheme* a URL has it should report this clearly.
## Actual Result
```
InvalidSchema at /scrapyd/start-job/
No connection adapters were found for 'localhost:6800/schedule.json'
```
There is no such thing as a URL "schema".
https://tools.ietf.org/html/rfc3986
https://en.wikipedia.org/wiki/Uniform_Resource_Identifier
The words "schema" and "scheme" are distinct. "Schema" is the singular of "schemata". The plural of "scheme" is "schemes" or "schemas". (https://english.stackexchange.com/questions/9232/plural-of-scheme) Given that SQL uses the word schema this is an extremely confusing error message. | {
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4495/reactions"
} | https://api.github.com/repos/psf/requests/issues/4495/timeline | null | completed | null | null | false | [
"Hey @kurtbrose, thanks for pointing this out. We’ve actually already patched this in #2961 but in the 3.0.0 branch due to this being a breaking change. The corrected naming will be available once the Requests team is ready to proceed with releasing 3.0.0."
] |
https://api.github.com/repos/psf/requests/issues/4494 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4494/labels{/name} | https://api.github.com/repos/psf/requests/issues/4494/comments | https://api.github.com/repos/psf/requests/issues/4494/events | https://github.com/psf/requests/issues/4494 | 293,899,841 | MDU6SXNzdWUyOTM4OTk4NDE= | 4,494 | Deprecation Warning on Python 3.7 beta | {
"avatar_url": "https://avatars.githubusercontent.com/u/25619791?v=4",
"events_url": "https://api.github.com/users/csabella/events{/privacy}",
"followers_url": "https://api.github.com/users/csabella/followers",
"following_url": "https://api.github.com/users/csabella/following{/other_user}",
"gists_url": "https://api.github.com/users/csabella/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/csabella",
"id": 25619791,
"login": "csabella",
"node_id": "MDQ6VXNlcjI1NjE5Nzkx",
"organizations_url": "https://api.github.com/users/csabella/orgs",
"received_events_url": "https://api.github.com/users/csabella/received_events",
"repos_url": "https://api.github.com/users/csabella/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/csabella/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/csabella/subscriptions",
"type": "User",
"url": "https://api.github.com/users/csabella",
"user_view_type": "public"
} | [
{
"color": "1cff91",
"default": false,
"description": "",
"id": 860696300,
"name": "3.0",
"node_id": "MDU6TGFiZWw4NjA2OTYzMDA=",
"url": "https://api.github.com/repos/psf/requests/labels/3.0"
}
] | closed | true | null | [] | null | 2 | 2018-02-02T14:08:46Z | 2021-09-08T02:09:51Z | 2018-06-12T05:48:40Z | NONE | resolved | ~/requests/models.py:170: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working
if isinstance(hook, collections.Callable):
I created a venv in Python 3.7 and got the warning when using pip.
| {
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4494/reactions"
} | https://api.github.com/repos/psf/requests/issues/4494/timeline | null | completed | null | null | false | [
"Thanks for the report @csabella, we’re just starting to test against 3.7 so there’s likely some of these that haven’t been caught yet. This should be relatively simple to fix, so we can make sure this is adjusted before 3.7 is officially released.",
"Resolved in #4501."
] |
https://api.github.com/repos/psf/requests/issues/4493 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4493/labels{/name} | https://api.github.com/repos/psf/requests/issues/4493/comments | https://api.github.com/repos/psf/requests/issues/4493/events | https://github.com/psf/requests/pull/4493 | 293,445,707 | MDExOlB1bGxSZXF1ZXN0MTY2NDczOTk0 | 4,493 | Start testing 3.7 | {
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2018-02-01T08:40:50Z | 2021-09-03T00:11:13Z | 2018-02-03T14:43:31Z | MEMBER | resolved | Given that 3.7 is [now in beta](https://twitter.com/gvanrossum/status/958930025603977216) and scheduled for release in ~4 months, we should probably start testing it again.
EDIT: As far as I can tell appveyor hasn't had support for 3.7 added yet, likely due to it being an alpha release. We'll want to add that later when it becomes available. | {
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4493/reactions"
} | https://api.github.com/repos/psf/requests/issues/4493/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/4493.diff",
"html_url": "https://github.com/psf/requests/pull/4493",
"merged_at": "2018-02-03T14:43:31Z",
"patch_url": "https://github.com/psf/requests/pull/4493.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/4493"
} | true | [
"# [Codecov](https://codecov.io/gh/requests/requests/pull/4493?src=pr&el=h1) Report\n> Merging [#4493](https://codecov.io/gh/requests/requests/pull/4493?src=pr&el=desc) into [master](https://codecov.io/gh/requests/requests/commit/512066488e039e048ff255d8322fbb53642166bd?src=pr&el=desc) will **not change** coverage.... |
https://api.github.com/repos/psf/requests/issues/4492 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4492/labels{/name} | https://api.github.com/repos/psf/requests/issues/4492/comments | https://api.github.com/repos/psf/requests/issues/4492/events | https://github.com/psf/requests/issues/4492 | 293,318,456 | MDU6SXNzdWUyOTMzMTg0NTY= | 4,492 | ests | {
"avatar_url": "https://avatars.githubusercontent.com/u/4216191?v=4",
"events_url": "https://api.github.com/users/x-jesse-zhang/events{/privacy}",
"followers_url": "https://api.github.com/users/x-jesse-zhang/followers",
"following_url": "https://api.github.com/users/x-jesse-zhang/following{/other_user}",
"gists_url": "https://api.github.com/users/x-jesse-zhang/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/x-jesse-zhang",
"id": 4216191,
"login": "x-jesse-zhang",
"node_id": "MDQ6VXNlcjQyMTYxOTE=",
"organizations_url": "https://api.github.com/users/x-jesse-zhang/orgs",
"received_events_url": "https://api.github.com/users/x-jesse-zhang/received_events",
"repos_url": "https://api.github.com/users/x-jesse-zhang/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/x-jesse-zhang/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/x-jesse-zhang/subscriptions",
"type": "User",
"url": "https://api.github.com/users/x-jesse-zhang",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 0 | 2018-01-31T21:30:14Z | 2021-09-08T04:00:43Z | 2018-01-31T23:12:23Z | NONE | resolved | Summary.
## Expected Result
What you expected.
## Actual Result
What happened instead.
## Reproduction Steps
```python
import requests
```
## System Information
$ python -m requests.help
```
<paste here>
```
This command is only available on Requests v2.16.4 and greater. Otherwise,
please provide some basic information about your system (Python version,
operating system, &c). | {
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4492/reactions"
} | https://api.github.com/repos/psf/requests/issues/4492/timeline | null | completed | null | null | false | [] |
https://api.github.com/repos/psf/requests/issues/4491 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4491/labels{/name} | https://api.github.com/repos/psf/requests/issues/4491/comments | https://api.github.com/repos/psf/requests/issues/4491/events | https://github.com/psf/requests/issues/4491 | 293,242,188 | MDU6SXNzdWUyOTMyNDIxODg= | 4,491 | sending file with POST the whole file gets read before sending | {
"avatar_url": "https://avatars.githubusercontent.com/u/33092692?v=4",
"events_url": "https://api.github.com/users/ddor254/events{/privacy}",
"followers_url": "https://api.github.com/users/ddor254/followers",
"following_url": "https://api.github.com/users/ddor254/following{/other_user}",
"gists_url": "https://api.github.com/users/ddor254/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/ddor254",
"id": 33092692,
"login": "ddor254",
"node_id": "MDQ6VXNlcjMzMDkyNjky",
"organizations_url": "https://api.github.com/users/ddor254/orgs",
"received_events_url": "https://api.github.com/users/ddor254/received_events",
"repos_url": "https://api.github.com/users/ddor254/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/ddor254/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ddor254/subscriptions",
"type": "User",
"url": "https://api.github.com/users/ddor254",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 2 | 2018-01-31T17:18:33Z | 2021-09-08T04:00:42Z | 2018-01-31T18:06:14Z | NONE | resolved | Summary.
When sending file in requests with :
f = open("blabla.pdf")
requests.post('http://localhost:9999',data=f)
the Whole file gets read before the request goes out, should not that be that the requests get sent with chunks - meaning a number of POST requests until the file gets ended??
i mean - when the requests library decide to "cut" and send the request?
it is the same in generator which send a lot of data
what is the maximum size of the request that being supported?
## Expected Result
several post requests
What you expected.
## Actual Result
one big post request
What happened instead.
## Reproduction Steps
```python
import requests
f = open("blabla.pdf")
requests.post('http://localhost:9999',data=f)
```
## System Information
requests==2.5.1
python 2.7.3
| {
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4491/reactions"
} | https://api.github.com/repos/psf/requests/issues/4491/timeline | null | completed | null | null | false | [
"@ddor254 it sounds like you’re looking for information around multi-part encoding files for large data transfer. You can find information on that [here](http://docs.python-requests.org/en/master/user/quickstart/#post-a-multipart-encoded-file) in the docs.\r\n\r\nIf you have further questions, please open an issue ... |
https://api.github.com/repos/psf/requests/issues/4490 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4490/labels{/name} | https://api.github.com/repos/psf/requests/issues/4490/comments | https://api.github.com/repos/psf/requests/issues/4490/events | https://github.com/psf/requests/pull/4490 | 292,986,998 | MDExOlB1bGxSZXF1ZXN0MTY2MTM0Mzk1 | 4,490 | removed invalid characters | {
"avatar_url": "https://avatars.githubusercontent.com/u/442991?v=4",
"events_url": "https://api.github.com/users/royopa/events{/privacy}",
"followers_url": "https://api.github.com/users/royopa/followers",
"following_url": "https://api.github.com/users/royopa/following{/other_user}",
"gists_url": "https://api.github.com/users/royopa/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/royopa",
"id": 442991,
"login": "royopa",
"node_id": "MDQ6VXNlcjQ0Mjk5MQ==",
"organizations_url": "https://api.github.com/users/royopa/orgs",
"received_events_url": "https://api.github.com/users/royopa/received_events",
"repos_url": "https://api.github.com/users/royopa/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/royopa/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/royopa/subscriptions",
"type": "User",
"url": "https://api.github.com/users/royopa",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2018-01-31T00:19:13Z | 2021-09-03T00:11:13Z | 2018-01-31T00:26:05Z | NONE | resolved | {
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4490/reactions"
} | https://api.github.com/repos/psf/requests/issues/4490/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/4490.diff",
"html_url": "https://github.com/psf/requests/pull/4490",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/4490.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/4490"
} | true | [
"Hey @royopa, these are valid utf-8 characters and intended to be in the document. You can find more information in #3733 which attempted to do that same. Thanks for checking in on this though!"
] | |
https://api.github.com/repos/psf/requests/issues/4489 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4489/labels{/name} | https://api.github.com/repos/psf/requests/issues/4489/comments | https://api.github.com/repos/psf/requests/issues/4489/events | https://github.com/psf/requests/issues/4489 | 292,778,814 | MDU6SXNzdWUyOTI3Nzg4MTQ= | 4,489 | UnicodeEncodeError on localised response.reason message (bad use of IOError) | {
"avatar_url": "https://avatars.githubusercontent.com/u/222162?v=4",
"events_url": "https://api.github.com/users/thomasnoel/events{/privacy}",
"followers_url": "https://api.github.com/users/thomasnoel/followers",
"following_url": "https://api.github.com/users/thomasnoel/following{/other_user}",
"gists_url": "https://api.github.com/users/thomasnoel/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/thomasnoel",
"id": 222162,
"login": "thomasnoel",
"node_id": "MDQ6VXNlcjIyMjE2Mg==",
"organizations_url": "https://api.github.com/users/thomasnoel/orgs",
"received_events_url": "https://api.github.com/users/thomasnoel/received_events",
"repos_url": "https://api.github.com/users/thomasnoel/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/thomasnoel/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/thomasnoel/subscriptions",
"type": "User",
"url": "https://api.github.com/users/thomasnoel",
"user_view_type": "public"
} | [] | closed | false | null | [] | {
"closed_at": null,
"closed_issues": 29,
"created_at": "2024-05-19T18:29:04Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/18519037?v=4",
"events_url": "https://api.github.com/users/sethmlarson/events{/privacy}",
"followers_url": "https://api.github.com/users/sethmlarson/followers",
"following_url": "https://api.github.com/users/sethmlarson/following{/other_user}",
"gists_url": "https://api.github.com/users/sethmlarson/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sethmlarson",
"id": 18519037,
"login": "sethmlarson",
"node_id": "MDQ6VXNlcjE4NTE5MDM3",
"organizations_url": "https://api.github.com/users/sethmlarson/orgs",
"received_events_url": "https://api.github.com/users/sethmlarson/received_events",
"repos_url": "https://api.github.com/users/sethmlarson/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sethmlarson/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sethmlarson/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sethmlarson",
"user_view_type": "public"
},
"description": "",
"due_on": null,
"html_url": "https://github.com/psf/requests/milestone/34",
"id": 11073254,
"labels_url": "https://api.github.com/repos/psf/requests/milestones/34/labels",
"node_id": "MI_kwDOABTKOs4AqPbm",
"number": 34,
"open_issues": 0,
"state": "open",
"title": "Bankruptcy",
"updated_at": "2024-05-20T14:37:16Z",
"url": "https://api.github.com/repos/psf/requests/milestones/34"
} | 4 | 2018-01-30T13:16:17Z | 2024-05-20T14:36:59Z | 2024-05-20T14:36:59Z | NONE | null | ## Expected result
Python 2.7, requests
A website returns 'Non-Autoris\xe9' (non authorized, in French) as response.reason on a 401 error. Before #3554 (https://github.com/requests/requests/pull/3554/files) a response.raise_for_error() returns this :
```python
import requests
resp = requests.get('http://www.example.net/admin/') # a website returning « 401 Non Autorisé »
try:
resp.raise_for_error()
except Exception as e:
pass
print e
```
401 Client Error: Non-Autoris for url: http://www.example.net/admin/
(\xe9 is just removed, not really an issue)
## Actual Result
After #3554 :
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe9' in position 29: ordinal not in range(128)
## Why ?
It's because HTTPError is in fact an IOError : the first init argument can't be a unicode string. See https://docs.python.org/2/library/exceptions.html#exceptions.EnvironmentError
```python
>>> unicode(IOError(12, u'é'))
u'[Errno 12] \xe9'
>>> unicode(IOError(u'é'))
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe9' in position 0: ordinal not in range(128)
>>> unicode(Exception(u'é'))
u'\xe9'
``` | {
"avatar_url": "https://avatars.githubusercontent.com/u/18519037?v=4",
"events_url": "https://api.github.com/users/sethmlarson/events{/privacy}",
"followers_url": "https://api.github.com/users/sethmlarson/followers",
"following_url": "https://api.github.com/users/sethmlarson/following{/other_user}",
"gists_url": "https://api.github.com/users/sethmlarson/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sethmlarson",
"id": 18519037,
"login": "sethmlarson",
"node_id": "MDQ6VXNlcjE4NTE5MDM3",
"organizations_url": "https://api.github.com/users/sethmlarson/orgs",
"received_events_url": "https://api.github.com/users/sethmlarson/received_events",
"repos_url": "https://api.github.com/users/sethmlarson/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sethmlarson/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sethmlarson/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sethmlarson",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4489/reactions"
} | https://api.github.com/repos/psf/requests/issues/4489/timeline | null | completed | null | null | false | [
"Sadly we can't change the exception inheritance order at this point. I wonder if it makes sense to `encode` to ascii and to ignore any errors doing so. I wonder if `IOError` is okay with `unicode` on python 3 though.",
"It is:\r\n```\r\n>>> str(IOError(u'é'))\r\n'é'\r\n```\r\n\r\n",
"Yep, this was an instance ... |
https://api.github.com/repos/psf/requests/issues/4488 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4488/labels{/name} | https://api.github.com/repos/psf/requests/issues/4488/comments | https://api.github.com/repos/psf/requests/issues/4488/events | https://github.com/psf/requests/issues/4488 | 292,503,971 | MDU6SXNzdWUyOTI1MDM5NzE= | 4,488 | Unauthenticated requests turns into authenticated one somewhere | {
"avatar_url": "https://avatars.githubusercontent.com/u/3780295?v=4",
"events_url": "https://api.github.com/users/mittagessen/events{/privacy}",
"followers_url": "https://api.github.com/users/mittagessen/followers",
"following_url": "https://api.github.com/users/mittagessen/following{/other_user}",
"gists_url": "https://api.github.com/users/mittagessen/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/mittagessen",
"id": 3780295,
"login": "mittagessen",
"node_id": "MDQ6VXNlcjM3ODAyOTU=",
"organizations_url": "https://api.github.com/users/mittagessen/orgs",
"received_events_url": "https://api.github.com/users/mittagessen/received_events",
"repos_url": "https://api.github.com/users/mittagessen/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/mittagessen/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/mittagessen/subscriptions",
"type": "User",
"url": "https://api.github.com/users/mittagessen",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 2 | 2018-01-29T18:01:06Z | 2021-09-08T04:00:44Z | 2018-01-30T07:02:09Z | NONE | resolved | My program uses the github API to query repository data and requests works perfectly for that. I've got a bug report from a user that they get a 401 back when trying to run it, which shouldn't happen as no authentication is involved anywhere. Unfortunately, I can't reproduce the bug myself but lo and behold with sufficient logging verbosity I see on the reporters machine my simple ``requests.get(url)`` request somehow gets Basic Authentication data attached to it.
From a cursory look over the source code I couldn't find any external source of authentication data but I only looked for obvious stuff like environment variables.
## Expected Result
When executing ``requests.get('https://api.github.com/repos/mittagessen/kraken-models/git/refs/headers/master')`` I expect this (urllib3 debug loggin):
```
send: 'GET /repos/mittagessen/kraken-models/git/refs/heads/master HTTP/1.1\r\nHost: api.github.com\r\nConnection: keep-alive\r\nAccept-Encoding: gzip, deflate\r\nAccept: */*\r\nUser-Agent: python-requests/2.18.4\r\n\r\n'
reply: 'HTTP/1.1 200 OK\r\n'
```
HTTP request to go over the wire.
## Actual Result
Instead I get this:
```
send: b'GET /repos/mittagessen/kraken-models/git/refs/heads/master HTTP/1.1\r\nHost: api.github.com\r\nUser-Agent: python-requests/2.18.4\r\nAccept-Encoding: gzip, deflate\r\nAccept: */*\r\nConnection: keep-alive\r\nAuthorization: Basic bG9yYW5nZXI6MmEzYWM3MjFmZWI0NjlmYjg0YTQ2NzFmNGI1ZjU3MGIyMGRjZTdjNw==\r\n\r\n'
reply: 'HTTP/1.1 401 Unauthorized\r\n'
```
## Reproduction Steps
Unfortunately, I can't reproduce it on any of my machines.
## System Information
Sorry, I don't have the help output but the reporter's machine run macOS 10.12.6 and the error occurs with both python 2.7 and 3.6. requests version is 2.18.4 as can be seen from the logging. | {
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4488/reactions"
} | https://api.github.com/repos/psf/requests/issues/4488/timeline | null | completed | null | null | false | [
"Hey @mittagessen, my guess is the person using your tool has a `.netrc` file setup. This can be configured to work with Github credentials which they've likely done. You can see that this information will be used when determining auth choices [here](https://github.com/requests/requests/blob/512066488e039e048ff255d... |
https://api.github.com/repos/psf/requests/issues/4487 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4487/labels{/name} | https://api.github.com/repos/psf/requests/issues/4487/comments | https://api.github.com/repos/psf/requests/issues/4487/events | https://github.com/psf/requests/issues/4487 | 292,361,933 | MDU6SXNzdWUyOTIzNjE5MzM= | 4,487 | SubjectAltNameWarning | {
"avatar_url": "https://avatars.githubusercontent.com/u/4284791?v=4",
"events_url": "https://api.github.com/users/Davidrjx/events{/privacy}",
"followers_url": "https://api.github.com/users/Davidrjx/followers",
"following_url": "https://api.github.com/users/Davidrjx/following{/other_user}",
"gists_url": "https://api.github.com/users/Davidrjx/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Davidrjx",
"id": 4284791,
"login": "Davidrjx",
"node_id": "MDQ6VXNlcjQyODQ3OTE=",
"organizations_url": "https://api.github.com/users/Davidrjx/orgs",
"received_events_url": "https://api.github.com/users/Davidrjx/received_events",
"repos_url": "https://api.github.com/users/Davidrjx/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Davidrjx/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Davidrjx/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Davidrjx",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 4 | 2018-01-29T10:51:56Z | 2021-09-08T04:00:44Z | 2018-01-29T15:51:29Z | NONE | resolved | Summary.
## Expected Result
drop this warning
## Actual Result
during every request, the warning outputs console.
## Reproduction Steps
```python
import requests
requests.get('url',verify=cert_file_path)
```
## System Information
$ python -m requests.help

This command is only available on Requests v2.16.4 and greater. Otherwise,
please provide some basic information about your system (Python version,
operating system, &c). | {
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4487/reactions"
} | https://api.github.com/repos/psf/requests/issues/4487/timeline | null | completed | null | null | false | [
"@Davidrjx this warning is there to warn you that the certificate you're using either doesn't either doesn't have a SubjectAltName field or the names defined in the field don't match the presenting server. This is a safety feature of urllib3 that is surfaced through Requests, so it's not directly part of our codeba... |
https://api.github.com/repos/psf/requests/issues/4486 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4486/labels{/name} | https://api.github.com/repos/psf/requests/issues/4486/comments | https://api.github.com/repos/psf/requests/issues/4486/events | https://github.com/psf/requests/issues/4486 | 292,332,152 | MDU6SXNzdWUyOTIzMzIxNTI= | 4,486 | Need additional kwarg option to prevent non-SSL redirects | {
"avatar_url": "https://avatars.githubusercontent.com/u/166486?v=4",
"events_url": "https://api.github.com/users/haridsv/events{/privacy}",
"followers_url": "https://api.github.com/users/haridsv/followers",
"following_url": "https://api.github.com/users/haridsv/following{/other_user}",
"gists_url": "https://api.github.com/users/haridsv/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/haridsv",
"id": 166486,
"login": "haridsv",
"node_id": "MDQ6VXNlcjE2NjQ4Ng==",
"organizations_url": "https://api.github.com/users/haridsv/orgs",
"received_events_url": "https://api.github.com/users/haridsv/received_events",
"repos_url": "https://api.github.com/users/haridsv/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/haridsv/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/haridsv/subscriptions",
"type": "User",
"url": "https://api.github.com/users/haridsv",
"user_view_type": "public"
} | [
{
"color": "02e10c",
"default": false,
"description": null,
"id": 76800,
"name": "Feature Request",
"node_id": "MDU6TGFiZWw3NjgwMA==",
"url": "https://api.github.com/repos/psf/requests/labels/Feature%20Request"
},
{
"color": "eb6420",
"default": false,
"description": null... | open | false | null | [] | null | 3 | 2018-01-29T09:12:14Z | 2018-03-12T21:35:26Z | null | NONE | null | When a service erroneously send a redirect from an SSL URL to a non-SSL URL, there is a high possibility that secure data (such as passwords) get sent over plaintext without the application's knowledge. There should be an option to prevent such redirects and I am in favor of preventing such redirects by default, though it may break some existing client code.
## Expected Result
Exception raised for `requests.exceptions.SSLError`
## Actual Result
Redirection is automatically followed
## Reproduction Steps
```
$ openssl req -x509 -newkey rsa:2048 -keyout key.pem -out cert.pem -days 365 -nodes -subj "/C=IN/ST=TS/L=Hyderabad/O=Example.com/OU=R&D/CN=example.com"
$ echo -e "HTTP/1.1 302 Found\nLocation: http://google.com\n\n" | openssl s_server -key key.pem -cert cert.pem -accept 12345
$ python -c 'import requests; print requests.get("https://localhost:12345", verify=False).text'
```
## System Information
```
$ python -c 'import requests; print requests.__version__'
2.8.1
$ python -V
Python 2.7.6
$ uname -a
Linux hdara1-wsl 3.13.0-139-generic #188-Ubuntu SMP Tue Jan 9 14:43:09 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
```
| null | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4486/reactions"
} | https://api.github.com/repos/psf/requests/issues/4486/timeline | null | null | null | null | false | [
"Hey @haridsv, just to be clear, Requests strips all body information and Authorization headers on redirect. We're pretty aggressive about this, so data shouldn't be resent on redirect regardless of SSL downgrading.\r\n\r\nAs for how we handle redirects to non-SSL URIs, I'm not sure we have a better option. There a... |
https://api.github.com/repos/psf/requests/issues/4485 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4485/labels{/name} | https://api.github.com/repos/psf/requests/issues/4485/comments | https://api.github.com/repos/psf/requests/issues/4485/events | https://github.com/psf/requests/issues/4485 | 291,859,327 | MDU6SXNzdWUyOTE4NTkzMjc= | 4,485 | POST turn to GET | {
"avatar_url": "https://avatars.githubusercontent.com/u/20187646?v=4",
"events_url": "https://api.github.com/users/neo-f/events{/privacy}",
"followers_url": "https://api.github.com/users/neo-f/followers",
"following_url": "https://api.github.com/users/neo-f/following{/other_user}",
"gists_url": "https://api.github.com/users/neo-f/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/neo-f",
"id": 20187646,
"login": "neo-f",
"node_id": "MDQ6VXNlcjIwMTg3NjQ2",
"organizations_url": "https://api.github.com/users/neo-f/orgs",
"received_events_url": "https://api.github.com/users/neo-f/received_events",
"repos_url": "https://api.github.com/users/neo-f/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/neo-f/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/neo-f/subscriptions",
"type": "User",
"url": "https://api.github.com/users/neo-f",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 2 | 2018-01-26T10:32:30Z | 2021-09-08T04:00:45Z | 2018-01-26T10:55:36Z | NONE | resolved | when I send a POST request, it became a GET request, I don't know what happend. but the api can work perfectly on postman or httpie
```python
# Python 3.6.4 (default, Jan 6 2018, 11:51:59)
# Type 'copyright', 'credits' or 'license' for more information
# IPython 6.2.1 -- An enhanced Interactive Python. Type '?' for help.
In [1]: import requests
In [2]: r = requests.post('http://192.168.2.214:9999/api-token-auth', json={})
In [3]: r
Out[3]: <Response [405]>
In [4]: r.request.method
Out[4]: 'GET'
```
## System Information
```
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "2.6"
},
"implementation": {
"name": "CPython",
"version": "2.7.10"
},
"platform": {
"release": "17.3.0",
"system": "Darwin"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.18.4"
},
"system_ssl": {
"version": "20000000"
},
"urllib3": {
"version": "1.22"
},
"using_pyopenssl": false
}
``` | {
"avatar_url": "https://avatars.githubusercontent.com/u/20187646?v=4",
"events_url": "https://api.github.com/users/neo-f/events{/privacy}",
"followers_url": "https://api.github.com/users/neo-f/followers",
"following_url": "https://api.github.com/users/neo-f/following{/other_user}",
"gists_url": "https://api.github.com/users/neo-f/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/neo-f",
"id": 20187646,
"login": "neo-f",
"node_id": "MDQ6VXNlcjIwMTg3NjQ2",
"organizations_url": "https://api.github.com/users/neo-f/orgs",
"received_events_url": "https://api.github.com/users/neo-f/received_events",
"repos_url": "https://api.github.com/users/neo-f/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/neo-f/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/neo-f/subscriptions",
"type": "User",
"url": "https://api.github.com/users/neo-f",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4485/reactions"
} | https://api.github.com/repos/psf/requests/issues/4485/timeline | null | completed | null | null | false | [
"You receive a `405 Method Not Allowed` response. The server is not accepting your `POST` request.\r\n\r\nI also can't reproduce this:\r\n\r\n```\r\n>>> import requests\r\n>>> response = requests.post(\"https://www.lhorn.de/\", json={})\r\n>>> response\r\n<Response [405]>\r\n>>> response.request.method\r\n'POST'\r\... |
https://api.github.com/repos/psf/requests/issues/4484 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4484/labels{/name} | https://api.github.com/repos/psf/requests/issues/4484/comments | https://api.github.com/repos/psf/requests/issues/4484/events | https://github.com/psf/requests/issues/4484 | 291,810,144 | MDU6SXNzdWUyOTE4MTAxNDQ= | 4,484 | ChunkedEncodingError when receive response | {
"avatar_url": "https://avatars.githubusercontent.com/u/10825713?v=4",
"events_url": "https://api.github.com/users/etiaxie/events{/privacy}",
"followers_url": "https://api.github.com/users/etiaxie/followers",
"following_url": "https://api.github.com/users/etiaxie/following{/other_user}",
"gists_url": "https://api.github.com/users/etiaxie/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/etiaxie",
"id": 10825713,
"login": "etiaxie",
"node_id": "MDQ6VXNlcjEwODI1NzEz",
"organizations_url": "https://api.github.com/users/etiaxie/orgs",
"received_events_url": "https://api.github.com/users/etiaxie/received_events",
"repos_url": "https://api.github.com/users/etiaxie/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/etiaxie/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/etiaxie/subscriptions",
"type": "User",
"url": "https://api.github.com/users/etiaxie",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2018-01-26T06:25:57Z | 2021-09-08T04:00:45Z | 2018-01-27T12:49:44Z | NONE | resolved | python version:python 2.7.10
requests version:2.11.1
my http request looks like this:

response like this:

then will get the exception:
File "C:\Python27\lib\site-packages\requests\sessions.py", line 476, in request
resp = self.send(prep, **send_kwargs)
File "C:\Python27\lib\site-packages\requests\sessions.py", line 629, in send
r.content
File "C:\Python27\lib\site-packages\requests\models.py", line 755, in content
self._content = bytes().join(self.iter_content(CONTENT_CHUNK_SIZE)) or bytes()
File "C:\Python27\lib\site-packages\requests\models.py", line 679, in generate
raise ChunkedEncodingError(e)
requests.exceptions.ChunkedEncodingError: ("Connection broken: error(10054, '')", error(10054, ''))
| {
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4484/reactions"
} | https://api.github.com/repos/psf/requests/issues/4484/timeline | null | completed | null | null | false | [
"There is not enough information here to assist you. Further this appears to be the server closing the connection before our underlying HTTP library expects you to. As a result, there's no bug in requests. If you have a question, please use [StackOverflow](https://stackoverflow.com)"
] |
https://api.github.com/repos/psf/requests/issues/4483 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4483/labels{/name} | https://api.github.com/repos/psf/requests/issues/4483/comments | https://api.github.com/repos/psf/requests/issues/4483/events | https://github.com/psf/requests/issues/4483 | 291,747,265 | MDU6SXNzdWUyOTE3NDcyNjU= | 4,483 | [Question] Is there in built tracer(distributed tracing) available with request module? | {
"avatar_url": "https://avatars.githubusercontent.com/u/3520037?v=4",
"events_url": "https://api.github.com/users/falu2010/events{/privacy}",
"followers_url": "https://api.github.com/users/falu2010/followers",
"following_url": "https://api.github.com/users/falu2010/following{/other_user}",
"gists_url": "https://api.github.com/users/falu2010/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/falu2010",
"id": 3520037,
"login": "falu2010",
"node_id": "MDQ6VXNlcjM1MjAwMzc=",
"organizations_url": "https://api.github.com/users/falu2010/orgs",
"received_events_url": "https://api.github.com/users/falu2010/received_events",
"repos_url": "https://api.github.com/users/falu2010/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/falu2010/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/falu2010/subscriptions",
"type": "User",
"url": "https://api.github.com/users/falu2010",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2018-01-25T23:05:48Z | 2021-09-08T04:00:45Z | 2018-01-26T00:00:04Z | NONE | resolved | Summary.
I am trying to implement distributed tracing with python request client but I could not find any example is there a default support in requests? Also, I don't want to use flask.
## Expected Result
What you expected.
## Actual Result
What happened instead.
## Reproduction Steps
```python
import requests
```
## System Information
$ python -m requests.help
```
<paste here>
```
This command is only available on Requests v2.16.4 and greater. Otherwise,
please provide some basic information about your system (Python version,
operating system, &c). | {
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4483/reactions"
} | https://api.github.com/repos/psf/requests/issues/4483/timeline | null | completed | null | null | false | [
"Hi there! Thanks for opening this issue. Unfortunately, it seems this is a request for help instead of a report of a defect in the project. Please use [StackOverflow](https://stackoverflow.com) for general usage questions instead and only report defects here."
] |
https://api.github.com/repos/psf/requests/issues/4482 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4482/labels{/name} | https://api.github.com/repos/psf/requests/issues/4482/comments | https://api.github.com/repos/psf/requests/issues/4482/events | https://github.com/psf/requests/issues/4482 | 290,164,968 | MDU6SXNzdWUyOTAxNjQ5Njg= | 4,482 | Too many open files error | {
"avatar_url": "https://avatars.githubusercontent.com/u/25509097?v=4",
"events_url": "https://api.github.com/users/radiantone/events{/privacy}",
"followers_url": "https://api.github.com/users/radiantone/followers",
"following_url": "https://api.github.com/users/radiantone/following{/other_user}",
"gists_url": "https://api.github.com/users/radiantone/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/radiantone",
"id": 25509097,
"login": "radiantone",
"node_id": "MDQ6VXNlcjI1NTA5MDk3",
"organizations_url": "https://api.github.com/users/radiantone/orgs",
"received_events_url": "https://api.github.com/users/radiantone/received_events",
"repos_url": "https://api.github.com/users/radiantone/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/radiantone/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/radiantone/subscriptions",
"type": "User",
"url": "https://api.github.com/users/radiantone",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2018-01-20T04:46:15Z | 2021-09-08T04:00:48Z | 2018-01-21T13:37:59Z | NONE | resolved | Summary.
2018-01-19 12:46:30+0000 [-] File "/usr/local/lib/python2.7/dist-packages/requests/api.py", line 70, in get
2018-01-19 12:46:30+0000 [-] File "/usr/local/lib/python2.7/dist-packages/requests/api.py", line 56, in request
2018-01-19 12:46:30+0000 [-] File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 488, in request
2018-01-19 12:46:30+0000 [-] File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 609, in send
2018-01-19 12:46:30+0000 [-] File "/usr/local/lib/python2.7/dist-packages/requests/adapters.py", line 423, in send
2018-01-19 12:46:30+0000 [-] File "/usr/local/lib/python2.7/dist-packages/requests/packages/urllib3/connectionpool.py", line 600, in urlopen
2018-01-19 12:46:30+0000 [-] File "/usr/local/lib/python2.7/dist-packages/requests/packages/urllib3/connectionpool.py", line 345, in _make_request
2018-01-19 12:46:30+0000 [-] File "/usr/local/lib/python2.7/dist-packages/requests/packages/urllib3/connectionpool.py", line 844, in _validate_conn
2018-01-19 12:46:30+0000 [-] File "/usr/local/lib/python2.7/dist-packages/requests/packages/urllib3/connection.py", line 326, in connect
2018-01-19 12:46:30+0000 [-] File "/usr/local/lib/python2.7/dist-packages/requests/packages/urllib3/util/ssl_.py", line 308, in ssl_wrap_socket
2018-01-19 12:46:30+0000 [-] File "/usr/local/lib/python2.7/dist-packages/requests/packages/urllib3/contrib/pyopenssl.py", line 411, in load_verify_locations
2018-01-19 12:46:30+0000 [-] File "/usr/local/lib/python2.7/dist-packages/OpenSSL/SSL.py", line 525, in load_verify_locations
2018-01-19 12:46:30+0000 [-] File "/usr/local/lib/python2.7/dist-packages/OpenSSL/_util.py", line 48, in exception_from_error_queue
2018-01-19 12:46:30+0000 [-] Error: [('system library', 'fopen', 'Too many open files'), ('BIO routines', 'BIO_new_file', 'system lib'), ('x509 certificate routines', 'X509_load_cert_crl_file', 'system lib')]
## Expected Result
What you expected.
## Actual Result
What happened instead.
## Reproduction Steps
```python
import requests
```
requests==2.13.0
## System Information
A twisted python app running inside docker. All file system limits are unlimited. I only see this in my AWS EC2 instance. On my local ubuntu 16.04 box running dockers I do not see it.
```
<paste here>
```
This command is only available on Requests v2.16.4 and greater. Otherwise,
please provide some basic information about your system (Python version,
operating system, &c). | {
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4482/reactions"
} | https://api.github.com/repos/psf/requests/issues/4482/timeline | null | completed | null | null | false | [
"Hi there, it looks as if this is due to your usage of Requests rather than a bug in Requests. Under normal usage, this problem will never be encountered. I suspect either your system configuration is at fault, or the actual usage of requests (or there may be some other bug).\r\n\r\nIf you need further assistance, ... |
https://api.github.com/repos/psf/requests/issues/4481 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4481/labels{/name} | https://api.github.com/repos/psf/requests/issues/4481/comments | https://api.github.com/repos/psf/requests/issues/4481/events | https://github.com/psf/requests/issues/4481 | 289,870,770 | MDU6SXNzdWUyODk4NzA3NzA= | 4,481 | Connection aborted , while uploading files over 10GB. Instead of closing the issue please resolve it. | {
"avatar_url": "https://avatars.githubusercontent.com/u/9799869?v=4",
"events_url": "https://api.github.com/users/kpputhiyattil/events{/privacy}",
"followers_url": "https://api.github.com/users/kpputhiyattil/followers",
"following_url": "https://api.github.com/users/kpputhiyattil/following{/other_user}",
"gists_url": "https://api.github.com/users/kpputhiyattil/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kpputhiyattil",
"id": 9799869,
"login": "kpputhiyattil",
"node_id": "MDQ6VXNlcjk3OTk4Njk=",
"organizations_url": "https://api.github.com/users/kpputhiyattil/orgs",
"received_events_url": "https://api.github.com/users/kpputhiyattil/received_events",
"repos_url": "https://api.github.com/users/kpputhiyattil/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kpputhiyattil/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kpputhiyattil/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kpputhiyattil",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 0 | 2018-01-19T05:58:36Z | 2021-09-08T04:00:48Z | 2018-01-19T06:22:09Z | NONE | resolved | ## Summary.
When I try to upload a file more than 5GB, connection error occurs, saying the connection is aborted.
ProtocolError('Connection aborted.', error("(-1, 'Unexpected EOF')",)).
I am raising this issue multiple times, but still, i am getting bad experience from your technical team. Instead of addressing the issue they are trying to close the issue, saying it's some server issue. Please provide proper assistance.
## What you expected.
Large File should be uploaded
## What happened instead.
Exception occurs
ProtocolError('Connection aborted.', error("(-1, 'Unexpected EOF')",))
What happened instead.
## Reproduction Steps
```python
import requests
import requests
payload={obj.backupId:backupId,obj.folderId:folderId,obj.backupTxnId:backupTxnId,obj.fileHash:fileHash,obj.accessed:accessed,obj.created:created,obj.modified:modified,obj.isDirectUpload:isDirectUpload,obj.fileName:fileName,obj.fileSize:fileSize, obj.contentHash:contentHash}
urls=obj.upload_url
e = encoder.MultipartEncoder(fields={'backupfile':(os.path.basename(backupfile.encode('unicode-escape')),open(r"D:\\Movies\\Aruvi\\5GB.mp4","rb") )})
m = encoder.MultipartEncoderMonitor(e)
m._read = m.read
m.read = lambda size: m._read(1024)
headers = {'Accept': 'application/json, text/javascript, */*; q=0.01',
'Accept-Encoding': 'gzip, deflate, br',
'Accept-Language': 'en-GB,en-US;q=0.8,en;q=0.6','Connection': 'keep-alive','Content-Type': m.content_type}
uploadObj = BackupResponse.upload_files()
response = APIResponse.Response(uploadObj)
resp_obj = requests.post(urls, params=payload, data=m, files=None, headers=headers, cookies=self.cookies)
response_object = calling_obj.set_attr(resp_obj.json())
## System Information
$ python -m requests.help
```
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": "2.0.3"
},
"idna": {
"version": ""
},
"implementation": {
"name": "CPython",
"version": "2.7.14"
},
"platform": {
"release": "10",
"system": "Windows"
},
"pyOpenSSL": {
"openssl_version": "1010006f",
"version": "17.2.0"
},
"requests": {
"version": "2.18.4"
},
"system_ssl": {
"version": "100020bf"
},
"urllib3": {
"version": "1.22"
},
"using_pyopenssl": true
}
```
This command is only available on Requests v2.16.4 and greater. Otherwise,
please provide some basic information about your system (Python version,
operating system, &c). | {
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4481/reactions"
} | https://api.github.com/repos/psf/requests/issues/4481/timeline | null | completed | null | null | false | [] |
https://api.github.com/repos/psf/requests/issues/4480 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4480/labels{/name} | https://api.github.com/repos/psf/requests/issues/4480/comments | https://api.github.com/repos/psf/requests/issues/4480/events | https://github.com/psf/requests/issues/4480 | 289,868,211 | MDU6SXNzdWUyODk4NjgyMTE= | 4,480 | Connection aborted , while uploading files over 10GB | {
"avatar_url": "https://avatars.githubusercontent.com/u/9799869?v=4",
"events_url": "https://api.github.com/users/kpputhiyattil/events{/privacy}",
"followers_url": "https://api.github.com/users/kpputhiyattil/followers",
"following_url": "https://api.github.com/users/kpputhiyattil/following{/other_user}",
"gists_url": "https://api.github.com/users/kpputhiyattil/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kpputhiyattil",
"id": 9799869,
"login": "kpputhiyattil",
"node_id": "MDQ6VXNlcjk3OTk4Njk=",
"organizations_url": "https://api.github.com/users/kpputhiyattil/orgs",
"received_events_url": "https://api.github.com/users/kpputhiyattil/received_events",
"repos_url": "https://api.github.com/users/kpputhiyattil/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kpputhiyattil/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kpputhiyattil/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kpputhiyattil",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 5 | 2018-01-19T05:39:35Z | 2021-09-08T04:00:48Z | 2018-01-19T05:47:29Z | NONE | resolved | Summary.
When I try to upload a file more than 5GB, connection error occurs, saying the connection is aborted.
ProtocolError('Connection aborted.', error("(-1, 'Unexpected EOF')",))
## Expected Result
Large File should be uploaded
## Actual Result
Exception occurs
ProtocolError('Connection aborted.', error("(-1, 'Unexpected EOF')",))
What happened instead.
## Reproduction Steps
```python
import requests
payload={obj.backupId:backupId,obj.folderId:folderId,obj.backupTxnId:backupTxnId,obj.fileHash:fileHash,obj.accessed:accessed,obj.created:created,obj.modified:modified,obj.isDirectUpload:isDirectUpload,obj.fileName:fileName,obj.fileSize:fileSize, obj.contentHash:contentHash}
urls=obj.upload_url
e = encoder.MultipartEncoder(fields={'backupfile':(os.path.basename(backupfile.encode('unicode-escape')),open(r"D:\\Movies\\Aruvi\\5GB.mp4","rb") )})
m = encoder.MultipartEncoderMonitor(e)
m._read = m.read
m.read = lambda size: m._read(1024)
headers = {'Accept': 'application/json, text/javascript, */*; q=0.01',
'Accept-Encoding': 'gzip, deflate, br',
'Accept-Language': 'en-GB,en-US;q=0.8,en;q=0.6','Connection': 'keep-alive','Content-Type': m.content_type}
uploadObj = BackupResponse.upload_files()
response = APIResponse.Response(uploadObj)
resp_obj = requests.post(urls, params=payload, data=m, files=None, headers=headers, cookies=self.cookies)
response_object = calling_obj.set_attr(resp_obj.json())
```
## System Information
```
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": "2.0.3"
},
"idna": {
"version": ""
},
"implementation": {
"name": "CPython",
"version": "2.7.14"
},
"platform": {
"release": "10",
"system": "Windows"
},
"pyOpenSSL": {
"openssl_version": "1010006f",
"version": "17.2.0"
},
"requests": {
"version": "2.18.4"
},
"system_ssl": {
"version": "100020bf"
},
"urllib3": {
"version": "1.22"
},
"using_pyopenssl": true
}
```
This command is only available on Requests v2.16.4 and greater. Otherwise,
please provide some basic information about your system (Python version,
operating system, &c). | {
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4480/reactions"
} | https://api.github.com/repos/psf/requests/issues/4480/timeline | null | completed | null | null | false | [
"Hey @kpputhiyattil, I'm going to have to ask you to please stop opening the same issue repeatedly. As we've stated in the previous issues, this is not a defect in Requests, the server is closing the connection on you. Please use [StackOverflow](https://stackoverflow.com) for further usability questions. Thank you!... |
https://api.github.com/repos/psf/requests/issues/4479 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4479/labels{/name} | https://api.github.com/repos/psf/requests/issues/4479/comments | https://api.github.com/repos/psf/requests/issues/4479/events | https://github.com/psf/requests/issues/4479 | 289,705,711 | MDU6SXNzdWUyODk3MDU3MTE= | 4,479 | Connection aborted , while uploading files over 10GB | {
"avatar_url": "https://avatars.githubusercontent.com/u/9799869?v=4",
"events_url": "https://api.github.com/users/kpputhiyattil/events{/privacy}",
"followers_url": "https://api.github.com/users/kpputhiyattil/followers",
"following_url": "https://api.github.com/users/kpputhiyattil/following{/other_user}",
"gists_url": "https://api.github.com/users/kpputhiyattil/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kpputhiyattil",
"id": 9799869,
"login": "kpputhiyattil",
"node_id": "MDQ6VXNlcjk3OTk4Njk=",
"organizations_url": "https://api.github.com/users/kpputhiyattil/orgs",
"received_events_url": "https://api.github.com/users/kpputhiyattil/received_events",
"repos_url": "https://api.github.com/users/kpputhiyattil/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kpputhiyattil/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kpputhiyattil/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kpputhiyattil",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2018-01-18T17:07:06Z | 2021-09-08T04:00:49Z | 2018-01-18T19:28:06Z | NONE | resolved | Summary.
When I try to upload a file more than 5GB, connection error occurs, saying the connection is aborted.
ProtocolError('Connection aborted.', error("(-1, 'Unexpected EOF')",))
## Expected Result
File should be uploaded
What you expected.
## Actual Result
Exception occurs
ProtocolError('Connection aborted.', error("(-1, 'Unexpected EOF')",))
What happened instead.
## Reproduction Steps
```python
request_obj = APIServices.HttpReq.getInstance()
e = encoder.MultipartEncoder(fields={'backupfile':(os.path.basename(backupfile.encode('unicode-escape')),open(r"D:\\Movies\\Aruvi\\www.TamilRockers.st - Aruvi (2017)[1080p HQ HD - AVC - MP4 - 5.5GB - Tamil].mp4","rb") )})
m = encoder.MultipartEncoderMonitor(e)
m._read = m.read
m.read = lambda size: m._read(1024)
headers = {'Accept': 'application/json, text/javascript, */*; q=0.01',
'Accept-Encoding': 'gzip, deflate, br',
'Accept-Language': 'en-GB,en-US;q=0.8,en;q=0.6','Connection': 'keep-alive','Content-Type': m.content_type}
uploadObj = BackupResponse.upload_files()
response = APIResponse.Response(uploadObj)
response_obj = request_obj.upload_reqPost(url=urls, calling_obj=response, params=payload,data=m,contentType=m.content_type)
```
## System Information
$ python -m requests.help
```
<paste here>
```
This command is only available on Requests v2.16.4 and greater. Otherwise,
please provide some basic information about your system (Python version,
operating system, &c). | {
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4479/reactions"
} | https://api.github.com/repos/psf/requests/issues/4479/timeline | null | completed | null | null | false | [
"Hey @kpputhiyattil, this appears to be a request for assistance. We reserve issues on the tracker for a defect in Requests, and suggest using [StackOverflow](https://stackoverflow.com) for usability questions. Also given none of the code provided is clearly related to Requests there’s nothing we can investigate."
... |
https://api.github.com/repos/psf/requests/issues/4478 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4478/labels{/name} | https://api.github.com/repos/psf/requests/issues/4478/comments | https://api.github.com/repos/psf/requests/issues/4478/events | https://github.com/psf/requests/issues/4478 | 289,702,884 | MDU6SXNzdWUyODk3MDI4ODQ= | 4,478 | ConnectionError C, while uploading 10 | {
"avatar_url": "https://avatars.githubusercontent.com/u/9799869?v=4",
"events_url": "https://api.github.com/users/kpputhiyattil/events{/privacy}",
"followers_url": "https://api.github.com/users/kpputhiyattil/followers",
"following_url": "https://api.github.com/users/kpputhiyattil/following{/other_user}",
"gists_url": "https://api.github.com/users/kpputhiyattil/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kpputhiyattil",
"id": 9799869,
"login": "kpputhiyattil",
"node_id": "MDQ6VXNlcjk3OTk4Njk=",
"organizations_url": "https://api.github.com/users/kpputhiyattil/orgs",
"received_events_url": "https://api.github.com/users/kpputhiyattil/received_events",
"repos_url": "https://api.github.com/users/kpputhiyattil/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kpputhiyattil/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kpputhiyattil/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kpputhiyattil",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 2 | 2018-01-18T16:59:11Z | 2021-09-08T04:00:49Z | 2018-01-18T17:02:35Z | NONE | resolved | Summary.
When I try to upload a file more than 5GB, connection error occurs, saying the connection is aborted.
ProtocolError('Connection aborted.', error("(-1, 'Unexpected EOF')",))
## Expected Result
File should be uploaded
What you expected.
## Actual Result
Exception occurs
ProtocolError('Connection aborted.', error("(-1, 'Unexpected EOF')",))
What happened instead.
## Reproduction Steps
```python
request_obj = APIServices.HttpReq.getInstance()
e = encoder.MultipartEncoder(fields={'backupfile':(os.path.basename(backupfile.encode('unicode-escape')),open(r"D:\\Movies\\Aruvi\\www.TamilRockers.st - Aruvi (2017)[1080p HQ HD - AVC - MP4 - 5.5GB - Tamil].mp4","rb") )})
m = encoder.MultipartEncoderMonitor(e)
m._read = m.read
m.read = lambda size: m._read(1024)
headers = {'Accept': 'application/json, text/javascript, */*; q=0.01',
'Accept-Encoding': 'gzip, deflate, br',
'Accept-Language': 'en-GB,en-US;q=0.8,en;q=0.6','Connection': 'keep-alive','Content-Type': m.content_type}
uploadObj = BackupResponse.upload_files()
response = APIResponse.Response(uploadObj)
response_obj = request_obj.upload_reqPost(url=urls, calling_obj=response, params=payload,data=m,contentType=m.content_type)
```
## System Information
$ python -m requests.help
```
<paste here>
```
This command is only available on Requests v2.16.4 and greater. Otherwise,
please provide some basic information about your system (Python version,
operating system, &c). | {
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4478/reactions"
} | https://api.github.com/repos/psf/requests/issues/4478/timeline | null | completed | null | null | false | [
"When I try to upload a file more than 5GB, connection error occurs, saying\nthe connection is aborted.\nProtocolError('Connection aborted.', error(\"(-1, 'Unexpected EOF')\",))\n\nOn Thu, Jan 18, 2018 at 10:33 PM, Ian Stapleton Cordasco <\nnotifications@github.com> wrote:\n\n> Closed #4478 <https://github.com/requ... |
https://api.github.com/repos/psf/requests/issues/4477 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4477/labels{/name} | https://api.github.com/repos/psf/requests/issues/4477/comments | https://api.github.com/repos/psf/requests/issues/4477/events | https://github.com/psf/requests/issues/4477 | 289,359,332 | MDU6SXNzdWUyODkzNTkzMzI= | 4,477 | POST to CA fails using TLS | {
"avatar_url": "https://avatars.githubusercontent.com/u/12820045?v=4",
"events_url": "https://api.github.com/users/vieirin/events{/privacy}",
"followers_url": "https://api.github.com/users/vieirin/followers",
"following_url": "https://api.github.com/users/vieirin/following{/other_user}",
"gists_url": "https://api.github.com/users/vieirin/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/vieirin",
"id": 12820045,
"login": "vieirin",
"node_id": "MDQ6VXNlcjEyODIwMDQ1",
"organizations_url": "https://api.github.com/users/vieirin/orgs",
"received_events_url": "https://api.github.com/users/vieirin/received_events",
"repos_url": "https://api.github.com/users/vieirin/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/vieirin/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/vieirin/subscriptions",
"type": "User",
"url": "https://api.github.com/users/vieirin",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 16 | 2018-01-17T18:00:26Z | 2021-09-07T00:06:20Z | 2018-01-17T19:16:47Z | NONE | resolved | Hello i'm facing a issue using requests lib to post to a CA with self-signed certificate Everything goes well when I POST from curl:
```curl --cacert "./ca-cert.pem" https://ca.goledger.com:7054/api/v1/cainfo -X POST```
I get my response with CAChain
If I try using requests lib it fails
## Expected Result
A response containing CAChain from CA at ca.goledger.com
## Actual Result
The command fails throwing a strange SSLError (BAD_ECC_CERT)
```python
Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/urllib3-1.22-py3.5.egg/urllib3/connectionpool.py", line 601, in urlopen
chunked=chunked)
File "/usr/local/lib/python3.5/dist-packages/urllib3-1.22-py3.5.egg/urllib3/connectionpool.py", line 346, in _make_request
self._validate_conn(conn)
File "/usr/local/lib/python3.5/dist-packages/urllib3-1.22-py3.5.egg/urllib3/connectionpool.py", line 850, in _validate_conn
conn.connect()
File "/usr/local/lib/python3.5/dist-packages/urllib3-1.22-py3.5.egg/urllib3/connection.py", line 326, in connect
ssl_context=context)
File "/usr/local/lib/python3.5/dist-packages/urllib3-1.22-py3.5.egg/urllib3/util/ssl_.py", line 329, in ssl_wrap_socket
return context.wrap_socket(sock, server_hostname=server_hostname)
File "/usr/lib/python3.5/ssl.py", line 377, in wrap_socket
_context=self)
File "/usr/lib/python3.5/ssl.py", line 752, in __init__
self.do_handshake()
File "/usr/lib/python3.5/ssl.py", line 988, in do_handshake
self._sslobj.do_handshake()
File "/usr/lib/python3.5/ssl.py", line 633, in do_handshake
self._sslobj.do_handshake()
ssl.SSLError: [SSL: BAD_ECC_CERT] bad ecc cert (_ssl.c:645)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/requests-2.18.4-py3.5.egg/requests/adapters.py", line 440, in send
timeout=timeout
File "/usr/local/lib/python3.5/dist-packages/urllib3-1.22-py3.5.egg/urllib3/connectionpool.py", line 639, in urlopen
_stacktrace=sys.exc_info()[2])
File "/usr/local/lib/python3.5/dist-packages/urllib3-1.22-py3.5.egg/urllib3/util/retry.py", line 388, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='ca.goledger.com', port=7054): Max retries exceeded with url: /api/v1/cainfo (Caused by SSLError(SSLError(1, '[SSL: BAD_ECC_CERT] bad ecc cert (_ssl.c:645)'),))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.5/dist-packages/requests-2.18.4-py3.5.egg/requests/api.py", line 112, in post
return request('post', url, data=data, json=json, **kwargs)
File "/usr/local/lib/python3.5/dist-packages/requests-2.18.4-py3.5.egg/requests/api.py", line 58, in request
return session.request(method=method, url=url, **kwargs)
File "/usr/local/lib/python3.5/dist-packages/requests-2.18.4-py3.5.egg/requests/sessions.py", line 508, in request
resp = self.send(prep, **send_kwargs)
File "/usr/local/lib/python3.5/dist-packages/requests-2.18.4-py3.5.egg/requests/sessions.py", line 618, in send
r = adapter.send(request, **kwargs)
File "/usr/local/lib/python3.5/dist-packages/requests-2.18.4-py3.5.egg/requests/adapters.py", line 506, in send
raise SSLError(e, request=request)
requests.exceptions.SSLError: HTTPSConnectionPool(host='ca.goledger.com', port=7054): Max retries exceeded with url: /api/v1/cainfo (Caused by SSLError(SSLError(1, '[SSL: BAD_ECC_CERT] bad ecc cert (_ssl.c:645)'),))
```
## Reproduction Steps
```python
import requests
requests.post(url='https://ca.goledger.com:7054/api/v1/cainfo', verify='./ca-cert.pem')
```
## System Information
```
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "2.6"
},
"implementation": {
"name": "CPython",
"version": "3.5.2"
},
"platform": {
"release": "4.10.0-38-generic",
"system": "Linux"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.18.4"
},
"system_ssl": {
"version": "1000207f"
},
"urllib3": {
"version": "1.22"
},
"using_pyopenssl": false
}
``` | {
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4477/reactions"
} | https://api.github.com/repos/psf/requests/issues/4477/timeline | null | completed | null | null | false | [
"@tiran Do you know if python 3.5 can handle ECC certificates from servers? It seems to either be that we can't handle that or the ECC cert is somehow invalid that this server is providing.\r\n\r\nI can't figure this out because `openssl s_client -connect ca.goledger.com:7054` can't find the service. I'm not sure t... |
https://api.github.com/repos/psf/requests/issues/4476 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4476/labels{/name} | https://api.github.com/repos/psf/requests/issues/4476/comments | https://api.github.com/repos/psf/requests/issues/4476/events | https://github.com/psf/requests/issues/4476 | 289,322,450 | MDU6SXNzdWUyODkzMjI0NTA= | 4,476 | Install of Requests fail with ValueError: source code string cannot contain null bytes | {
"avatar_url": "https://avatars.githubusercontent.com/u/35535238?v=4",
"events_url": "https://api.github.com/users/RalphShelly/events{/privacy}",
"followers_url": "https://api.github.com/users/RalphShelly/followers",
"following_url": "https://api.github.com/users/RalphShelly/following{/other_user}",
"gists_url": "https://api.github.com/users/RalphShelly/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/RalphShelly",
"id": 35535238,
"login": "RalphShelly",
"node_id": "MDQ6VXNlcjM1NTM1MjM4",
"organizations_url": "https://api.github.com/users/RalphShelly/orgs",
"received_events_url": "https://api.github.com/users/RalphShelly/received_events",
"repos_url": "https://api.github.com/users/RalphShelly/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/RalphShelly/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/RalphShelly/subscriptions",
"type": "User",
"url": "https://api.github.com/users/RalphShelly",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 2 | 2018-01-17T16:11:35Z | 2021-09-08T04:00:49Z | 2018-01-17T16:23:52Z | NONE | resolved | Summary.
Typed 'pip install requests' and received the following error: (I also uninstalled Python and reinstalled it to see if the message would disappear, but it remained.)
C:\Windows\system32>pip install requests
Traceback (most recent call last):
File "c:\users\e53192\appdata\local\programs\python\python36-32\lib\runpy.py",
line 193, in _run_module_as_main
"__main__", mod_spec)
File "c:\users\e53192\appdata\local\programs\python\python36-32\lib\runpy.py",
line 85, in _run_code
exec(code, run_globals)
File "C:\Users\e53192\AppData\Local\Programs\Python\Python36-32\Scripts\pip.ex
e\__main__.py", line 5, in <module>
File "c:\users\e53192\appdata\local\programs\python\python36-32\lib\site-packa
ges\pip\__init__.py", line 26, in <module>
from pip.utils import get_installed_distributions, get_prog
File "c:\users\e53192\appdata\local\programs\python\python36-32\lib\site-packa
ges\pip\utils\__init__.py", line 27, in <module>
from pip._vendor import pkg_resources
File "c:\users\e53192\appdata\local\programs\python\python36-32\lib\site-packa
ges\pip\_vendor\pkg_resources\__init__.py", line 70, in <module>
from pip._vendor import appdirs
File "c:\users\e53192\appdata\local\programs\python\python36-32\lib\site-packa
ges\pip\_vendor\appdirs.py", line 510, in <module>
import win32com.shell
ValueError: source code string cannot contain null bytes
C:\Windows\system32>
## Expected Result
What you expected.
## Actual Result
What happened instead.
## Reproduction Steps
```python
import requests
```
## System Information
$ python -m requests.help
```
<paste here>
```
This command is only available on Requests v2.16.4 and greater. Otherwise,
please provide some basic information about your system (Python version,
operating system, &c). | {
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4476/reactions"
} | https://api.github.com/repos/psf/requests/issues/4476/timeline | null | completed | null | null | false | [
"Typed 'pip install requests' and received the following error: (I also uninstalled Python and reinstalled it to see if the message would disappear, but it remained.)\r\n\r\nC:\\Windows\\system32>pip install requests\r\n Traceback (most recent call last):\r\n File \"c:\\users\\e53192\\appdata\\local\\programs\\pyth... |
https://api.github.com/repos/psf/requests/issues/4475 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4475/labels{/name} | https://api.github.com/repos/psf/requests/issues/4475/comments | https://api.github.com/repos/psf/requests/issues/4475/events | https://github.com/psf/requests/issues/4475 | 289,186,164 | MDU6SXNzdWUyODkxODYxNjQ= | 4,475 | interrupt request from main thread | {
"avatar_url": "https://avatars.githubusercontent.com/u/8723106?v=4",
"events_url": "https://api.github.com/users/lonnyzhang423/events{/privacy}",
"followers_url": "https://api.github.com/users/lonnyzhang423/followers",
"following_url": "https://api.github.com/users/lonnyzhang423/following{/other_user}",
"gists_url": "https://api.github.com/users/lonnyzhang423/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/lonnyzhang423",
"id": 8723106,
"login": "lonnyzhang423",
"node_id": "MDQ6VXNlcjg3MjMxMDY=",
"organizations_url": "https://api.github.com/users/lonnyzhang423/orgs",
"received_events_url": "https://api.github.com/users/lonnyzhang423/received_events",
"repos_url": "https://api.github.com/users/lonnyzhang423/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/lonnyzhang423/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/lonnyzhang423/subscriptions",
"type": "User",
"url": "https://api.github.com/users/lonnyzhang423",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 2 | 2018-01-17T08:54:12Z | 2021-09-08T04:00:50Z | 2018-01-17T11:51:29Z | NONE | resolved | How to interrupt an ongoing request in response to signal.SIGINT from main thread?
```
requests.get(url)
```
The code above running in a child thread. I expect the request return or raise an exception immediately once the main thread catch `KeyboardException`.
How to do that?
Thanks in advance. | {
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4475/reactions"
} | https://api.github.com/repos/psf/requests/issues/4475/timeline | null | completed | null | null | false | [
"Hi there! Thanks for opening this issue. Unfortunately, it seems this is a request for help instead of a report of a defect in the project. Please use [StackOverflow](https://stackoverflow.com) for general usage questions instead and only report defects here.",
"Thanks for your advice."
] |
https://api.github.com/repos/psf/requests/issues/4474 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4474/labels{/name} | https://api.github.com/repos/psf/requests/issues/4474/comments | https://api.github.com/repos/psf/requests/issues/4474/events | https://github.com/psf/requests/issues/4474 | 289,075,175 | MDU6SXNzdWUyODkwNzUxNzU= | 4,474 | Inconsistency while reading chunked output | {
"avatar_url": "https://avatars.githubusercontent.com/u/5338855?v=4",
"events_url": "https://api.github.com/users/jayesh92/events{/privacy}",
"followers_url": "https://api.github.com/users/jayesh92/followers",
"following_url": "https://api.github.com/users/jayesh92/following{/other_user}",
"gists_url": "https://api.github.com/users/jayesh92/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jayesh92",
"id": 5338855,
"login": "jayesh92",
"node_id": "MDQ6VXNlcjUzMzg4NTU=",
"organizations_url": "https://api.github.com/users/jayesh92/orgs",
"received_events_url": "https://api.github.com/users/jayesh92/received_events",
"repos_url": "https://api.github.com/users/jayesh92/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jayesh92/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jayesh92/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jayesh92",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 7 | 2018-01-16T22:17:04Z | 2021-09-08T04:00:50Z | 2018-01-17T03:22:43Z | NONE | resolved | I have an API which returns Chunked response. As per the requests documentation I'm reading using `iter_content` with `chunk_size` as `None`.
Documentation Referenced: http://docs.python-requests.org/en/master/user/advanced/#chunk-encoded-requests
Sample Code:
```
import time
import requests
def get_chunked_response():
session = requests.Session()
chunked_response = session.post(
URL,
json={},
stream=True,
timeout=(60, 60))
assert chunked_response.headers['Transfer-Encoding'] == 'chunked'
return chunked_response
def stich_dashboards(chunked_response):
chunks_read = 0
output = ''
for chunk in chunked_response.iter_content(chunk_size=None,
decode_unicode=False):
chunks_read += 1
output += chunk
time.sleep(0.001)
print "Total Chunks read {0}, Output size {1}".format(
chunks_read, len(output))
chunks = get_chunked_response()
stich_dashboards(chunks)
```
Output
```
jlahori@jlahori-ld2 ~ while [ 1 ]; do python test_requests.py; done
Total Chunks read 109771, Output size 444895380
Total Chunks read 117570, Output size 476956539
Total Chunks read 97814, Output size 395584817
Total Chunks read 116737, Output size 472958565
```
Why should I get different output sizes each time ?
However when I remove the `time.sleep(0.001)` from the code, I see the output size is consistent however, number of chunks read still differ.
Output with this change:
```
jlahori@jlahori-ld2 ~ while [ 1 ]; do python test_requests.py; done
Total Chunks read 176138, Output size 715589558
Total Chunks read 176012, Output size 715589558
Total Chunks read 176225, Output size 715589558
Total Chunks read 176161, Output size 715589558
```
```
jlahori@jlahori-ld2 ~ pip freeze | grep requests
requests==2.18.4
```
`curl` to the server always returns the same received size.
```
jlahori@jlahori-ld2 ~ while [ 1 ]; do curl -i -X POST <URL> -d '{}' --raw > ~/out; done
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 628M 0 628M 0 2 142M 0 --:--:-- 0:00:04 --:--:-- 145M
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 628M 0 628M 0 2 140M 0 --:--:-- 0:00:04 --:--:-- 143M
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 628M 0 628M 0 2 137M 0 --:--:-- 0:00:04 --:--:-- 137M
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 628M 0 628M 0 2 145M 0 --:--:-- 0:00:04 --:--:-- 146M
```
Any helps on this issue would be much appreciated. Thanks ! | {
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4474/reactions"
} | https://api.github.com/repos/psf/requests/issues/4474/timeline | null | completed | null | null | false | [
"Hi there! Thanks for opening this issue. Unfortunately, it seems this is a request for help instead of a report of a defect in the project. Please use [StackOverflow](https://stackoverflow.com) for general usage questions instead and only report defects here.",
"It looks to be an issue with the requests library ... |
https://api.github.com/repos/psf/requests/issues/4473 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4473/labels{/name} | https://api.github.com/repos/psf/requests/issues/4473/comments | https://api.github.com/repos/psf/requests/issues/4473/events | https://github.com/psf/requests/issues/4473 | 288,848,213 | MDU6SXNzdWUyODg4NDgyMTM= | 4,473 | AttributeError: module 'socket' has no attribute 'create_connection' | {
"avatar_url": "https://avatars.githubusercontent.com/u/30019034?v=4",
"events_url": "https://api.github.com/users/kosuke-zhang/events{/privacy}",
"followers_url": "https://api.github.com/users/kosuke-zhang/followers",
"following_url": "https://api.github.com/users/kosuke-zhang/following{/other_user}",
"gists_url": "https://api.github.com/users/kosuke-zhang/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kosuke-zhang",
"id": 30019034,
"login": "kosuke-zhang",
"node_id": "MDQ6VXNlcjMwMDE5MDM0",
"organizations_url": "https://api.github.com/users/kosuke-zhang/orgs",
"received_events_url": "https://api.github.com/users/kosuke-zhang/received_events",
"repos_url": "https://api.github.com/users/kosuke-zhang/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kosuke-zhang/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kosuke-zhang/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kosuke-zhang",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2018-01-16T10:03:59Z | 2021-09-08T04:00:52Z | 2018-01-16T13:28:40Z | NONE | resolved | manjaro python3.6
requests==2.18.4
PyMySQL==0.8.0
urllib3==1.22
certifi==2017.11.5
chardet==3.0.4
idna==2.5
six==1.11.0
import requests
req = requests.get('https://www.baidu.com')
------------------------------------------------error-----------------------------------------------------------
```
Traceback (most recent call last):
File "/home/zhangxu/project/python/map/test.py", line 1, in <module>
import requests
File "/home/zhangxu/.virtualenvs/spider/lib/python3.6/site-packages/requests/__init__.py", line 48, in <module>
import urllib3
File "/home/zhangxu/.virtualenvs/spider/lib/python3.6/site-packages/urllib3/__init__.py", line 8, in <module>
from .connectionpool import (
File "/home/zhangxu/.virtualenvs/spider/lib/python3.6/site-packages/urllib3/connectionpool.py", line 7, in <module>
from socket import error as SocketError, timeout as SocketTimeout
File "/usr/lib64/python3.6/socket.py", line 52, in <module>
import os, sys, io, selectors
File "/usr/lib64/python3.6/selectors.py", line 11, in <module>
import select
File "/home/zhangxu/project/python/map/select.py", line 31, in <module>
con = connect.mysql_save()
File "/home/zhangxu/project/python/map/connect.py", line 7, in __init__
self.conn = self.connect()
File "/home/zhangxu/project/python/map/connect.py", line 16, in connect
conn = pymysql.connect(host=host, port="", user=user, passwd=password, db=dbName, charset=charset)
File "/home/zhangxu/.virtualenvs/spider/lib/python3.6/site-packages/pymysql/__init__.py", line 90, in Connect
return Connection(*args, **kwargs)
File "/home/zhangxu/.virtualenvs/spider/lib/python3.6/site-packages/pymysql/connections.py", line 699, in __init__
self.connect()
File "/home/zhangxu/.virtualenvs/spider/lib/python3.6/site-packages/pymysql/connections.py", line 918, in connect
sock = socket.create_connection(
AttributeError: module 'socket' has no attribute 'create_connection'
``` | {
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4473/reactions"
} | https://api.github.com/repos/psf/requests/issues/4473/timeline | null | completed | null | null | false | [
"You have a file called `select.py` that you've placed in your import path. When the standard library tries to import the stdlib `select` it gets yours and this is why you're seeing this issue.\r\n\r\nThis is not a bug in requests. If you need further assistance, please post a question on [StackOverflow](https://st... |
https://api.github.com/repos/psf/requests/issues/4472 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4472/labels{/name} | https://api.github.com/repos/psf/requests/issues/4472/comments | https://api.github.com/repos/psf/requests/issues/4472/events | https://github.com/psf/requests/issues/4472 | 288,799,107 | MDU6SXNzdWUyODg3OTkxMDc= | 4,472 | Request function never returns | {
"avatar_url": "https://avatars.githubusercontent.com/u/10137?v=4",
"events_url": "https://api.github.com/users/ghost/events{/privacy}",
"followers_url": "https://api.github.com/users/ghost/followers",
"following_url": "https://api.github.com/users/ghost/following{/other_user}",
"gists_url": "https://api.github.com/users/ghost/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/ghost",
"id": 10137,
"login": "ghost",
"node_id": "MDQ6VXNlcjEwMTM3",
"organizations_url": "https://api.github.com/users/ghost/orgs",
"received_events_url": "https://api.github.com/users/ghost/received_events",
"repos_url": "https://api.github.com/users/ghost/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/ghost/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ghost/subscriptions",
"type": "User",
"url": "https://api.github.com/users/ghost",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 11 | 2018-01-16T06:28:07Z | 2021-09-08T03:00:32Z | 2018-03-12T21:42:34Z | NONE | resolved | I've a scraper that uses 200 threads to scrape and one thread to post data to an api with POST method.
Here's an excerpt from the log (normal behaviour with DEBUG loglevel):
> 06:25:44 MainThread : Before sending
> 06:25:46 MainThread : Resetting dropped connection: api.autosforsale.com
> 06:25:50 MainThread : http://api.autosforsale.com:80 "POST /acceptbulkrecords/?api_key=xxx HTTP/1.1" 200 None
> 06:25:50 MainThread : After sending: <Response [200]>
> 06:25:51 MainThread : Sent 1005. API STATUS: 200 {
And then when it's about to send another batch:
> 06:27:26 MainThread : Before sending
> 06:27:27 MainThread : Resetting dropped connection: api.autosforsale.com
There's no response in 8 hours.
I'm ok with anything that'll give a way to retry. I don't remember exactly, but I think I get this problem every now and then, although quite rarely.
The piece of code (s=Session()):
```python
b=BytesIO(dumps(batch).encode())
lg.info('Before sending')
r=s.post(API_URL, params={'api_key': API_KEY},
files=[('files[]', ('.json', b, 'application/octet-stream'))],
data={'source': 'cargurus', 'time_stamp': import_start},
timeout=20
)
lg.info('After sending: {}'.format(r))
```
## System Information
$ python -m requests.help
```
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "2.6"
},
"implementation": {
"name": "CPython",
"version": "3.6.3"
},
"platform": {
"release": "2.6.32-696.10.3.el6.x86_64",
"system": "Linux"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.18.4"
},
"system_ssl": {
"version": "1000105f"
},
"urllib3": {
"version": "1.22"
},
"using_pyopenssl": false
}
```
| {
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4472/reactions"
} | https://api.github.com/repos/psf/requests/issues/4472/timeline | null | completed | null | null | false | [
"Ok, got some more information. I was running it with tcpdump and here's what's in there.\r\n\r\n```\r\n> 00:34:34.063309 IP 192.126.255.227.60926 > 104.27.177.155.http: Flags [P.], seq 23053526:23054004, ack 3122, win 173, length 478\r\n> E..../@.@....~..h......P58.#.9.\"P.......nated Power Window Switches|Power W... |
https://api.github.com/repos/psf/requests/issues/4471 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4471/labels{/name} | https://api.github.com/repos/psf/requests/issues/4471/comments | https://api.github.com/repos/psf/requests/issues/4471/events | https://github.com/psf/requests/issues/4471 | 288,796,624 | MDU6SXNzdWUyODg3OTY2MjQ= | 4,471 | requests use https proxies problem | {
"avatar_url": "https://avatars.githubusercontent.com/u/29603143?v=4",
"events_url": "https://api.github.com/users/super5hunz1/events{/privacy}",
"followers_url": "https://api.github.com/users/super5hunz1/followers",
"following_url": "https://api.github.com/users/super5hunz1/following{/other_user}",
"gists_url": "https://api.github.com/users/super5hunz1/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/super5hunz1",
"id": 29603143,
"login": "super5hunz1",
"node_id": "MDQ6VXNlcjI5NjAzMTQz",
"organizations_url": "https://api.github.com/users/super5hunz1/orgs",
"received_events_url": "https://api.github.com/users/super5hunz1/received_events",
"repos_url": "https://api.github.com/users/super5hunz1/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/super5hunz1/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/super5hunz1/subscriptions",
"type": "User",
"url": "https://api.github.com/users/super5hunz1",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 2 | 2018-01-16T06:12:22Z | 2021-09-08T02:10:05Z | 2018-04-29T18:05:23Z | NONE | resolved | Summary.
i have a problem about proxies
use requests https proxies can't work.
but i use urllib is work.
thank for u reply :+1:
## Expected Result
What you expected.
## Actual Result
111.183.228.184:43841
C:\Program Files\Python36\lib\site-packages\urllib3\connectionpool.py:858: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings InsecureRequestWarning)
HTTPSConnectionPool(host='om.qq.com', port=443): Max retries exceeded with url: /userAuth/index (Caused by SSLError(SSLError(1, '[SSL: UNKNOWN_PROTOCOL] unknown
protocol (_ssl.c:777)'),))
## Reproduction Steps
```python
import os
import ssl
import time
import requests
from pprint import pprint
s = requests.session()
s.keep_alive = False
http_proxies_api = 'http://www.thisismyapi.com/http/'
https_proxies_api = 'http://www.thisismyapi.com/https/'
base_url = 'https://om.qq.com/'
check_ip_url = 'http://2017.ip138.com/ic.asp'
def requests_proxies():
proxies_ip = s.get(https_proxies_api).text
proxies_ip = proxies_ip.strip()
print (proxies_ip)
try:
try_connect = s.get(base_url, proxies={'https': proxies_ip}, verify=False)
try_connect.encoding = 'gbk'
print (try_connect.headers)
except Exception as err:
print (err)
for i in range(10):
time.sleep(2)
requests_proxies()
```
## System Information
$ python -m requests.help
```
C:\Users\DreamPython>python -m requests.help
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "2.6"
},
"implementation": {
"name": "CPython",
"version": "3.6.3"
},
"platform": {
"release": "7",
"system": "Windows"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.18.4"
},
"system_ssl": {
"version": "100020bf"
},
"urllib3": {
"version": "1.22"
},
"using_pyopenssl": false
}
C:\Users\DreamPython>
```
This command is only available on Requests v2.16.4 and greater. Otherwise,
please provide some basic information about your system (Python version,
operating system, &c). | {
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4471/reactions"
} | https://api.github.com/repos/psf/requests/issues/4471/timeline | null | completed | null | null | false | [
"i try get https://om.qq.com/somethingfiles\r\nthis is work.\r\nbut https://om.qq.com/ can't work. i don't know why =v=",
"@super5hunz1 This seems to strongly point to something incorrectly configured on the server. It appears you're being redirected so some kind of auth service which is trying to negotiate an \"... |
https://api.github.com/repos/psf/requests/issues/4470 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4470/labels{/name} | https://api.github.com/repos/psf/requests/issues/4470/comments | https://api.github.com/repos/psf/requests/issues/4470/events | https://github.com/psf/requests/issues/4470 | 288,700,331 | MDU6SXNzdWUyODg3MDAzMzE= | 4,470 | Problem with retries for HTTPS Connect proxy requests | {
"avatar_url": "https://avatars.githubusercontent.com/u/34813448?v=4",
"events_url": "https://api.github.com/users/railocius/events{/privacy}",
"followers_url": "https://api.github.com/users/railocius/followers",
"following_url": "https://api.github.com/users/railocius/following{/other_user}",
"gists_url": "https://api.github.com/users/railocius/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/railocius",
"id": 34813448,
"login": "railocius",
"node_id": "MDQ6VXNlcjM0ODEzNDQ4",
"organizations_url": "https://api.github.com/users/railocius/orgs",
"received_events_url": "https://api.github.com/users/railocius/received_events",
"repos_url": "https://api.github.com/users/railocius/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/railocius/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/railocius/subscriptions",
"type": "User",
"url": "https://api.github.com/users/railocius",
"user_view_type": "public"
} | [] | closed | false | null | [] | null | 3 | 2018-01-15T19:53:02Z | 2024-05-19T19:03:48Z | 2024-05-19T19:03:47Z | NONE | null | Summary.
I would like to solve this problem: https://github.com/requests/requests-ntlm/issues/104
and I narrowed it down to this line in requests\session.py:
```
# Send the request
r = adapter.send(request, **kwargs) #<-- exception happens here for HTTPS case
# Total elapsed time of the request (approximately)
elapsed = preferred_clock() - start
r.elapsed = timedelta(seconds=elapsed)
# Response manipulation hooks
r = dispatch_hook('response', hooks, r, **kwargs)
```
for a normal HTTP GET over a proxy, this will return an object r with an HTTP status code of 407. Then my auth hook will be called in the last line -> Authentication can take place.
However, for the HTTPS CONNECT case, the first line will throw an exception for 407 status code, and the command flow is interrupted! -> error
## Actual Result
Exception is thrown for HTTPS CONNECT instead of normal return from function with 407 status code set.
## Reproduction Steps
see the linked bug ticket above.
## System Information
I use the version installed by pip for Python 2.7.14, 32bit, windows 10, which is requests-2.7.0
```
python -m requests.help
C:\Python27\python.exe: No module named requests.help
```
But I also tried to copy the newest requests-2.18.4 and it has the same exception characteristic. Maybe I did something wrong there..
| {
"avatar_url": "https://avatars.githubusercontent.com/u/18519037?v=4",
"events_url": "https://api.github.com/users/sethmlarson/events{/privacy}",
"followers_url": "https://api.github.com/users/sethmlarson/followers",
"following_url": "https://api.github.com/users/sethmlarson/following{/other_user}",
"gists_url": "https://api.github.com/users/sethmlarson/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sethmlarson",
"id": 18519037,
"login": "sethmlarson",
"node_id": "MDQ6VXNlcjE4NTE5MDM3",
"organizations_url": "https://api.github.com/users/sethmlarson/orgs",
"received_events_url": "https://api.github.com/users/sethmlarson/received_events",
"repos_url": "https://api.github.com/users/sethmlarson/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sethmlarson/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sethmlarson/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sethmlarson",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4470/reactions"
} | https://api.github.com/repos/psf/requests/issues/4470/timeline | null | completed | null | null | false | [
"Ok, it seems the same issue was brought up here in 2013-2016: https://github.com/requests/requests/issues/1582\r\nbut was closed with no hope of fixing. Does anybody know, if anything changed relating to this ?",
"Hi @railocius, this is still open in urllib3/urllib3#242 and is a blocker for Requests. Until a sol... |
https://api.github.com/repos/psf/requests/issues/4469 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4469/labels{/name} | https://api.github.com/repos/psf/requests/issues/4469/comments | https://api.github.com/repos/psf/requests/issues/4469/events | https://github.com/psf/requests/issues/4469 | 288,328,635 | MDU6SXNzdWUyODgzMjg2MzU= | 4,469 | Fail to access cookies | {
"avatar_url": "https://avatars.githubusercontent.com/u/20822635?v=4",
"events_url": "https://api.github.com/users/Napator/events{/privacy}",
"followers_url": "https://api.github.com/users/Napator/followers",
"following_url": "https://api.github.com/users/Napator/following{/other_user}",
"gists_url": "https://api.github.com/users/Napator/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Napator",
"id": 20822635,
"login": "Napator",
"node_id": "MDQ6VXNlcjIwODIyNjM1",
"organizations_url": "https://api.github.com/users/Napator/orgs",
"received_events_url": "https://api.github.com/users/Napator/received_events",
"repos_url": "https://api.github.com/users/Napator/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Napator/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Napator/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Napator",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2018-01-13T13:24:49Z | 2021-09-08T04:00:53Z | 2018-01-13T19:27:54Z | NONE | resolved | Hello,
I've made a simple test to try to acces cookies via httpbin, as shown in th "quicksart" page of the documentation.
Is it a bug of the module, or something in don't get ?
Thank you for your answers.
## Expected Result
Expected handle of the cookie.
## Actual Result
{
"cookies": {
"test": "test"
}
}
Traceback (most recent call last):
File "Test-webanim.py", line 9, in <module>
r1.cookies['test']
File "/usr/local/lib/python2.7/dist-packages/requests/cookies.py", line 293, in __getitem__
return self._find_no_duplicates(name)
File "/usr/local/lib/python2.7/dist-packages/requests/cookies.py", line 351, in _find_no_duplicates
raise KeyError('name=%r, domain=%r, path=%r' % (name, domain, path))
KeyError: "name='test', domain=None, path=None"
## Reproduction Steps
```python
import requests
payload = {'test':'test'}
r1 = requests.get('https://httpbin.org/cookies/set', params = payload)
print(r1.text)
a =requests.utils.dict_from_cookiejar(r1.cookies)
r1.cookies['test']
```
## System Information
$ python -m requests.help
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "2.6"
},
"implementation": {
"name": "CPython",
"version": "3.5.2"
},
"platform": {
"release": "4.4.0-109-generic",
"system": "Linux"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.18.4"
},
"system_ssl": {
"version": "1000207f"
},
"urllib3": {
"version": "1.22"
},
"using_pyopenssl": false
}
| {
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4469/reactions"
} | https://api.github.com/repos/psf/requests/issues/4469/timeline | null | completed | null | null | false | [
"Hey @Napator, this is the documented functionality of both the httpbin.org/cookies endpoint and Requests. You are sending cookies to the server, and it's returning a json document containing what it received. The `cookies` attribute tells you what cookies the server set, for which you would use the httpbin.org/coo... |
https://api.github.com/repos/psf/requests/issues/4468 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4468/labels{/name} | https://api.github.com/repos/psf/requests/issues/4468/comments | https://api.github.com/repos/psf/requests/issues/4468/events | https://github.com/psf/requests/pull/4468 | 288,285,998 | MDExOlB1bGxSZXF1ZXN0MTYyNzU0ODU4 | 4,468 | Simple fix for the issue #2392 | {
"avatar_url": "https://avatars.githubusercontent.com/u/27725951?v=4",
"events_url": "https://api.github.com/users/VasiliPupkin256/events{/privacy}",
"followers_url": "https://api.github.com/users/VasiliPupkin256/followers",
"following_url": "https://api.github.com/users/VasiliPupkin256/following{/other_user}",
"gists_url": "https://api.github.com/users/VasiliPupkin256/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/VasiliPupkin256",
"id": 27725951,
"login": "VasiliPupkin256",
"node_id": "MDQ6VXNlcjI3NzI1OTUx",
"organizations_url": "https://api.github.com/users/VasiliPupkin256/orgs",
"received_events_url": "https://api.github.com/users/VasiliPupkin256/received_events",
"repos_url": "https://api.github.com/users/VasiliPupkin256/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/VasiliPupkin256/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/VasiliPupkin256/subscriptions",
"type": "User",
"url": "https://api.github.com/users/VasiliPupkin256",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 6 | 2018-01-13T00:42:07Z | 2021-09-04T00:06:34Z | 2018-01-14T01:13:30Z | NONE | resolved | The issue also has duplicates #2620 and my recent #4467 | {
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4468/reactions"
} | https://api.github.com/repos/psf/requests/issues/4468/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/4468.diff",
"html_url": "https://github.com/psf/requests/pull/4468",
"merged_at": "2018-01-14T01:13:30Z",
"patch_url": "https://github.com/psf/requests/pull/4468.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/4468"
} | true | [
"# [Codecov](https://codecov.io/gh/requests/requests/pull/4468?src=pr&el=h1) Report\n> Merging [#4468](https://codecov.io/gh/requests/requests/pull/4468?src=pr&el=desc) into [proposed/3.0.0](https://codecov.io/gh/requests/requests/commit/78bf3ee6e662d724df106e76a79e5902a96b1528?src=pr&el=desc) will **increase** cov... |
https://api.github.com/repos/psf/requests/issues/4467 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4467/labels{/name} | https://api.github.com/repos/psf/requests/issues/4467/comments | https://api.github.com/repos/psf/requests/issues/4467/events | https://github.com/psf/requests/issues/4467 | 288,258,222 | MDU6SXNzdWUyODgyNTgyMjI= | 4,467 | Shouldn't it raise ReadTimeout instead in models.py:752 ? | {
"avatar_url": "https://avatars.githubusercontent.com/u/27725951?v=4",
"events_url": "https://api.github.com/users/VasiliPupkin256/events{/privacy}",
"followers_url": "https://api.github.com/users/VasiliPupkin256/followers",
"following_url": "https://api.github.com/users/VasiliPupkin256/following{/other_user}",
"gists_url": "https://api.github.com/users/VasiliPupkin256/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/VasiliPupkin256",
"id": 27725951,
"login": "VasiliPupkin256",
"node_id": "MDQ6VXNlcjI3NzI1OTUx",
"organizations_url": "https://api.github.com/users/VasiliPupkin256/orgs",
"received_events_url": "https://api.github.com/users/VasiliPupkin256/received_events",
"repos_url": "https://api.github.com/users/VasiliPupkin256/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/VasiliPupkin256/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/VasiliPupkin256/subscriptions",
"type": "User",
"url": "https://api.github.com/users/VasiliPupkin256",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 8 | 2018-01-12T21:58:45Z | 2021-09-08T04:00:53Z | 2018-01-12T22:11:53Z | NONE | resolved | https://github.com/requests/requests/blob/e4fc3539b43416f9e9ba6837d73b1b7392d4b242/requests/models.py#L751-L752 | {
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4467/reactions"
} | https://api.github.com/repos/psf/requests/issues/4467/timeline | null | completed | null | null | false | [
"Hey @VasiliPupkin256, this is actually intended behavior.\r\n\r\nThe 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 p... |
https://api.github.com/repos/psf/requests/issues/4466 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4466/labels{/name} | https://api.github.com/repos/psf/requests/issues/4466/comments | https://api.github.com/repos/psf/requests/issues/4466/events | https://github.com/psf/requests/issues/4466 | 288,252,261 | MDU6SXNzdWUyODgyNTIyNjE= | 4,466 | Consider allowing iter_lines to keep end of lines intact | {
"avatar_url": "https://avatars.githubusercontent.com/u/41681?v=4",
"events_url": "https://api.github.com/users/c4milo/events{/privacy}",
"followers_url": "https://api.github.com/users/c4milo/followers",
"following_url": "https://api.github.com/users/c4milo/following{/other_user}",
"gists_url": "https://api.github.com/users/c4milo/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/c4milo",
"id": 41681,
"login": "c4milo",
"node_id": "MDQ6VXNlcjQxNjgx",
"organizations_url": "https://api.github.com/users/c4milo/orgs",
"received_events_url": "https://api.github.com/users/c4milo/received_events",
"repos_url": "https://api.github.com/users/c4milo/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/c4milo/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/c4milo/subscriptions",
"type": "User",
"url": "https://api.github.com/users/c4milo",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 2 | 2018-01-12T21:32:45Z | 2021-09-08T02:10:05Z | 2018-04-29T18:11:38Z | NONE | resolved | I'm using `iter_lines` to read CSV files and it has been working great. However, in one particular case, I had to take the iterable response back to a file-like object and it was not possible because `readlines()` is being called without `keepends=True`. Will it possible to expose this parameter in `iter_lines` or should I write my own line iterator? | {
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4466/reactions"
} | https://api.github.com/repos/psf/requests/issues/4466/timeline | null | completed | null | null | false | [
"Requests is presently under a feature freeze. That means the API is only extended in certain conditions. I'm not sure we'd extend it for this case. Over the years this is the first request we've had for this feature. You're definitely (at the present time) better off writing your own. We can also toss this in the ... |
https://api.github.com/repos/psf/requests/issues/4465 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4465/labels{/name} | https://api.github.com/repos/psf/requests/issues/4465/comments | https://api.github.com/repos/psf/requests/issues/4465/events | https://github.com/psf/requests/issues/4465 | 288,229,287 | MDU6SXNzdWUyODgyMjkyODc= | 4,465 | Unobivious HTTP Basic Auth behaviour | {
"avatar_url": "https://avatars.githubusercontent.com/u/2608653?v=4",
"events_url": "https://api.github.com/users/uthunderbird/events{/privacy}",
"followers_url": "https://api.github.com/users/uthunderbird/followers",
"following_url": "https://api.github.com/users/uthunderbird/following{/other_user}",
"gists_url": "https://api.github.com/users/uthunderbird/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/uthunderbird",
"id": 2608653,
"login": "uthunderbird",
"node_id": "MDQ6VXNlcjI2MDg2NTM=",
"organizations_url": "https://api.github.com/users/uthunderbird/orgs",
"received_events_url": "https://api.github.com/users/uthunderbird/received_events",
"repos_url": "https://api.github.com/users/uthunderbird/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/uthunderbird/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/uthunderbird/subscriptions",
"type": "User",
"url": "https://api.github.com/users/uthunderbird",
"user_view_type": "public"
} | [
{
"color": "fad8c7",
"default": false,
"description": null,
"id": 136616769,
"name": "Documentation",
"node_id": "MDU6TGFiZWwxMzY2MTY3Njk=",
"url": "https://api.github.com/repos/psf/requests/labels/Documentation"
},
{
"color": "1cff91",
"default": false,
"description": ""... | closed | true | null | [] | null | 5 | 2018-01-12T19:55:41Z | 2021-09-04T00:06:29Z | 2018-05-05T23:55:51Z | NONE | resolved | Hi there. I've just completed some [test](https://github.com/uthunderbird/clickhouse-sqlalchemy/commit/d21aba511df9e1fd94657d10383afa268a3f8d05), and decided to discuss a behaviour of `auth` option.
The solution I'm using now it's just a `password or ''`. I don't think it's a good approach.
## Expected Result
1. I know I can write something like `uthunderbird@example.com` to attach HTTP Basic Auth header to request to `example.com` in browser. Actually, it's true for any URI as I know. So it was pretty expected for me that this : `transport.auth = ('uthunderbird', )` will work for case if I don't want to send password.
2. The second idea was to write `transport.auth = ('uthunderbird', None)`, but it get a horrible result.
## Actual Result
1. `tuple is not callable`
2. I sent auth header with `dXRodW5kZXJiaXJkOk5vbmU=`, which means `'uthunderbird:None'`. Wow, such JSish.
## Reproduction Steps
```
python
import requests
a = requests.get('https://api.github.com/user', auth=('user', ))
```
```
python
import base64
import requests
a = requests.get('https://api.github.com/user', auth=('user', None)
base64.b64decode(a.request.headers['authorization'][6:]).decode()
```
## System Information
$ python -m requests.help
```
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "2.6"
},
"implementation": {
"name": "CPython",
"version": "3.6.3"
},
"platform": {
"release": "10",
"system": "Windows"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.18.4"
},
"system_ssl": {
"version": "100020bf"
},
"urllib3": {
"version": "1.22"
},
"using_pyopenssl": false
}```
(I'm pretty sure it's not required here, but ok) | {
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
} | {
"+1": 1,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 1,
"url": "https://api.github.com/repos/psf/requests/issues/4465/reactions"
} | https://api.github.com/repos/psf/requests/issues/4465/timeline | null | completed | null | null | false | [
"Actually, the simplest thing we can do with this it's just document the usecase and tell that this is just the following of the principle of \"explicit is better than implicit\", so you should explicitly declare an empty password string, but it's an ideology conflict I think.\r\n\r\nBut at least None shouldn't be ... |
https://api.github.com/repos/psf/requests/issues/4464 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4464/labels{/name} | https://api.github.com/repos/psf/requests/issues/4464/comments | https://api.github.com/repos/psf/requests/issues/4464/events | https://github.com/psf/requests/issues/4464 | 288,179,365 | MDU6SXNzdWUyODgxNzkzNjU= | 4,464 | Curl works but requests doesn't | {
"avatar_url": "https://avatars.githubusercontent.com/u/34809228?v=4",
"events_url": "https://api.github.com/users/Therewasherefor/events{/privacy}",
"followers_url": "https://api.github.com/users/Therewasherefor/followers",
"following_url": "https://api.github.com/users/Therewasherefor/following{/other_user}",
"gists_url": "https://api.github.com/users/Therewasherefor/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Therewasherefor",
"id": 34809228,
"login": "Therewasherefor",
"node_id": "MDQ6VXNlcjM0ODA5MjI4",
"organizations_url": "https://api.github.com/users/Therewasherefor/orgs",
"received_events_url": "https://api.github.com/users/Therewasherefor/received_events",
"repos_url": "https://api.github.com/users/Therewasherefor/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Therewasherefor/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Therewasherefor/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Therewasherefor",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 2 | 2018-01-12T16:45:53Z | 2021-09-08T04:00:54Z | 2018-01-12T19:01:14Z | NONE | resolved | Can someone explain to me why curl works and request doesn't? I've followed the docs and I don't get what I am doing wrong here. Is it a bug or am I missing something super obvious?
curl -u "USER:PASS" -L -O https://api.bitbucket.org/2.0/repositories/EEEE/AAA/downloads/zip.zip
```
import requests
from requests.auth import HTTPBasicAuth
url = "https://bitbucket.org/SYA/Music/downloads/SSR131.zip"
src = r"C:\1\1\SR131.zip"
headers = {'Content-Type': 'application/json'}
respo = requests.get(url, stream=True, verify=False, auth=('##############', '######################'), headers=headers)
if respo.status_code == requests.codes.ok:
out = open(src, "wb")
for block in respo.iter_content(1024):
if not block:
break
out.write(block)
out.close()
else:
print("Not able to download ZIP url {url}: {status}, {content}".format(url=url, status=respo.status_code, content=respo.content))
Error:
Not able to download ZIP url https......: 401, b''
More specifically:
Debug output of Requests:
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): api.bitbucket.org
C:\Users\Imapotatofish\AppData\Local\Continuum\miniconda3\lib\site-packages\urllib3\connectionpool.py:858: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
send: b'GET /2.0/repositories/Imapotatofish/EEE/downloads/zip.zip HTTP/1.1\r\nHost: api.bitbucket.org\r\nUser-Agent: python-requests/2.18.4\r\nAccept-Encoding: gzip, deflate\r\nAccept: */*\r\nConnection: keep-alive\r\nAuthorization: Basic VHlzb25kb2dlcnpAZ21haWwuY29tOlJLRDJSUlRXMnhVNnhjWGh6Y3lY\r\n\r\n'
InsecureRequestWarning) repositories/EEEE/AAA/downloads/zip.zi
DEBUG:urllib3.connectionpool:https://api.bitbucket.org:443 "GET /2.0/repositories/Imapotatofish/EEE/downloads/zip HTTP/1.1" 401 0
reply: 'HTTP/1.1 401 Unauthorized\r\n'
header: Server header: WWW-Authenticate header: Content-Type header: Strict-Transport-Security header: Date header: X-Served-By header: X-Static-Version header: ETag header: X-Render-Time header: Connection header: X-Version header: X-Request-Count header: X-Frame-Options header: Content-Length Not able to download ZIP url https://api.bitbucket.org/2.0/repositories/Imapotatofish/EEE/downloads/zip: 401, b''
| {
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4464/reactions"
} | https://api.github.com/repos/psf/requests/issues/4464/timeline | null | completed | null | null | false | [
"By specifying `auth=(..., ...)` you're telling Requests to use Basic Authentication. Instead, it looks like Bitbucket wants Digest Authentication. The [toolbelt](/requests/toolbelt) has a `GuessAuth` handler that would handle this for your auto-magically. Otherwise you can do `from requests.auth import HTTPDigestA... |
https://api.github.com/repos/psf/requests/issues/4463 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4463/labels{/name} | https://api.github.com/repos/psf/requests/issues/4463/comments | https://api.github.com/repos/psf/requests/issues/4463/events | https://github.com/psf/requests/issues/4463 | 288,128,599 | MDU6SXNzdWUyODgxMjg1OTk= | 4,463 | Requests now ignores system installed CA certs | {
"avatar_url": "https://avatars.githubusercontent.com/u/9017352?v=4",
"events_url": "https://api.github.com/users/james-portman/events{/privacy}",
"followers_url": "https://api.github.com/users/james-portman/followers",
"following_url": "https://api.github.com/users/james-portman/following{/other_user}",
"gists_url": "https://api.github.com/users/james-portman/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/james-portman",
"id": 9017352,
"login": "james-portman",
"node_id": "MDQ6VXNlcjkwMTczNTI=",
"organizations_url": "https://api.github.com/users/james-portman/orgs",
"received_events_url": "https://api.github.com/users/james-portman/received_events",
"repos_url": "https://api.github.com/users/james-portman/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/james-portman/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/james-portman/subscriptions",
"type": "User",
"url": "https://api.github.com/users/james-portman",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2018-01-12T14:03:44Z | 2021-09-08T04:00:54Z | 2018-01-12T19:01:58Z | NONE | resolved | (I know about REQUESTS_CA_BUNDLE etc)
Requests now ignores system installed CA certs and causes SSL errors when visiting https addresses which use a custom/system installed CA.
Requests is used by a number of other applications, so it is not always straightforward to set environment variable, nor do I think it should be necessary.
There are a load of other tools that respect the system installed CA certs such as wget, curl...
Why have you made this change?
Can there be a discussion about reverting the behaviour?
Could you do something else like load in the system CAs then use your other method on top?
(is it certifi?)
## Expected Result
Visiting a https url for which I have the CA cert installed system wide should work.
## Actual Result
An SSL error.
## Reproduction Steps
```python
import requests
requests.get('https://some_url')
```
## System Information
$ python -m requests.help
```
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": "2.1.4"
},
"idna": {
"version": "2.6"
},
"implementation": {
"name": "CPython",
"version": "2.7.14"
},
"platform": {
"release": "4.13.0-16-lowlatency",
"system": "Linux"
},
"pyOpenSSL": {
"openssl_version": "1010007f",
"version": "17.3.0"
},
"requests": {
"version": "2.18.4"
},
"system_ssl": {
"version": "1000207f"
},
"urllib3": {
"version": "1.22"
},
"using_pyopenssl": true
}
```
| {
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
} | {
"+1": 2,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 2,
"url": "https://api.github.com/repos/psf/requests/issues/4463/reactions"
} | https://api.github.com/repos/psf/requests/issues/4463/timeline | null | completed | null | null | false | [
"> Requests now ignores system installed CA certs\r\n\r\nRequests installed via pip *never* observed system-installed CA certs (except maybe in the very early 0.x days). If you're installing Requests via your system package manager, then it's likely that they've broken their patching for CA certs and this needs to ... |
https://api.github.com/repos/psf/requests/issues/4462 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4462/labels{/name} | https://api.github.com/repos/psf/requests/issues/4462/comments | https://api.github.com/repos/psf/requests/issues/4462/events | https://github.com/psf/requests/issues/4462 | 288,039,767 | MDU6SXNzdWUyODgwMzk3Njc= | 4,462 | decode_unicode naming | {
"avatar_url": "https://avatars.githubusercontent.com/u/987487?v=4",
"events_url": "https://api.github.com/users/kousu/events{/privacy}",
"followers_url": "https://api.github.com/users/kousu/followers",
"following_url": "https://api.github.com/users/kousu/following{/other_user}",
"gists_url": "https://api.github.com/users/kousu/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kousu",
"id": 987487,
"login": "kousu",
"node_id": "MDQ6VXNlcjk4NzQ4Nw==",
"organizations_url": "https://api.github.com/users/kousu/orgs",
"received_events_url": "https://api.github.com/users/kousu/received_events",
"repos_url": "https://api.github.com/users/kousu/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kousu/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kousu/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kousu",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 4 | 2018-01-12T08:19:02Z | 2021-09-08T02:09:57Z | 2018-05-20T19:22:21Z | NONE | resolved | In `iter_{content,lines}()`, `decode_unicode` is a misnomer. It should just be `decode`: you don't really know you're decoding from a unicode encoding. Or maybe it should be `text`, to match `response.text`: if set, it guarantees you get strings back and not bytes.
Maybe this is irrelevant if this whole feature is [getting kaiboshed](https://github.com/requests/requests/issues/3481#issuecomment-238543302), but in the meantime please consider making this more obvious. | {
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4462/reactions"
} | https://api.github.com/repos/psf/requests/issues/4462/timeline | null | completed | null | null | false | [
"> but in the meantime please consider making this more obvious.\r\n\r\nHow would we go about making it more obvious in your opinion? I'm not certain I see a clear path forward based on what has been reported.",
"My suggestion is to rename `decode_unicode` to `text`, as in \"give me a text object, please\", simil... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.