* merge master into v3
* fix order_by snake casing by checking if value is None, switch executor to execution_context_class since schema.execute no longer supports executor
* fix linting by removing duplicate defintion and test of convert_form_field_to_string_list
* Reset the global registry after each test (teardown)
* Create a settings fixtures that returns graphene_settings and resets
the graphene_settings after use (teardown)
* Convert test_mutation tests from unittests.TestCase to pytest
* Convert test_mutation PetType to a pet_type fixtures that reregisters
the type
* Remove Python 2 support
* Upgrade Python & Django versions
* Remove unsupported Django versions
* Remove unsupported Python versions
* Add Python 3.8
* Drop support for django-filter < 2
* Update LoginRequiredMixin doc link
* Remove redundant import
* Resolve RemovedInDjango40Warning warnings
* gql/graphene-django/graphene_django/tests/test_converter.py:175:
RemovedInDjango40Warning: django.utils.translation.ugettext_lazy() is
deprecated in favor of django.utils.translation.gettext_lazy().
* graphene-django/graphene_django/utils/utils.py:28:
RemovedInDjango40Warning: force_text() is deprecated in favor of
force_str().
* No need to use unicode strings with Python3
* Remove singledispatch dependency
singledispatch is inluded with Python >= 3.4, no need for external
package.
* use `to_represenation` in favor of `get_attribute`
* fix datetime type does get converted to a string
to_representation will convert the datetime field into a string representation. However the to_representation on the method field will only call its underlying method.
* fix add missing import
* apply black formatter
* add test for serializer method field
* apply black format
* improve backward compatibility
by using date's class contructor instead of fromisostring
* apply black format
* fix black format issue
* convert DRF ChoiceField to Enum, also impacts FilePathField
* Pep8 fixes
* DRF multiple choices field converts to list of enum
* apply black formatting
* Create new fields and exclude options that are aliased to exclude_fields and only_fields
* Update docs
* Add some checking around fields and exclude definitions
* Add all fields option
* Update docs to include `__all__` option
* Actual order of fields is not stable
* Update docs/queries.rst
Co-Authored-By: Semyon Pupkov <semen.pupkov@gmail.com>
* Fix example code
* Format code
* Start raising PendingDeprecationWarnings for using only_fields and exclude_fields
* Update tests
* Include setup.py in black formatting
* Add new flake8 plugins and update errors to look for
* Fix duplicate test name
* Don't use mutable data structure
* Install all dev dependencies for flake8 and black tox envs
* Update travis and tox
* Use xenial distribution
* Don't install coveralls twice
* Add black and flake8 tox commands
* Remove Python 3.5 test for Django master
* Fix indent
* Ignore migrations
* Remove black for now
* Run black formatting (#668)
* Run black format
* Update makefile
* Add black to travis build
Upon success the result was correct but also included:
"errors": [
{
"message": "User Error: expected iterable, but did not find one
for field <SerializerMutation_Subclass>Payload.errors."
}
]
This seemed to be due to Payload.errors defaulting to graphene.List
rather than unset or None. Unsure what exactly changed with 2.x to break
this, so I welcome a better fix, but explicitly setting errors to None
also seems easy enough.