# HG changeset patch # User ymh # Date 1339592658 -7200 # Node ID f4fed46efbde39f8fc72c3fd2c024b42e1de7e4a # Parent 9392a0440e5189a94d341dd7f0c31131c94ad164 correct warnings about timezones, remove dependance on pytz diff -r 9392a0440e51 -r f4fed46efbde src/ldt/ldt/__init__.py --- a/src/ldt/ldt/__init__.py Mon Jun 11 19:53:13 2012 +0200 +++ b/src/ldt/ldt/__init__.py Wed Jun 13 15:04:18 2012 +0200 @@ -1,4 +1,4 @@ -VERSION = (1, 10, 0, "final", 0) +VERSION = (1, 11, 0, "final", 0) def get_version(): diff -r 9392a0440e51 -r f4fed46efbde src/ldt/ldt/api/ldt/handlers.py --- a/src/ldt/ldt/api/ldt/handlers.py Mon Jun 11 19:53:13 2012 +0200 +++ b/src/ldt/ldt/api/ldt/handlers.py Wed Jun 13 15:04:18 2012 +0200 @@ -44,8 +44,6 @@ class AnnotationHandler(BaseHandler): allowed_methods = ('PUT',) - model = Project - @require_extended def update(self, request, project_id): diff -r 9392a0440e51 -r f4fed46efbde src/ldt/ldt/ldt_utils/stat.py --- a/src/ldt/ldt/ldt_utils/stat.py Mon Jun 11 19:53:13 2012 +0200 +++ b/src/ldt/ldt/ldt_utils/stat.py Wed Jun 13 15:04:18 2012 +0200 @@ -1,7 +1,7 @@ from django.conf import settings #@UnresolvedImport from ldt.ldt_utils.models import Segment, ContentStat, POL_INDICES import datetime -import pytz +from django.utils import timezone def update_stat_content(content): @@ -18,7 +18,7 @@ pol_stats = [0]*len(POL_INDICES) - min_ts = datetime.datetime.min.replace(tzinfo=pytz.utc) + min_ts = datetime.datetime.min.replace(tzinfo=timezone.utc) min_update_ts = min_ts #@UndefinedVariable for segment in segments: @@ -69,7 +69,7 @@ contentstat, created = ContentStat.objects.get_or_create(content=content) #@UnusedVariable @UndefinedVariable contentstat.annotation_volume = buckets - contentstat.last_annotated = datetime.datetime.now() #@UndefinedVariable + contentstat.last_annotated = timezone.now() contentstat.save() diff -r 9392a0440e51 -r f4fed46efbde src/ldt/ldt/ldt_utils/utils.py --- a/src/ldt/ldt/ldt_utils/utils.py Mon Jun 11 19:53:13 2012 +0200 +++ b/src/ldt/ldt/ldt_utils/utils.py Wed Jun 13 15:04:18 2012 +0200 @@ -296,7 +296,7 @@ return polemics def __del__(self): - self.save() + self.save() def create_ldt(project, user, cuttings=[]): """create xml""" diff -r 9392a0440e51 -r f4fed46efbde virtualenv/res/lib/lib_create_env.py --- a/virtualenv/res/lib/lib_create_env.py Mon Jun 11 19:53:13 2012 +0200 +++ b/virtualenv/res/lib/lib_create_env.py Wed Jun 13 15:04:18 2012 +0200 @@ -36,7 +36,6 @@ 'SSH': {'setup': 'ssh', 'url':'http://pypi.python.org/packages/source/s/ssh/ssh-1.7.14.tar.gz#md5=4cdd0549ef4699bd67b96264d3b21427', 'local':'ssh-1.7.14.tar.gz'}, 'FABRIC': {'setup': 'fabric', 'url':'https://github.com/fabric/fabric/tarball/1.4.2', 'local':'fabric-1.4.2.tar.gz'}, 'MERCURIAL': {'setup': 'mercurial', 'url':'http://mercurial.selenic.com/release/mercurial-2.2.2.tar.gz', 'local':'mercurial-2.2.2.tar.gz'}, - 'PYTZ': {'setup':'pytz', 'url':'http://pypi.python.org/packages/source/p/pytz/pytz-2012c.tar.bz2', 'local':'pytz.tar.bz2'}, } if system_str == 'Windows': diff -r 9392a0440e51 -r f4fed46efbde virtualenv/res/src/pytz.tar.bz2 Binary file virtualenv/res/src/pytz.tar.bz2 has changed diff -r 9392a0440e51 -r f4fed46efbde virtualenv/web/res/res_create_env.py --- a/virtualenv/web/res/res_create_env.py Mon Jun 11 19:53:13 2012 +0200 +++ b/virtualenv/web/res/res_create_env.py Wed Jun 13 15:04:18 2012 +0200 @@ -22,7 +22,6 @@ ]) INSTALLS.extend([ #(key,method, option_str, dict_extra_env) - ('PYTZ', 'pip', None, None), ('SOUTH', 'pip', None, None), ('PIL', 'easy_install', None, None), ('DJANGO','pip', None, None), diff -r 9392a0440e51 -r f4fed46efbde web/ldtplatform/settings.py --- a/web/ldtplatform/settings.py Mon Jun 11 19:53:13 2012 +0200 +++ b/web/ldtplatform/settings.py Wed Jun 13 15:04:18 2012 +0200 @@ -29,7 +29,7 @@ # although not all choices may be available on all operating systems. # If running in a Windows environment this must be set to the same as your # system time zone. -TIME_ZONE = 'Europe/Paris' +TIME_ZONE = 'UTC' # Language code for this installation. All choices can be found here: # http://www.i18nguy.com/unicode/language-identifiers.html