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

2016-10-25 Thread Aymeric Augustin
Hello Tim,

Considering that there’s no evidence of anyone using the feature, that it 
doesn’t work well in all circumstances, that we have an alternative which works 
better and has no downsides (considering the new policy on dependencies), I 
think that’s reasonable.

I’m afraid we’ll get a couple complaints a few months after we’ll drop security 
support for 1.8, not during the 1.11 alpha period… But that doesn’t change my 
arguments. If we get feedback during 1.11 alpha then we’ll have to reconsider.

(Disclaimer — I’m more tolerant of backwards-incompatible changes than many 
other committers.)

-- 
Aymeric.

> On 24 Oct 2016, at 22:51, Tim Graham  wrote:
> 
> I asked on django-users [0] if anyone is using settings.TIME_ZONE=None and 
> didn't get any responses. Does it seem okay to drop that for now and react if 
> we get any complaints about its removal?
> 
> [0] https://groups.google.com/d/topic/django-users/CxAiS6PXs3U/discussion 
> 
> 
> On Wednesday, October 12, 2016 at 3:12:44 PM UTC-4, Tim Graham wrote:
> Would you be comfortable recommending that package for anyone who needs the 
> autodetection?  This seems to work:
> 
> from tzlocal import get_localzone
> TIME_ZONE = get_localzone().zone
> 
> What would change compared to the behavior of TIME_ZONE=None is that Django 
> will set os.environ['TZ'] (except on Windows). I don't really understand the 
> use case where doing that may have been a problem [0].
> 
> [0] https://code.djangoproject.com/ticket/1480 
> 
> On Wednesday, October 12, 2016 at 12:58:19 PM UTC-4, Aymeric Augustin wrote:
> > On 12 Oct 2016, at 18:22, Tim Graham > wrote: 
> > 
> > is there some other approach we could take? 
> 
> To obtain the pytz timezone for the local time, you’d need something like: 
> https://github.com/regebro/tzlocal  
> 
> It isn’t exactly straightforward… This approach seems sub-optimal. 
> 
> -- 
> Aymeric. 
> 
> 
> -- 
> 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/f83d112d-d2c6-4201-91ad-80578f23df0d%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/7747B0D4-153D-4B6C-9F8F-2517E85BAFD9%40polytechnique.org.
For more options, visit https://groups.google.com/d/optout.


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

2016-10-24 Thread Tim Graham
I asked on django-users [0] if anyone is using settings.TIME_ZONE=None and 
didn't get any responses. Does it seem okay to drop that for now and react 
if we get any complaints about its removal?

[0] https://groups.google.com/d/topic/django-users/CxAiS6PXs3U/discussion

On Wednesday, October 12, 2016 at 3:12:44 PM UTC-4, Tim Graham wrote:
>
> Would you be comfortable recommending that package for anyone who needs 
> the autodetection?  This seems to work:
>
> from tzlocal import get_localzone
> TIME_ZONE = get_localzone().zone
>
> What would change compared to the behavior of TIME_ZONE=None is that 
> Django will set os.environ['TZ'] (except on Windows). I don't really 
> understand the use case where doing that may have been a problem [0].
>
> [0] https://code.djangoproject.com/ticket/1480
>
> On Wednesday, October 12, 2016 at 12:58:19 PM UTC-4, Aymeric Augustin 
> wrote:
>>
>> > On 12 Oct 2016, at 18:22, Tim Graham  wrote: 
>> > 
>> > is there some other approach we could take? 
>>
>> To obtain the pytz timezone for the local time, you’d need something 
>> like: 
>> https://github.com/regebro/tzlocal 
>>
>> It isn’t exactly straightforward… This approach seems sub-optimal. 
>>
>> -- 
>> Aymeric. 
>>
>>

-- 
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/f83d112d-d2c6-4201-91ad-80578f23df0d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


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

2016-10-12 Thread Tim Graham
Would you be comfortable recommending that package for anyone who needs the 
autodetection?  This seems to work:

from tzlocal import get_localzone
TIME_ZONE = get_localzone().zone

What would change compared to the behavior of TIME_ZONE=None is that Django 
will set os.environ['TZ'] (except on Windows). I don't really understand 
the use case where doing that may have been a problem [0].

[0] https://code.djangoproject.com/ticket/1480

On Wednesday, October 12, 2016 at 12:58:19 PM UTC-4, Aymeric Augustin wrote:
>
> > On 12 Oct 2016, at 18:22, Tim Graham  
> wrote: 
> > 
> > is there some other approach we could take? 
>
> To obtain the pytz timezone for the local time, you’d need something like: 
> https://github.com/regebro/tzlocal 
>
> It isn’t exactly straightforward… This approach seems sub-optimal. 
>
> -- 
> Aymeric. 
>
>

