[Django] #23976: ValidationError by list argument

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

[Django] #23976: ValidationError by list argument

Django
#23976: ValidationError by list argument
-------------------------------------+-------------------------------------
     Reporter:  archivarius888       |      Owner:  nobody
         Type:  Bug                  |     Status:  new
    Component:  Core                 |    Version:  master
  (Serialization)                    |   Keywords:  exceptions,
     Severity:  Release blocker      |  ValidationError
 Triage Stage:  Unreviewed           |  Has patch:  0
Easy pickings:  0                    |      UI/UX:  0
-------------------------------------+-------------------------------------
 Redefinition variable message by django/django/core/exceptions.py
 line 114,    for message in message:

--
Ticket URL: <https://code.djangoproject.com/ticket/23976>
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/057.6e406da50b783b5618558d052f5e9a9b%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [Django] #23976: ValidationError by list argument

Django
#23976: ValidationError by list argument
-------------------------------------+-------------------------------------
     Reporter:  archivarius888       |                    Owner:  nobody
         Type:  Bug                  |                   Status:  new
    Component:  Core                 |                  Version:  master
  (Serialization)                    |               Resolution:
     Severity:  Release blocker      |             Triage Stage:
     Keywords:  exceptions,          |  Unreviewed
  ValidationError                    |      Needs documentation:  0
    Has patch:  0                    |  Patch needs improvement:  0
  Needs tests:  0                    |                    UI/UX:  0
Easy pickings:  0                    |
-------------------------------------+-------------------------------------
Changes (by archivarius888):

 * needs_better_patch:   => 0
 * needs_tests:   => 0
 * needs_docs:   => 0


Old description:

> Redefinition variable message by django/django/core/exceptions.py
> line 114,    for message in message:

New description:

 Redefinition variable message by django/django/core/exceptions.py
 line 114,    for message in message:

 below line, 116:

 {{{
                 if not isinstance(message, ValidationError):
                     message = ValidationError(message)
                 self.error_list.extend(message.error_list)
 }}}

 if message isinstance of dict: AttributeError: 'ValidationError' object
 has no attribute 'error_list'

--

--
Ticket URL: <https://code.djangoproject.com/ticket/23976#comment:1>
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/072.2b57b7e224aa7d0c6bcf9c43d82252be%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [Django] #23976: ValidationError by list argument

Django
In reply to this post by Django
#23976: ValidationError by list argument
-------------------------------------+-------------------------------------
     Reporter:  archivarius888       |                    Owner:  nobody
         Type:  Bug                  |                   Status:  new
    Component:  Core                 |                  Version:  master
  (Serialization)                    |               Resolution:
     Severity:  Release blocker      |             Triage Stage:
     Keywords:  exceptions,          |  Unreviewed
  ValidationError                    |      Needs documentation:  0
    Has patch:  0                    |  Patch needs improvement:  0
  Needs tests:  0                    |                    UI/UX:  0
Easy pickings:  0                    |
-------------------------------------+-------------------------------------

Comment (by timgraham):

 Could you provide the code to reproduce the error?

--
Ticket URL: <https://code.djangoproject.com/ticket/23976#comment:2>
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/072.b2a462d680adab5cf1ff5594c7775270%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [Django] #23976: ValidationError by list argument

Django
In reply to this post by Django
#23976: ValidationError by list argument
-------------------------------------+-------------------------------------
     Reporter:  archivarius888       |                    Owner:  nobody
         Type:  Bug                  |                   Status:  new
    Component:  Core                 |                  Version:  master
  (Serialization)                    |               Resolution:
     Severity:  Release blocker      |             Triage Stage:
     Keywords:  exceptions,          |  Unreviewed
  ValidationError                    |      Needs documentation:  0
    Has patch:  0                    |  Patch needs improvement:  0
  Needs tests:  0                    |                    UI/UX:  0
Easy pickings:  0                    |
-------------------------------------+-------------------------------------

Comment (by archivarius888):

 {{{
 >>> from django.core.exceptions import ValidationError
 >>> ValidationError([{}])

 }}}

--
Ticket URL: <https://code.djangoproject.com/ticket/23976#comment:3>
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/072.2fb8efa041862da7997ad4f601bf4ddf%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [Django] #23976: ValidationError by list argument

Django
In reply to this post by Django
#23976: ValidationError by list argument
-------------------------------------+-------------------------------------
     Reporter:  archivarius888       |                    Owner:  nobody
         Type:  Bug                  |                   Status:  new
    Component:  Core                 |                  Version:  master
  (Serialization)                    |               Resolution:
     Severity:  Release blocker      |             Triage Stage:
     Keywords:  exceptions,          |  Unreviewed
  ValidationError                    |      Needs documentation:  0
    Has patch:  0                    |  Patch needs improvement:  0
  Needs tests:  0                    |                    UI/UX:  0
Easy pickings:  0                    |
-------------------------------------+-------------------------------------

Comment (by whoshuu):

 Under what circumstances does this exception get thrown? From the
 definition of `message`, it doesn't appear that `[{}]` is a valid form of
 `message`. If `message` does take that form somehow, then that's a
 separate bug.

