﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
22625	Installing pytz breaks code already using django's timezone module	tom.michaelis@…	Aymeric Augustin	"pytz is an optional module for Django, used in django.utils.timezone (and possibly elsewhere). The documentation recommends that pytz is installed, but it's not a requirement.

The bug is that after installing pytz, methods in django's timezone module do not present the same interface as before installation. Installing an optional module should not adjust the interface presented.

The following code works differently before and after installation of pytz:

{{{
from django.utils import timezone

now = timezone.now()
timezone.make_aware(now, timezone.utc())
}}}

Before installing pytz, timezone.make_aware essentially does nothing (the variable is already timezone aware). After installing pytz, timezone.make_aware makes a call to pytz which raises 'ValueError: Not naive datetime (tzinfo is already set)', and causes everything to break.

While I discovered this in django 1.5, I've also been able to replicate the bug in django 1.6, so I am filing the bug report under that.

"	Bug	closed	Utilities	1.6	Normal	fixed	pytz, timezone		Accepted	0	0	0	0	0	0
