Re: [Django] #35193: Range dumper assumes timezone aware datetimes.

2024-02-15 Thread Django
#35193: Range dumper assumes timezone aware datetimes.
-+-
 Reporter:  Mapiarz  |Owner:  nobody
 Type:  Bug  |   Status:  closed
Component:  Database layer   |  Version:  4.2
  (models, ORM)  |
 Severity:  Normal   |   Resolution:  invalid
 Keywords:  psycopg3 | Triage Stage:
 |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Comment (by Mapiarz):

 Thanks Mariusz.

 In the overriden dumper, is it ok to never cast to tstzrange like the
 built in dumper does? I'm not sure why that is needed in the first place
 and I don't want to break something with 'normal' (i.e. timezone aware)
 fields.
-- 
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/0107018dac2c338b-939502d1-1495-4d3b-bf8f-72f993cceb35-00%40eu-central-1.amazonses.com.


Re: [Django] #35193: Range dumper assumes timezone aware datetimes. (was: Timezone unaware datetimes and psycopg 3)

2024-02-14 Thread Django
#35193: Range dumper assumes timezone aware datetimes.
-+-
 Reporter:  Mapiarz  |Owner:  nobody
 Type:  Bug  |   Status:  closed
Component:  Database layer   |  Version:  4.2
  (models, ORM)  |
 Severity:  Normal   |   Resolution:  invalid
 Keywords:  psycopg3 | Triage Stage:
 |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Mariusz Felisiak):

 * status:  new => closed
 * cc: Florian Apolloner (added)
 * resolution:   => invalid
 * summary:  Timezone unaware datetimes and psycopg 3 => Range dumper
 assumes timezone aware datetimes.
 * keywords:   => psycopg3
 * type:  Uncategorized => Bug

Comment:

 Thanks for the report. As far as I'm aware, there is no way in the dumper
 to detect that you're using `tsrange` and change the behavior. You should
 be able to use
 
[https://www.psycopg.org/psycopg3/docs/api/adapt.html#psycopg.adapt.AdaptersMap.register_dumper
 register_dumper()] to override the dumper.
-- 
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/0107018da76eb2c1-452391f7-c6fa-461d-a3cd-98563da9a3f8-00%40eu-central-1.amazonses.com.