Skip to content

Commit 0468503

Browse files
authored
Merge pull request #160 from maxmind/greg/eng-841-easy-way-to-serialize-python-minfraud-model-objects-to-json
Refactor model classes and provide to_dict method
2 parents e249584 + 431c616 commit 0468503

File tree

11 files changed

+534
-513
lines changed

11 files changed

+534
-513
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
strategy:
1313
matrix:
1414
platform: [ubuntu-latest, macos-latest, windows-latest]
15-
python-version: [3.8, 3.9, "3.10", 3.11, 3.12, 3.13]
15+
python-version: [3.9, "3.10", 3.11, 3.12, 3.13]
1616

1717
name: Python ${{ matrix.python-version }} on ${{ matrix.platform }}
1818
runs-on: ${{ matrix.platform }}

HISTORY.rst

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,22 @@
33
History
44
-------
55

6-
2.12.0
6+
3.0.0
77
+++++++++++++++++++
88

9+
* BREAKING CHANGE: The ``minfraud.model.*`` classes have been refactored to
10+
simplify them and make them more flexible. They are no longer subclass
11+
NamedTuple and are now standard Python classes. This also means the
12+
classes are no longer immutable. For most users, these differences should
13+
not impact their integration.
14+
* BREAKING CHANGE: Model attributes that were formerly tuples are now lists.
15+
* BREAKING CHANGE: The deprecated `is_high_risk` attribute on
16+
`resp.ip_address.country` has been removed.
17+
* IMPORTANT: Python 3.9 or greater is required. If you are using an older
18+
version, please use an earlier release.
19+
* Added ``to_dict`` methods to the model classes. These return a dict version
20+
of the object that is suitable for serialization. It recursively calls
21+
``to_dict`` or the equivalent on all objects contained within the object.
922
* The minFraud Factors subscores have been deprecated. They will be removed
1023
in March 2025. Please see `our release notes <https://dev.maxmind.com/minfraud/release-notes/2024/#deprecation-of-risk-factor-scoressubscores>`_
1124
for more information.

README.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ For asynchronous reporting:
307307
Requirements
308308
------------
309309

310-
Python 3.8 or greater is required. Older versions are not supported.
310+
Python 3.9 or greater is required. Older versions are not supported.
311311

312312
Versioning
313313
----------
@@ -327,6 +327,6 @@ for assistance.
327327
Copyright and License
328328
---------------------
329329

330-
This software is Copyright © 2015-2024 by MaxMind, Inc.
330+
This software is Copyright © 2015-2025 by MaxMind, Inc.
331331

332332
This is free software, licensed under the Apache License, Version 2.0.

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646

4747
# General information about the project.
4848
project = "minfraud"
49-
copyright = "2015-2024, MaxMind, Inc"
49+
copyright = "2015-2025, MaxMind, Inc"
5050

5151
# The version info for the project you're documenting, acts as replacement for
5252
# |version| and |release|, also used in various other places throughout the

docs/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,6 @@ Indices and tables
3131
* :ref:`modindex`
3232
* :ref:`search`
3333

34-
:copyright: © 2015-2024 by MaxMind, Inc.
34+
:copyright: © 2015-2025 by MaxMind, Inc.
3535
:license: Apache License, Version 2.0
3636

0 commit comments

Comments
 (0)