Skip to content

Commit

Permalink
Make gpsoauth optional, allow aiohttp 2.1.x
Browse files Browse the repository at this point in the history
  • Loading branch information
Noctem committed May 27, 2017
1 parent 7ad37e7 commit 18ad412
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 9 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -270,3 +270,4 @@ pyvenv.cfg
pip-selfcheck.json

test*.py
ignore
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,14 @@ Documentation is available at the [pgoapi wiki](https://wiki.pogodev.org).
* Python ≥3.5
* aiohttp
* protobuf (≥3)
* gpsoauth
* pycrypt
* cyrandom

##### Optional Packages
* *gpsoauth*: required for Google accounts
* *aiosocks*: required for SOCKS proxies
* *ujson*, *cchardet*, *aiodns*: improve performance

## Contribution
Contributions are very welcome, feel free to submit a pull request.

Expand Down
2 changes: 1 addition & 1 deletion aiopogo/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
__title__ = 'aiopogo'
__version__ = '2.0'
__version__ = '2.0.1'
__author__ = 'David Christenson'
__license__ = 'MIT License'
__copyright__ = 'Copyright (c) 2017 David Christenson <https://github.com/Noctem>'
Expand Down
7 changes: 6 additions & 1 deletion aiopogo/auth_google.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,12 @@
from functools import partial
from time import time

from gpsoauth import perform_master_login, perform_oauth
try:
from gpsoauth import perform_master_login, perform_oauth
except ImportError:
def perform_master_login(*args, **kwargs):
raise ImportError('Must install gpsoauth to use Google accounts')
perform_oauth = perform_master_login

from .auth import Auth
from .exceptions import AuthException, InvalidCredentialsException
Expand Down
3 changes: 1 addition & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
protobuf>=3.0.0
gpsoauth>=0.4.0
aiohttp>=2.0.7,<2.1
aiohttp>=2.0.7,<2.2
pycrypt>=0.7.0
cyrandom>=0.1.2
yarl>=0.10.0
10 changes: 6 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,18 @@
author='David Christenson',
author_email='mail@noctem.xyz',
description='Asynchronous Pokemon API lib',
version='2.0',
version='2.0.1',
url='https://github.com/Noctem/aiopogo',
packages=find_packages(),
install_requires=[
'protobuf>=3.0.0',
'gpsoauth>=0.4.0',
'aiohttp>=2.0.7,<2.1',
'aiohttp>=2.0.7,<2.2',
'pycrypt>=0.7.0',
'cyrandom>=0.1.2'],
extras_require={'ujson': ['ujson'], 'socks': ['aiosocks>=0.2.2']},
extras_require={
'performance': ['ujson>=1.3.5', 'cchardet>=2.1.0', 'aiodns>=1.1.1'],
'socks': ['aiosocks>=0.2.2'],
'google': ['gpsoauth>=0.4.0']},
license='MIT',
classifiers=[
'Development Status :: 5 - Production/Stable',
Expand Down

0 comments on commit 18ad412

Please sign in to comment.