Great! Thanx
Op zaterdag 15 november 2014 18:08:34 UTC+1 schreef Ilja Maas:
>
> Investigating https://code.djangoproject.com/ticket/21163
> I came across these lines in mysql/base.py:
>
> if settings.DEBUG:
> warnings.filterwarnings("error", category=Database.Warning)
>
>
> Finding out why, t
Just to close the loop, I created a ticket and will commit shortly:
https://code.djangoproject.com/ticket/23871
On Monday, November 17, 2014 5:44:35 AM UTC-5, Florian Apolloner wrote:
>
>
>
> On Monday, November 17, 2014 11:40:15 AM UTC+1, Aymeric Augustin wrote:
>>
>> 2014-11-17 10:45 GMT+01:00
On Monday, November 17, 2014 11:40:15 AM UTC+1, Aymeric Augustin wrote:
>
> 2014-11-17 10:45 GMT+01:00 Florian Apolloner >:
>
>> Imo we should make those exceptions instead! Data truncation should never
>> be just a warning ;)
>>
>
> Those who think like you can use a database instead of MySQL
2014-11-17 10:45 GMT+01:00 Florian Apolloner :
> Imo we should make those exceptions instead! Data truncation should never
> be just a warning ;)
>
Those who think like you can use a database instead of MySQL ;-)
I agree we should simply remove the code that promotes warnings to
exceptions in DE
Imo we should make those exceptions instead! Data truncation should never
be just a warning ;)
Cheers,
Florian
On Monday, November 17, 2014 9:14:06 AM UTC+1, Anssi Kääriäinen wrote:
>
> I don't see any reason why we should promote warnings to errors only
> when DEBUG is enabled.
>
> +1 to remo
I don't see any reason why we should promote warnings to errors only
when DEBUG is enabled.
+1 to removing the filterwarnings() call.
- Anssi
On Sat, 2014-11-15 at 09:08 -0800, Ilja Maas wrote:
> Investigating https://code.djangoproject.com/ticket/21163
> I came across these lines in mysql/base
Hmm, looking at the code that existed before the filterwarnings promotion
to error, the older code was catching Database.Warning exceptions and
re-raising them with the warning information included. This was before my
time but it seems the older code was simply making the exceptions raised
for DB w
This is working as intended; on most databases, inserting a 11 character
text value into a VARCHAR(10) raises an error. On MySQL, depending on if
strict mode is enabled*, it either inserts "just fine" by truncating
"12345678901" to "1234567890" with a warning, or fails with an error.
As silent
Investigating https://code.djangoproject.com/ticket/21163
I came across these lines in mysql/base.py:
if settings.DEBUG:
warnings.filterwarnings("error", category=Database.Warning)
Finding out why, this bubbles up to somewhere in 2007
https://github.com/django/django/commit/f9c4ce51235aac48