Skip to content

Commit aeaba46

Browse files
authored
Merge pull request #123 from mailjet/release/1.5.0
Release 1.5.0
2 parents cec3ac9 + ecf452d commit aeaba46

File tree

17 files changed

+188
-54
lines changed

17 files changed

+188
-54
lines changed

.github/ISSUE_TEMPLATE/bug_report.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ body:
3333
label: Python Version
3434
description: What Python version are you using?
3535
options:
36-
- '3.9'
3736
- '3.10'
3837
- '3.11'
3938
- '3.12'

.github/workflows/commit_checks.yaml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,18 @@ on:
77
- main
88
pull_request:
99

10+
permissions:
11+
contents: read
12+
1013
jobs:
1114
pre-commit:
1215
runs-on: ubuntu-latest
1316
steps:
14-
- uses: actions/checkout@v4
15-
- uses: actions/setup-python@v5
17+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
18+
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
1619
with:
1720
python-version: '3.12' # Specify a Python version explicitly
18-
- uses: pre-commit/action@v3.0.1
21+
- uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1
1922

2023
test:
2124
name: test py${{ matrix.python-version }} on ${{ matrix.os }}
@@ -27,15 +30,15 @@ jobs:
2730
fail-fast: false
2831
matrix:
2932
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
30-
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
33+
python-version: ["3.10", "3.11", "3.12", "3.13"]
3134
env:
3235
MJ_APIKEY_PUBLIC: ${{ secrets.MJ_APIKEY_PUBLIC }}
3336
MJ_APIKEY_PRIVATE: ${{ secrets.MJ_APIKEY_PRIVATE }}
3437
steps:
35-
- uses: actions/checkout@v4
38+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
3639
with:
3740
fetch-depth: 0 # Get full history with tags (required for setuptools-scm)
38-
- uses: conda-incubator/setup-miniconda@v3
41+
- uses: conda-incubator/setup-miniconda@835234971496cad1653abb28a638a281cf32541f # v3.2.0
3942
with:
4043
python-version: ${{ matrix.python-version }}
4144
channels: defaults

.github/workflows/issue-triage.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,17 @@ on:
44
issues:
55
types: [opened, labeled, unlabeled, reopened]
66

7+
permissions:
8+
contents: read
9+
710
jobs:
811
triage:
912
runs-on: ubuntu-latest
1013
permissions:
1114
issues: write
1215
steps:
1316
- name: Initial triage
14-
uses: actions/github-script@v6
17+
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
1518
with:
1619
github-token: ${{ secrets.GITHUB_TOKEN }}
1720
script: |

.github/workflows/pr_validation.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,25 @@ on:
44
pull_request:
55
branches: [main]
66

7+
permissions:
8+
contents: read
9+
710
jobs:
811
validate:
912
runs-on: ubuntu-latest
1013
steps:
11-
- uses: actions/checkout@v4
14+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
1215
with:
1316
fetch-depth: 0
1417

1518
- name: Set up Python
16-
uses: actions/setup-python@v5
19+
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
1720
with:
1821
python-version: '3.12'
1922

2023
- name: Build package
2124
run: |
22-
pip install --upgrade build setuptools wheel setuptools-scm
25+
pip install --upgrade build setuptools setuptools-scm
2326
python -m build
2427
2528
- name: Test installation

.github/workflows/publish.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ on:
77
types: [published] # Triggers when a GitHub release is published
88
workflow_dispatch: # Manual trigger
99

10+
permissions:
11+
contents: read
12+
1013
jobs:
1114
publish:
1215
runs-on: ubuntu-latest
@@ -15,17 +18,17 @@ jobs:
1518
contents: read
1619

1720
steps:
18-
- uses: actions/checkout@v4
21+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
1922
with:
2023
fetch-depth: 0
2124

2225
- name: Set up Python
23-
uses: actions/setup-python@v5
26+
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
2427
with:
2528
python-version: '3.12'
2629

2730
- name: Install build tools
28-
run: pip install --upgrade build setuptools wheel setuptools-scm twine
31+
run: pip install --upgrade build setuptools setuptools-scm twine
2932

3033
- name: Extract version
3134
id: get_version

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,3 +234,5 @@ dev/
234234
# pytest cache
235235
.pytest_cache/
236236
pytestdebug.log
237+
238+
*/_version.py

