Compare commits

..

4 Commits

Author SHA1 Message Date
Georg K
f5fec0f374 feat: update code collection check 2022-02-03 20:16:03 +03:00
jar3b
dffcc0992d fix: imports to match v0.13 to python3.10 2021-11-05 18:10:25 +03:00
Stefan Wojcik
824ec42005 bump version to v0.13.0 and fill in the changelog and the upgrade docs 2017-04-16 14:08:46 -04:00
Stefan Wójcik
466935e9a3 Unicode support in EmailField (#1527) 2017-04-16 13:58:58 -04:00
6 changed files with 20 additions and 4 deletions

View File

@@ -6,6 +6,11 @@ Development
===========
- (Fill this out as you fix issues and develop your features).
Changes in 0.13.0
=================
- POTENTIAL BREAKING CHANGE: Added Unicode support to the `EmailField`, see
docs/upgrade.rst for details.
Changes in 0.12.0
=================
- POTENTIAL BREAKING CHANGE: Fixed limit/skip/hint/batch_size chaining #1476

View File

@@ -6,6 +6,17 @@ Development
***********
(Fill this out whenever you introduce breaking changes to MongoEngine)
0.13.0
******
This release adds Unicode support to the `EmailField` and changes its
structure significantly. Previously, email addresses containing Unicode
characters didn't work at all. Starting with v0.13.0, domains with Unicode
characters are supported out of the box, meaning some emails that previously
didn't pass validation now do. Make sure the rest of your application can
accept such email addresses. Additionally, if you subclassed the `EmailField`
in your application and overrode `EmailField.EMAIL_REGEX`, you will have to
adjust your code to override `EmailField.USER_REGEX`, `EmailField.DOMAIN_REGEX`,
and potentially `EmailField.UTF8_USER_REGEX`.
0.12.0
******

View File

@@ -23,7 +23,7 @@ __all__ = (list(document.__all__) + list(fields.__all__) +
list(signals.__all__) + list(errors.__all__))
VERSION = (0, 12, 0)
VERSION = (0, 13, 0)
def get_version():

View File

@@ -1,6 +1,6 @@
import copy
import numbers
from collections import Hashable
from collections.abc import Hashable
from functools import partial
from bson import ObjectId, json_util

View File

@@ -808,7 +808,7 @@ class Document(BaseDocument):
collection = cls._get_collection()
# 746: when connection is via mongos, the read preference is not necessarily an indication that
# this code runs on a secondary
if not collection.is_mongos and collection.read_preference > 1:
if collection.is_mongos is not None and collection.read_preference.mode > 1:
return
# determine if an index which we are creating includes

View File

@@ -6,7 +6,7 @@ import socket
import time
import uuid
import warnings
from collections import Mapping
from collections.abc import Mapping
from operator import itemgetter
from bson import Binary, DBRef, ObjectId, SON