[CalendarServer-changes] [15410] CalendarServer/trunk
source_changes at macosforge.org
source_changes at macosforge.org
Mon Jan 4 09:07:32 PST 2016
Revision: 15410
http://trac.calendarserver.org//changeset/15410
Author: cdaboo at apple.com
Date: 2016-01-04 09:07:32 -0800 (Mon, 04 Jan 2016)
Log Message:
-----------
Fix circular import.
Modified Paths:
--------------
CalendarServer/trunk/calendarserver/push/amppush.py
CalendarServer/trunk/calendarserver/push/applepush.py
CalendarServer/trunk/calendarserver/push/notifier.py
CalendarServer/trunk/calendarserver/push/test/test_amppush.py
CalendarServer/trunk/calendarserver/push/test/test_applepush.py
CalendarServer/trunk/calendarserver/push/test/test_notifier.py
CalendarServer/trunk/calendarserver/push/util.py
CalendarServer/trunk/txdav/caldav/datastore/test/common.py
CalendarServer/trunk/txdav/carddav/datastore/test/common.py
CalendarServer/trunk/txdav/idav.py
Added Paths:
-----------
CalendarServer/trunk/calendarserver/push/ipush.py
Modified: CalendarServer/trunk/calendarserver/push/amppush.py
===================================================================
--- CalendarServer/trunk/calendarserver/push/amppush.py 2015-12-21 21:27:08 UTC (rev 15409)
+++ CalendarServer/trunk/calendarserver/push/amppush.py 2016-01-04 17:07:32 UTC (rev 15410)
@@ -14,6 +14,7 @@
# limitations under the License.
##
+from calendarserver.push.ipush import PushPriority
from calendarserver.push.util import PushScheduler
from twext.python.log import Logger
from twisted.internet.defer import inlineCallbacks, returnValue
@@ -23,7 +24,6 @@
import time
import uuid
-from calendarserver.push.util import PushPriority
log = Logger()
Modified: CalendarServer/trunk/calendarserver/push/applepush.py
===================================================================
--- CalendarServer/trunk/calendarserver/push/applepush.py 2015-12-21 21:27:08 UTC (rev 15409)
+++ CalendarServer/trunk/calendarserver/push/applepush.py 2016-01-04 17:07:32 UTC (rev 15410)
@@ -36,9 +36,8 @@
import struct
import time
from txdav.common.icommondatastore import InvalidSubscriptionValues
-from calendarserver.push.util import (
- validToken, TokenHistory, PushScheduler, PushPriority
-)
+from calendarserver.push.ipush import PushPriority
+from calendarserver.push.util import validToken, TokenHistory, PushScheduler
from twext.internet.adaptendpoint import connect
from twext.internet.gaiendpoint import GAIEndpoint
from twisted.python.constants import Values, ValueConstant
Added: CalendarServer/trunk/calendarserver/push/ipush.py
===================================================================
--- CalendarServer/trunk/calendarserver/push/ipush.py (rev 0)
+++ CalendarServer/trunk/calendarserver/push/ipush.py 2016-01-04 17:07:32 UTC (rev 15410)
@@ -0,0 +1,26 @@
+##
+# Copyright (c) 2011-2015 Apple Inc. All rights reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+##
+
+from twisted.python.constants import Values, ValueConstant
+
+
+class PushPriority(Values):
+ """
+ Constants to use for push priorities
+ """
+ low = ValueConstant(1)
+ medium = ValueConstant(5)
+ high = ValueConstant(10)
Modified: CalendarServer/trunk/calendarserver/push/notifier.py
===================================================================
--- CalendarServer/trunk/calendarserver/push/notifier.py 2015-12-21 21:27:08 UTC (rev 15409)
+++ CalendarServer/trunk/calendarserver/push/notifier.py 2016-01-04 17:07:32 UTC (rev 15410)
@@ -34,7 +34,7 @@
import datetime
-from calendarserver.push.util import PushPriority
+from calendarserver.push.ipush import PushPriority
log = Logger()
Modified: CalendarServer/trunk/calendarserver/push/test/test_amppush.py
===================================================================
--- CalendarServer/trunk/calendarserver/push/test/test_amppush.py 2015-12-21 21:27:08 UTC (rev 15409)
+++ CalendarServer/trunk/calendarserver/push/test/test_amppush.py 2016-01-04 17:07:32 UTC (rev 15410)
@@ -18,7 +18,7 @@
from calendarserver.push.amppush import NotificationForID
from twistedcaldav.test.util import StoreTestCase
from twisted.internet.task import Clock
-from calendarserver.push.util import PushPriority
+from calendarserver.push.ipush import PushPriority
class AMPPushMasterTests(StoreTestCase):
Modified: CalendarServer/trunk/calendarserver/push/test/test_applepush.py
===================================================================
--- CalendarServer/trunk/calendarserver/push/test/test_applepush.py 2015-12-21 21:27:08 UTC (rev 15409)
+++ CalendarServer/trunk/calendarserver/push/test/test_applepush.py 2016-01-04 17:07:32 UTC (rev 15410)
@@ -20,7 +20,8 @@
from calendarserver.push.applepush import (
ApplePushNotifierService, APNProviderProtocol, ApplePushPriority
)
-from calendarserver.push.util import validToken, TokenHistory, PushPriority
+from calendarserver.push.ipush import PushPriority
+from calendarserver.push.util import validToken, TokenHistory
from twistedcaldav.test.util import StoreTestCase
from twisted.internet.defer import inlineCallbacks, succeed
from twisted.internet.task import Clock
Modified: CalendarServer/trunk/calendarserver/push/test/test_notifier.py
===================================================================
--- CalendarServer/trunk/calendarserver/push/test/test_notifier.py 2015-12-21 21:27:08 UTC (rev 15409)
+++ CalendarServer/trunk/calendarserver/push/test/test_notifier.py 2016-01-04 17:07:32 UTC (rev 15410)
@@ -22,7 +22,7 @@
from twistedcaldav.config import ConfigDict
from txdav.common.datastore.test.util import populateCalendarsFrom
from txdav.common.datastore.sql_tables import _BIND_MODE_WRITE
-from calendarserver.push.util import PushPriority
+from calendarserver.push.ipush import PushPriority
from txdav.idav import ChangeCategory
from twext.enterprise.jobs.jobitem import JobItem
from twisted.internet import reactor
Modified: CalendarServer/trunk/calendarserver/push/util.py
===================================================================
--- CalendarServer/trunk/calendarserver/push/util.py 2015-12-21 21:27:08 UTC (rev 15409)
+++ CalendarServer/trunk/calendarserver/push/util.py 2016-01-04 17:07:32 UTC (rev 15410)
@@ -16,8 +16,6 @@
from twext.python.log import Logger
-from twisted.python.constants import Values, ValueConstant
-
from twistedcaldav.util import getPasswordFromKeychain, KeychainAccessError, \
KeychainPasswordNotFound
@@ -28,16 +26,6 @@
-class PushPriority(Values):
- """
- Constants to use for push priorities
- """
- low = ValueConstant(1)
- medium = ValueConstant(5)
- high = ValueConstant(10)
-
-
-
def getAPNTopicFromConfig(protocol, accountName, protoConfig):
"""
Given the APNS protocol config, extract the APN topic.
Modified: CalendarServer/trunk/txdav/caldav/datastore/test/common.py
===================================================================
--- CalendarServer/trunk/txdav/caldav/datastore/test/common.py 2015-12-21 21:27:08 UTC (rev 15409)
+++ CalendarServer/trunk/txdav/caldav/datastore/test/common.py 2016-01-04 17:07:32 UTC (rev 15410)
@@ -51,7 +51,7 @@
from txdav.common.icommondatastore import ConcurrentModification
from twistedcaldav.ical import Component
from twistedcaldav.config import config
-from calendarserver.push.util import PushPriority
+from calendarserver.push.ipush import PushPriority
import hashlib
import json
Modified: CalendarServer/trunk/txdav/carddav/datastore/test/common.py
===================================================================
--- CalendarServer/trunk/txdav/carddav/datastore/test/common.py 2015-12-21 21:27:08 UTC (rev 15409)
+++ CalendarServer/trunk/txdav/carddav/datastore/test/common.py 2016-01-04 17:07:32 UTC (rev 15410)
@@ -39,7 +39,7 @@
from txdav.common.icommondatastore import ObjectResourceNameAlreadyExistsError
from txdav.idav import IPropertyStore, IDataStore
from txdav.xml.element import WebDAVUnknownElement
-from calendarserver.push.util import PushPriority
+from calendarserver.push.ipush import PushPriority
import hashlib
Modified: CalendarServer/trunk/txdav/idav.py
===================================================================
--- CalendarServer/trunk/txdav/idav.py 2015-12-21 21:27:08 UTC (rev 15409)
+++ CalendarServer/trunk/txdav/idav.py 2016-01-04 17:07:32 UTC (rev 15410)
@@ -35,7 +35,7 @@
from zope.interface.common.mapping import IMapping
from twisted.python.constants import Values, ValueConstant
-from calendarserver.push.util import PushPriority
+from calendarserver.push.ipush import PushPriority
#
# Exceptions
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20160104/c08cd834/attachment.html>
More information about the calendarserver-changes
mailing list