.pre-commit-config.yaml

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
# pre-commit run --all-files
44
# Update this file:
55
# pre-commit autoupdate
6+
default_language_version:
7+
python: python3
68
exclude: ^(.*/versioneer\.py|.*/_version\.py|.*/.*\.svg)
79

810
ci:
@@ -111,7 +113,7 @@ repos:
111113
rev: v3.20.0
112114
hooks:
113115
- id: pyupgrade
114-
args: [--py39-plus, --keep-runtime-typing]
116+
args: [--py310-plus, --keep-runtime-typing]
115117

116118
- repo: https://github.com/charliermarsh/ruff-pre-commit
117119
# Ruff version.
@@ -123,6 +125,13 @@ repos:
123125
# Run the formatter.
124126
- id: ruff-format
125127

128+
- repo: https://github.com/pycqa/pydocstyle
129+
rev: 6.3.0
130+
hooks:
131+
- id: pydocstyle
132+
args: [--select=D200,D213,D400,D415]
133+
additional_dependencies: [tomli]
134+
126135
- repo: https://github.com/dosisod/refurb
127136
rev: v2.1.0
128137
hooks:
@@ -133,10 +142,9 @@ repos:
133142
rev: v1.16.1
134143
hooks:
135144
- id: mypy
136-
args:
137-
[
138-
--config-file=./pyproject.toml,
139-
]
145+
args: [--config-file=./pyproject.toml]
146+
additional_dependencies:
147+
- types-requests
140148
exclude: ^samples/
141149

142150
- repo: https://github.com/RobertCraigie/pyright-python

