Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: value error recherche prestataire => passage django 4.2 => 5.1 #1635

Merged
merged 21 commits into from
Feb 7, 2025

Conversation

Guilouf
Copy link
Collaborator

@Guilouf Guilouf commented Jan 15, 2025

Quoi ?

Erreur 500 à cause de caractères nulls: http://localhost:8000/prestataires/?sectors=1%00%EF%BF%BD%EF%BF%BD%EF%BF%BD%EF%BF%BD%252527%252522

Pourquoi ?

C'est un bug django https://code.djangoproject.com/ticket/35483 qui a été patché en version 5.1 django/django@38ad710

Comment ?

Une bonne occasion de passer en version 5 ?

@Guilouf Guilouf added the bug Something isn't working label Jan 15, 2025
@Guilouf Guilouf self-assigned this Jan 15, 2025
@Guilouf Guilouf changed the title Fix useless comment fix: value error recherche prestataire Jan 15, 2025
@Guilouf Guilouf marked this pull request as ready for review January 15, 2025 16:31
@Guilouf Guilouf changed the title fix: value error recherche prestataire fix: value error recherche prestataire => passage django 4.2 => 5.1 Jan 15, 2025
@madjid-asa madjid-asa force-pushed the guilouf/value-error-prestataires branch from 34491dc to 1ac487f Compare February 4, 2025 21:25
Copy link

gitguardian bot commented Feb 4, 2025

️✅ There are no secrets present in this pull request anymore.

If these secrets were true positive and are still valid, we highly recommend you to revoke them.
While these secrets were previously flagged, we no longer have a reference to the
specific commits where they were detected. Once a secret has been leaked into a git
repository, you should consider it compromised, even if it was deleted immediately.
Find here more information about risks.


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

lemarche/static/js/favorite_item.js Dismissed Show dismissed Hide dismissed
lemarche/siaes/management/commands/import_esat_from_asp.py Dismissed Show dismissed Hide dismissed
lemarche/siaes/management/commands/import_esat_from_asp.py Dismissed Show dismissed Hide dismissed
lemarche/siaes/management/commands/import_esat_from_csv.py Dismissed Show dismissed Hide dismissed
lemarche/siaes/management/commands/import_esat_gesat.py Dismissed Show dismissed Hide dismissed
lemarche/siaes/management/commands/import_esat_handeco.py Dismissed Show dismissed Hide dismissed
lemarche/siaes/management/commands/import_sep.py Dismissed Show dismissed Hide dismissed
lemarche/www/auth/views.py Dismissed Show dismissed Hide dismissed
lemarche/www/siaes/views.py Dismissed Show dismissed Hide dismissed
lemarche/www/siaes/views.py Dismissed Show dismissed Hide dismissed
@Guilouf Guilouf force-pushed the guilouf/value-error-prestataires branch from 1ac487f to 51bbba5 Compare February 6, 2025 08:52
@SebastienReuiller
Copy link
Contributor

@Guilouf , j'ai fais le tour des DepreciationWarning sur la version Django 4 et corrigé en grande partie.

Il en reste juste deux qu'on peut ignorer pour le moment:

/app/.venv/lib/python3.11/site-packages/sib_api_v3_sdk/rest.py:46: DeprecationWarning: HTTPResponse.getheaders() is deprecated and will be removed in urllib3 v2.1.0. Instead access HTTPResponse.headers directly.
On peut l'ignorer car il n'y a pas de mis à jour sur sib_api_v3_sdk (peut-être brevo_api..) mais surtout, nous sommes en version 2.3.0 de urllib3 et le DeprecationWarning est toujours présent :
https://github.com/urllib3/urllib3/blob/2f68c5363ef632d73dd4d9300289d7ce5ff275b4/src/urllib3/response.py#L518

L'autre Warning est sur le dsfr_form mais nous ne le mettons pas à jour ici et les formulaires ne fonctionne pas sans :
../app/.venv/lib/python3.11/site-packages/django/template/library.py:258: DeprecationWarning: The dsfr_form tag is deprecated and will be removed from django-dsfr at the end of 2024. Please use a normal {{ form }} tag (requires Django 4 or superior)

Donc j'approuve la PR, et tu vas pouvoir merger ;)

Copy link
Contributor

@SebastienReuiller SebastienReuiller left a comment

Choose a reason for hiding this comment

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

LG avec la correction d'un max de DeprecationWarning 🦾

@Guilouf
Copy link
Collaborator Author

Guilouf commented Feb 7, 2025

@Guilouf , j'ai fais le tour des DepreciationWarning sur la version Django 4 et corrigé en grande partie.

Il en reste juste deux qu'on peut ignorer pour le moment:

/app/.venv/lib/python3.11/site-packages/sib_api_v3_sdk/rest.py:46: DeprecationWarning: HTTPResponse.getheaders() is deprecated and will be removed in urllib3 v2.1.0. Instead access HTTPResponse.headers directly. On peut l'ignorer car il n'y a pas de mis à jour sur sib_api_v3_sdk (peut-être brevo_api..) mais surtout, nous sommes en version 2.3.0 de urllib3 et le DeprecationWarning est toujours présent : https://github.com/urllib3/urllib3/blob/2f68c5363ef632d73dd4d9300289d7ce5ff275b4/src/urllib3/response.py#L518

L'autre Warning est sur le dsfr_form mais nous ne le mettons pas à jour ici et les formulaires ne fonctionne pas sans : ../app/.venv/lib/python3.11/site-packages/django/template/library.py:258: DeprecationWarning: The dsfr_form tag is deprecated and will be removed from django-dsfr at the end of 2024. Please use a normal {{ form }} tag (requires Django 4 or superior)

Donc j'approuve la PR, et tu vas pouvoir merger ;)

Il y a aussi RemovedInDjango60Warning: Calling format_html() without passing args or kwargs is deprecated. mais vu que c'est dans admin c'est pas très grave. En tout cas merci pour l'aide, une bonne chose de faite ;)

@Guilouf Guilouf merged commit f1196c7 into master Feb 7, 2025
8 checks passed
@Guilouf Guilouf deleted the guilouf/value-error-prestataires branch February 7, 2025 08:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants