Skip to content

serialize as str when field is UUID type#11

Merged
Gagaro merged 3 commits intomasterfrom
serialize_uuid
Mar 5, 2026
Merged

serialize as str when field is UUID type#11
Gagaro merged 3 commits intomasterfrom
serialize_uuid

Conversation

@juggler31
Copy link
Copy Markdown
Collaborator

Il y avait des warnings lors de la sérialization d'un objet UUID.

@juggler31 juggler31 force-pushed the serialize_uuid branch 4 times, most recently from 352dd6a to dfdf577 Compare March 3, 2026 10:30
@coveralls
Copy link
Copy Markdown

coveralls commented Mar 3, 2026

Coverage Status

coverage: 78.383% (+0.7%) from 77.647%
when pulling 2376b88 on serialize_uuid
into 6395159 on master.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR addresses UUID serialization warnings by serializing uuid.UUID values as strings, and updates CI to adjust the Python/Django test matrix and GitHub Actions versions.

Changes:

  • Serialize uuid.UUID fields as str in _serialize_field to avoid JSON serialization warnings.
  • Remove Python 3.7 from the GitHub Actions matrix and update Actions used in the workflow.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
tracking_fields/tracking.py Adds explicit UUID handling in field serialization.
.github/workflows/python-app.yml Updates Python version matrix and bumps GitHub Actions versions.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +30 to +37
- django_version: '4.0'
python_version: '3.7'
python_version: '3.8'

- django_version: '4.1'
python_version: '3.7'
python_version: '3.8'

- django_version: '4.2'
python_version: '3.7'
python_version: '3.8'
Copy link

Copilot AI Mar 3, 2026

Choose a reason for hiding this comment

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

The matrix exclude list was previously excluding Python 3.7 for Django 4.x (unsupported). Now that 3.7 is removed from the matrix, these entries were changed to exclude Python 3.8 instead, which is a supported combination for Django 4.0/4.1/4.2 and is also covered in tox. This unintentionally drops CI coverage for Python 3.8 on Django 4.x; remove these exclude items (or adjust them to only exclude truly unsupported pairs, e.g. Django 4.0 with Python 3.11).

Copilot uses AI. Check for mistakes.
@juggler31 juggler31 force-pushed the serialize_uuid branch 5 times, most recently from 77e4013 to b4510a6 Compare March 5, 2026 14:31
Copy link
Copy Markdown
Member

@Gagaro Gagaro left a comment

Choose a reason for hiding this comment

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

Il faudrait mettre le README à jour au passage pour changer la version minimal de Django et enlever la mention de django-cuser + ajouter un passage sur le middleware à rajouter dans les settings pour avoir le user.

@juggler31 juggler31 force-pushed the serialize_uuid branch 3 times, most recently from 80c0bc2 to 8cd2198 Compare March 5, 2026 14:59
@juggler31 juggler31 requested a review from Gagaro March 5, 2026 15:01
@makinacorpus makinacorpus deleted a comment from Copilot AI Mar 5, 2026
@Gagaro Gagaro merged commit a835f5e into master Mar 5, 2026
13 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.

4 participants