forked from starenka/mailjetv3
-
Notifications
You must be signed in to change notification settings - Fork 39
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
Support py>=39,<py313 #108
Merged
skupriienko
merged 69 commits into
mailjet:master
from
oss-repack:DE-1055-all-python3-versions
Oct 31, 2024
Merged
Support py>=39,<py313 #108
skupriienko
merged 69 commits into
mailjet:master
from
oss-repack:DE-1055-all-python3-versions
Oct 31, 2024
Conversation
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
222fdec
to
ec90e4b
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Actions:
Add the GitHub Action Workflow to support py39-py312.
pre-commit
jobtest {py39-py312} on {linux, osx, win}
job (without runningpytest
now, see the Notes below)Add dev tools:
pre-commit-config.yaml
with linters and formattersMakefile
to make development easierenvironment.yaml
for the main environmentenvironment-dev.yaml
for the development environmentFix the
build_url
function by movingif resource_id:
to the top of the function. It was investigated that:MAILJET_API_URL/contact/123456/managemanycontacts
seems to be the correct order. It should also be like thishttps://api.mailjet.com/v3/REST/contact/CONTACT_ID/managecontactslists
.So the Corrected url building bug #86 could be wrong (see Corrected url building bug #86 (comment)). If you replace the
resource_id
andaction_id
(e.g.,MAILJET_API_URL/contact/managemanycontacts/123456
), the endpoint will be unavailable and, accordingly, the test will also fail with status code 400.The API docs also have the correct order https://dev.mailjet.com/email/reference/contacts/subscriptions/#v3_post_contact_contact_ID_managecontactslists. Therefore, it is surprising what kind of a bug the user had 1 year ago. I think the user used the wrong mailjet.contact_managemanycontacts.get(jobID) method, although it should have been mailjet.contact_managemanycontacts.create(jobID), because the POST method always goes with
create()
I've tested it with curl:
It fixes
test.py::TestSuite::test_get_with_action
on my local machine.Packaging:
setup.py
withpyprpoject.toml
requirements.txt
as obsoleteMinor fixes:
CHANGELOG.md
,README.md
LICENSE
fileNotes:
pytest
in GitHub Actions, we need an Environment section in the repository Settings, but it doesn't exist because of a legacy plan (possibly), see https://docs.github.com/en/actions/managing-workflow-runs-and-deployments/managing-deployments/managing-environments-for-deployment