CHANGELOG.md

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,39 @@ We [keep a changelog.](http://keepachangelog.com/)
44

55
## [Unreleased]
66

7+
## [1.5.0] - 2025-07-11
8+
9+
### Added
10+
11+
- Add class `TestCsvImpor` with a test suite for testing CSV import functionality to `test.py`
12+
- Add `types-requests` to `mypy`'s `additional_dependencies` in `pre-commit` hooks
13+
- Add `pydocstyle` pre-commit's hook
14+
- Add `*/_version.py` to `.gitignore`
15+
16+
### Fixed
17+
18+
- Fix a csvimport error 'List index (0) out of bounds': renamed `json_data` back to `data`. Corrected behavior broken since v1.4.0
19+
20+
### Changed
21+
22+
- Update pre-commit hooks to the latest versions
23+
- Breaking changes: drop support for Python 3.9
24+
- Import Callable from collections.abc
25+
- Improve a conda recipe
26+
- Update `README.md`
27+
28+
### Security
29+
30+
- Add the Security Policy file `SECURITY.md`
31+
- Use `permissions: contents: read` in all CI workflow files explicitly
32+
- Use commit hashes to ensure reproducible builds
33+
- Update pinning for runtime dependency `requests >=2.32.4`
34+
35+
### Pull Requests Merged
36+
37+
- [PR_120](https://github.com/mailjet/mailjet-apiv3-python/pull/120) - Fix a csvimport error 'List index (0) out of bounds'
38+
- [PR_123](https://github.com/mailjet/mailjet-apiv3-python/pull/123) - Release 1.5.0
39+
740
## [1.4.0] - 2025-05-07
841

942
### Added
@@ -141,4 +174,5 @@ We [keep a changelog.](http://keepachangelog.com/)
141174
\* *This Changelog was automatically generated by [github_changelog_generator](https://github.com/github-changelog-generator/github-changelog-generator)*
142175

143176
[1.4.0]: https://github.com/mailjet/mailjet-apiv3-python/releases/tag/v1.4.0
144-
[unreleased]: https://github.com/mailjet/mailjet-apiv3-python/releases/tag/v1.4.0...HEAD
177+
[1.5.0]: https://github.com/mailjet/mailjet-apiv3-python/releases/tag/v1.5.0
178+
[unreleased]: https://github.com/mailjet/mailjet-apiv3-python/releases/tag/v1.5.0...HEAD

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ Check out all the resources and Python code examples in the official [Mailjet Do
5858

5959
This library `mailjet_rest` officially supports the following Python versions:
6060

61-
- Python >=3.9,\<3.14
61+
- Python >=3.10,\<3.14
6262

6363
It's tested up to 3.13 (including).
6464

@@ -70,7 +70,7 @@ To build the `mailjet_rest` package from the sources you need `setuptools` (as a
7070

7171
### Runtime dependencies
7272

73-
At runtime the package requires only `requests >=2.32.3`.
73+
At runtime the package requires only `requests >=2.32.4`.
7474

7575
### Test dependencies
7676

@@ -443,5 +443,5 @@ If you have suggestions on how to improve the guides, please submit an issue in
443443
- [@skupriienko](https://github.com/skupriienko)
444444

445445
[api_credential]: https://app.mailjet.com/account/apikeys
446-
[doc]: http://dev.mailjet.com/guides/?python#
447-
[mailjet]: (http://www.mailjet.com/)
446+
[doc]: https://dev.mailjet.com/email/guides/?python#
447+
[mailjet]: (https://www.mailjet.com)

SECURITY.md

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
# Security Policy
2+
3+
## Supported Versions
4+
5+
| Version | Supported |
6+
| ------- | ------------------ |
7+
| 1.4.x | :white_check_mark: |
8+
| < 1.4.0 | :x: |
9+
10+
# Vulnerability Disclosure
11+
12+
If you think you have found a potential security vulnerability in
13+
mailjet-rest, please open a [draft Security Advisory](https://github.com/mailjet/mailjet-apiv3-python/security/advisories/new)
14+
via GitHub. We will coordinate verification and next steps through
15+
that secure medium.
16+
17+
If English is not your first language, please try to describe the
18+
problem and its impact to the best of your ability. For greater detail,
19+
please use your native language and we will try our best to translate it
20+
using online services.
21+
22+
Please also include the code you used to find the problem and the
23+
shortest amount of code necessary to reproduce it.
24+
25+
Please do not disclose this to anyone else. We will retrieve a CVE
26+
identifier if necessary and give you full credit under whatever name or
27+
alias you provide. We will only request an identifier when we have a fix
28+
and can publish it in a release.
29+
30+
We will respect your privacy and will only publicize your involvement if
31+
you grant us permission.
32+
33+
## Process
34+
35+
This following information discusses the process the project
36+
follows in response to vulnerability disclosures. If you are disclosing
37+
a vulnerability, this section of the documentation lets you know how we
38+
will respond to your disclosure.
39+
40+
### Timeline
41+
42+
When you report an issue, one of the project members will respond to you
43+
within five days *at the outside*. In most cases responses will be
44+
faster, usually within 72 hours. This initial response will at the very
45+
least confirm receipt of the report.
46+
47+
If we were able to rapidly reproduce the issue, the initial response
48+
will also contain confirmation of the issue. If we are not, we will
49+
often ask for more information about the reproduction scenario.
50+
51+
Our goal is to have a fix for any vulnerability released within two
52+
weeks of the initial disclosure. This may potentially involve shipping
53+
an interim release that simply disables function while a more mature fix
54+
can be prepared, but will in the vast majority of cases mean shipping a
55+
complete release as soon as possible.
56+
57+
Throughout the fix process we will keep you up to speed with how the fix
58+
is progressing. Once the fix is prepared, we will notify you that we
59+
believe we have a fix. Often we will ask you to confirm the fix resolves
60+
the problem in your environment, especially if we are not confident of
61+
our reproduction scenario.
62+
63+
At this point, we will prepare for the release. We will obtain a CVE
64+
number if one is required, providing you with full credit for the
65+
discovery. We will also decide on a planned release date, and let you
66+
know when it is. This release date will *always* be on a weekday.
67+
68+
At this point we will reach out to our major downstream packagers to
69+
notify them of an impending security-related patch so they can make
70+
arrangements. In addition, these packagers will be provided with the
71+
intended patch ahead of time, to ensure that they are able to promptly
72+
release their downstream packages.
73+
74+
On release day, we will push the patch to our public repository, along
75+
with an updated changelog that describes the issue and credits you. We
76+
will then issue a PyPI release containing the patch.
77+
78+
At this point, we will publicise the release.
79+
80+
We will also explicitly mention which commits contain the fix to make it
81+
easier for other distributors and users to easily patch their own
82+
versions of mailjet-rest if upgrading is not an option.

0 commit comments

Comments
 (0)