-- 
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/a2937942-fe2d-410a-bb1e-a563ffc7982e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


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

2016-10-12 Thread Aymeric Augustin
> On 12 Oct 2016, at 18:22, Tim Graham  wrote:
> 
> is there some other approach we could take?

To obtain the pytz timezone for the local time, you’d need something like:
https://github.com/regebro/tzlocal

It isn’t exactly straightforward… This approach seems sub-optimal.

-- 
Aymeric.

-- 
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/8F64A27E-9644-4AFD-B173-6E650886ED74%40polytechnique.org.
For more options, visit https://groups.google.com/d/optout.


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

2016-10-12 Thread Tim Graham
According to the docs for settings.TIMEZONE: "Django cannot reliably use 
alternate time zones in a Windows environment. If you’re running Django on 
Windows, TIME_ZONE  
must be set to match the system time zone."

If we keep supporting settings.TIME_ZONE=None I think that means this 
branch stays: 

https://github.com/django/django/blob/a3a10f8abe43c443f217d75153f50b53fbe71be2/django/utils/timezone.py#L180-L182

which means we have to keep LocalTimezone:

https://github.com/django/django/blob/a3a10f8abe43c443f217d75153f50b53fbe71be2/django/utils/timezone.py#L82-L151

or is there some other approach we could take?

Is anyone reading this using settings.TIME_ZONE=None?

On Monday, October 10, 2016 at 6:00:51 PM UTC-4, Florian Apolloner wrote:
>
>
>
> On Monday, October 10, 2016 at 9:50:51 PM UTC+2, Aymeric Augustin wrote:
>>
>> I think it’s best to state the expected value explicitly.
>>
>
> In theory yes, in pratice I think that is at least annoying on Windows 
> which only allows for the System-TZ I think?
>
> Cheers,
> Florian
>

-- 
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/e2c31cdf-fba1-4593-93a9-142d163a61e5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


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

2016-10-10 Thread Carl Meyer
Hi Kevin,

On 10/09/2016 11:09 AM, Kevin Brown wrote:
> I agree with requiring pytz if you have timezone support enabled in
> Django, as that cuts out a set of edge cases and likely simplifies the
> code base a bit in the long run. And I even agree with forcing it to be
> installed with Django if we want to encourage people to use Django with
> timezone support by default.
> 
> But I don't see the value in requiring pytz to be installed whenever you
> install Django, even if you explicitly disable timezone support. This
> means that there is the potential to force pytz to be installed in cases
> where it may never be used, and at the moment isn't even required.
> 
> If there was interest in dropping support for using Django without
> timezones (so removing USE_TZ = False), then I would understand the push
> for making pytz required for everyone.

I made this same argument a while back. The main problem with it is that
the default startproject sets USE_TZ = True. That means that with your
proposal, the default experience for every new Django dev would be 1.
install Django, 2. run startproject, 3. run runserver and get an error
that pytz isn't installed. That's not acceptable. Having pytz installed
in some cases when it isn't strictly needed is a very small price to pay
for a smoother path in the common case.

Carl

-- 
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/f03ff8ad-a71e-ba56-df1e-42f1ef02a41c%40oddbird.net.
For more options, visit https://groups.google.com/d/optout.


signature.asc
Description: OpenPGP digital signature


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

2016-10-10 Thread Florian Apolloner


On Monday, October 10, 2016 at 9:50:51 PM UTC+2, Aymeric Augustin wrote:
>
> I think it’s best to state the expected value explicitly.
>

In theory yes, in pratice I think that is at least annoying on Windows 
which only allows for the System-TZ I think?

Cheers,
Florian

-- 
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/55b7f343-96ed-4861-9f14-006201624ac9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


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

2016-10-10 Thread Tim Graham
Here's the ticket that added support for TIME_ZONE=None: 
https://code.djangoproject.com/ticket/1480

On Monday, October 10, 2016 at 3:50:51 PM UTC-4, Aymeric Augustin wrote:
>
> On 10 Oct 2016, at 21:31, Tim Graham  
> wrote:
>
> I forgot to mention (and document) that (if I'm following the code 
> correctly) this change removes support for setting TIME_ZONE=None. 
> According to the docs, TIME_ZONE=None "causes cause Django to fall back to 
> using the system timezone. However, this is discouraged when USE_TZ = True 
> , because it makes 
> conversions between local time and UTC less reliable." Is removing that 
> option acceptable as a backwards-incompatible change?
>
>
> I don’t have an opinion on that.
>
> I don’t think USE_TZ = None provides a particularly useful behavior. I 
> think it’s best to state the expected value explicitly.
>
> Perhaps that option was implemented because someone asked for it? I don’t 
> remember.
>
> -- 
> Aymeric.
>
>

