#28183: objects.create(**dictionary, key=value) regression in 1.11
-------------------------------------+-------------------------------------
               Reporter:  MMeent     |          Owner:  nobody
                   Type:  Bug        |         Status:  new
              Component:  Database   |        Version:  1.11
  layer (models, ORM)                |
               Severity:  Normal     |       Keywords:  objects.create
           Triage Stage:             |      Has patch:  0
  Unreviewed                         |
    Needs documentation:  0          |    Needs tests:  0
Patch needs improvement:  0          |  Easy pickings:  0
                  UI/UX:  0          |
-------------------------------------+-------------------------------------
 Hi,

 We recently tried to move to django 1.11.x on python 3.4, and were
 suprised that our tests failed on the following:

 {{{
 [16:37:37] :     [Step 1/4] --- Environment information:
 [16:37:37] :     [Step 1/4] ------------------------
 [16:37:37] :     [Step 1/4] --- Python version:
 [16:37:37] :     [Step 1/4] Python 3.4.2
 [16:37:37] :     [Step 1/4] --- Pip version:
 [16:37:37] :     [Step 1/4] pip 9.0.1 from /<...>/lib/python3.4/site-
 packages (python 3.4)
 [16:37:37] :     [Step 1/4] --- Environment packages:
 [16:37:38] :     [Step 1/4] appdirs (1.4.3)
 [16:37:38] :     [Step 1/4] Django (1.11.1)
 [16:37:38] :     [Step 1/4] django-cors-headers (1.3.1)
 [16:37:38] :     [Step 1/4] django-gravatar2 (1.4.0)
 [16:37:38] :     [Step 1/4] djangorestframework (3.6.2)
 [16:37:38] :     [Step 1/4] docutils (0.13.1)
 [16:37:38] :     [Step 1/4] olefile (0.44)
 [16:37:38] :     [Step 1/4] packaging (16.8)
 [16:37:38] :     [Step 1/4] Pillow (4.1.1)
 [16:37:38] :     [Step 1/4] pip (9.0.1)
 [16:37:38] :     [Step 1/4] pyparsing (2.2.0)
 [16:37:38] :     [Step 1/4] pytz (2017.2)
 [16:37:38] :     [Step 1/4] reportlab (3.4.0)
 [16:37:38] :     [Step 1/4] setuptools (35.0.2)
 [16:37:38] :     [Step 1/4] six (1.10.0)
 [16:37:38] :     [Step 1/4] teamcity-messages (1.21)
 <...>
 [16:37:51]W:     [Step 3/4]   File "/<...>/work/www/urls.py", line 16, in
 <module>
 [16:37:51]W:     [Step 3/4]     url(r'^article/',
 include('article.urls')),
 [16:37:51]W:     [Step 3/4]   File "/<...>/lib/python3.4/site-
 packages/django/conf/urls/__init__.py", line 50, in include
 [16:37:51]W:     [Step 3/4]     urlconf_module =
 import_module(urlconf_module)
 [16:37:51]W:     [Step 3/4]   File
 "/<...>/lib/python3.4/importlib/__init__.py", line 109, in import_module
 [16:37:51]W:     [Step 3/4]     return
 _bootstrap._gcd_import(name[level:], package, level)
 [16:37:51]W:     [Step 3/4]   File "<frozen importlib._bootstrap>", line
 2254, in _gcd_import
 [16:37:51]W:     [Step 3/4]   File "<frozen importlib._bootstrap>", line
 2237, in _find_and_load
 [16:37:51]W:     [Step 3/4]   File "<frozen importlib._bootstrap>", line
 2226, in _find_and_load_unlocked
 [16:37:51]W:     [Step 3/4]   File "<frozen importlib._bootstrap>", line
 1200, in _load_unlocked
 [16:37:51]W:     [Step 3/4]   File "<frozen importlib._bootstrap>", line
 1129, in _exec
 [16:37:51]W:     [Step 3/4]   File "<frozen importlib._bootstrap>", line
 1471, in exec_module
 [16:37:51]W:     [Step 3/4]   File "<frozen importlib._bootstrap>", line
 321, in _call_with_frames_removed
 [16:37:51]W:     [Step 3/4]   File "/<...>/work/article/urls.py", line 3,
 in <module>
 [16:37:51]W:     [Step 3/4]     from article import views
 [16:37:51]W:     [Step 3/4]   File "/<...>/work/article/views.py", line 5,
 in <module>
 [16:37:51]W:     [Step 3/4]     from article.serializers import
 ArticleTypeSerializer
 [16:37:51]W:     [Step 3/4]   File "/<...>/work/article/serializers.py",
 line 6, in <module>
 [16:37:51]W:     [Step 3/4]     from money.serializers import
 MoneySerializerField
 [16:37:51]W:     [Step 3/4]   File "/<...>/work/money/serializers.py",
 line 138
 [16:37:51]W:     [Step 3/4]     VATPeriod.objects.create(**vp_data,
 vat=vat)
 [16:37:51]W:     [Step 3/4]                                       ^
 [16:37:51]W:     [Step 3/4] SyntaxError: invalid syntax
 [16:37:52]W:     [Step 3/4] Process exited with code 1
 }}}

 When I set the requirements.txt from >=1.10 to ~=1.10, our tests complete
 with the following dependencies:

 {{{
 [16:53:22] :     [Step 1/4] --- Environment information:
 [16:53:22] :     [Step 1/4] ------------------------
 [16:53:22] :     [Step 1/4] --- Python version:
 [16:53:22] :     [Step 1/4] Python 3.4.2
 [16:53:22] :     [Step 1/4] --- Pip version:
 [16:53:22] :     [Step 1/4] pip 9.0.1 from /<...>/lib/python3.4/site-
 packages (python 3.4)
 [16:53:22] :     [Step 1/4] --- Environment packages:
 [16:53:23] :     [Step 1/4] appdirs (1.4.3)
 [16:53:23] :     [Step 1/4] Django (1.10.7)
 [16:53:23] :     [Step 1/4] django-cors-headers (1.3.1)
 [16:53:23] :     [Step 1/4] django-gravatar2 (1.4.0)
 [16:53:23] :     [Step 1/4] djangorestframework (3.6.2)
 [16:53:23] :     [Step 1/4] docutils (0.13.1)
 [16:53:23] :     [Step 1/4] olefile (0.44)
 [16:53:23] :     [Step 1/4] packaging (16.8)
 [16:53:23] :     [Step 1/4] Pillow (4.1.1)
 [16:53:23] :     [Step 1/4] pip (9.0.1)
 [16:53:23] :     [Step 1/4] pyparsing (2.2.0)
 [16:53:23] :     [Step 1/4] reportlab (3.4.0)
 [16:53:23] :     [Step 1/4] setuptools (35.0.2)
 [16:53:23] :     [Step 1/4] six (1.10.0)
 [16:53:23] :     [Step 1/4] teamcity-messages (1.21)
 }}}

--
Ticket URL: <https://code.djangoproject.com/ticket/28183>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/049.5c24f3a1c0373b8b983a2f3caa053e7f%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to