Django 3.0 Release Notes - ASGI

2019-10-14 Thread Josh Smeaton
A co-worker just linked me to https://docs.djangoproject.com/en/dev/releases/3.0/#asgi-support and asked me (basically) if we can start doing all kinds of async work in one of our projects. Unfortunately, I didn't really know how to answer. Preface: I haven't followed the ASGI plan very closely

Re: django-admin startproject settings.py has some security holes

2019-10-23 Thread Josh Smeaton
A quick idea from the top of my head, is to change the assignment of SECRET_KEY in the generated settings to something like: SECRET_KEY = os.environ.get("DJANGO_SECRET_KEY", "insecure-") It signals that secrets in the environment are a good idea, that the default generated value is insecure, a

Re: Vote on Jira as bugtracker

2016-01-06 Thread Josh Smeaton
FWIW I actually like Jira (much more than Trac) and find it a lot easier to use. I think the trick is configuring very basic workflows so users don't have to fight through transitions. Open, Closed, Assigned/In Progress and transitions to and from each state would get us really close to the curr

Re: [Feature Request] Orderable ArrayAgg and StringAgg in contrib.postgres.aggregates

2016-01-07 Thread Josh Smeaton
Seems reasonable enough to me. Expressions already support generating an ORDER BY clause by calling .asc() or .desc() on them. That'd allow your proposed API to support: Model.objects.aggregate(ArrayAgg(some_field, order_by=F('some_field').asc() )) Or any other expression. Consider that any ord

Re: deprecate CommaSeparatedIntegerField?

2016-01-20 Thread Josh Smeaton
>> It's an edge case, either way (who puts hundreds of numbers in such a field?) I'm not saying it's good or right, but I can easily see how people would store hundreds of comma separated values as a poor version of a m2m table. I'm not sure that the difference between NVARCHAR2 and VARCHAR2 w

Re: deprecate CommaSeparatedIntegerField?

2016-01-21 Thread Josh Smeaton
> > On 21 janv. 2016, at 07:24, Josh Smeaton wrote: > > > > I'm in favour of making the change, just call it out as a backwards > compatibility. > > If I understand correctly, Oracle users encountering this issue would just > have to adjust the field length? >

Re: Index expressions

2016-02-07 Thread Josh Smeaton
There are many places that expressions can extend to, and I think indexes would make a really good candidate. There are a few things that need to happen to make this work though. - create meta.indexes to store { index_name: IndexType('field') } - internally translate any db_index=True to the app

Re: Calling of int constructor in QuerySet

2016-02-13 Thread Josh Smeaton
The iexact lookup shouldn't even be defined for number types should it? I'm assuming it is due to backwards compatibility (from 1.7 when custom lookups landed), but what would that even mean? If we're not able to remove iexact lookup from number types then I would agree that it should also throw

Re: Making max_length argument optional

2016-02-28 Thread Josh Smeaton
This discussion started because a user wants to leave off max_length for postgres, which allows the max_length to be omitted right? Is there anything wrong with `from django.contrib.postgres.fields import CharField`? The postgres specific CharField will allow max_length to be optional without i

Re: Add support for relative imports in django.conf.urls.include()?

2016-02-29 Thread Josh Smeaton
Going off topic a little bit but.. have we considered deprecating string based includes in favour of actually importing the urls module? from . import myapp urlpatterns = ( url(r'^myapp/', include(myapp.urls.urlpatterns)), ) Then users can relatively import their nested app patterns as they wi

Re: Annotate date intervals or ranges

2016-03-03 Thread Josh Smeaton
A somewhat related ticket: https://code.djangoproject.com/ticket/25774 which attempts to make current datetime transforms/expressions public. These focus mainly on EXTRACT() type transformations, but there's certainly a place for date_trunc type transformations too. Feel free to create a ticket

Re: Proposal: django.contrib.mysql

2016-03-04 Thread Josh Smeaton
*Well...* over the past year and a bit I've been developing Django-MySQL. > It has a ton of features specific to MySQL and/or MariaDB. For a quick tour > of the features, see the exposition in the documentation: > https://django-mysql.readthedocs.org/en/latest/exposition.html

Re: Annotate date intervals or ranges

2016-03-07 Thread Josh Smeaton
If there are no good suggestions before this is ready for commit, that's ok. We can always add lookup_name properties at a later datetime (sorry). Cheers On Friday, 4 March 2016 10:08:47 UTC+11, Josh Smeaton wrote: > > A somewhat related ticket: https://code.djangoproject.com/tick