-- 
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/d915b200-11b9-4103-883e-243449c9a358%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


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

2016-10-10 Thread Aymeric Augustin
> On 10 Oct 2016, at 21:31, Tim Graham  wrote:
> 
> I forgot to mention (and document) that (if I'm following the code correctly) 
> this change removes support for setting TIME_ZONE=None. According to the 
> docs, TIME_ZONE=None "causes cause Django to fall back to using the system 
> timezone. However, this is discouraged when USE_TZ = True 
> , because it makes 
> conversions between local time and UTC less reliable." Is removing that 
> option acceptable as a backwards-incompatible change?

I don’t have an opinion on that.

I don’t think USE_TZ = None provides a particularly useful behavior. I think 
it’s best to state the expected value explicitly.

Perhaps that option was implemented because someone asked for it? I don’t 
remember.

-- 
Aymeric.

-- 
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/70E556C2-6CF6-43CF-9763-89EE0C50C2EB%40polytechnique.org.
For more options, visit https://groups.google.com/d/optout.


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

2016-10-10 Thread Tim Graham
I forgot to mention (and document) that (if I'm following the code 
correctly) this change removes support for setting TIME_ZONE=None. 
According to the docs, TIME_ZONE=None "causes cause Django to fall back to 
using the system timezone. However, this is discouraged when USE_TZ = True 
, because it makes 
conversions between local time and UTC less reliable." Is removing that 
option acceptable as a backwards-incompatible change?

On Sunday, October 9, 2016 at 4:22:30 PM UTC-4, Aymeric Augustin wrote:
>
> Hello Kevin, 
>
> > On 09 Oct 2016, at 20:09, Kevin Brown  
> wrote: 
> > 
> > If there was interest in dropping support for using Django without 
> timezones (so removing USE_TZ = False), then I would understand the push 
> for making pytz required for everyone. 
>
> You’re making the assumption that pytz is only needed when USE_TZ = True. 
> In practice it isn’t that simple. 
>
> If you look at Tim’s patch you’ll see that code that relies pytz doesn’t 
> look like `if settings.USE_TZ: # do something with pytz` in general. 
> Several APIs need to account for time zones to produce accurate results 
> even when USE_TZ = False, for example, if memory serves, template tags that 
> humanize durations, probably others. Also django.utils.timezone can be 
> useful even when USE_TZ = False. 
>
> The patch makes it clear that managing with / without pytz alternatives 
> everywhere creates a lot of noise and a lot of error messages that boil 
> down to “yeah, this doesn’t work without pytz, install it”. Forcing the 
> install upfront has a negligible cost and removes the possibility to hit 
> these frustrating errors 
>
> Also supporting two code paths cause a non-negligible overhead for the 
> development of Django. Every time someone wants to add a test that involves 
> datetimes, they have to figure out what happens with or without pytz, 
> whether the test should be skipped and in which circumstances, etc. Often, 
> I still have to intervene myself, even though it’s been four years since I 
> added time zone support to Django. The developer experience in this area is 
> awful :-/ 
>
> Of course the point of Django is to have few people make efforts so that 
> everyone else doesn’t have to, but in this case, the burden added on 
> everyone else seems barely noticeable. If the concern is the size of a 
> Django install, honestly, there are other areas to target (e.g. ship 
> contrib apps, translations, etc. separately). 
>
> I hope this clarifies the situation, 
>
> -- 
> Aymeric. 
>
>

-- 
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/7a89192f-f3be-4ce3-ad7a-2fcb54a0365d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


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

2016-10-09 Thread Aymeric Augustin
Hello Kevin,

> On 09 Oct 2016, at 20:09, Kevin Brown  wrote:
> 
> If there was interest in dropping support for using Django without timezones 
> (so removing USE_TZ = False), then I would understand the push for making 
> pytz required for everyone.

You’re making the assumption that pytz is only needed when USE_TZ = True. In 
practice it isn’t that simple.

If you look at Tim’s patch you’ll see that code that relies pytz doesn’t look 
like `if settings.USE_TZ: # do something with pytz` in general. Several APIs 
need to account for time zones to produce accurate results even when USE_TZ = 
False, for example, if memory serves, template tags that humanize durations, 
probably others. Also django.utils.timezone can be useful even when USE_TZ = 
False.

The patch makes it clear that managing with / without pytz alternatives 
everywhere creates a lot of noise and a lot of error messages that boil down to 
“yeah, this doesn’t work without pytz, install it”. Forcing the install upfront 
has a negligible cost and removes the possibility to hit these frustrating 
errors

Also supporting two code paths cause a non-negligible overhead for the 
development of Django. Every time someone wants to add a test that involves 
datetimes, they have to figure out what happens with or without pytz, whether 
the test should be skipped and in which circumstances, etc. Often, I still have 
to intervene myself, even though it’s been four years since I added time zone 
support to Django. The developer experience in this area is awful :-/

Of course the point of Django is to have few people make efforts so that 
everyone else doesn’t have to, but in this case, the burden added on everyone 
else seems barely noticeable. If the concern is the size of a Django install, 
honestly, there are other areas to target (e.g. ship contrib apps, 
translations, etc. separately).

I hope this clarifies the situation,

-- 
Aymeric.

-- 
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/EA48F769-4A2B-47EE-8502-8F27ED59D413%40polytechnique.org.
For more options, visit https://groups.google.com/d/optout.


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

2016-10-09 Thread Kevin Brown
I agree with requiring pytz if you have timezone support enabled in Django, 
as that cuts out a set of edge cases and likely simplifies the code base a 
bit in the long run. And I even agree with forcing it to be installed with 
Django if we want to encourage people to use Django with timezone support 
by default.

But I don't see the value in requiring pytz to be installed whenever you 
install Django, even if you explicitly disable timezone support. This means 
that there is the potential to force pytz to be installed in cases where it 
may never be used, and at the moment isn't even required.

If there was interest in dropping support for using Django without 
timezones (so removing USE_TZ = False), then I would understand the push 
for making pytz required for everyone.

-- 
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/59cc28c6-0843-4738-90a6-5afcc52d84b0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


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

2016-10-09 Thread Aymeric Augustin
I reviewed the patch and I think it’s good. It removes quite a lot of messy 
code.

There’s a DEP in progress about allowing dependencies here:
https://github.com/django/deps/pull/26 

It looks like that there’s consensus on the general idea of allowing 
dependencies
and on pytz being an acceptable dependency, and that the DEP isn’t finished
simply because no one has taken the time to finish it.

If some contributors are uncomfortable with preempting the discussion of that 
DEP
or don’t think there’s consensus, now’s a good time to say so :-) Tim, you could
also ask for the technical board’s opinion if you want.

