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

Update master from upstream #4

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pyavatax/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
VERSION = (1, 3, 8)
VERSION = (1, 3, 10)


def get_version():
Expand Down
6 changes: 3 additions & 3 deletions pyavatax/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ def update(self, *args, **kwargs):
if isinstance(_v, klass):
getattr(self, k).append(_v)
elif isinstance(_v, dict):
getattr(self, k).append(klass(allow_new_fields=self.allow_new_fields,**_v))
getattr(self, k).append(klass(allow_new_fields=self.allow_new_fields, **_v))
else:
self._invalid_field(k)
self.clean()
Expand Down Expand Up @@ -179,7 +179,6 @@ def _request(self, http_method, stem, data={}, params={}):
data = data.replace('\\n', ' ')
kwargs = {
'params': params,
'data': data,
'headers': self.headers,
'auth': (self.username, self.password),
'proxies': self.proxies,
Expand All @@ -191,6 +190,7 @@ def _request(self, http_method, stem, data={}, params={}):
kwargs.pop('data')
resp = requests.get(url, **kwargs)
elif http_method == 'POST':
kwargs.update({'data': data})
resp = requests.post(url, **kwargs)
except (requests.exceptions.ConnectionError, requests.exceptions.SSLError, requests.exceptions.HTTPError, requests.exceptions.Timeout) as e:
self.logger.warning(e)
Expand Down Expand Up @@ -602,7 +602,7 @@ class TaxOverride(AvalaraBase):
OVERRIDE_AMOUNT = 'TaxAmount'
OVERRIDE_DATE = 'TaxDate'
OVERRIDE_EXEMPT = 'Exemption'
OVERRIDE_TYPES = ( OVERRIDE_NONE, OVERRIDE_AMOUNT, OVERRIDE_DATE, OVERRIDE_EXEMPT )
OVERRIDE_TYPES = (OVERRIDE_NONE, OVERRIDE_AMOUNT, OVERRIDE_DATE, OVERRIDE_EXEMPT)
_fields = ['TaxOverrideType', 'TaxAmount', 'TaxDate', 'Reason']

@staticmethod
Expand Down
6 changes: 2 additions & 4 deletions pyavatax/django_integration.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
from django.utils import timezone


class MockDjangoRecorder(object):

@staticmethod
def failure(doc, response):
pass
Expand All @@ -15,6 +12,7 @@ def success(doc):
def get_django_recorder():
try:
import django
from django.utils import timezone
from django.conf import settings
from pyavatax.models import AvaTaxRecord
except ImportError:
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ pytest==2.6.4
testfixtures==4.1.2
Sphinx==1.1.3
simplejson==3.3.0
twine==1.9.1
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#! /usr/bin/env python
from setuptools import setup, find_packages
# python setup.py sdist
# python setup.py sdist bdist_wininst upload
# python setup.py sdist bdist_wininst
# twine upload dist/*

version = __import__('pyavatax').__version__

Expand Down