- apns: Remove TLS version flag and default to
ssl.PROTOCOL_TLS
when creating APNS socket connection. Thanks Tanner Stirrat!
- gcm: Use FCM URL instead of deprecated GCM URL. Thanks Lukas Anzinger!
- apns: Remove restriction on token length due to incorrect assumption about tokens always being 64 characters long.
- apns: Add exceptions
APNSProtocolError
andAPNSTimeoutError
. Thanks Jakub Kleň! - apns: Add retry mechanism to
APNSClient.send
. Thanks Jakub Kleň!- Add
default_retries
argument toAPNSClient
initialization. Defaults to5
. - Add
retries
argument toAPNSClient.send
. By default will useAPNSClient.default_retries
unless explicitly passed in. - If unable to send after
retries
, anAPNSTimeoutError
will be raised.
- Add
- apns: Fix bug in bulk
APNSClient.send
that resulted in an off-by-one error for message identifier in returned errors. Thanks Jakub Kleň! - apns: Add max payload truncation option to
APNSClient.send
. Thanks Jakub Kleň!- Add
default_max_payload_length
argument toAPNSClient
initialization. Defaults to0
which disabled max payload length check. - Add
max_payload_length
argument toAPNSClient.send
. By default will useAPNSClient.default_max_payload_length
unless explicitly passed in. - When
max_payload_length
set, messages will be truncated to fit within the length restriction by trimming the "message" text and appending it with "...".
- Add
- apns: Optimize reading from APNS Feedback so that the number of bytes read are based on header and token lengths.
- apns: Explicitly close connection to APNS Feedback service after reading data.
- apns: Add support for
mutable-content
field (Apple Notification Service Extension) viamutable_content
argument toAPNSClient.send()
. Thanks Ahmed Khedr! - apns: Add support for
thread-id
field (group identifier in Notification Center) viathread_id
argument toAPNSClient.send()
. Thanks Ahmed Khedr!
- apns: Fix implementation of empty APNS notifications and allow notifications with
{"aps": {}}
to be sent. Thanks Julius Seporaitis!
- gcm: Add support for
priority
field to GCM messages vialow_priority
keyword argument. Default behavior is for all messages to be"high"
priority. This is the opposite of GCM messages but mirrors the behavior in the APNS module where the default priority is"high"
.
- gcm: Add support for
notification
field to GCM messages. - gcm: Replace
registration_ids
field withto
field when sending to a single recipient sinceregistration_ids
field has been deprecated for single recipients.
- gcm: Fix incorrect authorization header in GCM client. Thanks Brad Montgomery!
apns: Add
APNSSandboxClient
for sending notifications to APNS sandbox server.apns: Add
message
attribute toAPNSResponse
.pushjack: Add internal logging.
apns: Fix APNS error checking to properly handle reading when no data returned.
apns: Make APNS sending stop during iteration if a fatal error is received from APNS server (e.g. invalid topic, invalid payload size, etc).
apns/gcm: Make APNS and GCM clients maintain an active connection to server.
apns: Make APNS always return
APNSResponse
object instead of only raisingAPNSSendError
when errors encountered. (breaking change)apns/gcm: Remove APNS/GCM module send functions and only support client interfaces. (breaking change)
apns: Remove
config
argument fromAPNSClient
and use individual method parameters as mapped below instead: (breaking change)APNS_ERROR_TIMEOUT
=>default_error_timeout
APNS_DEFAULT_EXPIRATION_OFFSET
=>default_expiration_offset
APNS_DEFAULT_BATCH_SIZE
=>default_batch_size
gcm: Remove
config
argument fromGCMClient
and use individual method parameters as mapped below instead: (breaking change)GCM_API_KEY
=>api_key
pushjack: Remove
pushjack.clients
module. (breaking change)pushjack: Remove
pushjack.config
module. (breaking change)gcm: Rename
GCMResponse.payloads
toGCMResponse.messages
. (breaking change)
- apns: Add new APNS configuration value
APNS_DEFAULT_BATCH_SIZE
and set to100
. - apns: Add
batch_size
parameter to APNSsend
that can be used to overrideAPNS_DEFAULT_BATCH_SIZE
. - apns: Make APNS
send
batch multiple notifications into a single payload. Previously, individual socket writes were performed for each token. Now, socket writes are batched based on either theAPNS_DEFAULT_BATCH_SIZE
configuration value or thebatch_size
function argument value. - apns: Make APNS
send
resume sending from after the failed token when an error response is received. - apns: Make APNS
send
raise anAPNSSendError
when one or more error responses received.APNSSendError
contains an aggregation of errors, all tokens attempted, failed tokens, and successful tokens. (breaking change) - apns: Replace
priority
argument to APNSsend
withlow_priority=False
. (breaking change)
- apns: Improve error handling in APNS so that errors aren't missed.
- apns: Improve handling of APNS socket connection during bulk sending so that connection is re-established when lost.
- apns: Make APNS socket read/writes non-blocking.
- apns: Make APNS socket frame packing easier to grok.
- apns/gmc: Remove APNS and GCM
send_bulk
function. Modifysend
to support bulk notifications. (breaking change) - apns: Remove
APNS_MAX_NOTIFICATION_SIZE
as config option. - gcm: Remove
GCM_MAX_RECIPIENTS
as config option. - gcm: Remove
request
argument from GCM send function. (breaking change) - apns: Remove
sock
argument from APNS send function. (breaking change) - gcm: Return namedtuple for GCM canonical ids.
- apns: Return namedtuple class for APNS expired tokens.
gcm: Add
restricted_package_name
anddry_run
fields to GCM sending.gcm: Add exceptions for all GCM server error responses.
apns: Make
apns.get_expired_tokens
andAPNSClient.get_expired_tokens
accept an optionalsock
argument to provide a custom socket connection.apns: Raise
APNSAuthError
instead ofAPNSError
if certificate file cannot be read.apns: Raise
APNSInvalidPayloadSizeError
instead ofAPNSDataOverflow
. (breaking change)apns: Raise
APNSInvalidTokenError
instead ofAPNSError
.gcm: Raise
GCMAuthError
ifGCM_API_KEY
is not set.pushjack: Rename several function parameters: (breaking change)
- gcm:
alert
todata
- gcm:
token
/tokens
toregistration_id
/registration_ids
- gcm:
Dispatcher
/dispatcher
toGCMRequest
/request
- Clients:
registration_id
todevice_id
- gcm:
gcm: Return
GCMResponse
object forGCMClient.send/send_bulk
. (breaking change)gcm: Return
requests.Response
object(s) forgcm.send/send_bulk
. (breaking change)
- apns: Fix payload key assigments for
title-loc
,title-loc-args
, andlaunch-image
. Previously,'_'
was used in place of'-'
.
- apns: Fix incorrect variable reference in
apns.receive_feedback
.
- pushjack: Fix handling of
config
in clients whenconfig
is a class object and subclass ofConfig
. - apns: Make
apns.send/send_bulk
accept additionalalert
fields:title
,title-loc
,title-loc-args
, andlaunch-image
. - gcm: Make
gcm.send/send_bulk
raise aGCMError
exception ifGCM_API_KEY
is not set. - gcm: Make gcm payload creation cast
data
to dict if isn't not passed in as one. Original value ofdata
is then set to{'message': data}
. (breaking change) - gcm: Make gcm payload creation not set defaults for optional keyword arguments. (breaking change)
- pushjack: Rename
pushjack.settings
module topushjack.config
. (breaking change) - apns/gcm: Allow config settings overrides to be passed into
create_gcm_config
,create_apns_config
, andcreate_apns_sandbox_config
. - pushjack: Override
Config
'supdate()
method with custom method that functions similarly tofrom_object()
except that it accepts adict
instead.
- First release.