Re: Admin hstore widget

2016-03-07 Thread Josh Smeaton
I wouldn't drop it if I were you. I (think) I watched you demo the hstore admin field at melbdjango and it looked cool to me. If I used hstorefield I'd be interested in the implementation. The dev ML isn't really indicative of the broader django community I feel, because only a small portion of

Re: Improving MSSQL and Azure SQL support on Django

2016-03-07 Thread Josh Smeaton
Wow, that's really great news! I haven't used mssql for a number of years but it was always very nice to work with. Having it available to run on linux will make it much easier for the Django community to test against mssql, provided we're able to get/develop an appropriate driver and backend.

Re: Proposal on Custom Indexes - Google Summer of Code

2016-03-08 Thread Josh Smeaton
Hi Akshesh, The proposal looks really good so far. I haven't gone through it in depth though, but I'll set aside some time to try and do so. A few comments: - Using the schema editor rather than sqlcompiler is the right choice. - The earlier part of your proposal seems to focus on allowing pos

Re: Revisiting multiline tags

2016-03-11 Thread Josh Smeaton
Funkybob (Curtis Maloney) implemented a multiline template tag patch nearly two years ago. He asked for feedback a number of times and received none. I think there's enough support here that if someone were to implement a patch, it'd probably be accepted. Adding the same argument as to why mult

Re: Value of tightening URLValidator/EmailValidator regular expressions?

2016-03-14 Thread Josh Smeaton
+1. I don't think we need strict email validation. "looks vaguely like an email address" is enough for validation purposes in forms. Are there any security concerns we need to be aware of though? On Tuesday, 15 March 2016 05:17:15 UTC+11, James Bennett wrote: > > Personally I've long been in fav

Re: Proposal: change to the way list_editable form data is submitted in the admin

2016-03-18 Thread Josh Smeaton
I know this particular case has been discussed before. Here are two related tickets (I think there's a better canonical ticket but I can't find it just now): https://code.djangoproject.com/ticket/11652 and https://code.djangoproject.com/ticket/16549 I haven't done the required reading recently,

Re: FileField and ImageField

2016-03-18 Thread Josh Smeaton
he code the _size is being used as size is a property that gets the file > size either from the storage class or the actual file. So removing that > line, could also allow us to use normal files in the save method. > > El miƩrcoles, 16 de marzo de 2016, 23:41:58 (UTC-3), Josh Smeato

Re: FileField and ImageField

2016-03-19 Thread Josh Smeaton
It seems like FileField should delegate some of these methods to an underlying Storage backend, no? I don't know what the implications to back-compat would be, but the idea seems like a sensible one to start with. The storage backend API may need to grow some additional methods to verify/valida

Re: Feedback on Django Channels

2016-03-21 Thread Josh Smeaton
Assuming the frontend has access to DJANGO_SETTINGS_MODULE, couldn't it use the SECRET_KEY to encrypt the message before passing it to the message broker? On message receipt it could then use the SECRET_KEY to decrypt the message. It'd be nice if encryption were an option encoded within the mes

Re: Value of tightening URLValidator/EmailValidator regular expressions?

2016-04-01 Thread Josh Smeaton
For what reason Zach? Without a canonical regex implementation to copy or include, we're stuck poorly reimplementing a bunch of esoteric rules to what end? The main purpose of email validation is to provide relevant feedback to the user, and to guard against obviously bad or malicious data. "Lo

Re: Add documentation to address OWASP Top 10?

2016-04-05 Thread Josh Smeaton
I like the idea of addressing the OWASP top 10. Further, I think the advice of obscuring keys is wrong. The problem is actually addressed in the OWASP Top 10[0] *4 Insecure Direct Object References:* A direct object reference occurs when a developer exposes a reference to an internal implementa

Re: Making Django more PaaS-friendly

2016-04-11 Thread Josh Smeaton
I kind of like the idea of making all settings configurable via the environment by prefixing with DJANGO_SETTINGNAME. Sort of like how click allows environment variables for options: http://click.pocoo.org/5/options/#values-from-environment-variables. Ideally configuring settings from the envir

Should we require pytz for timezone support in Django?

