Skip to content

Upgrade to Python 3.12, remove django-choices and a couple other package updates.#593

Open
duckduckgrayduck wants to merge 7 commits intomasterfrom
issue502
Open

Upgrade to Python 3.12, remove django-choices and a couple other package updates.#593
duckduckgrayduck wants to merge 7 commits intomasterfrom
issue502

Conversation

@duckduckgrayduck
Copy link
Contributor

@duckduckgrayduck duckduckgrayduck commented Feb 17, 2026

  • Upgraded pylint and related plugins
  • Upgraded stripe because our old version does not support 3.12. Upgraded to a version that supports 3.12.
  • Removed django-choices and replaced with Django's built in choices.
  • Various linting and format fixes to align with the new pylint.

@duckduckgrayduck duckduckgrayduck temporarily deployed to squarelet-pi-issue502-jhlgvs82 February 17, 2026 21:27 Inactive
@allanlasser allanlasser temporarily deployed to squarelet-pi-issue502-tffnnuho February 17, 2026 21:31 Inactive
@duckduckgrayduck duckduckgrayduck temporarily deployed to squarelet-pi-issue502-vvvjmxg3 February 18, 2026 02:23 Inactive
@duckduckgrayduck duckduckgrayduck temporarily deployed to squarelet-pi-issue502-jikfr2p6 February 18, 2026 14:18 Inactive
@allanlasser allanlasser temporarily deployed to squarelet-pi-issue502-hopbdfqt February 18, 2026 14:40 Inactive
@duckduckgrayduck
Copy link
Contributor Author

duckduckgrayduck commented Feb 18, 2026

Ok, I'm hitting an issue now with both the construction of the test database and running the migrations in the deploy preview. I get the following error:

sql` = 'ALTER TABLE "users_user" ALTER COLUMN "email" TYPE varchar(254) COLLATE "case_insensitive"'
params =
ignored_wrapper_args = (False, {'connection': , 'cursor': <django.db.backends.utils.CursorWrapper object at 0x7fed216483d0>})

def _execute(self, sql, params, *ignored_wrapper_args):
    # Raise a warning during app initialization (stored_app_configs is only
    # ever set during testing).
    if not apps.ready and not apps.stored_app_configs:
        warnings.warn(self.APPS_NOT_READY_WARNING_MSG, category=RuntimeWarning)
    self.db.validate_no_broken_transaction()
    with self.db.wrap_database_errors:
        if params is :
            # params default might be backend specific.
          return self.cursor.execute(sql)

E django.db.utils.NotSupportedError: nondeterministic collations are not supported for operator class `"varchar_pattern_ops"

in users/models.py the email field does appear to have a collation
email = models.EmailField(
("email"),
unique=True, # All non-NULL values must be unique
null=True, # PostgresQL treats each NULL as unique
help_text=
("The user's email address"),
db_collation="case_insensitive",
)

I'm seeing some relevant discussions here:
https://code.djangoproject.com/ticket/36261
https://forum.djangoproject.com/t/icontains-lookup-when-using-nondeterministic-collations-in-postgres-fails/25696/6
and here:
https://adamj.eu/tech/2023/02/23/migrate-django-postgresql-ci-fields-case-insensitive-collation/#adding-new-case-insensitive-db-collation-fields-can-fail (albeit this is for migrating to 5.2)

Not sure what is the best path forward here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments