Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

praw 3 requests dependency version #737

Closed
michael-lazar opened this issue Feb 25, 2017 · 1 comment
Closed

praw 3 requests dependency version #737

michael-lazar opened this issue Feb 25, 2017 · 1 comment

Comments

@michael-lazar
Copy link
Contributor

Issue Description

In PRAW 3, the setup.py file pins the requests version at 'requests >=2.3.0'. However, actually trying to use requests v2.3.0 will raise an exception. The problem is that the merge_environment_settings method wasn't added until v2.4.0.

  File "/usr/local/lib/python3.4/dist-packages/praw/__init__.py", line 1522, in refresh_access_information
    refresh_token=refresh_token or self.refresh_token)
  File "<decorator-gen-11>", line 2, in refresh_access_information
  File "/usr/local/lib/python3.4/dist-packages/praw/decorators.py", line 294, in require_oauth
    return function(*args, **kwargs)
  File "/usr/local/lib/python3.4/dist-packages/praw/__init__.py", line 745, in refresh_access_information
    retval = self._handle_oauth_request(data)
  File "/usr/local/lib/python3.4/dist-packages/praw/__init__.py", line 657, in _handle_oauth_request
    response = self._request(url, auth=auth, data=data, raw_response=True)
  File "/usr/local/lib/python3.4/dist-packages/praw/__init__.py", line 451, in _request
    response = handle_redirect()
  File "/usr/local/lib/python3.4/dist-packages/praw/__init__.py", line 432, in handle_redirect
    verify=self.http.validate_certs, **kwargs)
  File "/usr/local/lib/python3.4/dist-packages/praw/handlers.py", line 138, in wrapped
    return function(cls, **kwargs)
  File "/usr/local/lib/python3.4/dist-packages/praw/handlers.py", line 56, in wrapped
    return function(cls, **kwargs)
  File "/usr/local/lib/python3.4/dist-packages/praw/handlers.py", line 101, in request
    settings = self.http.merge_environment_settings(
AttributeError: 'Session' object has no attribute 'merge_environment_settings'

This bug was initially discovered here michael-lazar/rtv#325. I've tested on requests v2.4.0 and verified that it solved the problem. I can fix it on my end by changing the package requirements, but if you're still supporting bug fixes for PRAW 3 I think it's worth updating here too.

System Information

PRAW Version: 3.6.1
Python Version: 3.4.0
Operating System: Ubuntu 14.04

@bboe
Copy link
Member

bboe commented Feb 25, 2017

Thanks for reporting and great work finding the bug. If you want to make a PR to the PRAW3 branch I will merge it in, however, I am not likely to make a new PRAW3 release unless a large number of issues accumulate. I'm going to close the issue since it's not a problem with the current version.

@bboe bboe closed this as completed Feb 25, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants