Re: Deprecate CICharField, CIEmailField, CITextField

2024-02-23 Thread Silvio
True, not the end of the world. Just ... another dependency. The NPM world has traumatized me. Many thanks for creating that. If there's nothing that can be done, it's time to move on. But worth asking. (Interestingly, even with the deprecation, historical migration fields still need to be

Re: Deprecate CICharField, CIEmailField, CITextField

2024-02-22 Thread 'Johannes Maron' via Django developers (Contributions to Django itself)
I just say it: The decision certainly had good intentions, but maybe wasn't fully informed. It happens. But since we don't really have a processed to revert a deprecation, I would recommend using the django-citext package. It's a drop-in replacement with the same license as Django and a corporate

Re: Deprecate CICharField, CIEmailField, CITextField

2024-02-21 Thread Silvio
Coming in again now that I've looked at upgrading. @Adam: your post was useful. But can you actually say you prefer the new approach? But I'm going to be honest, this is a lot of hoops and gotchas. What did we actually gain by deprecating this? I'm seeing maybe 15-20 lines of code that will

Re: Deprecate CICharField, CIEmailField, CITextField

2023-12-20 Thread Matthew Graham
I only started trying to move to collations instead of citext recently, and it broke the regex validation as as non deterministic collation can't support regex validator, like what, why are we replacing something with an alternative that actually cant do the job as a replacement On Thu, 21 Dec

Re: Deprecate CICharField, CIEmailField, CITextField

2023-12-20 Thread gw...@fusionbox.com
This breaks search_fields. I can annotate a deterministic collation for simple fields. I don't understand why I have to do workarounds to get builtin stuff to work. There's no workaround I can figure out across joins though. I have `search_fields = ['owners__email']`. Using an annotated field

Re: Deprecate CICharField, CIEmailField, CITextField

2023-09-06 Thread 'Johannes Maron' via Django developers (Contributions to Django itself)
Hi again, We started creating a 3rd party django-citext package, to ensure future support of PotsgreSQL's CITEXT extension under a corporate funding. You can find the project here: https://github.com/voiio/django-citext While doing so, I noticed a couple of small things, where I'd love some

Re: Deprecate CICharField, CIEmailField, CITextField

2023-05-12 Thread 'Johannes Maron' via Django developers (Contributions to Django itself)
Hi, Yes, I hope Django will continue to expand expression support. I worked so hard on the SQL compiler to facilitate those kinds of features. Anyhow, since db collations are not an adequate replacement for CI text, we will create an open-source backport of the CITEXT fields. Once we are done, I

Re: Deprecate CICharField, CIEmailField, CITextField

2023-05-12 Thread 'Adam Johnson' via Django developers (Contributions to Django itself)
> What I am struggling now with is whenever I specify > `db_collation="case_insensitive"` on the field and this field is used in > `ModelAdmin.search_fields` - Django simply breaks (as it by default uses > `icontains` lookup). > That is quite unfortunate for the big projects, as I have to come up

Re: Deprecate CICharField, CIEmailField, CITextField

2023-05-06 Thread 'Johannes Maron' via Django developers (Contributions to Django itself)
Hello again, I trust Mariusz' assessment regarding the maintainability. In that case, I presume a separate package from a 3rd party with commercial interest might be the best option going forward. Thanks for all the considerations and explanations. Cheers! Joe On Wed, Apr 19, 2023 at 3:48 PM

Re: Deprecate CICharField, CIEmailField, CITextField

2023-04-19 Thread fly.a...@gmail.com
Hey everyone! Thanks for the discussion. And special thanks @Adam, for the great article, helped us with the migration. What I am struggling now with is whenever I specify `db_collation="case_insensitive"` on the field and this field is used in `ModelAdmin.search_fields` - Django simply

Re: Deprecate CICharField, CIEmailField, CITextField

2023-04-18 Thread 'Johannes Maron' via Django developers (Contributions to Django itself)
Thanks Adam, of course I read your well-written article before diving into this topic, thanks for sharing. However, I don't agree about the index. The best solution is using the CITEXT db type, which is very much alive. Should Django to deprecate support for the db type, a 3rd party package

Re: Deprecate CICharField, CIEmailField, CITextField

2023-04-14 Thread 'Adam Johnson' via Django developers (Contributions to Django itself)
Just to note, for anyone that finds it useful, that I wrote a blog post on migrating to collations: https://adamj.eu/tech/2023/02/23/migrate-django-postgresql-ci-fields-case-insensitive-collation/ But yes, I have also been thinking like Tom that indexing UPPER("email") seems to be the path of

Re: Deprecate CICharField, CIEmailField, CITextField

2023-04-13 Thread Tom Carrick
Hi, I wrote most of the code for collation support, and I also argued (softly) against deprecating citext support for the reasons you stated. However, I've changed my mind on this now. As you can't index the citext column for LIKE queries, doing these types of searches on any real amount of data

Re: Deprecate CICharField, CIEmailField, CITextField

2023-04-12 Thread Mariusz Felisiak
Hi > Unless we want to drop support for the CITEXT extension, ... What do you mean by that? As far as I'm now, we don't do anything special to support CITEXT extension 樂. > I'd caution to revert the deprecation and keep support ... I'm obviously biased as the author of this proposition and

Re: Deprecate CICharField, CIEmailField, CITextField

2023-04-12 Thread 'Johannes Maron' via Django developers (Contributions to Django itself)
Hi there, I am sorry that I missed this in the alpha. But to the best of my knowledge, CITEXT and non-deterministic collations are not the same. They don't support the same operations and their string comparison operations are similar, yet not identical. Furthermore, PostgreSQL doesn't

Re: Deprecate CICharField, CIEmailField, CITextField

2022-08-08 Thread Mariusz Felisiak
As far as I'm aware you can use: CreateCollation("case_insensitive", "und-u-ks-level2", provider="icu", deterministic=False) to create a case insensitive collation on PostgreSQL. -- You received this message because you are subscribed to the Google Groups "Django developers

Re: Deprecate CICharField, CIEmailField, CITextField

2022-08-06 Thread Silvio
Since these are PotsgreSQL-specific fields that are being deprecated, might it make sense to provide a hint as to what the CreateCollation() call should be? I'm looking around and it's not immediately obvious. The CreateCollation() examples in Django are for a German phone book, where in

Re: Deprecate CICharField, CIEmailField, CITextField

2022-07-28 Thread Mariusz Felisiak
https://code.djangoproject.com/ticket/33872 -- 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

Re: Deprecate CICharField, CIEmailField, CITextField

2022-07-28 Thread Mariusz Felisiak
> Support for PostgreSQL 10 was dropped in Django 4.1, and support for PostgreSQL 11 was dropped in Django 4.2. When CICharField, CIEmailField, CITextField deprecation starts in Django 4.2 they will be removed in Django 5.1. -- You received this message because you are subscribed to the

Re: Deprecate CICharField, CIEmailField, CITextField

2022-01-25 Thread Mariusz Felisiak
wtorek, 25 stycznia 2022 o 13:59:54 UTC+1 Adam Johnson napisał(a): > My initial concern was around the minimum PostgreSQL version that Django > 5.0 will support. According to > https://en.wikipedia.org/wiki/PostgreSQL#Release_history , PostgreSQL 10 > is supported until 2022-11-10 , and

Re: Deprecate CICharField, CIEmailField, CITextField

2022-01-25 Thread Tom Carrick
Hi, I'm not too sure about this. While Postgres encourages using non-deterministic collations, they're not without their downsides. For example, you can't do a LIKE query on a field using a non-deterministic collation, but you can with CItext - although I don't believe there's a way to index it.

Re: Deprecate CICharField, CIEmailField, CITextField

2022-01-25 Thread Paolo Melchiorre
Hi Mariusz, I agree with you on deprecating and then removing CI fields. I only would suggest adding some examples of migrations from CI fields to collations in the deprecation notes to help users to easily migrate. So +1 for me too. Ciao, Paolo On Tue, Jan 25, 2022 at 1:39 PM Mariusz

Re: Deprecate CICharField, CIEmailField, CITextField

2022-01-25 Thread 'Adam Johnson' via Django developers (Contributions to Django itself)
My initial concern was around the minimum PostgreSQL version that Django 5.0 will support. According to https://en.wikipedia.org/wiki/PostgreSQL#Release_history , PostgreSQL 10 is supported until 2022-11-10 , and version 11 until 2023-11-09. With Django 5.0 expected in 2024-01, it should be fine

Deprecate CICharField, CIEmailField, CITextField

2022-01-25 Thread Mariusz Felisiak
Hi y'all,     Django 3.2+ supports "db_collation" [1] for "CharField" and "TextField" along with migration operations ("CreateCollation()", "RemoveCollation") and the database function "Collate()" [3]. Moreover CI fields and the entire "citext" module are discouraged since PostgreSQL 12 [4]