-
Notifications
You must be signed in to change notification settings - Fork 60
Fix tox and add GH workflow #83
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @mikemanger - thank you enormously for the excellent changes here in this pull request - we really appreciate your work here. I am eager to get this PR moving ahead.
I had a few things which I wanted to go over with you to get us to that stage. With all this, please keep in mind I am not an experienced Python developer and so there might be some things I am off the mark about and I'm happy to learn and be corrected along the way.
These were the items I had in mind:
- Earlier today, I merged in your work from #84 which have some changes in common with this PR - namely changing
assertEqualstoassertEqual. This is now in master and in the latest version of the package (8.0.2) and hopefully bringing those changes across in to this PR will reduce the number of changes. - I am not too familiar with the github workflow side of things but I am happy to go ahead with those changes for the automated testing side of things.
- I ran
toxand that was showing some issues with version Python 3.7, namely this issue shown below. Python version 3.6 is skipped and 3.7 doesn't run properly:

The error for Python 7 I was seeing on my machine was this:

How would we feel about removing Python versions 3.6 and 3.7 from tests.yml and tox.ini? I have left these as things to consider below. I'm happy to update the documentation saying that we do not support those two versions any more. Having said that, I did test with Python 3.6 and the wrapper appears to still be working as before.
- From Python version 3.11 and onwards, I noticed this deprecation warning that came up:
\createsend-python\lib\createsend\utils.py:106: DeprecationWarning: ssl.SSLContext() without protocol argument is deprecated.
context = ssl.SSLContext()
\createsend-python\lib\createsend\utils.py:106: DeprecationWarning: ssl.PROTOCOL_TLS is deprecated
context = ssl.SSLContext()
I attempted to remove this warning by changing utils.py line 106:
From:
ssl.SSLContext()
To:
ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT)
But that resulted in this failure:

FAILED test/test_verifiedhttpsconnection.py::VerifiedHTTPSConnectionTestCase::test_verified_connection - ValueError: check_hostname requires server_hostname
For now, I was thinking we're happy to leave it as a warning and figure out a fix for that separately.
So with all that in mind after:
- this PR has the latest from master merged in; and
- if you agree that removing 3.6 and 3.7 is a good idea and we do so
I'm happy to get this approved, merged and released ASAP. Thank you once again for your help and pushing for this code base to be modernised.
|
Hey @russella-acm thanks for the great review! Interestingly the python 3.7 tests runs fine on my GH workflow (you can see this here) so I'm wondering if it is an issue with pip on Windows (a quick search didn't return anything). Either way I'm happy to drop support for Python 3.7 (its EOL over a year now). I've updated this branch and also fixed a couple of small typos. With the 3.11 deprecation warning I think we should tackle that in another PR as important but outside the scope of this PR. |
russella-acm
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM - Thank you @mikemanger - really appreciate the changes, I will go about getting these in and releasing them in a next version ASAP.
I tested out tox, unit tests and ran then the wrapper code. All working as expected.
Fix tox and add GH workflow
Fix tox and add GH workflow
Some fixes to the tests