Fellow Report - March 11, 2017

2017-03-11 Thread Tim Graham


Triaged

---

https://code.djangoproject.com/ticket/27916 - versionchanged / versionadded 
annotation titles missing in downloadable docs (accepted)

https://code.djangoproject.com/ticket/27910 - Allow using an Enum class in 
model Field choices (wontfix)

https://code.djangoproject.com/ticket/27911 - Document UserAdmin when 
creating custom User model (fixed)

https://code.djangoproject.com/ticket/27908 - Cannot use 'schema.table' 
with inspectdb (duplicate)

https://code.djangoproject.com/ticket/27917 - Allow ModelAdmin.radio_fields 
to work with NullBooleanField (accepted)

https://code.djangoproject.com/ticket/27928 - Gratuitous ALTER COLUMN 
statements generated for adding blank=True (accepted)

Reviewed/committed

--

https://github.com/django/django/pull/7797 - Fixed #27475 -- Fixed 
NonExistentTimeError crash in ModelAdmin.date_hierarchy.

https://github.com/django/django/pull/8139 - Fixed #26522 -- Fixed a 
nondeterministic AssertionError in QuerySet combining.

https://github.com/django/django/pull/8153 - Refs #27622 -- Fixed a 
regression in JSON content-type detection.

https://github.com/django/django/pull/8150 - Fixed #27905 – Added 
RelatedFieldWidgetWrapper.value_omitted_from_data().

https://github.com/django/django/pull/8134 - Fixed #27891 -- Added 
PasswordResetConfirmView.post_reset_login_backend attribute.

https://github.com/django/django/pull/8151 - Fixed #24365 -- Made inspectdb 
translate MySQL unsigned integer columns to positive integer fields.

https://github.com/django/django/pull/8159 - Fixed #27920 -- Restored empty 
RadioSelect choice producing value="".

https://github.com/django/django/pull/8165 - Fixed #27924 -- Added 
cx_Oracle 5.3 support.
https://github.com/django/django/pull/8147 - Fixed #27904 -- Added a system 
check that Field.validators are callable.

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/579b0534-1db8-4242-ae7a-bffa3ae50d8c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


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 
also just take a look at the settings files it uses for 
testing: https://github.com/django/django-box/tree/master/roles/djangodata/files

On Saturday, 11 March 2017 09:03:51 UTC+11, Anton Samarchyan wrote:
>
> I have a pull request in which some tests for some of environments are 
> failing. (it's fine for the default tests with sqlite and some others) - 
> https://github.com/django/django/pull/7994 
>
> Now, I am trying to run the tests with the database set to mysql.
>
> I added a file settings_mysql.py which I put in the tests folder: 
> http://pastebin.com/113Xx2Am 
>
> To try it out I use the master branch (commit 
> c577d8a4981233b4d0f65c6ce57ae33d304095b9).
>
> Then I run ./runtests.py --settings settings_mysql and I am getting errors.
>
> Then I rerun it with parallel=1 - ./runtests.py --settings settings_mysql 
> --parallel=1
>
> and I get the following result:
>
> FAILED (failures=56, errors=42, skipped=1046, expected failures=4)
>
> Full log - https://paste.ee/p/Tfc9H
>
> Does anyone have an idea what might be wrong and what is the best way to 
> run tests for different databases?
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/78cfa185-0443-4d78-a059-f3c016209d71%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: NEW Feature: Collect static order of directories searched. Possible upgrade inside FileSystemFinder.

2017-03-11 Thread Luke Plant
Like Tim, I'm surprised if there is non-determinism in the order here - 
a quick look at the code shows the search is in the order specified in  
STATICFILES_DIRS. Is it possible you are encountering browser caching 
effects, perhaps triggered by accessing both sites on 'localhost' locally?



Luke

On 10/03/17 16:35, Tim Graham wrote:
Hi, I'm surprised if the search behavior is nondeterministic rather 
than searching STATICFILES_DIRS in order. If that's really the case, 
it seems like a bug. Can you point to the code that causes the 
nondeterminism?


On Friday, March 10, 2017 at 7:35:25 AM UTC-5, Radosław Orłowski wrote:

Right now I'm working with Django 1.8.17 and What I'm trying to
acomplish is simple override of static files.

STATICFILES_DIRS = (
str(os.path.abspath(os.path.join(SITE_ROOT, 'static_new'))),
str(os.path.abspath(os.path.join(SITE_ROOT, 'static'))),
)

STATICFILES_FINDERS = (
'django.contrib.staticfiles.finders.FileSystemFinder',
'django.contrib.staticfiles.finders.AppDirectoriesFinder',
)

my thinking:
I have to sites that need different logo file.

Both directories static and static_new have images/logo.png, but
this file is different.

I need to add logo from static_new and load rest of content from
static (js, css. etc)
This would allow me to create folders with statics -- per site
without changing urls and templates, just collect static would
take images from another dir, other changes are made with 
django.contrib.sites.models.get_current_site

Collect static works with *first found* but I have no way to
define 'seach here first behavior'. Also development static and
collectstatic don't seem to search for those files with same order
(also I find them both unstable as once in a while logo is loaded
from static_new and mostly from static)


Expected behavior:
when adding new folder to STATICFILES_FINDERS, I can somehow
define order of folders static file finder will go through
searching for this item either as alphabetic order or by explicit
order. ('static',2),('static_new',1)
second behavior is similar to list_display and fieldsets in admin
views, I would love to introduce here something like that.


Discussion open.

--
You received this message because you are subscribed to the Google 
Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send 
an email to django-developers+unsubscr...@googlegroups.com 
.
To post to this group, send email to 
django-developers@googlegroups.com 
.

Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/86d68df8-38e0-4dad-ab93-6d12e1d2eeba%40googlegroups.com 
.

For more options, visit https://groups.google.com/d/optout.


--
You received this message because you are subscribed to the Google Groups "Django 
developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/213566d4-3cf8-2e7e-e16d-4d48c82837f5%40cantab.net.
For more options, visit https://groups.google.com/d/optout.


Re: Problem with running tests with mysql database.

2017-03-11 Thread Adam Johnson
For the lock wait timeout errors, it's probable something (another test
run?) is still connected to the database and holding the locks. Try
restarting mysql.

And if you are still having problems, knowing the version of MySQL you're
using, plus how you installed it, would be helpful.

On 10 March 2017 at 22:14, Tim Graham  wrote:

> For the error, "Database returned an invalid datetime value. Are time zone
> definitions for your database installed?", see https://docs.djangoproject.
> com/en/dev/ref/databases/#time-zone-definitions.
>
> Adding this to the 'default' and 'other' dictionaries in DATABASES may
> solve some of the encoding problems:
>
> 'TEST': {
> 'CHARSET': 'utf8',
> 'COLLATION': 'utf8_general_ci',
> },
>
> If you still have some errors after that, please post an updated output.
>
> On Friday, March 10, 2017 at 5:03:51 PM UTC-5, Anton Samarchyan wrote:
>>
>> I have a pull request in which some tests for some of environments are
>> failing. (it's fine for the default tests with sqlite and some others) -
>> https://github.com/django/django/pull/7994
>>
>> Now, I am trying to run the tests with the database set to mysql.
>>
>> I added a file settings_mysql.py which I put in the tests folder:
>> http://pastebin.com/113Xx2Am
>>
>> To try it out I use the master branch (commit
>> c577d8a4981233b4d0f65c6ce57ae33d304095b9).
>>
>> Then I run ./runtests.py --settings settings_mysql and I am getting
>> errors.
>>
>> Then I rerun it with parallel=1 - ./runtests.py --settings settings_mysql
>> --parallel=1
>>
>> and I get the following result:
>>
>> FAILED (failures=56, errors=42, skipped=1046, expected failures=4)
>>
>> Full log - https://paste.ee/p/Tfc9H
>>
>> Does anyone have an idea what might be wrong and what is the best way to
>> run tests for different databases?
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Django developers (Contributions to Django itself)" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-developers+unsubscr...@googlegroups.com.
> To post to this group, send email to django-developers@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-developers.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/django-developers/6f86afff-c4c1-481e-8e17-
> 7aae2cf0bde7%40googlegroups.com
> 
> .
>
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Adam

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/CAMyDDM1KNVFfJhBO-AbPH15se0TosZe%2BhygeRneTEv%3D0yKuJAg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.