Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-mongoengine for openSUSE:Factory checked in at 2022-06-12 17:41:11 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-mongoengine (Old) and /work/SRC/openSUSE:Factory/.python-mongoengine.new.1548 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-mongoengine" Sun Jun 12 17:41:11 2022 rev:5 rq:982089 version:0.24.1 Changes: -------- --- /work/SRC/openSUSE:Factory/python-mongoengine/python-mongoengine.changes 2022-03-07 17:47:27.283110944 +0100 +++ /work/SRC/openSUSE:Factory/.python-mongoengine.new.1548/python-mongoengine.changes 2022-06-12 17:43:08.234484536 +0200 @@ -1,0 +2,7 @@ +Fri Jun 10 15:25:38 UTC 2022 - John Paul Adrian Glaubitz <adrian.glaub...@suse.com> + +- update to 0.24.1: + * Allow pymongo<5.0 to be pulled + * Don't use deprecated property for emptiness check in queryset base #2633 + +------------------------------------------------------------------- Old: ---- v0.24.0.tar.gz New: ---- v0.24.1.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-mongoengine.spec ++++++ --- /var/tmp/diff_new_pack.tzUTaT/_old 2022-06-12 17:43:08.626485098 +0200 +++ /var/tmp/diff_new_pack.tzUTaT/_new 2022-06-12 17:43:08.630485104 +0200 @@ -19,7 +19,7 @@ %{?!python_module:%define python_module() python3-%{**}} %global skip_python2 1 Name: python-mongoengine -Version: 0.24.0 +Version: 0.24.1 Release: 0 Summary: Python Object-Document Mapper for working with MongoDB License: MIT ++++++ v0.24.0.tar.gz -> v0.24.1.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mongoengine-0.24.0/.pre-commit-config.yaml new/mongoengine-0.24.1/.pre-commit-config.yaml --- old/mongoengine-0.24.0/.pre-commit-config.yaml 2022-02-21 00:04:04.000000000 +0100 +++ new/mongoengine-0.24.1/.pre-commit-config.yaml 2022-03-21 21:50:55.000000000 +0100 @@ -1,14 +1,14 @@ fail_fast: false repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.0.1 + rev: v4.1.0 hooks: - id: check-merge-conflict - id: debug-statements - id: trailing-whitespace - id: end-of-file-fixer - repo: https://github.com/ambv/black - rev: 21.5b2 + rev: 22.1.0 hooks: - id: black - repo: https://gitlab.com/pycqa/flake8 @@ -16,11 +16,11 @@ hooks: - id: flake8 - repo: https://github.com/asottile/pyupgrade - rev: v2.19.1 + rev: v2.31.1 hooks: - id: pyupgrade args: [--py36-plus] - repo: https://github.com/pycqa/isort - rev: 5.8.0 + rev: 5.10.1 hooks: - id: isort diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mongoengine-0.24.0/benchmarks/test_basic_doc_ops.py new/mongoengine-0.24.1/benchmarks/test_basic_doc_ops.py --- old/mongoengine-0.24.0/benchmarks/test_basic_doc_ops.py 2022-02-21 00:04:04.000000000 +0100 +++ new/mongoengine-0.24.1/benchmarks/test_basic_doc_ops.py 2022-03-21 21:50:55.000000000 +0100 @@ -38,34 +38,34 @@ author_email="a...@example.com", ) - print("Doc initialization: %.3fus" % (timeit(init_book, 1000) * 10 ** 6)) + print("Doc initialization: %.3fus" % (timeit(init_book, 1000) * 10**6)) b = init_book() - print("Doc getattr: %.3fus" % (timeit(lambda: b.name, 10000) * 10 ** 6)) + print("Doc getattr: %.3fus" % (timeit(lambda: b.name, 10000) * 10**6)) print( "Doc setattr: %.3fus" - % (timeit(lambda: setattr(b, "name", "New name"), 10000) * 10 ** 6) # noqa B010 + % (timeit(lambda: setattr(b, "name", "New name"), 10000) * 10**6) # noqa B010 ) - print("Doc to mongo: %.3fus" % (timeit(b.to_mongo, 1000) * 10 ** 6)) + print("Doc to mongo: %.3fus" % (timeit(b.to_mongo, 1000) * 10**6)) - print("Doc validation: %.3fus" % (timeit(b.validate, 1000) * 10 ** 6)) + print("Doc validation: %.3fus" % (timeit(b.validate, 1000) * 10**6)) def save_book(): b._mark_as_changed("name") b._mark_as_changed("tags") b.save() - print("Save to database: %.3fus" % (timeit(save_book, 100) * 10 ** 6)) + print("Save to database: %.3fus" % (timeit(save_book, 100) * 10**6)) son = b.to_mongo() print( - "Load from SON: %.3fus" % (timeit(lambda: Book._from_son(son), 1000) * 10 ** 6) + "Load from SON: %.3fus" % (timeit(lambda: Book._from_son(son), 1000) * 10**6) ) print( - "Load from database: %.3fus" % (timeit(lambda: Book.objects[0], 100) * 10 ** 6) + "Load from database: %.3fus" % (timeit(lambda: Book.objects[0], 100) * 10**6) ) def create_and_delete_book(): @@ -75,7 +75,7 @@ print( "Init + save to database + delete: %.3fms" - % (timeit(create_and_delete_book, 10) * 10 ** 3) + % (timeit(create_and_delete_book, 10) * 10**3) ) @@ -101,9 +101,9 @@ ) company = init_company() - print("Big doc to mongo: %.3fms" % (timeit(company.to_mongo, 100) * 10 ** 3)) + print("Big doc to mongo: %.3fms" % (timeit(company.to_mongo, 100) * 10**3)) - print("Big doc validation: %.3fms" % (timeit(company.validate, 1000) * 10 ** 3)) + print("Big doc validation: %.3fms" % (timeit(company.validate, 1000) * 10**3)) company.save() @@ -112,17 +112,17 @@ company._mark_as_changed("contacts") company.save() - print("Save to database: %.3fms" % (timeit(save_company, 100) * 10 ** 3)) + print("Save to database: %.3fms" % (timeit(save_company, 100) * 10**3)) son = company.to_mongo() print( "Load from SON: %.3fms" - % (timeit(lambda: Company._from_son(son), 100) * 10 ** 3) + % (timeit(lambda: Company._from_son(son), 100) * 10**3) ) print( "Load from database: %.3fms" - % (timeit(lambda: Company.objects[0], 100) * 10 ** 3) + % (timeit(lambda: Company.objects[0], 100) * 10**3) ) def create_and_delete_company(): @@ -132,7 +132,7 @@ print( "Init + save to database + delete: %.3fms" - % (timeit(create_and_delete_company, 10) * 10 ** 3) + % (timeit(create_and_delete_company, 10) * 10**3) ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mongoengine-0.24.0/docs/changelog.rst new/mongoengine-0.24.1/docs/changelog.rst --- old/mongoengine-0.24.0/docs/changelog.rst 2022-02-21 00:04:04.000000000 +0100 +++ new/mongoengine-0.24.1/docs/changelog.rst 2022-03-21 21:50:55.000000000 +0100 @@ -8,6 +8,12 @@ =========== - (Fill this out as you fix issues and develop your features). +Changes in 0.24.1 +================= +- Allow pymongo<5.0 to be pulled +- Don't use deprecated property for emptiness check in queryset base #2633 + + Changes in 0.24.0 ================= - EnumField improvements: now ``choices`` limits the values of an enum to allow @@ -48,6 +54,12 @@ documents the extended functionality which is no longer supported. Rewrite the unsupported queries or fetch the whole result set and perform the count locally. + - Pymongo 4 removed db.authenticate(), on which we were relying for authenticating + with username/password. The migration involved switching to providing credentials to + MongoClient BUT in case the authSource isn't provided, db.authenticate used to default to + authSource=current-database and MongoClient defaults to authSource="admin". Long story short, + if you observe authentication issue after migrating, make sure you provide the authSource + explicitly. (see #2626) Changes in 0.23.1 ================= diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mongoengine-0.24.0/mongoengine/__init__.py new/mongoengine-0.24.1/mongoengine/__init__.py --- old/mongoengine-0.24.0/mongoengine/__init__.py 2022-02-21 00:04:04.000000000 +0100 +++ new/mongoengine-0.24.1/mongoengine/__init__.py 2022-03-21 21:50:55.000000000 +0100 @@ -29,7 +29,7 @@ ) -VERSION = (0, 24, 0) +VERSION = (0, 24, 1) def get_version(): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mongoengine-0.24.0/mongoengine/document.py new/mongoengine-0.24.1/mongoengine/document.py --- old/mongoengine-0.24.0/mongoengine/document.py 2022-02-21 00:04:04.000000000 +0100 +++ new/mongoengine-0.24.1/mongoengine/document.py 2022-03-21 21:50:55.000000000 +0100 @@ -241,7 +241,7 @@ collection_name = cls._get_collection_name() # Get max document limit and max byte size from meta. - max_size = cls._meta.get("max_size") or 10 * 2 ** 20 # 10MB default + max_size = cls._meta.get("max_size") or 10 * 2**20 # 10MB default max_documents = cls._meta.get("max_documents") # MongoDB will automatically raise the size to make it a multiple of diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mongoengine-0.24.0/mongoengine/queryset/base.py new/mongoengine-0.24.1/mongoengine/queryset/base.py --- old/mongoengine-0.24.0/mongoengine/queryset/base.py 2022-02-21 00:04:04.000000000 +0100 +++ new/mongoengine-0.24.1/mongoengine/queryset/base.py 2022-03-21 21:50:55.000000000 +0100 @@ -722,7 +722,7 @@ :param object_id: the value for the id of the document to look up """ queryset = self.clone() - if not queryset._query_obj.empty: + if queryset._query_obj: msg = "Cannot use a filter whilst using `with_id`" raise InvalidQueryError(msg) return queryset.filter(pk=object_id).first() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mongoengine-0.24.0/setup.py new/mongoengine-0.24.1/setup.py --- old/mongoengine-0.24.0/setup.py 2022-02-21 00:04:04.000000000 +0100 +++ new/mongoengine-0.24.1/setup.py 2022-03-21 21:50:55.000000000 +0100 @@ -142,7 +142,7 @@ platforms=["any"], classifiers=CLASSIFIERS, python_requires=">=3.6", - install_requires=["pymongo>=3.4,<=4.0"], + install_requires=["pymongo>=3.4,<5.0"], cmdclass={"test": PyTest}, **extra_opts ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mongoengine-0.24.0/tests/document/test_instance.py new/mongoengine-0.24.1/tests/document/test_instance.py --- old/mongoengine-0.24.0/tests/document/test_instance.py 2022-02-21 00:04:04.000000000 +0100 +++ new/mongoengine-0.24.1/tests/document/test_instance.py 2022-03-21 21:50:55.000000000 +0100 @@ -129,7 +129,7 @@ options = Log.objects._collection.options() assert options["capped"] is True assert options["max"] == 10 - assert options["size"] == 10 * 2 ** 20 + assert options["size"] == 10 * 2**20 # Check that the document with default value can be recreated class Log(Document): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mongoengine-0.24.0/tests/fields/test_float_field.py new/mongoengine-0.24.1/tests/fields/test_float_field.py --- old/mongoengine-0.24.0/tests/fields/test_float_field.py 2022-02-21 00:04:04.000000000 +0100 +++ new/mongoengine-0.24.1/tests/fields/test_float_field.py 2022-03-21 21:50:55.000000000 +0100 @@ -51,9 +51,9 @@ big_person.height = int(0) big_person.validate() - big_person.height = 2 ** 500 + big_person.height = 2**500 big_person.validate() - big_person.height = 2 ** 100000 # Too big for a float value + big_person.height = 2**100000 # Too big for a float value with pytest.raises(ValidationError): big_person.validate()