-- 
Aymeric.

> On 08 Oct 2016, at 14:13, Tim Graham  wrote:
> 
> I created a ticket and PR to add pytz to install_requires. I think it's a 
> nice simplification and will result in a better user experience.
> https://code.djangoproject.com/ticket/27327 
> 
> https://github.com/django/django/pull/7361 
> 
> 
> On Monday, June 6, 2016 at 5:28:11 AM UTC-4, Aymeric Augustin wrote:
> > On 06 Jun 2016, at 03:46, Carl Meyer  
> > wrote: 
> > 
> >> django-admin.py startproject defaults to USE_TZ = True which means that 
> >> new projects that install django, start the project, and then run the 
> >> internal web server are going to get missing dependency problems. 
> > 
> > That's an excellent point. I agree, we should just add pytz to 
> > install_requires if we require it for USE_TZ=True, otherwise the default 
> > new-project experience is unpleasant. 
> 
> I agree as well. 
> 
> One of these days we should reverse the “actual default value” so we don’t 
> have to override it in the “default project template” (and then people 
> obviously have no idea what the “default” is…) 
> 
> -- 
> Aymeric. 
> 
> 
> -- 
> 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/5c96fb2e-a620-4a1a-a584-64c3318f9837%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/1686E521-D511-4750-8AEF-7087EE240660%40polytechnique.org.
For more options, visit https://groups.google.com/d/optout.


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

2016-10-08 Thread Tim Graham
I created a ticket and PR to add pytz to install_requires. I think it's a 
nice simplification and will result in a better user experience.
https://code.djangoproject.com/ticket/27327
https://github.com/django/django/pull/7361

On Monday, June 6, 2016 at 5:28:11 AM UTC-4, Aymeric Augustin wrote:
>
> > On 06 Jun 2016, at 03:46, Carl Meyer  
> wrote: 
> > 
> >> django-admin.py startproject defaults to USE_TZ = True which means that 
> new projects that install django, start the project, and then run the 
> internal web server are going to get missing dependency problems. 
> > 
> > That's an excellent point. I agree, we should just add pytz to 
> install_requires if we require it for USE_TZ=True, otherwise the default 
> new-project experience is unpleasant. 
>
> I agree as well. 
>
> One of these days we should reverse the “actual default value” so we don’t 
> have to override it in the “default project template” (and then people 
> obviously have no idea what the “default” is…) 
>
> -- 
> Aymeric. 
>
>

