Skip to content

Upgrade Django to 6 and refactor dependencies and tests#232

Open
nofalx wants to merge 20 commits into
taigaio:mainfrom
nofalx:issues/195/greenkeep
Open

Upgrade Django to 6 and refactor dependencies and tests#232
nofalx wants to merge 20 commits into
taigaio:mainfrom
nofalx:issues/195/greenkeep

Conversation

@nofalx
Copy link
Copy Markdown

@nofalx nofalx commented Mar 26, 2026

  • Django 6+ compatibility: Update storage configuration to use STORAGES dict
  • Refactor: Replace raw SQL queries with Django ORM bulk_update operations across projects and userstories services
  • Fix: Add iterator chunk_size configuration (2000) to be compatible with new django versions
  • Fix: Correct PostgreSQL version detection in migrations using proper cursor methods
  • Fix: Simplify complex database migration by replacing raw SQL with bulk_update as its broken on new Postgres versions
  • Upgrade: psycopg to v3 for improved PostgreSQL compatibility
  • Chore: Update minimum Python requirement to 3.10+ (Django 6 requirement)
  • Chore: Update minimum PostgreSQL requirement to 12+ (Django 6 requirement)
  • CI: Upgrade GitHub Actions (checkout@v4, setup-python@v5) and Upgrade Python test version from 3.10 to 3.12
  • Chore: Update tox configuration
  • Chore: Multiple dependency updates and security fixes

Currently all tests are passing, this should help close any security gaps and closes #195
This PR is built on top the work of #229

Comment thread AUTHORS.rst

And here is an inevitably incomplete list of MUCH-APPRECIATED CONTRIBUTORS, people who have submitted patches, reported bugs, added translations, helped answer newbie questions, and generally made Taiga that much better:

- Ahmad Nofal <nofal.ahmad@outlook.com>
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

consider adding @YaruG1022

Comment on lines +107 to +108
# TODO: double check why without create=True the tests fail when doing `pytest -v -n auto`
refval, _ = make_reference(instance, instance.project, create=True)
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Running tests in parallel will error out without adding this option, is this additon ok?

Comment on lines +50 to +51
# TODO Prefetching history_entry is currently causing errors. The actual data is fetched from history_service.get_history_queryset_by_model_instance(). Needs confirmation
value = value.prefetch_related('attachments')
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In past versions incorrect prefetch fields used to fail silently, I had to remove this as it was doing nothing and causing an error. It seems the "prefetch" logic was already handle by get_history_queryset_by_model_instance

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.

[SECURITY] Outdated Packages in the repo

2 participants