Skip to content

Django upgrades, UUID handling - #340

Merged
jheld merged 5 commits into
soynatan:masterfrom
UpliftAgency:django-upgrades
Jun 6, 2026
Merged

Django upgrades, UUID handling#340
jheld merged 5 commits into
soynatan:masterfrom
UpliftAgency:django-upgrades

Conversation

@pcraciunoiu

Copy link
Copy Markdown
Contributor

Upstreaming more changes from our fork that we've been using in production.

  • Upgrade various imports/calls to use Django 4.2+ (used django-upgrade lib)
  • Handle UUID in changed_fields, was giving issues
  • Handle async transactions properly

Thanks for reviewing!

* Upgrade various imports/calls to use Django 4.2+ (used django-upgrade
  lib)
* Handle UUID in changed_fields, was giving issues
* Handle async transactions properly
Comment thread easyaudit/signals/crud_flows.py Outdated
Comment thread easyaudit/signals/crud_flows.py Outdated
if isinstance(pks, Iterable):
pks = (format_primary_key(pk) for pk in pks)
else:
pks = format_primary_key(pks)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

if not an iterable, then what exactly is happening here? it's also been a long time since i've read the flow of how pk_set can be passed in.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Good call, I'll simplify this and make sure we're testing it in one project too.

Pushed changes.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@pcraciunoiu have you been able to test out this change in one of your projects?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@jheld it looks like I didn't get to creating a new tag on our fork and updating our project to use the changes after the last commit bfe2ced

Otherwise it's been tested. I'll push that update and deploy, but it'll likely be a few days of testing to be sure (it's not a very active project)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I'm in no rush but I also haven't used this project in a company since 2020. If you're okay to wait on getting some runtime signals, that's stellar! If you're otherwise feeling confident, then we can merge and make a new release.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Been using it for a few days. The main use case for the app is an audit trail of changes. No issues with these changes that I could see.

I do have a couple more features that I'd like to PR. The main one is to add a metadata with a callback so that using this project allows us to add custom data on top of the change events.

I'll PR those changes separately soon.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@jheld meaning, I feel good about merging this if you are ready

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Opened follow-ups on top of this in #343 and #344.

Those last two bring parity with our fork, which would be ideal, but they are more substantial as well.

@jheld jheld left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

i'm probably going to approve this anyway but hoping to get more information about the changes in crud_flows before doing it.

@jheld
jheld merged commit 25b53f9 into soynatan:master Jun 6, 2026
15 checks passed
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