-- 
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/5c96fb2e-a620-4a1a-a584-64c3318f9837%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


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

2016-06-06 Thread Aymeric Augustin
> On 06 Jun 2016, at 03:46, Carl Meyer  wrote:
> 
>> django-admin.py startproject defaults to USE_TZ = True which means that new 
>> projects that install django, start the project, and then run the internal 
>> web server are going to get missing dependency problems.
> 
> That's an excellent point. I agree, we should just add pytz to 
> install_requires if we require it for USE_TZ=True, otherwise the default 
> new-project experience is unpleasant. 

I agree as well.

One of these days we should reverse the “actual default value” so we don’t have 
to override it in the “default project template” (and then people obviously 
have no idea what the “default” is…)

-- 
Aymeric.

-- 
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/2149BDA6-2122-476B-900D-223C92AC869E%40polytechnique.org.
For more options, visit https://groups.google.com/d/optout.


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

2016-06-05 Thread Carl Meyer

> On Jun 5, 2016, at 6:09 PM, Josh Smeaton  wrote:
> 
> It sounds like we have consensus that we can make pytz a required dependency 
> when USE_TZ = True, and clear up the associated documentation. 
> 
> I think now we should try and find (rough) consensus on whether or not we 
> should have pytz as a required dependency in `install_requires`.
> 
> > If there is a significant number, and we want to continue to support their 
> > use-case, it's a non-zero added burden to require them to pull in a 
> > frequently-updated useless dependency. 
> 
> Let's assume there is a reasonable number of deployments with and without 
> timezone support. Even then I'm personally in favour of requiring pytz. 
> 
> django-admin.py startproject defaults to USE_TZ = True which means that new 
> projects that install django, start the project, and then run the internal 
> web server are going to get missing dependency problems.

That's an excellent point. I agree, we should just add pytz to install_requires 
if we require it for USE_TZ=True, otherwise the default new-project experience 
is unpleasant. 

Carl

-- 
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/12B46FC5-1326-4938-B611-86A7E195347A%40oddbird.net.
For more options, visit https://groups.google.com/d/optout.


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

2016-06-04 Thread Carl Meyer
On 06/04/2016 12:38 PM, Carl Meyer wrote:
> I just realized that I think something's gotten lost in this thread:
> Josh's original point was about requiring pytz _if you want timezone
> support_ (that is, if USE_TZ=True). That would I presume involve raising
> ImproperlyConfigured (or maybe having a site check raise an error?) if
> USE_TZ=True and pytz is not installed. I'd support this for sure: the
> "well, it might work OK without pytz if you're on Postgres" caveat is
> extra complexity for not much gain.
> 
> But this is not the same thing as putting pytz in install_requires,
> which makes it a required dependency for everyone using Django, even if
> they want USE_TZ=False.
> 
> I don't know how many USE_TZ=False projects there are. I always set
> USE_TZ=True, but I can imagine some small locally-oriented sites might
> have reason to prefer USE_TZ=False? If there is a significant number,
> and we want to continue to support their use-case, it's a non-zero added
> burden to require them to pull in a frequently-updated useless dependency.

FWIW: https://github.com/search?q=USE_TZ+%3D+False=Code

Carl

-- 
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/57532EEC.7000700%40oddbird.net.
For more options, visit https://groups.google.com/d/optout.


signature.asc
Description: OpenPGP digital signature


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

2016-06-04 Thread Carl Meyer
I just realized that I think something's gotten lost in this thread:
Josh's original point was about requiring pytz _if you want timezone
support_ (that is, if USE_TZ=True). That would I presume involve raising
ImproperlyConfigured (or maybe having a site check raise an error?) if
USE_TZ=True and pytz is not installed. I'd support this for sure: the
"well, it might work OK without pytz if you're on Postgres" caveat is
extra complexity for not much gain.

But this is not the same thing as putting pytz in install_requires,
which makes it a required dependency for everyone using Django, even if
they want USE_TZ=False.

I don't know how many USE_TZ=False projects there are. I always set
USE_TZ=True, but I can imagine some small locally-oriented sites might
have reason to prefer USE_TZ=False? If there is a significant number,
and we want to continue to support their use-case, it's a non-zero added
burden to require them to pull in a frequently-updated useless dependency.

Carl

-- 
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/57532E4E.7090504%40oddbird.net.
For more options, visit https://groups.google.com/d/optout.


signature.asc
Description: OpenPGP digital signature


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

2016-06-04 Thread Philip James
Adding pytz to install_requires might not contribute to a bug fix or new
feature right now, but it does remove a point of confusion from the docs. I
think it also reduces friction in getting Django up-and-running, which
seems valuable for Django users and Django contributors.

