Re: [Django] #34923: MESSAGE_TAGS ignored in 5.0a1

2023-10-24 Thread Django
#34923: MESSAGE_TAGS ignored in 5.0a1
-+-
 Reporter:  James Gillard|Owner:  Mariusz
 |  Felisiak
 Type:  Bug  |   Status:  closed
Component:  contrib.messages |  Version:  5.0
 Severity:  Release blocker  |   Resolution:  fixed
 Keywords:   | Triage Stage:  Ready for
 |  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Natalia <124304+nessita@…>):

 In [changeset:"00805ff4369efb269a825880ec4589fc14efb82d" 00805ff]:
 {{{
 #!CommitTicketReference repository=""
 revision="00805ff4369efb269a825880ec4589fc14efb82d"
 [5.0.x] Fixed #34923 -- Avoided initializing LEVEL_TAGS when importing
 django.contrib.messages.

 Regression in b7fe36ad37fb18c4bc7932c0aec6ae4f299b9622.

 Thanks James Gillard for the report.

 Backport of 311718feb5f1fb9ff794bbac0cda48cfc3410de8 from main
 }}}

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/0107018b62ad268c-44c70714-7cbf-48b8-816d-ab16d228c5f5-00%40eu-central-1.amazonses.com.


Re: [Django] #34923: MESSAGE_TAGS ignored in 5.0a1

2023-10-24 Thread Django
#34923: MESSAGE_TAGS ignored in 5.0a1
-+-
 Reporter:  James Gillard|Owner:  Mariusz
 |  Felisiak
 Type:  Bug  |   Status:  closed
Component:  contrib.messages |  Version:  5.0
 Severity:  Release blocker  |   Resolution:  fixed
 Keywords:   | Triage Stage:  Ready for
 |  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Natalia <124304+nessita@…>):

 * status:  assigned => closed
 * resolution:   => fixed


Comment:

 In [changeset:"311718feb5f1fb9ff794bbac0cda48cfc3410de8" 311718fe]:
 {{{
 #!CommitTicketReference repository=""
 revision="311718feb5f1fb9ff794bbac0cda48cfc3410de8"
 Fixed #34923 -- Avoided initializing LEVEL_TAGS when importing
 django.contrib.messages.

 Regression in b7fe36ad37fb18c4bc7932c0aec6ae4f299b9622.

 Thanks James Gillard for the report.
 }}}

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/0107018b62abf521-5102f123-52db-44d9-b9fd-1bb27756beae-00%40eu-central-1.amazonses.com.


Re: [Django] #34923: MESSAGE_TAGS ignored in 5.0a1

2023-10-24 Thread Django
#34923: MESSAGE_TAGS ignored in 5.0a1
-+-
 Reporter:  James Gillard|Owner:  Mariusz
 |  Felisiak
 Type:  Bug  |   Status:  assigned
Component:  contrib.messages |  Version:  5.0
 Severity:  Release blocker  |   Resolution:
 Keywords:   | Triage Stage:  Ready for
 |  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Natalia Bidart):

 * stage:  Accepted => Ready for checkin


-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/0107018b62a90a72-cb2a802a-6a10-4c5b-83de-4ecbbf8a1cce-00%40eu-central-1.amazonses.com.


Re: [Django] #34923: MESSAGE_TAGS ignored in 5.0a1

2023-10-24 Thread Django
#34923: MESSAGE_TAGS ignored in 5.0a1
-+-
 Reporter:  James Gillard|Owner:  Mariusz
 |  Felisiak
 Type:  Bug  |   Status:  assigned
Component:  contrib.messages |  Version:  5.0
 Severity:  Release blocker  |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Mariusz Felisiak):

 * has_patch:  0 => 1


Comment:

 [https://github.com/django/django/pull/17407 PR]

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/0107018b60b66243-5bf4eac4-0746-49fd-a5ac-43f7441cd169-00%40eu-central-1.amazonses.com.


Re: [Django] #34923: MESSAGE_TAGS ignored in 5.0a1

2023-10-23 Thread Django
#34923: MESSAGE_TAGS ignored in 5.0a1
-+-
 Reporter:  James Gillard|Owner:  Mariusz
 |  Felisiak
 Type:  Bug  |   Status:  assigned
Component:  contrib.messages |  Version:  5.0
 Severity:  Release blocker  |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Mariusz Felisiak):

 * owner:  nobody => Mariusz Felisiak
 * status:  new => assigned


-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/0107018b5e433e05-99cbdf2a-341a-4059-be22-e72ddb0b6a90-00%40eu-central-1.amazonses.com.


Re: [Django] #34923: MESSAGE_TAGS ignored in 5.0a1

2023-10-23 Thread Django
#34923: MESSAGE_TAGS ignored in 5.0a1
--+
 Reporter:  James Gillard |Owner:  nobody
 Type:  Bug   |   Status:  new
Component:  contrib.messages  |  Version:  5.0
 Severity:  Release blocker   |   Resolution:
 Keywords:| Triage Stage:  Accepted
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+

Comment (by James Gillard):

 Hi Mariusz, that does indeed fix it for me!

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/0107018b5e09ba42-c648f475-8721-4168-bdce-ae627809cf2a-00%40eu-central-1.amazonses.com.


Re: [Django] #34923: MESSAGE_TAGS ignored in 5.0a1

2023-10-23 Thread Django
#34923: MESSAGE_TAGS ignored in 5.0a1
--+
 Reporter:  James Gillard |Owner:  nobody
 Type:  Bug   |   Status:  new
