Why was CommaSeparatedIntegerField Deprecated?

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

Why was CommaSeparatedIntegerField Deprecated?

Larrik Jaerico
I see that CommaSeparatedIntegerField is being deprecated, but I don't see why. I know I'm apparently late to the discussion, but after it 16 months I don't see any actual reasoning.

I recognize that a CharField with the validator is functionally equivalent, but it takes a very handy field type and makes it completely inaccessible and invisible to new users.

I see this discussion: https://groups.google.com/forum/#!topic/django-developers/wfp9qNpNpaQ/discussion which lead to this ticket: https://code.djangoproject.com/ticket/26154

Both links focus on the how rather than the why

I disagree with the decision overall, but I'm more concerned that it just kind of slipped through without anyone really thinking about it.

(To be clear, I don't begrudge Tim Graham, he was right to propose it, but then there was no discussion on it at all that I saw)

--
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" 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].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/3d54fb68-5548-424f-8806-103c026b5922%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Why was CommaSeparatedIntegerField Deprecated?

Tim Graham-2
The CharField(validators=[validate_comma_separated_integer_list]) version is more explicit about how the database stores the data. In my mind, having a separate field could give the impression that the database uses a special field type or validation. Also, I think
CommaSeparatedIntegerField is/was generally something to avoid -- I've never seen it used myself.

On Monday, May 15, 2017 at 12:57:59 PM UTC-4, Donald Morrone wrote:
I see that CommaSeparatedIntegerField is being deprecated, but I don't see why. I know I'm apparently late to the discussion, but after it 16 months I don't see any actual reasoning.

I recognize that a CharField with the validator is functionally equivalent, but it takes a very handy field type and makes it completely inaccessible and invisible to new users.

I see this discussion: <a href="https://groups.google.com/forum/#!topic/django-developers/wfp9qNpNpaQ/discussion" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/forum/#!topic/django-developers/wfp9qNpNpaQ/discussion&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/forum/#!topic/django-developers/wfp9qNpNpaQ/discussion&#39;;return true;">https://groups.google.com/forum/#!topic/django-developers/wfp9qNpNpaQ/discussion which lead to this ticket: <a href="https://code.djangoproject.com/ticket/26154" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fcode.djangoproject.com%2Fticket%2F26154\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFYur7FJtJfbSUw0NPIIo7tHJnlXA&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fcode.djangoproject.com%2Fticket%2F26154\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFYur7FJtJfbSUw0NPIIo7tHJnlXA&#39;;return true;">https://code.djangoproject.com/ticket/26154

Both links focus on the how rather than the why

I disagree with the decision overall, but I'm more concerned that it just kind of slipped through without anyone really thinking about it.

(To be clear, I don't begrudge Tim Graham, he was right to propose it, but then there was no discussion on it at all that I saw)

--
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" 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].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/6e661a98-df55-4be5-852e-99788df05945%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Why was CommaSeparatedIntegerField Deprecated?

Adam Johnson-2
I agree with the removal, it wasn't providing much value and was making it unclear as to what it actually aws. It could easily be mistaken by a beginner for a performant alternative to M2M models or something like django.contrib.postgres' ArrayField. Additionally it was weird that Django would offer a single model field that's just differs from another by a single validator function - why not offer CommaSeparatedStringField, OddIntegerField, etc. ?

On 15 May 2017 at 18:21, Tim Graham <[hidden email]> wrote:
The CharField(validators=[validate_comma_separated_integer_list]) version is more explicit about how the database stores the data. In my mind, having a separate field could give the impression that the database uses a special field type or validation. Also, I think
CommaSeparatedIntegerField is/was generally something to avoid -- I've never seen it used myself.

On Monday, May 15, 2017 at 12:57:59 PM UTC-4, Donald Morrone wrote:
I see that CommaSeparatedIntegerField is being deprecated, but I don't see why. I know I'm apparently late to the discussion, but after it 16 months I don't see any actual reasoning.

I recognize that a CharField with the validator is functionally equivalent, but it takes a very handy field type and makes it completely inaccessible and invisible to new users.


Both links focus on the how rather than the why

I disagree with the decision overall, but I'm more concerned that it just kind of slipped through without anyone really thinking about it.

(To be clear, I don't begrudge Tim Graham, he was right to propose it, but then there was no discussion on it at all that I saw)

--
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" 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].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/6e661a98-df55-4be5-852e-99788df05945%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Adam

--
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" 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].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/CAMyDDM2F5rvBRUhm0k8NEGp8a%3DD%2B5WPtM%3DgV2%3DRz3mK_1rZXdQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Why was CommaSeparatedIntegerField Deprecated?

Aymeric Augustin
In reply to this post by Larrik Jaerico
Hello,

Storing a comma-separated list of integers in a text field in a SQL database is a really bad anti-pattern. That's a sufficient reason for Django to stop condoning it, which it did by providing that functionality out of the box.

It was widely accepted (at least among the core team) that CommaSeparatedIntegerField shouldn't be a core Django field because it's both weird and specialized. That's why no one found useful to write down the reasons,

There's a comment saying that CSIF doesn't belong to core Django since the magic-removal refactor, just over 11 years ago:

It already existed when Django was open sourced, making it hard to trace why it was introduced — likely to support some sort of one-to-many field?

I hope this helps,

-- 
Aymeric.



On 15 May 2017, at 16:14, Donald Morrone <[hidden email]> wrote:

I see that CommaSeparatedIntegerField is being deprecated, but I don't see why. I know I'm apparently late to the discussion, but after it 16 months I don't see any actual reasoning.

I recognize that a CharField with the validator is functionally equivalent, but it takes a very handy field type and makes it completely inaccessible and invisible to new users.


Both links focus on the how rather than the why

I disagree with the decision overall, but I'm more concerned that it just kind of slipped through without anyone really thinking about it.

(To be clear, I don't begrudge Tim Graham, he was right to propose it, but then there was no discussion on it at all that I saw)

--
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" 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].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/3d54fb68-5548-424f-8806-103c026b5922%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" 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].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/FF0E8034-5BE7-4A47-8548-F0DE501F6940%40polytechnique.org.
For more options, visit https://groups.google.com/d/optout.