support for JSON RPC views

2011-12-08 Thread Vaclav Klecanda
I have started with pyjamas that use JSON RPC and would like to use "JSON RPC views" but found only external libraries solution. I have written following snippets and wonder if they could be added to django.utils: class JsonResponse(HttpResponse): """ Http response which has JSON content. ""

Re: Adding Support for PyMySQL (for Python 3)

2011-12-08 Thread Karen Tracey
On Thu, Dec 8, 2011 at 2:40 AM, Vinay Sajip wrote: > On Dec 8, 6:46 am, Ian Clelland wrote: > > > > There also seem to be a number of unicode-related errors there (mixed > > collations; unrecognized characters) -- Could that be related to the > lines > > I'm also getting the same errors on 2.x w

Re: Adding Support for PyMySQL (for Python 3)

2011-12-08 Thread Tom Evans
On Wed, Dec 7, 2011 at 8:38 PM, Ian Clelland wrote: > Hi, all --- > > This is a proposal to add support in Django for PyMySQL[1] as an optional > replacement for MySQLdb. > > … > > PyMySQL is a pure python implementation of PEP 249 for MySQL, and supports > Python 2.4 - 3.2, and MySQL 4.1 and high

Re: Adding Support for PyMySQL (for Python 3)

2011-12-08 Thread Jens Diemer
Am 07.12.2011 21:38, schrieb Ian Clelland: PyMySQL is a pure python implementation of PEP 249 for MySQL, and supports Python 2.4 - 3.2, and MySQL 4.1 and higher. Another goal of PyMySQL would be to use Django + MySQL with PyPy, isn't it? See also: https://groups.google.com/group/django-users/

Re: Adding Support for PyMySQL (for Python 3)

2011-12-08 Thread Ian Clelland
On Thursday, December 8, 2011, Jens Diemer wrote: > Am 07.12.2011 21:38, schrieb Ian Clelland: >> >> PyMySQL is a pure python implementation of PEP 249 for MySQL, and supports >> Python 2.4 - 3.2, and MySQL 4.1 and higher. > > Another goal of PyMySQL would be to use Django + MySQL with PyPy, isn't

Re: Python 3 port - all tests now pass on 2.7.2 and 3.2.2 with the same codebase

2011-12-08 Thread Ian Clelland
Update: As of last night, between Vinay's patches, some of my own, and some MySQL configuration tweaks, I think I have all (expected) tests passing with the PyMySQL adapter. I still need to run one more complete pass through the test suite to be sure that I haven't introduced any regressions, but

FileField should be a context manager

2011-12-08 Thread Martin Chase
This shouldn't be backwards incompatible, just implementing the __exit__ and __enter__ methods. Use case: class Obj(models.Model): file_field = models.FileField(upload_to="test") ... obj = Obj() obj.file_field.save(filename, content) ... with obj.file_field.open() as a_file: a_fil

Re: Django-nonrel patches

2011-12-08 Thread Jonas H.
On 12/07/2011 09:53 PM, Aymeric Augustin wrote: I just came across your patches while I was triaging the "unreviewed" queue. Unfortunately, I found it difficult to assess them, since they don't include tests or docs. Generally, all changes should come with tests. If you're adding new features

Re: FileField should be a context manager

2011-12-08 Thread Jacob Kaplan-Moss
On Thu, Dec 8, 2011 at 2:07 PM, Martin Chase wrote: > This shouldn't be backwards incompatible, just implementing the > __exit__ and __enter__ methods. > > Use case: > >  class Obj(models.Model): >    file_field = models.FileField(upload_to="test") > ... >  obj = Obj() >  obj.file_field.save(filen

Re: FileField should be a context manager

2011-12-08 Thread Alex Gaynor
On Thu, Dec 8, 2011 at 5:35 PM, Jacob Kaplan-Moss wrote: > On Thu, Dec 8, 2011 at 2:07 PM, Martin Chase > wrote: > > This shouldn't be backwards incompatible, just implementing the > > __exit__ and __enter__ methods. > > > > Use case: > > > > class Obj(models.Model): > >file_field = models.F

Re: Django-nonrel patches

2011-12-08 Thread Jacob Kaplan-Moss
On Thu, Dec 8, 2011 at 3:31 PM, Jonas H. wrote: > 2.) I don't like wasting my time, so I won't write extensive documentation > before the patch gets accepted I'm sorry, but that's just not how we do things around here. Documentation isn't an afterthought; is as important -- more even -- then the

Re: Django-nonrel patches

2011-12-08 Thread Carl Meyer
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Mmm, this reads to me like a bit of a mis-understanding. Hinges on what Jonas means by "before the patch gets accepted." The phrase is slightly confusing because we have an Accepted state in Trac, but that applies to tickets, in concept, not to specifi

Python 3 port - all MySQL tests now pass on 2.6.7 and 3.2.2 with the same codebase

2011-12-08 Thread Ian Clelland
I now have Django passing its entire unit test suite with the MySQL and SQLite backends, on Python 2.6.7 and Python 3.2.2 Details: Common environment: OS X 10.6.8 MacPorts 2.0.3 MySQL 5.1.60 from MacPorts SQLite 3.7.9 from MacPorts Django from https://bitbucket.org/vinay.sajip/django/ hash 6b1413

Re: Django-nonrel patches

2011-12-08 Thread Jonas H.
On 12/08/2011 11:39 PM, Jacob Kaplan-Moss wrote: On Thu, Dec 8, 2011 at 3:31 PM, Jonas H. wrote: 2.) I don't like wasting my time, so I won't write extensive documentation before the patch gets accepted I'm sorry, but that's just not how we do things around here. Documentation isn't an aftert

Re: Python 3 port - all MySQL tests now pass on 2.6.7 and 3.2.2 with the same codebase

2011-12-08 Thread Vinay Sajip
On Dec 8, 11:39 pm, Ian Clelland wrote: > I now have Django passing its entire unit test suite with the MySQL and > SQLite backends, on Python 2.6.7 and Python 3.2.2 Ian, Thanks for the comprehensive summary and eliminating those last few issues on the MySQL backend. One more thing which might

Re: support for JSON RPC views

2011-12-08 Thread Russell Keith-Magee
On Thu, Dec 8, 2011 at 4:58 PM, Vaclav Klecanda wrote: > I have started with pyjamas that use JSON RPC and would like to use > "JSON RPC views" but found only external libraries solution. I have > written following snippets and wonder if they could be added to > django.utils: Hi Vaclav, Thanks f