Re: [Django] #17755: Use database adapters for converting time zone aware datetimes in raw queries

2015-05-17 Thread Django
#17755: Use database adapters for converting time zone aware datetimes in raw
queries
-+-
 Reporter:  akaariai |Owner:  aaugustin
 Type:   |   Status:  closed
  Cleanup/optimization   |
Component:  Database layer   |  Version:
  (models, ORM)  |  1.4-beta-1
 Severity:  Release blocker  |   Resolution:  fixed
 Keywords:  akaariai | Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Aymeric Augustin ):

 In [changeset:"d9521f66b1851b0eacd55bc78f801dc64123e333" d9521f6]:
 {{{
 #!CommitTicketReference repository=""
 revision="d9521f66b1851b0eacd55bc78f801dc64123e333"
 Removed global timezone-aware datetime adapters.

 Refs #23820.

 Fixed #19738.

 Refs #17755. In order not to introduce a regression for raw queries,
 parameters are passed through the connection.ops.value_to_db_* methods,
 depending on their type.
 }}}

--
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 post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.b2d8d97c172a801e8967f552153ad519%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #17755: Use database adapters for converting time zone aware datetimes in raw queries

2012-02-29 Thread Django
#17755: Use database adapters for converting time zone aware datetimes in raw
queries
-+-
 Reporter:  akaariai |Owner:  aaugustin
 Type:   |   Status:  closed
  Cleanup/optimization   |  Version:
Component:  Database layer   |  1.4-beta-1
  (models, ORM)  |   Resolution:  fixed
 Severity:  Release blocker  | Triage Stage:  Accepted
 Keywords:  akaariai |  Needs documentation:  0
Has patch:  0|  Patch needs improvement:  0
  Needs tests:  0|UI/UX:  0
Easy pickings:  0|
-+-

Comment (by anonymous):

 Replying to [comment:5 aaugustin]:
 > You're right, there's a way to avoid importing `_mysql` in Django, and
 I'm going to do that.
 >
 > However, I don't believe it will make much of a difference, since
 `MySQLdb.converters` imports `_mysql` anyway.

 In fact, the problem is happened when I am running Google App Engine
 dev_appserver.py.

 A direct import of `_mysql` was causing C-extension disallowed while
 importing from `MySQLdb` has no problem. I guess the package has monkey-
 patched or white-listed the `MySQLdb` module.

 Anyway, thanks for the quick fix.

-- 
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 post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #17755: Use database adapters for converting time zone aware datetimes in raw queries

2012-02-29 Thread Django
#17755: Use database adapters for converting time zone aware datetimes in raw
queries
-+-
 Reporter:  akaariai |Owner:  aaugustin
 Type:   |   Status:  closed
  Cleanup/optimization   |  Version:
Component:  Database layer   |  1.4-beta-1
  (models, ORM)  |   Resolution:  fixed
 Severity:  Release blocker  | Triage Stage:  Accepted
 Keywords:  akaariai |  Needs documentation:  0
Has patch:  0|  Patch needs improvement:  0
  Needs tests:  0|UI/UX:  0
Easy pickings:  0|
-+-

Comment (by aaugustin):

 In [17602]:
 {{{
 #!CommitTicketReference repository="" revision="17602"
 Avoided importing _mysql directly. Refs #17755.
 }}}

-- 
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 post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #17755: Use database adapters for converting time zone aware datetimes in raw queries

2012-02-29 Thread Django
#17755: Use database adapters for converting time zone aware datetimes in raw
queries
-+-
 Reporter:  akaariai |Owner:  aaugustin
 Type:   |   Status:  closed
  Cleanup/optimization   |  Version:
Component:  Database layer   |  1.4-beta-1
  (models, ORM)  |   Resolution:  fixed
 Severity:  Release blocker  | Triage Stage:  Accepted
 Keywords:  akaariai |  Needs documentation:  0
Has patch:  0|  Patch needs improvement:  0
  Needs tests:  0|UI/UX:  0
Easy pickings:  0|
-+-

Comment (by aaugustin):

 You're right, there's a way to avoid importing `_mysql` in Django, and I'm
 going to do that.

 However, I don't believe it will make much of a difference, since
 `MySQLdb.converters` imports `_mysql` anyway.

-- 
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 post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #17755: Use database adapters for converting time zone aware datetimes in raw queries

2012-02-29 Thread Django
#17755: Use database adapters for converting time zone aware datetimes in raw
queries
-+-
 Reporter:  akaariai |Owner:  aaugustin
 Type:   |   Status:  closed
  Cleanup/optimization   |  Version:
Component:  Database layer   |  1.4-beta-1
  (models, ORM)  |   Resolution:  fixed
 Severity:  Release blocker  | Triage Stage:  Accepted
 Keywords:  akaariai |  Needs documentation:  0
Has patch:  0|  Patch needs improvement:  0
  Needs tests:  0|UI/UX:  0
Easy pickings:  0|
-+-
Changes (by anonymous):

 * type:  Uncategorized => Cleanup/optimization


Comment:

 I am wondering if there is any reason using "from _mysql import
 string_literal" instead of "from MySQLdb.converters import
 string_literal".
 I have run into problem because C-extension is disallowed when running a
 Django project.

-- 
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 post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #17755: Use database adapters for converting time zone aware datetimes in raw queries

2012-02-27 Thread Django
#17755: Use database adapters for converting time zone aware datetimes in raw
queries
-+-
 Reporter:  akaariai |Owner:  aaugustin
 Type:  Uncategorized|   Status:  closed
Component:  Database layer   |  Version:
  (models, ORM)  |  1.4-beta-1
 Severity:  Release blocker  |   Resolution:  fixed
 Keywords:  akaariai | Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by aaugustin):

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


Comment:

 In [17596]:
 {{{
 #!CommitTicketReference repository="" revision="17596"
 Fixed #17755 -- Ensured datetime objects that bypass the model layer (for
 instance, in raw SQL queries) are converted to UTC before sending them to
 the database when time zone support is enabled. Thanks Anssi 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 post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #17755: Use database adapters for converting time zone aware datetimes in raw queries

2012-02-23 Thread Django
#17755: Use database adapters for converting time zone aware datetimes in raw
queries
-+-
 Reporter:  akaariai |Owner:  aaugustin
 Type:  Uncategorized|   Status:  new
Component:  Database layer   |  Version:
  (models, ORM)  |  1.4-beta-1
 Severity:  Release blocker  |   Resolution:
 Keywords:  akaariai | Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by akaariai):

 There seems to be enough work to do before 1.4 release :) Fixing this by a
 quick note in documentation and doing proper fix later is probably fine as
 long as the current behavior will not be seen as backwards compatibility
 issue in 1.5.

 If you wish I could take a deeper look on this issue. I already have done
 some investigation on this issue, so I already have some idea on how to
 fix this issue. However, I am pretty busy currently, so I can't guarantee
 any schedule...

-- 
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 post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #17755: Use database adapters for converting time zone aware datetimes in raw queries

2012-02-23 Thread Django
#17755: Use database adapters for converting time zone aware datetimes in raw
queries
-+-
 Reporter:  akaariai |Owner:  aaugustin
 Type:  Uncategorized|   Status:  new
Component:  Database layer   |  Version:
  (models, ORM)  |  1.4-beta-1
 Severity:  Release blocker  |   Resolution:
 Keywords:  akaariai | Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by aaugustin):

 * owner:  nobody => aaugustin
 * needs_better_patch:   => 0
 * stage:  Unreviewed => Accepted
 * needs_tests:   => 0
 * needs_docs:   => 0


Comment:

 I'll see what I can do before 1.4 final.

 You may have noticed that there's quite a bit legacy code in the adapters
 / converters definitions. Some functions appear to be workarounds for bugs
 of very old versions of the database adapters. A cleanup would be useful,
 but I'd prefer to postpone it to the beginning of the 1.5 release cycle.

-- 
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 post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.