Closed macmichael01 closed 6 years ago
Hi @macmichael01,
This looks like the right approach to me.
Please rebase from master so that linting and testing may run. Although I left some comments, it will be easier for me to review your PR then.
Thanks!
Forgot to mention you can remove the allow_failure
for python3.6 from the travis build.
For the drone build it should be something similar to https://github.com/drone/drone-python/blob/master/.drone.yml, but it might require some tinkering. You can leave that to me if you want.
It seems tests are passing for Python2: https://travis-ci.org/silverapp/silver/jobs/419958428 But they're not passing for Python3: https://travis-ci.org/silverapp/silver/jobs/419958429 Linting fails in both cases, but it should be easy fixing it.
I see the failing tests are related to:
exception.message
not being available anymore in Python3. Converting the exception object to string instead (str(exception)
) should do the trick.'dict' object has no attribute 'iteritems'
. Use .items()
as discussed previously.pdf_content = ContentFile(pdf_file_object)
error.
https://github.com/silverapp/silver/blob/0009ff4ca52dfc711e2f160ad90b449060fc4007/silver/models/documents/pdf.py#L41 should become pdf_file_object = BytesIO()
.django.urls.exceptions.NoReverseMatch: Reverse for 'payment' with keyword arguments
https://github.com/silverapp/silver/blob/3b718bb7a44c7e1e42479e9f59a0f68c841abda0/silver/utils/payments.py#L33
should become kwargs = {'token': force_text(_get_jwt_token(transaction))}
Let me know if you need any help.
Since future versions of Django will have a python3 requirement, I would attempt to make Silver Python2 and Python3 compatible. Please review!