-
Notifications
You must be signed in to change notification settings - Fork 438
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
5 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,9 +3,7 @@ sudo: false | |
language: python | ||
|
||
python: | ||
- "2.6" | ||
- "2.7" | ||
- "3.3" | ||
- "3.4" | ||
- "3.5" | ||
- "3.6" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,33 +13,13 @@ | |
|
||
install_requires = [] | ||
|
||
if sys.version_info < (2, 6): | ||
warnings.warn( | ||
'Python 2.5 is no longer officially supported by Stripe. ' | ||
'If you have any questions, please file an issue on Github or ' | ||
'contact us at [email protected].', | ||
DeprecationWarning) | ||
install_requires.append('requests >= 0.8.8, < 0.10.1') | ||
install_requires.append('ssl') | ||
else: | ||
install_requires.append('requests >= 0.8.8') | ||
|
||
|
||
with open('LONG_DESCRIPTION.rst') as f: | ||
long_description = f.read() | ||
|
||
# Don't import stripe module here, since deps may not be installed | ||
sys.path.insert(0, os.path.join(os.path.dirname(__file__), 'stripe')) | ||
from version import VERSION | ||
|
||
# Get simplejson if we don't already have json | ||
if sys.version_info < (3, 0): | ||
try: | ||
from util import json | ||
except ImportError: | ||
install_requires.append('simplejson') | ||
|
||
|
||
setup( | ||
name='stripe', | ||
version=VERSION, | ||
|
@@ -61,10 +41,8 @@ | |
"Operating System :: OS Independent", | ||
"Programming Language :: Python", | ||
"Programming Language :: Python :: 2", | ||
"Programming Language :: Python :: 2.6", | ||
"Programming Language :: Python :: 2.7", | ||
"Programming Language :: Python :: 3", | ||
"Programming Language :: Python :: 3.3", | ||
"Programming Language :: Python :: 3.4", | ||
"Programming Language :: Python :: 3.5", | ||
"Programming Language :: Python :: 3.6", | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,13 +2,16 @@ | |
|
||
import hmac | ||
import io | ||
import json | ||
import logging | ||
import sys | ||
import os | ||
import re | ||
|
||
import stripe | ||
from stripe import six | ||
from stripe.six.moves.urllib.parse import parse_qsl | ||
|
||
|
||
STRIPE_LOG = os.environ.get('STRIPE_LOG') | ||
|
||
|
@@ -25,38 +28,6 @@ | |
'logfmt', | ||
] | ||
|
||
try: | ||
from stripe.six.moves.urllib.parse import parse_qsl | ||
except ImportError: | ||
# Python < 2.6 | ||
from cgi import parse_qsl | ||
|
||
try: | ||
import json | ||
except ImportError: | ||
json = None | ||
|
||
if not (json and hasattr(json, 'loads')): | ||
try: | ||
import simplejson as json | ||
except ImportError: | ||
if not json: | ||
raise ImportError( | ||
"Stripe requires a JSON library, such as simplejson. " | ||
"HINT: Try installing the " | ||
"python simplejson library via 'pip install simplejson' or " | ||
"'easy_install simplejson', or contact [email protected] " | ||
"with questions.") | ||
else: | ||
raise ImportError( | ||
"Stripe requires a JSON library with the same interface as " | ||
"the Python 2.6 'json' library. You appear to have a 'json' " | ||
"library with a different interface. Please install " | ||
"the simplejson library. HINT: Try installing the " | ||
"python simplejson library via 'pip install simplejson' " | ||
"or 'easy_install simplejson', or contact [email protected]" | ||
"with questions.") | ||
|
||
|
||
def utf8(value): | ||
# Note the ordering of these conditionals: `unicode` isn't a symbol in | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters