Skip to content

Conversation

@mosquito
Copy link
Owner

No description provided.

Copy link
Collaborator

@decaz decaz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mosquito I guess that

PAMQP_EXCEPTIONS = (pamqp.exceptions.PAMQPException,) + tuple(
pamqp.specification.ERRORS.values(),
)
CONNECTION_EXCEPTIONS = (
RuntimeError,
ConnectionError,
OSError,
AMQPError,
) + PAMQP_EXCEPTIONS
should be rewritten as the following:

CONNECTION_EXCEPTIONS = (
    RuntimeError,
    ConnectionError,
    OSError,
    AMQPError,
    pamqp.exceptions.PAMQPException,
)

)
PAMQP_EXCEPTIONS = (pamqp.exceptions.PAMQPException,)

CONNECTION_EXCEPTIONS = (
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think ConnectionError can be removed because it inherits OSError which is already exists here.


import aiormq
import aiormq.types
from pamqp import commands
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In other files you are making import pamqp.commands, - I think it worth to do the same here so that it'll be the same everywhere.

@decaz
Copy link
Collaborator

decaz commented Dec 17, 2020

@mosquito from pamqp's changelog: Changed pamqp.decode.timestamp to return a datetime.datetime instance instead of time.struct_time..

So I guess all helpers (encode_timestamp and decode_timestamp) can be removed, isn't it?

@mosquito mosquito added this to the 7.0 milestone Mar 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants