Re: [Django] #30689: Fix documentation for the `fields` argument of MultiValueField

2019-08-08 Thread Django
#30689: Fix documentation for the `fields` argument of MultiValueField
---+--
 Reporter:  Adam Sołtysik  |Owner:  nobody
 Type:  Bug|   Status:  closed
Component:  Documentation  |  Version:  master
 Severity:  Normal |   Resolution:  invalid
 Keywords: | Triage Stage:  Unreviewed
Has patch:  0  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  0
Easy pickings:  0  |UI/UX:  0
---+--

Comment (by Adam Sołtysik):

 I get it, though I think there's a difference between a bug when something
 doesn't work, and a "bug" when something works but it maybe shouldn't.
 That's the second time I stumbled upon such a situation -- several days
 ago I was refactoring part of the project because of #30333, and the
 change was also not documented. What's sad is that it's not my fault, as I
 didn't work on the project from the beginning and I didn't write the code
 in question, but now I have no way of being sure whether nothing else is
 broken after the upgrade. So maybe it's worth considering to add a special
 section to release notes just for code-breaking bugfixes ;)

-- 
Ticket URL: 
Django 
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 django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/065.87ad3517c83472be945b6ec316a69ed2%40djangoproject.com.


Re: [Django] #30689: Fix documentation for the `fields` argument of MultiValueField

2019-08-08 Thread Django
#30689: Fix documentation for the `fields` argument of MultiValueField
---+--
 Reporter:  Adam Sołtysik  |Owner:  nobody
 Type:  Bug|   Status:  closed
Component:  Documentation  |  Version:  master
 Severity:  Normal |   Resolution:  invalid
 Keywords: | Triage Stage:  Unreviewed
Has patch:  0  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  0
Easy pickings:  0  |UI/UX:  0
---+--

Comment (by Carlton Gibson):

 8e752d84378c7169ef73a483cba55a08c867 was just correcting a bug: that
 `fields` was **not** in fact required, contrary to the documentation.

 Sorry that you've hit this, but it doesn't qualify as a breaking change.
 (All bugfixes are breaking changes if you're relying on the broken
 behaviour...)

-- 
Ticket URL: 
Django 
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 django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/065.4511437d65d68a627aed028337bac881%40djangoproject.com.


Re: [Django] #30689: Fix documentation for the `fields` argument of MultiValueField

2019-08-08 Thread Django
#30689: Fix documentation for the `fields` argument of MultiValueField
---+--
 Reporter:  Adam Sołtysik  |Owner:  nobody
 Type:  Bug|   Status:  closed
Component:  Documentation  |  Version:  master
 Severity:  Normal |   Resolution:  invalid
 Keywords: | Triage Stage:  Unreviewed
Has patch:  0  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  0
Easy pickings:  0  |UI/UX:  0
---+--

Comment (by Adam Sołtysik):

 My problem was that the `fields` argument was not passed to the
 constructor of a class inheriting from `MultiValueField`. In Django 1.11
 it worked, because empty tuple `()` was the default for this argument,
 just like in the class header in the documentation, and since Django 2.0
 there is no default value. The exact code change is here:
 
https://github.com/django/django/commit/8e752d84378c7169ef73a483cba55a08c867.

 I think this is a breaking change that should be documented in the release
 notes. This:

 {{{Form fields no longer accept optional arguments as positional
 arguments}}}

 is not relevant, since `fields` is in fact accepted as a positional
 argument.

-- 
Ticket URL: 
Django 
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 django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/065.fe7e8035e8d40877beb73b0f5096abd8%40djangoproject.com.


Re: [Django] #30689: Fix documentation for the `fields` argument of MultiValueField

2019-08-08 Thread Django
#30689: Fix documentation for the `fields` argument of MultiValueField
---+--
 Reporter:  Adam Sołtysik  |Owner:  nobody
 Type:  Bug|   Status:  closed
Component:  Documentation  |  Version:  master
 Severity:  Normal |   Resolution:  invalid
 Keywords: | Triage Stage:  Unreviewed
Has patch:  0  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  0
Easy pickings:  0  |UI/UX:  0
---+--
Changes (by Carlton Gibson):

 * status:  new => closed
 * type:  Uncategorized => Bug
 * version:  2.2 => master
 * resolution:   => invalid


Comment:

 Without actual code it's difficult to know what's broken in your project
 but I'd guess the relevant change was #28192. Optional args are now
 keyword only. As [https://docs.djangoproject.com/en/2.2/releases/2.0
 /#form-fields-no-longer-accept-optional-arguments-as-positional-arguments
 per the note in the Backwards incompatible changes section of the 2.0
 release notes]:

 > To help prevent runtime errors due to incorrect ordering of form field
 arguments, optional arguments of built-in form fields are no longer
 accepted as positional arguments.

 In general, the reference docs do not attempt to match the code signature
 of the documented methods exactly. Rather they aim to give a guide to the
 interface from the user perspective. In this case, `fields` doesn't have
 an actual default, but is a required tuple of fields, as per the
 discussion below.

-- 
Ticket URL: 
Django 
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 django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/065.daa3fafc9d0e599c58636ff41d611609%40djangoproject.com.


[Django] #30689: Fix documentation for the `fields` argument of MultiValueField

2019-08-08 Thread Django
#30689: Fix documentation for the `fields` argument of MultiValueField
-+
   Reporter:  Adam Sołtysik  |  Owner:  nobody
   Type:  Uncategorized  | Status:  new
  Component:  Documentation  |Version:  2.2
   Severity:  Normal |   Keywords:
   Triage Stage:  Unreviewed |  Has patch:  0
Needs documentation:  0  |Needs tests:  0
Patch needs improvement:  0  |  Easy pickings:  0
  UI/UX:  0  |
-+
 In the
 [https://docs.djangoproject.com/en/2.2/ref/forms/fields/#multivaluefield
 documentation] there is the class header:

 {{{class MultiValueField(fields=(), **kwargs)}}}

 However, in the
 
[https://docs.djangoproject.com/en/2.2/_modules/django/forms/fields/#MultiValueField
 source code] the `fields` argument has no default value:

 {{{def __init__(self, fields, *, require_all_fields=True, **kwargs):}}}

 This behaviour seems to have changed in Django 2.0 (some of my forms
 started crashing after the upgrade), but there is nothing about it in the
 [https://docs.djangoproject.com/en/2.2/releases/2.0/ release notes].

-- 
Ticket URL: 
Django 
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 django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/050.763723228819184f82b596887a1743bf%40djangoproject.com.