Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion awsimple/__version__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
__application_name__ = "awsimple"
__title__ = __application_name__
__author__ = "abel"
__version__ = "7.1.4"
__version__ = "7.1.5"
__author_email__ = "j@abel.co"
__url__ = "https://github.com/jamesabel/awsimple"
__download_url__ = "https://github.com/jamesabel/awsimple"
Expand Down
8 changes: 4 additions & 4 deletions awsimple/pubsub.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ class _PubSub(Thread):
def __init__(
self,
channel: str,
node_name: str,
node_name: str | None,
sub_callback: Callable | None,
use_sub_queue: bool,
profile_name: Union[str, None],
Expand All @@ -164,7 +164,7 @@ def __init__(
:param use_sub_queue: If True, use an internal queue to store received messages. If False, messages must be handled by the callback function. Default is False.
"""
self.channel = AWS_RESOURCE_PREFIX + make_name_aws_safe(channel) # prefix with ps (pubsub) to avoid collisions with other uses of SNS topics and SQS queues
self.node_name = node_name
self.node_name = get_node_name() if node_name is None else node_name
self.sqs_queue_name = AWS_RESOURCE_PREFIX + make_name_aws_safe(self.channel, self.node_name)
self.sub_callback = sub_callback
self.use_sub_queue = use_sub_queue
Expand Down Expand Up @@ -304,7 +304,7 @@ class Pub(_PubSub):
def __init__(
self,
channel: str,
node_name: str = get_node_name(),
node_name: str | None = None,
profile_name: Union[str, None] = None,
aws_access_key_id: Union[str, None] = None,
aws_secret_access_key: Union[str, None] = None,
Expand Down Expand Up @@ -334,7 +334,7 @@ class Sub(_PubSub):
def __init__(
self,
channel: str,
node_name: str = get_node_name(),
node_name: str | None = None,
sub_callback: Callable | None = None,
profile_name: Union[str, None] = None,
aws_access_key_id: Union[str, None] = None,
Expand Down
2 changes: 1 addition & 1 deletion test_awsimple/test_serializable.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def test_make_serializable():
assert serial_values["a"] == "a"
assert serial_values["b"] == "b"
image_size = len(serial_values["image"])
assert image_size == 141233 or image_size == 140065 # depending on the version of Pillow
assert 140065 <= image_size <= 141661 # depending on the version of Pillow
assert serial_values["binary"] == "b'\\x00\\x01'"
assert isinstance(serial_values["ni"], int)
assert isinstance(serial_values["nbi"], float) # ends up being a float, even though we'd prefer it as an int
Expand Down