2016-05-16 Thread Josh Smeaton
While writing timezone tests for https://github.com/django/django/pull/6243 I ran into some issues where pytz seemed to be required for just about every database and platform combination except postgres on linux. The docs for timezone support (https://docs.djangoproject.com/en/dev/topics/i18n/t

Re: [RFC] Test methods filtering on tests run

2016-05-16 Thread Josh Smeaton
Hi Antonio I have the same problem when running tests in Django's test suite. When there's a failure, I have to copy the test path, paste that, then copy the failing test. The entire path to the test isn't printed in the failures. I'd be a big fan of *some* kind of implementation that allows me

Re: Tracking/logging bruteforcing, especially on admin accounts?

2016-05-19 Thread Josh Smeaton
I understand the reasoning for "use the cache", but not every site has caching enabled, especially lots of smaller sites. A separate table could be used for tracking attempts, and cleared out per user on successful login attempt/ip address. This table would not need to be huge if designed with

Re: Possible Bug (MYSQL)

2016-06-02 Thread Josh Smeaton
Hi Paulo, Have you opened a ticket on Trac for this yet? If not, please do so. This mailing list isn't really for verifying bugs. That said, does the query work if you provide an actual alias for the aggregate? *Company.objects.annotate(max_pk=Max('employee__p

Re: Some thoughts on upgrade pain & deprecations.

2016-06-02 Thread Josh Smeaton
I like the general idea. Going with your low tech solution we could have snippets for the X most popular test runners to treat warnings as errors. Perhaps ./manage test.py --warnings-as-errors or similar for the interface django provides. Every time django makes a release there are some that ex

Re: Should we require pytz for timezone support in Django?

2016-06-05 Thread Josh Smeaton
eps flag. Cheers On Tuesday, 17 May 2016 10:21:29 UTC+10, Josh Smeaton wrote: > > While writing timezone tests for > https://github.com/django/django/pull/6243 I ran into some issues where > pytz seemed to be required for just about every database and platform > comb

Re: Clearing prefetch related on add(), change(), remove()

2016-06-08 Thread Josh Smeaton
Usually, yes. I'm not sure refresh_from_db works on related managers though. I ran into a similar issue writing unit test fixtures just last week and refresh_from_db didn't fix the problem. On Thursday, 9 June 2016 02:46:25 UTC+10, bliy...@rentlytics.com wrote: > > To be clear, I think the way

Re: Extend support for long surnames in Django Auth

2016-07-29 Thread Josh Smeaton
> Nowadays I just go for a single and long name field and I would like to suggest that django.contrib.auth takes this path too because the first name and last name system isn't international and django is for building websites on internet which is meant to be a communication tool connecting Hum

Re: [ANNOUNCE] Django 1.10 and 1.9.9 released

2016-08-01 Thread Josh Smeaton
Awesome! Thanks Tim, once again, for driving the release process on time. Love your work! On Tuesday, 2 August 2016 05:03:27 UTC+10, Tim Graham wrote: > > Django 1.10 and a bug fix release for the 1.9 series (1.9.9) are now > available: > > https://www.djangoproject.com/weblog/2016/aug/01/django

Re: Add an optional parameter to values() that returns a nested dictionary for foreign keys

2016-08-19 Thread Josh Smeaton
ing strings as F() expressions. What do you > think? > > > > [0] > https://github.com/django/django/commit/39f35d4b9de223b72c67bb1d12e65669b4e1355b > > > [1] https://github.com/django/django/pull/7088 > > > > On Wednesday, November 25, 2015 at 7:24:22 PM UTC-5, Josh Sme

Re: PEP 484 type hinting in Django

2016-08-19 Thread Josh Smeaton
Agree. January is not that far out, and then you get to build the annotations as designed in the PEP. You can begin work earlier of course, but keeping your patch up to date with all of the work going on may become annoying. The HttpRequest/Response objects don't really get changed that often s

Re: Google Summer of Code Updates - Class based indexes

2016-08-21 Thread Josh Smeaton
Great work Akki! I know there hasn't been a lot of activity on this thread, but I'm really looking forward to using the new indexing features, and I bet there are a lot of others. It's also been fun to follow along with your progress as you've been pushing many smaller commits rather than one gi

Re: SearchQuery concatenation (`&` and `|`) is either broken or documentation incomplete

2016-08-25 Thread Josh Smeaton
Hi Nicola, Without a lot of familiarity of SearchQuery, in particular, it looks like a bug to me. SearchQuery defines its own operators to work around the limitation in Combinable, but fails to take into account that when two SearchQuery instances are combined, you're returned a CombinedExpress

Does the javascript test runner need attention?

2016-08-25 Thread Josh Smeaton
Hi All, While building out a vagrant image for running django's tests (plug: https://github.com/django/django-box) I came across a problem trying to run the javascript tests as defined by the tox.ini file. It ended up being the same problem as raised in https://code.djangoproject.com/ticket/25

Django Box - A vagrant virtual machine for testing Django

2016-08-27 Thread Josh Smeaton
Hi All, At the PyCON AU sprints I began working on a project for building a vagrant virtual machine that would facilitate testing django, itself, against most of the databases that django supports. I forked https://github.com/jphalip/djangocore-box which was last updated about 3 years ago and

Re: Django Box - A vagrant virtual machine for testing Django

2016-08-28 Thread Josh Smeaton
> > I have my environment set up already, and I suspect this would hold for a > lot > of the more experienced developers here; do you think the new box will > improve > things for me? > > It probably won't make a big difference for those that already have environments setup for django develo

Re: Django Box - A vagrant virtual machine for testing Django

2016-08-28 Thread Josh Smeaton
An interesting idea put forward by Ed Morley on the issues tracker (https://github.com/django/django-box/issues/12) is to merge the django-box project into the django main repository directly. The meat of the suggestion is copied below: > The ideal end state I see is that this project lives in

Re: Django Box - A vagrant virtual machine for testing Django

2016-08-29 Thread Josh Smeaton
Hi Tim, Doesn't SQL Server still require windows? I know there are plans from Microsoft to allow SQLServer running on Linux and drivers for linux to connect to SQL server, but I wasn't aware that those projects had materialized yet. This specific Vagrant image is an Ubuntu 16.04 virtual machin

Re: Django Box - A vagrant virtual machine for testing Django

2016-08-29 Thread Josh Smeaton
> > I don't think a formal approval/proposal is needed to keep django box > under the Django org. For example, tools to help with Django development > don't require things like fixing security issues (I hope). As long as it's > working as semi-maintained, we can add a link to it from the contri

Re: Django default PK type setting

2016-08-31 Thread Josh Smeaton
A major issue with this would be the many apps out in the wild (and their tests!) that assume the pk is an integer, and do queries like .filter(pk=1). I don't like the idea of being able to enforce a different kind of pk type for apps that you haven't written yourself. Is there an actual proble

Re: Add past/present/future validations for Date and DateTime types

2016-08-31 Thread Josh Smeaton
Jani is correct, you'll need to be careful to handle timezones if timezones are activated in SETTINGS. I can see value in a django-validators external package that you could expand upon with newer validators as they come up. But whether or not you want to build and maintain such a project is ob

Re: Django Box - A vagrant virtual machine for testing Django

2016-09-12 Thread Josh Smeaton
Hi all, a quick update. https://github.com/django/django-box now has a live compiled box available from https://atlas.hashicorp.com/djangoproject/boxes/django-box-1.11 What this means is that a minimal Vagrantfile can now be: Vagrant.configure("2") do |config| config.ssh.forward_agent = true

Re: request to reopen issue #23332 (using the dotted test name in test output)

2016-09-21 Thread Josh Smeaton
I'd be very happy with a change to give the full dotted path to the test. I've copy/paste/modify/copy/paste hundreds of times, and it has always bothered me. Big +1. Agree with Tim that a push upstream would be good, but I'm all for solving this immediately in Django. I think the suggestion mad

Re: Adding aggregates to ModelAdmin.list_display

2016-09-21 Thread Josh Smeaton
I think I'm OK with `list_aggregates` because it implies a terminal queryset method which really restricts the members used to create that aggregation (the GROUP BY). Adding aggregates to existing list_display would require something *else* to refine the group by using `values()`. If list_aggre

Re: MariaDB, official support

2016-11-14 Thread Josh Smeaton
I believe Adam is (or is planning..) writing a DB backend that includes MySQL and MariaDB. Adam, did I remember correctly? If so, are you going to suggest adding this new backend to core as a replacement? Mads, perhaps you can help with this effort? Regards, On Tuesday, 15 November 2016 08:44:

Re: Window expressions, #26608

2016-11-22 Thread Josh Smeaton
Hi Mads, Thanks for picking this up. I've been wondering if Window expressions would be possible, and what limitations we might have to make based on our ORM. > 1. Since this is specific to postgres, I'm looking for a better place to put the actual Window-expression class, as well as axillary h

Re: Consider reverting or adding guidelines on how to use class based views for security sensitive features

2016-11-22 Thread Josh Smeaton
+1 to everything Baptiste and Ben have said. A bug in a CBV isn't a good argument for throwing away CBVs entirely. We should probably review patches that touch security systems quite a bit more thoroughly in the future - meaning more eyes rather than a single set of eyes spending more time. On

Re: Window expressions, #26608

2016-11-25 Thread Josh Smeaton
, Mads Jensen wrote: > > On Tuesday, November 22, 2016 at 11:50:17 PM UTC+1, Josh Smeaton wrote: > >> Thanks for picking this up. I've been wondering if Window expressions >> would be possible, and what limitations we might have to make based on our >> ORM. >

Re: automating Django releases

2016-11-25 Thread Josh Smeaton
I think automating as much of the release process is a fantastic idea. Regarding bumping the release numbers, have you seen the bumpversion project https://pypi.python.org/pypi/bumpversion? After some trial and error, I seem to have a configuration that works with the existing version tuple in

Re: automating Django releases

2016-11-26 Thread Josh Smeaton
Appreciate the security concerns of the jenkins boxes, but Jenkins is the obvious choice as a task runner. My first thought would be to bring up a special slave that was particularly hardened and walled off from the regular PR runners. I'm unsure how far access to the slave from the master coul

Re: Window expressions, #26608

2016-11-29 Thread Josh Smeaton
Adam, are you thinking we should be adding something like Model.objects.window(), or just allowing Window-type expressions on backends that have a specific feature flag? Does the compiler need to get involved at all, or can we handle the full range of window expressions with the expressions API

Re: segmentation fault while running test suite and possible bug in documentation.

2016-12-01 Thread Josh Smeaton
Regarding the segfault it's likely related to this: https://code.djangoproject.com/ticket/24080 A bug in sqlite. On Thursday, 1 December 2016 20:39:26 UTC+11, Vimarsh Chaturvedi wrote: > > Hey guys, > > My first time posting here. > I downloaded the Django source code and I was going through t

Re: is support for old cx_Oracle versions needed?

2016-12-21 Thread Josh Smeaton
I'm unsure how others typically install cx_Oracle, but when I had to do it, it involved downloading and installing proprietary oracle drivers, making sure the headers were linked to the correct place, and then using pip. I don't think licensing allows OS maintainers to package up cx_Oracle and i

Re: status of 1.11 release blockers

2016-12-21 Thread Josh Smeaton
There are two specific patches that I'll be looking to merge before the feature freeze. I'd appreciate more eyes on the following if anyone has some capacity (and knowledge) for review. https://github.com/django/django/pull/7587 (Support server-side cursors for queryset iteration in database ba

Should we add a dependency on the multipledispatch library, or vendor it?

2016-12-31 Thread Josh Smeaton
This has been briefly discussed before, but we need to form a consensus on whether we vendor or depend on the multipledispatch library for the following PR: https://github.com/django/django/pull/6395 The brief overview of the patch is to allow oper

Re: Should we add a dependency on the multipledispatch library, or vendor it?

2017-01-02 Thread Josh Smeaton
I agree with Tim. I think the intent is to add dependencies as part of a feature, not specifically as part of another DEP (which I don't believe this feature needs). I don't think `overloading` was considered as a dependency, but it's interesting. If this feature doesn't make 1.11 (it potential

Re: Should we add a dependency on the multipledispatch library, or vendor it?

2017-01-04 Thread Josh Smeaton
It seems everyone that has chimed in prefers adding a dependency to vendoring. If there are alternative views please express them, but I'm going to recommend a dependency on the PR. Thanks On Tuesday, 3 January 2017 09:13:01 UTC+11, Josh Smeaton wrote: > > I agree with Tim. I think

Re: Add custom autoreload file tracking options setting

2017-01-05 Thread Josh Smeaton
> I am -0 to -1 for the debugger -- I've seen to many sites out there running with DEBUG=True, enabling RCE ootb seems to be pretty horrible. But it's so incredibly useful. And we already show the django debug page for errors with DEBUG=True that exposes enough secrets to allow a sufficient att

Re: Django 2.0 Python version support (Python 3.6+ only?)

2017-01-08 Thread Josh Smeaton
I guess I don't really see how we'd be helping users in any meaningful way by supporting python 3.4 with Django 2.0. Django 2.0's defining change is dropping Python 2. We have no idea what else will land in 2.0. If we're trying to consider Enterprise users on "older" Distros: - 1.11 will be LTS

Re: Django 2.0 Python version support (Python 3.6+ only?)

2017-01-08 Thread Josh Smeaton
te: > > Hi Josh, > > I do agree and support your idea's. How about pointing/recommend pyenv for > deployment in the doc? > > Thanks, > Asif > > On Sunday, January 8, 2017 at 4:38:52 PM UTC+6, Josh Smeaton wrote: >> >> I guess I don't really see how

Re: Django 2.0 Python version support (Python 3.6+ only?)

2017-01-08 Thread Josh Smeaton
Apparently I'm dumb and didn't read enough. pyenv *does* take care of installation too. I'm not familiar enough with it (obviously..) to know whether or not we should be encouraging its use. On Sunday, 8 January 2017 22:33:44 UTC+11, Josh Smeaton wrote: > > I don&#x

Re: SubQuery without using RawSQL

2017-01-12 Thread Josh Smeaton
I like my bike sheds to be green. But I don't have a problem painting it red either. It seems red is the more popular colour, and that's fine. > > -- You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group. To unsubsc

Re: Switching the default password hasher to Argon2 (was: Methodology for increasing the number of PBKDF2 iterations)

2017-01-15 Thread Josh Smeaton
> That said, it is pretty incredible that beginners can (still) install Django just about anywhere they have Python without compiling anything at all. I think this comment perfectly summarises my initial resistance to forcing this change. I think adding argon2_cffi to extra_requires could be a

Re: Switching the default password hasher to Argon2 (was: Methodology for increasing the number of PBKDF2 iterations)

2017-01-16 Thread Josh Smeaton
Hah, sure, exactly like that! Is it documented? Yes, yes it is. https://docs.djangoproject.com/en/1.10/topics/auth/passwords/#using-argon2-with-django On Monday, 16 January 2017 20:12:23 UTC+11, Florian Apolloner wrote: > > > > On Monday, January 16, 2017 at 3:56:44 AM UTC+1,

Re: Renaming the postgresql_psycopg2 backend

2017-01-24 Thread Josh Smeaton
I remembered a thing from Michaels talk at #DUTH. Let me present a use case for subclassing a backend: https://github.com/opbeat/django-postgres-readonly/blob/master/django_postgres_readonly/base.py I think if we end up favouring immediate deprecation, we could proactively find and inform backe

Re: Implement form.as_table, as_ul, as_p using templates

2017-02-03 Thread Josh Smeaton
I like the concept, though I haven't looked into the 4 points you laid out. I like the concept of the prefix you mentioned in the widget thread also - I'd love to see template packs as third party libraries that easily slot in (per form I think is crucial). I'm unsure of the proposed properties

Re: Should Model.save() fix incorrect types that happen to save correctly?

2017-02-14 Thread Josh Smeaton
I posted on the ticket before reading this thread. Whoops. As mentioned above it's impossible to always convert user input into the output provided by the database without doing a round trip, because there are driver data adapters, and django converters that both get a chance at modifying the d

Django Box 2.0 Released (Vagrant virtual machine for testing Django)

2017-02-18 Thread Josh Smeaton
I've pushed an update to the django-box project (https://github.com/django/django-box) to bring the environment up to compatibility with Django 2.0. If you don't know what django-box is, it's a virtualbox virtual machine with a Vagrant file, providing all (most) dependencies required to run the

Re: Modifying django.db.models.expressions.Func.as_sql() to allow `**extra_context` to be more useful

2017-02-19 Thread Josh Smeaton
Avoid modifying self in `as_` methods if possible, even if you are going to restore state. See how some of the others work around needing to switch order etc here: https://github.com/django/django/blob/75f0070a54925bc8d10b1f5a2b6a50fe3a1f7f50/django/db/models/functions/base.py#L58 Short versio

Re: Window expressions, #26608

2017-02-22 Thread Josh Smeaton
First off, great work on this patch. I haven't given it much of a look over just yet unfortunately, but I'm trying to figure out where your issues are to help unblock. - I'm unsure how DEFAULT_INDEX_TABLESPACE is causing issues with your patch, can you explain a bit? - Explicit arguments in fu

Re: Project idea for GSoC page - Support for expressions in indexes

2017-03-03 Thread Josh Smeaton
I think Markus is currently working on this idea, along with Ian Foote, who has contributed some precursor work to make the idea possible (deconstructed expressions). The current PR is https://github.com/django/django/pull/8056 On Saturday, 4 March 2017 05:39:11 UTC+11, akki wrote: > > Hi > > T

Re: Problem with running tests with mysql database.

2017-03-11 Thread Josh Smeaton
If you're having issues with specific environments and configuring all of the dependencies, you can try using https://github.com/django/django-box which is a Vagrant virtual machine running on Virtualbox. It has postgres, mysql, sqlite, and all of the pythons Django uses for testing. You could

Re: Adding generated common table expressions

2017-03-18 Thread Josh Smeaton
Thanks for bringing this up Ashley, and for all of the detail you provided. I'd certainly like to see CTEs make their way into Django, provided we could come up with a nice enough API. From the look of it, you've already got something that works with an okay API so I'm hopeful. I'd be very inte

Re: re :GSOC 2017 Project - Test framework cleanup

2017-03-26 Thread Josh Smeaton
At this late stage, it's highly unlikely that you'd be able to put together a successful proposal, and demonstrate your ability to execute on it. We encourage students to spend some time contributing before proposal stage, to give us a better idea of the ability to complete their tasks. Further,

Re: Provide 'V' as alias for 'Value'?

2017-04-03 Thread Josh Smeaton
I think I proposed V as an alias back when I was writing the patch, but the rough consensus at the time was that one letter class names are a bit of an anti pattern (Q, F) that we shouldn't persist with. Aliasing V in the examples was my way of sneaking the idea through for those who chose to ac

Re: Pull requests waiting for review

2017-04-04 Thread Josh Smeaton
I'd just like to add - thank you for the polite reminder! I know it can be very frustrating having patches sit around without any attention, and sometimes a good bump is and/or feels necessary. Doing so in a positive manner is very welcome. As a small reminder - the release of django 1.11 happe

Re: DJANGO_SETTINGS_FILE

2017-04-09 Thread Josh Smeaton
FWIW - I wasn't completely sure what the problem was you were relating or the solution you were proposing as a means to fix it. I came to this thread a bit late, and was probably overwhelmed by lots of text without reading and understand your first message in the thread well enough. The big rep

Re: assertRaises vs. assertRaisesMessage

2017-04-09 Thread Josh Smeaton
We throw lots of ValueErrors and TypeErrors rather than creating new exception types all over the place. There's definitely an argument to be made that different exception types can be created. But I know that I've definitely run afoul of believing I was testing one error (assertRaises) when I

Re: Django test suite taking > 2 hours, gets stuck, have to Ctrl-C

2017-04-22 Thread Josh Smeaton
While it's important to figure out the cause of the hang (and the horrendous runtime - 2 hours is far too long), in future you could try using the vagrant image https://github.com/django/django-box to run your tests. It comes loaded with all supported python versions and databases (except Oracl

Re: PostgreSQL aggregation and views through unmanaged models

2017-05-21 Thread Josh Smeaton
> Therefore I'd favor we keep the current adjustment in the master branch as it > restores backward compatibility but I don't have strong feelings about reverting > it either if it's deemed inappropriate. Fixing the crash is the number 1 priority in my opinion, as it broke something that used t

Re: Django directory design philosophy question

2017-06-04 Thread Josh Smeaton
I agree that creating a "project" subdirectory inside the code directory, that's usually named the same thing, can be quite confusing. I'd like to see some kind of improvement here, but I haven't done the research to see what makes sense. The cognitive overhead of myproject/myproject, especiall

Re: Makemigrations hooks for third-party apps?

2017-06-13 Thread Josh Smeaton
Can you provide the operations that users can then import into their migrations, similarly to how contrib.postgres provides the HStoreExtension operation [0]? The import could even be a function taking the extended model that returns the appropriate operation. This might be a bit more lo-fi tha

Re: On ASGI...

2017-06-17 Thread Josh Smeaton
FuncName() and FuncNameAsync() are common patterns in .NET land with async/await. The snake case translation would be funcname_async. From a quick scan, the JS world hasn't settled on a convention yet, though there is a bit of discussion about how to differentiate the names. Personally I don't

<    1   2   3   4