Skip to content
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

fix numpy array incompatability #658

Merged
merged 5 commits into from
Sep 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion beanie/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
from beanie.odm.views import View
from beanie.odm.union_doc import UnionDoc

__version__ = "1.22.3"
__version__ = "1.22.4"
__all__ = [
# ODM
"Document",
Expand Down
3 changes: 2 additions & 1 deletion beanie/odm/utils/encoder.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,8 @@ def encode_document(self, obj):
else:
obj_dict[k] = o

if obj_dict[k] == IGNORE:
if isinstance(obj_dict[k], Ignore) and obj_dict[k] == IGNORE:
# Check the class, as direct comparison might not work, like with numpy arrays
del obj_dict[k]
else:
obj_dict[k] = encoder.encode(obj_dict[k])
Expand Down
8 changes: 8 additions & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@

Beanie project

## [1.22.4] - 2023-09-13

### Fix Numpy Array Incompatability
- Author - [Alex Lau](https://github.com/riven314)
- PR <https://github.com/roman-right/beanie/pull/658>

[1.22.4]: https://pypi.org/project/beanie/1.22.4

## [1.22.3] - 2023-09-13

### Refactor: Simplify UpdateMany And UpdateOne __await__ Method
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "flit_core.buildapi"

[project]
name = "beanie"
version = "1.22.3"
version = "1.22.4"
description = "Asynchronous Python ODM for MongoDB"
readme = "README.md"
requires-python = ">=3.7,<4.0"
Expand Down
2 changes: 1 addition & 1 deletion tests/test_beanie.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@


def test_version():
assert __version__ == "1.22.3"
assert __version__ == "1.22.4"
Loading