python-ulid 2.3.0__tar.gz → 2.4.0.post0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {python_ulid-2.3.0 → python_ulid-2.4.0.post0}/CHANGELOG.rst +10 -1
- {python_ulid-2.3.0 → python_ulid-2.4.0.post0}/PKG-INFO +7 -1
- {python_ulid-2.3.0 → python_ulid-2.4.0.post0}/pyproject.toml +8 -0
- {python_ulid-2.3.0 → python_ulid-2.4.0.post0}/tests/test_ulid.py +11 -0
- {python_ulid-2.3.0 → python_ulid-2.4.0.post0}/ulid/__init__.py +3 -0
- {python_ulid-2.3.0 → python_ulid-2.4.0.post0}/.github/workflows/lint-and-test.yml +0 -0
- {python_ulid-2.3.0 → python_ulid-2.4.0.post0}/.github/workflows/publish.yml +0 -0
- {python_ulid-2.3.0 → python_ulid-2.4.0.post0}/.gitignore +0 -0
- {python_ulid-2.3.0 → python_ulid-2.4.0.post0}/.pre-commit-config.yaml +0 -0
- {python_ulid-2.3.0 → python_ulid-2.4.0.post0}/.readthedocs.yml +0 -0
- {python_ulid-2.3.0 → python_ulid-2.4.0.post0}/LICENSE +0 -0
- {python_ulid-2.3.0 → python_ulid-2.4.0.post0}/README.rst +0 -0
- {python_ulid-2.3.0 → python_ulid-2.4.0.post0}/docs/Makefile +0 -0
- {python_ulid-2.3.0 → python_ulid-2.4.0.post0}/docs/requirements.txt +0 -0
- {python_ulid-2.3.0 → python_ulid-2.4.0.post0}/docs/source/api.rst +0 -0
- {python_ulid-2.3.0 → python_ulid-2.4.0.post0}/docs/source/changelog.rst +0 -0
- {python_ulid-2.3.0 → python_ulid-2.4.0.post0}/docs/source/conf.py +0 -0
- {python_ulid-2.3.0 → python_ulid-2.4.0.post0}/docs/source/index.rst +0 -0
- {python_ulid-2.3.0 → python_ulid-2.4.0.post0}/hatch.toml +0 -0
- {python_ulid-2.3.0 → python_ulid-2.4.0.post0}/logo.png +0 -0
- {python_ulid-2.3.0 → python_ulid-2.4.0.post0}/tests/__init__.py +0 -0
- {python_ulid-2.3.0 → python_ulid-2.4.0.post0}/tests/test_base32.py +0 -0
- {python_ulid-2.3.0 → python_ulid-2.4.0.post0}/tests/test_cli.py +0 -0
- {python_ulid-2.3.0 → python_ulid-2.4.0.post0}/ulid/__main__.py +0 -0
- {python_ulid-2.3.0 → python_ulid-2.4.0.post0}/ulid/base32.py +0 -0
- {python_ulid-2.3.0 → python_ulid-2.4.0.post0}/ulid/constants.py +0 -0
- {python_ulid-2.3.0 → python_ulid-2.4.0.post0}/ulid/py.typed +0 -0
|
@@ -5,7 +5,15 @@ Changelog
|
|
|
5
5
|
|
|
6
6
|
Versions follow `Semantic Versioning <http://www.semver.org>`_
|
|
7
7
|
|
|
8
|
-
`2.
|
|
8
|
+
`2.4.0`_ - 2024-04-02
|
|
9
|
+
---------------------
|
|
10
|
+
|
|
11
|
+
Added
|
|
12
|
+
~~~~~
|
|
13
|
+
* :class:`.ULID` objects are now properly serialized when used as Pydantic types `@Avihais12344 <https://github.com/Avihais12344>`_.
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
`2.3.0`_ - 2024-03-21
|
|
9
17
|
---------------------
|
|
10
18
|
|
|
11
19
|
Added
|
|
@@ -143,6 +151,7 @@ Changed
|
|
|
143
151
|
* The package now has no external dependencies.
|
|
144
152
|
* The test-coverage has been raised to 100%.
|
|
145
153
|
|
|
154
|
+
.. _2.4.0: https://github.com/mdomke/python-ulid/compare/2.3.0...2.4.0
|
|
146
155
|
.. _2.3.0: https://github.com/mdomke/python-ulid/compare/2.2.0...2.3.0
|
|
147
156
|
.. _2.2.0: https://github.com/mdomke/python-ulid/compare/2.1.0...2.2.0
|
|
148
157
|
.. _2.1.0: https://github.com/mdomke/python-ulid/compare/2.0.0...2.1.0
|
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: python-ulid
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.4.0.post0
|
|
4
4
|
Summary: Universally unique lexicographically sortable identifier
|
|
5
|
+
Project-URL: Homepage, https://github.com/mdomke/python-ulid
|
|
6
|
+
Project-URL: Documentation, https://python-ulid.readthedocs.io
|
|
7
|
+
Project-URL: Changelog, https://python-ulid.readthedocs.io/en/latest/changelog.html
|
|
8
|
+
Project-URL: Issues, https://github.com/mdomke/python-ulid/issues
|
|
9
|
+
Project-URL: CI, https://github.com/mdomke/python-ulid/actions
|
|
10
|
+
Project-URL: Repository, https://github.com/mdomke/python-ulid
|
|
5
11
|
Author-email: Martin Domke <mail@martindomke.net>
|
|
6
12
|
License-Expression: MIT
|
|
7
13
|
License-File: LICENSE
|
|
@@ -26,6 +26,14 @@ classifiers = [
|
|
|
26
26
|
"Topic :: Software Development :: Libraries",
|
|
27
27
|
]
|
|
28
28
|
|
|
29
|
+
[project.urls]
|
|
30
|
+
Homepage = "https://github.com/mdomke/python-ulid"
|
|
31
|
+
Documentation = "https://python-ulid.readthedocs.io"
|
|
32
|
+
Changelog = "https://python-ulid.readthedocs.io/en/latest/changelog.html"
|
|
33
|
+
Issues = "https://github.com/mdomke/python-ulid/issues"
|
|
34
|
+
CI = "https://github.com/mdomke/python-ulid/actions"
|
|
35
|
+
Repository = "https://github.com/mdomke/python-ulid"
|
|
36
|
+
|
|
29
37
|
[project.optional-dependencies]
|
|
30
38
|
pydantic = [
|
|
31
39
|
"pydantic>=2.0"
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import json
|
|
1
2
|
import time
|
|
2
3
|
import uuid
|
|
3
4
|
from collections.abc import Callable
|
|
@@ -177,3 +178,13 @@ def test_pydantic_protocol() -> None:
|
|
|
177
178
|
for value in [b"not-enough", "not-enough"]:
|
|
178
179
|
with pytest.raises(ValidationError):
|
|
179
180
|
Model(ulid=value)
|
|
181
|
+
|
|
182
|
+
model_dict = model.model_dump()
|
|
183
|
+
ulid_from_dict = model_dict["ulid"]
|
|
184
|
+
assert ulid_from_dict == ulid
|
|
185
|
+
assert isinstance(ulid_from_dict, ULID)
|
|
186
|
+
assert Model(**model_dict) == model
|
|
187
|
+
|
|
188
|
+
model_json = model.model_dump_json()
|
|
189
|
+
assert isinstance(json.loads(model_json)["ulid"], str)
|
|
190
|
+
assert Model.model_validate_json(model_json) == model
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|