--
Ticket URL: <https://code.djangoproject.com/ticket/23976#comment:4>
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/072.1ca892f2428fa9a24d9234d29817931b%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [Django] #23976: ValidationError by list argument

Django
In reply to this post by Django
#23976: ValidationError by list argument
-------------------------------------+-------------------------------------
     Reporter:  archivarius888       |                    Owner:  nobody
         Type:  Bug                  |                   Status:  new
    Component:  Core                 |                  Version:  master
  (Serialization)                    |               Resolution:
     Severity:  Release blocker      |             Triage Stage:
     Keywords:  exceptions,          |  Unreviewed
  ValidationError                    |      Needs documentation:  0
    Has patch:  0                    |  Patch needs improvement:  0
  Needs tests:  0                    |                    UI/UX:  0
Easy pickings:  0                    |
-------------------------------------+-------------------------------------

Comment (by archivarius888):

 Yeap, I just code would be better. And the user can do anything.

--
Ticket URL: <https://code.djangoproject.com/ticket/23976#comment:5>
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/072.9238a59333bc2eab07ee92741a6c9f8e%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [Django] #23976: ValidationError crashes if initialized with a list of empty dicts (was: ValidationError by list argument)

Django
In reply to this post by Django
#23976: ValidationError crashes if initialized with a list of empty dicts
-------------------------------------+-------------------------------------
     Reporter:  archivarius888       |                    Owner:  nobody
         Type:                       |                   Status:  new
  Cleanup/optimization               |                  Version:  master
    Component:  Core (Other)         |               Resolution:
     Severity:  Normal               |             Triage Stage:  Accepted
     Keywords:  exceptions,          |      Needs documentation:  0
  ValidationError                    |  Patch needs improvement:  0
    Has patch:  0                    |                    UI/UX:  0
  Needs tests:  0                    |
Easy pickings:  0                    |
-------------------------------------+-------------------------------------
Changes (by timgraham):

 * component:  Core (Serialization) => Core (Other)
 * stage:  Unreviewed => Accepted
 * type:  Bug => Cleanup/optimization
 * severity:  Release blocker => Normal


Comment:

 We could at least not crash so obscurely I suppose.

--
Ticket URL: <https://code.djangoproject.com/ticket/23976#comment:6>
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/072.3575e8b7ab95781f1b5552381b4696bd%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [Django] #23976: ValidationError crashes if initialized with a list of empty dicts

Django
In reply to this post by Django
#23976: ValidationError crashes if initialized with a list of empty dicts
-------------------------------------+-------------------------------------
     Reporter:  archivarius888       |                    Owner:  nobody
         Type:                       |                   Status:  new
  Cleanup/optimization               |
    Component:  Core (Other)         |                  Version:  master
     Severity:  Normal               |               Resolution:
     Keywords:  exceptions,          |             Triage Stage:  Accepted
  ValidationError                    |
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by takis):

 Could not reproduce using current Django master on Python 3.4.1 on OSX
 10.10.4.

--
Ticket URL: <https://code.djangoproject.com/ticket/23976#comment:7>
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/072.bdaa46b32546a9731f1cf24a66d0d203%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [Django] #23976: ValidationError crashes if initialized with a list of empty dicts

Django
In reply to this post by Django
#23976: ValidationError crashes if initialized with a list of empty dicts
-------------------------------------+-------------------------------------
     Reporter:  archivarius888       |                    Owner:  nobody
         Type:                       |                   Status:  new
  Cleanup/optimization               |
    Component:  Core (Other)         |                  Version:  master
     Severity:  Normal               |               Resolution:
     Keywords:  exceptions,          |             Triage Stage:  Accepted
  ValidationError                    |
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by Adam Zapletal):

 I've confirmed that the crash no longer happens on both `v2.0.7` and
 `master` on Mac OS 10.13.5 with Python 3.7.0:

 {{{
 In [1]: import django

 In [2]: django.__version__
 Out[2]: '2.0.7'

 In [3]: from django.core.exceptions import ValidationError

 In [4]: ValidationError([{}])
 Out[4]: ValidationError([])
 }}}

 {{{
 In [1]: import django

 In [2]: django.__version__
 Out[2]: '2.2.dev20180711212029'

 In [3]: from django.core.exceptions import ValidationError

 In [4]: ValidationError([{}])
 Out[4]: ValidationError([])
 }}}

 Can this ticket be closed?

--
Ticket URL: <https://code.djangoproject.com/ticket/23976#comment:8>
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/072.cf4a3992918cf4a276e205668c9faaeb%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [Django] #23976: ValidationError crashes if initialized with a list of empty dicts

Django
In reply to this post by Django
#23976: ValidationError crashes if initialized with a list of empty dicts
-------------------------------------+-------------------------------------
     Reporter:  archivarius888       |                    Owner:  nobody
         Type:                       |                   Status:  closed
  Cleanup/optimization               |
    Component:  Core (Other)         |                  Version:  master
     Severity:  Normal               |               Resolution:  fixed
     Keywords:  exceptions,          |             Triage Stage:  Accepted
  ValidationError                    |
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by Tim Graham):

 * status:  new => closed
 * resolution:   => fixed


--
Ticket URL: <https://code.djangoproject.com/ticket/23976#comment:9>
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/072.d73c33d4b93bd6319452be2557435a3f%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.