Component:  contrib.messages  |  Version:  5.0
 Severity:  Release blocker   |   Resolution:
 Keywords:| Triage Stage:  Accepted
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+

Comment (by Mariusz Felisiak):

 James, Can you confirm that the following patch fixes this issue for you?
 {{{#!diff
 diff --git a/django/contrib/messages/storage/base.py
 b/django/contrib/messages/storage/base.py
 index 124049a5e2..5d89acfe69 100644
 --- a/django/contrib/messages/storage/base.py
 +++ b/django/contrib/messages/storage/base.py
 @@ -1,7 +1,8 @@
  from django.conf import settings
  from django.contrib.messages import constants, utils
 +from django.utils.functional import SimpleLazyObject

 -LEVEL_TAGS = utils.get_level_tags()
 +LEVEL_TAGS = SimpleLazyObject(utils.get_level_tags)


  class Message:

 }}}

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/0107018b5dcf1c33-1c349bed-89d2-445a-a570-506cdb8c8999-00%40eu-central-1.amazonses.com.


Re: [Django] #34923: MESSAGE_TAGS ignored in 5.0a1

2023-10-23 Thread Django
#34923: MESSAGE_TAGS ignored in 5.0a1
--+
 Reporter:  James Gillard |Owner:  nobody
 Type:  Bug   |   Status:  new
Component:  contrib.messages  |  Version:  5.0
 Severity:  Release blocker   |   Resolution:
 Keywords:| Triage Stage:  Accepted
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+
Changes (by Mariusz Felisiak):

 * cc: François Freitag (added)
 * severity:  Normal => Release blocker
 * stage:  Unreviewed => Accepted


Comment:

 Thanks for the report! Regression in
 b7fe36ad37fb18c4bc7932c0aec6ae4f299b9622.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/0107018b5dc7d829-b171f9dc-6abd-4d31-b469-f096f2052795-00%40eu-central-1.amazonses.com.


Re: [Django] #34923: MESSAGE_TAGS ignored in 5.0a1

2023-10-23 Thread Django
#34923: MESSAGE_TAGS ignored in 5.0a1
--+--
 Reporter:  James Gillard |Owner:  nobody
 Type:  Bug   |   Status:  new
Component:  contrib.messages  |  Version:  5.0
 Severity:  Normal|   Resolution:
 Keywords:| Triage Stage:  Unreviewed
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+--
Changes (by James Gillard):

 * component:  Uncategorized => contrib.messages


-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/0107018b5dc0bae4-7dd1710c-859d-4f11-afc0-d70cfc139623-00%40eu-central-1.amazonses.com.


[Django] #34923: MESSAGE_TAGS ignored in 5.0a1

2023-10-23 Thread Django
#34923: MESSAGE_TAGS ignored in 5.0a1
-+
   Reporter:  James Gillard  |  Owner:  nobody
   Type:  Bug| Status:  new
  Component:  Uncategorized  |Version:  5.0
   Severity:  Normal |   Keywords:
   Triage Stage:  Unreviewed |  Has patch:  0
Needs documentation:  0  |Needs tests:  0
Patch needs improvement:  0  |  Easy pickings:  0
  UI/UX:  0  |
-+
 I've been running 5.0a1 off and on with our project to spot issues and
 have come across my first.

 As stated in the title, MESSAGE_TAGS in settings.py is now having no
 effect for me. I noticed this when the extra classes we define inside
 settings.py disappeared from the rendered HTML of a message. I tried
 having a play around with the django test suite to recreate, but I didn't
 achieve that, so the proof I have is from adding a debug line inside
 `django.contrib.messages.utils.get_level_tags`. I stopped at this point,
 as someone might be able to point out something obvious I've missed that's
 leading to this.

 Here's the debug `print` I've added:

 {{{
 def get_level_tags():
 """
 Return the message level tags.
 """
 print(getattr(settings, "MESSAGE_TAGS", {}))
 return {
 **constants.DEFAULT_TAGS,
 **getattr(settings, "MESSAGE_TAGS", {}),
 }
 }}}

 Here is what we have inside settings.py:
 {{{
 MESSAGE_TAGS = {
 messages.DEBUG: 'debug alert-info is-info',
 messages.INFO: 'info alert-info is-info',
 messages.SUCCESS: 'success alert-success is-success',
 messages.WARNING: 'warning alert-warning is-warning',
 messages.ERROR: 'error alert-danger is-danger',
 }
 }}}

 And here's what I'm seeing when going from 4.2.5 to 5.0a1, and also
 testing latest main; lines removed for brevity:

 {{{
 ✗ pip install Django==4.2.5
 ✗ ./manage.py runserver
 {10: 'debug alert-info is-info', 20: 'info alert-info is-info', 25:
 'success alert-success is-success', 30: 'warning alert-warning is-
 warning', 40: 'error alert-danger is-danger'}
 {10: 'debug alert-info is-info', 20: 'info alert-info is-info', 25:
 'success alert-success is-success', 30: 'warning alert-warning is-
 warning', 40: 'error alert-danger is-danger'}
 Django version 4.2.5, using settings 'journee.settings'

 ✗ pip install Django==5.0a1
 ✗ ./manage.py runserver
 {}
 {}
 Django version 5.0a1, using settings 'journee.settings'

 ✗ pip install git+https://github.com/django/django.git
 ✗ ./manage.py runserver
 {}
 {}
 Django version 5.1.dev20231023125957, using settings 'journee.settings'
 }}}

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/0107018b5d972198-b482e4bc-173f-4ed9-839e-d46aafd33a16-00%40eu-central-1.amazonses.com.