Bastien Gerard
5a41998eda
Updated recent bugfix with embedded DOc deepcopy so that it set _instance to None
2021-08-02 21:51:15 +02:00
Bastien Gerard
c32b308730
minor renaming in test classes
2021-08-01 14:12:27 +02:00
Timothé Perez
88642eb021
Fix deepcopy on EmbeddedDocument
2021-08-01 10:09:24 +02:00
Bastien Gerard
2fd4169656
Fix instance._qs that was failing due to bad parametrization that went unnoticed
2021-05-17 22:37:35 +02:00
Bastien Gerard
2215e2746b
run latest autoformatter
2021-05-04 10:50:56 +02:00
Bastien Gerard
b9d370c885
add standard hooks
2021-03-29 22:02:57 +02:00
Bastien Gerard
ff596fcb7e
replace flake8-import-order by isort
2021-03-29 21:50:22 +02:00
Bastien Gerard
f244207168
fix mongo download link for 4.2 4.4 explicitly
2021-03-03 12:26:48 +01:00
Bastien Gerard
8ef771912d
fixing incompatibility with mongoengine aggregation to support mongo 4.4
2021-03-03 10:51:03 +01:00
Bastien Gerard
c28bb517cb
Use Queryset._query instead of Cursor.__spec for count()
2020-12-13 10:43:26 +01:00
Bastien Gerard
8a1a68ea7c
fix flake8 warnings
2020-12-13 00:14:53 +01:00
Bastien Gerard
eabb8f60f5
autoformat with pyupgrade
2020-12-13 00:14:53 +01:00
Bastien Gerard
c00a378776
autoformat with updated black
2020-12-13 00:14:52 +01:00
Bastien Gérard
48357640c6
improve deprecated pymongo call
2020-11-14 14:41:59 +01:00
Bastien Gérard
8c3058d99b
Fix some issues related with db_field in constructor by removing field/db_field translation that shouldn't occur in constructor
2020-11-08 22:36:58 +01:00
Bastien Gérard
eb56fb9bda
Merge pull request #2413 from bagerard/dynamic_document_parsing_known_fields
...
Bug fix in DynamicDocument which is not parsing known fields
2020-11-08 13:17:07 +01:00
Bastien Gérard
161493c0d2
Merge pull request #2408 from bagerard/refactoring_remove_useless_code_only_fields
...
Removed code related to Document.__only_fields
2020-11-08 13:16:03 +01:00
Bastien Gérard
03af784ebe
Bug fix in DynamicDocument which isn not parsing known fields in constructor like Document do #2412
2020-11-07 21:30:23 +01:00
Felix Schultheiß
e5f6e4584a
Merge commit master into bugfix-save-sharding
2020-11-03 10:05:31 +01:00
Felix Schultheiß
0bc18cd6e1
fixed shard test case for old mongodb version
2020-11-03 10:00:02 +01:00
Felix Schultheiß
30a3c6a5b7
added testcase for save create with shard key
2020-11-02 17:30:24 +01:00
Bastien Gérard
d8b8ff6851
Removed code related to Document.__only_fields and Queryset.only_fields which appear to have no effect
2020-11-02 14:52:02 +01:00
Bastien Gérard
f4962fbc40
remove utf8 encoding declaration in test files as it's not needed/recommended
2020-10-30 21:10:21 +01:00
Bastien Gérard
65f50fd713
Merge pull request #2387 from bagerard/fix_change_fields_inconsistencies
...
fix inconsistencies in ._changed_fields computation
2020-10-29 21:15:31 +01:00
Bastien Gérard
d4350e7da4
Fix for ListField that isnt detecting properly that item 0 is changed
2020-10-10 23:32:22 +02:00
Bastien Gérard
aabc18755c
fix inconsistencies in ._changed_fields computation
2020-10-07 00:01:09 +02:00
Bastien Gérard
aca4de728e
Merge branch 'master' of github.com:MongoEngine/mongoengine into fix_count_documents_deprecation
2020-08-11 23:01:33 +02:00
Bastien Gérard
ef7da36ac6
Update pre-commit and fix existing flake8 warnings once for all
2020-04-25 21:36:07 +02:00
Bastien Gérard
87f4d1a323
Merge branch 'master' of github.com:MongoEngine/mongoengine into drop_py2_support
2020-04-25 13:51:21 +02:00
Bastien Gérard
ee2d50b2d1
remove drop_dups index option, deprecated with MongoDB3
2020-03-17 21:38:50 +01:00
Bastien Gérard
8086576677
get rid of six
2020-03-11 23:07:03 +01:00
Bastien Gérard
e64a7a9448
reformat with latest black
2020-01-07 22:11:24 +01:00
Bastien Gérard
60c42dddd5
finalize code related to count_documents migration
2020-01-05 22:29:13 +01:00
Bastien Gérard
c85b59d3b5
Merge branch 'master' of github.com:MongoEngine/mongoengine into negative_indexes_in_list
2019-12-20 23:27:51 +01:00
Bastien Gérard
332bd767d4
minor fixes in tests
2019-12-20 23:20:15 +01:00
Eric Timmons
68dc2925fb
Add LazyReferenceField with dbref=True to embedded_document equality test
2019-12-15 20:21:22 -05:00
Eric Timmons
dc7b96a569
Make python value for LazyReferenceFields be a DBRef
...
Previously, when reading a LazyReferenceField from the DB, it was stored
internally in the parent document's _data field as an ObjectId. However, this
meant that equality tests using an enclosing EmbeddedDocument would not return
True when the EmbeddedDocument being compared to contained a DBRef or Document
in _data. Enclosing Documents were largely unaffected because they look at the
primary key for equality (which EmbeddedDocuments lack).
This makes the internal Python representation of a LazyReferenceField (before
the LazyReference itself has been constructed) a DBRef, using code identical to
ReferenceField.
2019-12-15 20:20:59 -05:00
Eric Timmons
50882e5bb0
Add failing test
...
Test that __eq__ for EmbeddedDocuments with LazyReferenceFields works as
expected.
2019-12-15 20:20:59 -05:00
Bastien Gérard
78b240b740
updated changelog + improved query_counter test
2019-12-04 21:51:07 +01:00
Eloi Zalczer
0bf08db7b9
Added test case for query_counter alias
2019-12-02 10:07:33 +01:00
Bastien Gérard
138e759161
Merge pull request #2187 from bagerard/improve_error_message_InvalidDocumentError
...
Improve error message from InvalidDocumentError
2019-11-08 21:27:17 +01:00
Bastien Gérard
81647d67a0
fix recent tests update with unittest2pytest
2019-10-31 23:06:40 +01:00
Bastien Gérard
799cdafae6
remove references to nose
2019-10-31 23:02:28 +01:00
Bastien Gérard
bc0c55e49a
improve tests health (flake8 warnings)
2019-10-31 23:01:27 +01:00
Bastien Gérard
c61c6a8525
fix == None assertions
2019-10-31 22:59:49 +01:00
Bastien Gérard
3e764d068c
fix remaining assertRaises
2019-10-31 22:59:49 +01:00
Bastien Gérard
ac25f4b98b
ran unittest2pytest
2019-10-31 22:59:49 +01:00
Bastien Gérard
37ca79e9c5
fix black formatting
2019-10-31 22:39:53 +01:00
Bastien Gérard
54ca7bf09f
fix associated test to avoid discrepencies btw py2 and py3
2019-10-28 23:33:37 +01:00
Bastien Gérard
8bf5370b6c
Improve error message from InvalidDocumentError whenever an embedded document has a bad shape (e.g due to migration)
2019-10-28 22:05:13 +01:00