Exception when use pk__token__gt filter In python 3.7

Description

When doing following query

list(Model.objects(pk_token_gt=functions.Token(x.pk)).limit(1))

It raised an exception

TypeError: can't pickle odict_values objects.

The reason:

In _PartitionKeysToken's _init_, it calls self.partition_columns = model._partition_keys.values(), which returns an odict_values, it is not deepcopiable.

Fix: modify model._partition_keys.values() to list(model._partition_keys.values()).

Environment

None

Pull Requests

None

Status

Assignee

Unassigned

Reporter

lishuo.03

Fix versions

Labels

None

Reproduced in

None

PM Priority

None

External issue ID

None

External issue ID

None

External issue ID

None

External issue ID

None

External issue ID

None

External issue ID

None

Doc Impact

None

Reviewer

None

Size

None

Affects versions

3.18.0

Priority

Major
Configure