PJJ
http://philipjohnjames.com

On Sat, Jun 4, 2016 at 11:42 AM, Carl Meyer  wrote:

> On 06/03/2016 03:55 PM, Philip James wrote:
> > Is there consensus on making pytz required? (I, personally, am in favor,
> > since I too can't remember the last project I did that didn't need it.)
> >
> > If it's required, should it be vendored?
>
> -1 on vendoring pytz. I think it's fine to just make it a required
> dependency if that saves us significant work on a valuable new feature
> or refactoring. I don't really see the hurry to make it a required
> dependency just for its own sake, though.
>
> Carl
>
> --
> 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/57532114.20003%40oddbird.net
> .
> 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/CACXM1yEYWzpZMSNk8Sy9x%3DsBvFaLWK5Cokg3ujZYf%3D2koc5OSg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


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

2016-06-04 Thread Carl Meyer
On 06/03/2016 03:55 PM, Philip James wrote:
> Is there consensus on making pytz required? (I, personally, am in favor,
> since I too can't remember the last project I did that didn't need it.)
> 
> If it's required, should it be vendored?

-1 on vendoring pytz. I think it's fine to just make it a required
dependency if that saves us significant work on a valuable new feature
or refactoring. I don't really see the hurry to make it a required
dependency just for its own sake, though.

Carl

-- 
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/57532114.20003%40oddbird.net.
For more options, visit https://groups.google.com/d/optout.


signature.asc
Description: OpenPGP digital signature


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

2016-06-04 Thread Donald Stufft

> On Jun 4, 2016, at 1:18 PM, Aymeric Augustin 
>  wrote:
> 
> That doesn’t sound optimal because pytz’ release cycle is tied to the TZ 
> database’s cycle, which is different from Django’s.


IMO just stick pytz in install_requires and be done with it. It’s a very 
trivial dependency, and is available as a Wheel, various eggs, and sdists. Just 
to put some numbers behind this:

93.6% of all downloads of Django from PyPI [1] are originating using a tool 
that will properly support dependencies out of the box. Another 3.5% of that 
are using a tool that we can’t detect— this is largely older versions of pip 
and devpi that didn’t accurately report themselves in the User-Agent header, so 
is going to also be largely things that support dependencies properly. Another 
2.3% of the downloads are coming from mirroring clients like devpi, 
bandersnatch, etc where it’s likely the consumers are mostly or entirely 
automated tooling that understands dependencies again.

Finally, 0.5% of all downloads for Django from PyPI are made using the browser, 
where people may or may not be passing that to a tool that properly understands 
dependencies.

In addition, the latest versions of all Python versions that Django supports 
come with pip already available, eliminating the bootstrapping issues.

Given these numbers, and the existing of ensurepip, I think it’s easily time 
for Django to just start depending on things, particularly when those things 
are something as trivial to install as a pure python library like pytz.

[1] Using the now public metrics database.

—
Donald Stufft



-- 
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/F935353C-45B1-414E-8851-57DAAFA1BB57%40stufft.io.
For more options, visit https://groups.google.com/d/optout.


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

2016-06-04 Thread Aymeric Augustin
> On 04 Jun 2016, at 00:55, Philip James  wrote:
> 
> If it's required, should it be vendors?

That doesn’t sound optimal because pytz’ release cycle is tied to the TZ 
database’s cycle, which is different from Django’s.

-- 
Aymeric.

-- 
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/9967F49D-0DA8-4A93-A90B-A41F8782EF65%40polytechnique.org.
For more options, visit https://groups.google.com/d/optout.


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

2016-06-03 Thread Philip James
Is there consensus on making pytz required? (I, personally, am in favor, 
since I too can't remember the last project I did that didn't need it.)

If it's required, should it be vendored?

On Thursday, May 19, 2016 at 11:10:09 PM UTC-7, akki wrote:
>
> Corresponding ticket - #26622 
> .
>
> On Tuesday, 17 May 2016 05:51:29 UTC+5:30, 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 
>> combination except postgres on linux. The docs for timezone support (
>> https://docs.djangoproject.com/en/dev/topics/i18n/timezones/) say:
>>
>> Installing pytz  is highly recommended, 
>>> but may not be mandatory depending on your particular database backend, 
>>> operating system and time zone. If you encounter an exception querying 
>>> dates or times, please try installing it before filing a bug. 
>>
>>
>> I tried to find some documentation on the broader internet that would 
>> more accurately describe when and for what platforms pytz is actually 
>> required for timezone support, but was unable to find anything. I've opened 
>> a new ticket https://code.djangoproject.com/ticket/26622 to clarify more 
>> explicitly when pytz is required.
>>
>> However, I'm wondering if we should just go all-in on pytz and require it 
>> for timezone support. I've not run a Django site with timezone support 
>> without pytz, so I'm not sure what exact limitations exist or why you'd 
>> want to use timezone support without pytz. I'd be interested in hearing use 
>> cases for not requiring pytz if there are any. Explicitly requiring pytz 
>> will make test writing a lot easier, and will remove any doubt about 
>> whether or not pytz is required for users.
>>
>> Josh 
>>
>

-- 
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/16ce6fb6-c787-452b-a1b3-5f9891f8c80e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


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

2016-05-20 Thread akki
Corresponding ticket - #26622 .

On Tuesday, 17 May 2016 05:51:29 UTC+5:30, 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 
> combination except postgres on linux. The docs for timezone support (
> https://docs.djangoproject.com/en/dev/topics/i18n/timezones/) say:
>
> Installing pytz  is highly recommended, but 
>> may not be mandatory depending on your particular database backend, 
>> operating system and time zone. If you encounter an exception querying 
>> dates or times, please try installing it before filing a bug. 
>
>
> I tried to find some documentation on the broader internet that would more 
> accurately describe when and for what platforms pytz is actually required 
> for timezone support, but was unable to find anything. I've opened a new 
> ticket https://code.djangoproject.com/ticket/26622 to clarify more 
> explicitly when pytz is required.
>
> However, I'm wondering if we should just go all-in on pytz and require it 
> for timezone support. I've not run a Django site with timezone support 
> without pytz, so I'm not sure what exact limitations exist or why you'd 
> want to use timezone support without pytz. I'd be interested in hearing use 
> cases for not requiring pytz if there are any. Explicitly requiring pytz 
> will make test writing a lot easier, and will remove any doubt about 
> whether or not pytz is required for users.
>
> Josh 
>

-- 
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/395a2065-6172-4643-8bcd-300323e54ad3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


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

2016-05-20 Thread akki
Corresponding ticket - #26622 

On Tuesday, 17 May 2016 05:51:29 UTC+5:30, 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 
> combination except postgres on linux. The docs for timezone support (
> https://docs.djangoproject.com/en/dev/topics/i18n/timezones/) say:
>
> Installing pytz  is highly recommended, but 
>> may not be mandatory depending on your particular database backend, 
>> operating system and time zone. If you encounter an exception querying 
>> dates or times, please try installing it before filing a bug. 
>
>
> I tried to find some documentation on the broader internet that would more 
> accurately describe when and for what platforms pytz is actually required 
> for timezone support, but was unable to find anything. I've opened a new 
> ticket https://code.djangoproject.com/ticket/26622 to clarify more 
> explicitly when pytz is required.
>
> However, I'm wondering if we should just go all-in on pytz and require it 
> for timezone support. I've not run a Django site with timezone support 
> without pytz, so I'm not sure what exact limitations exist or why you'd 
> want to use timezone support without pytz. I'd be interested in hearing use 
> cases for not requiring pytz if there are any. Explicitly requiring pytz 
> will make test writing a lot easier, and will remove any doubt about 
> whether or not pytz is required for users.
>
> Josh 
>

-- 
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/02554482-7301-43c2-b279-ca2c24393e9f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


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

2016-05-17 Thread Michael Manfre
I can't recall the last Django project I worked on that didn't require
pytz. It makes sense to me to require it.

Regards,
Michael Manfre

On Tue, May 17, 2016 at 6:07 AM Aymeric Augustin <
aymeric.augus...@polytechnique.org> wrote:

> The reasoning was based on:
>
> - our reluctance to add dependencies back then (Django 1.4)
> - sqlite3 not being strictly needed in all circumstances (and probably
> being needed in fewer circumstances originally)
>
> I’ll try to find time to make a more detailed answer later.
>
> --
> Aymeric.
>
> On 17 May 2016, at 12:01, Marc Tamlyn  wrote:
>
> It would seem reasonable to me to require it. I wonder whether the
> reasoning is based on distro packaging or similar?
>
> On 17 May 2016 at 01:21, 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
>> combination except postgres on linux. The docs for timezone support (
>> https://docs.djangoproject.com/en/dev/topics/i18n/timezones/) say:
>>
>> Installing pytz  is highly recommended,
>>> but may not be mandatory depending on your particular database backend,
>>> operating system and time zone. If you encounter an exception querying
>>> dates or times, please try installing it before filing a bug.
>>
>>
>> I tried to find some documentation on the broader internet that would
>> more accurately describe when and for what platforms pytz is actually
>> required for timezone support, but was unable to find anything. I've opened
>> a new ticket https://code.djangoproject.com/ticket/26622 to clarify more
>> explicitly when pytz is required.
>>
>> However, I'm wondering if we should just go all-in on pytz and require it
>> for timezone support. I've not run a Django site with timezone support
>> without pytz, so I'm not sure what exact limitations exist or why you'd
>> want to use timezone support without pytz. I'd be interested in hearing use
>> cases for not requiring pytz if there are any. Explicitly requiring pytz
>> will make test writing a lot easier, and will remove any doubt about
>> whether or not pytz is required for users.
>>
>> Josh
>>
>> --
>> 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/cb513e96-e75f-462f-a8ca-b5d916ad8eef%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/CAMwjO1H_n%3DGzAFZ%2BR07Qf2qnbmY8_dpy5FhdaBEXrQRB0gJ9sQ%40mail.gmail.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/E0E058F8-7842-4F57-B7C2-A5BA2C2FD4D4%40polytechnique.org
> 
> .
> 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 

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

2016-05-17 Thread Aymeric Augustin
The reasoning was based on:

- our reluctance to add dependencies back then (Django 1.4)
- sqlite3 not being strictly needed in all circumstances (and probably being 
needed in fewer circumstances originally)

I’ll try to find time to make a more detailed answer later.

-- 
Aymeric.

> On 17 May 2016, at 12:01, Marc Tamlyn  wrote:
> 
> It would seem reasonable to me to require it. I wonder whether the reasoning 
> is based on distro packaging or similar?
> 
> On 17 May 2016 at 01:21, 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 
> combination except postgres on linux. The docs for timezone support 
> (https://docs.djangoproject.com/en/dev/topics/i18n/timezones/ 
> ) say:
> 
> Installing pytz  is highly recommended, but may 
> not be mandatory depending on your particular database backend, operating 
> system and time zone. If you encounter an exception querying dates or times, 
> please try installing it before filing a bug. 
> 
> I tried to find some documentation on the broader internet that would more 
> accurately describe when and for what platforms pytz is actually required for 
> timezone support, but was unable to find anything. I've opened a new ticket 
> https://code.djangoproject.com/ticket/26622 
>  to clarify more explicitly when 
> pytz is required.
> 
> However, I'm wondering if we should just go all-in on pytz and require it for 
> timezone support. I've not run a Django site with timezone support without 
> pytz, so I'm not sure what exact limitations exist or why you'd want to use 
> timezone support without pytz. I'd be interested in hearing use cases for not 
> requiring pytz if there are any. Explicitly requiring pytz will make test 
> writing a lot easier, and will remove any doubt about whether or not pytz is 
> required for users.
> 
> Josh 
> 
> -- 
> 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/cb513e96-e75f-462f-a8ca-b5d916ad8eef%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/CAMwjO1H_n%3DGzAFZ%2BR07Qf2qnbmY8_dpy5FhdaBEXrQRB0gJ9sQ%40mail.gmail.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/E0E058F8-7842-4F57-B7C2-A5BA2C2FD4D4%40polytechnique.org.
For more options, visit https://groups.google.com/d/optout.


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

2016-05-17 Thread Marc Tamlyn
It would seem reasonable to me to require it. I wonder whether the
reasoning is based on distro packaging or similar?

On 17 May 2016 at 01:21, 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
> combination except postgres on linux. The docs for timezone support (
> https://docs.djangoproject.com/en/dev/topics/i18n/timezones/) say:
>
> Installing pytz  is highly recommended, but
>> may not be mandatory depending on your particular database backend,
>> operating system and time zone. If you encounter an exception querying
>> dates or times, please try installing it before filing a bug.
>
>
> I tried to find some documentation on the broader internet that would more
> accurately describe when and for what platforms pytz is actually required
> for timezone support, but was unable to find anything. I've opened a new
> ticket https://code.djangoproject.com/ticket/26622 to clarify more
> explicitly when pytz is required.
>
> However, I'm wondering if we should just go all-in on pytz and require it
> for timezone support. I've not run a Django site with timezone support
> without pytz, so I'm not sure what exact limitations exist or why you'd
> want to use timezone support without pytz. I'd be interested in hearing use
> cases for not requiring pytz if there are any. Explicitly requiring pytz
> will make test writing a lot easier, and will remove any doubt about
> whether or not pytz is required for users.
>
> Josh
>
> --
> 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/cb513e96-e75f-462f-a8ca-b5d916ad8eef%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/CAMwjO1H_n%3DGzAFZ%2BR07Qf2qnbmY8_dpy5FhdaBEXrQRB0gJ9sQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.