| Commit message (Collapse) | Author | Age | Files | Lines |
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
`ssl.wrap_socket` is deprecated since python 3.7 and since python 3.2
and 2.7.9 (released in 2014) it is recommended to use the
SSLContext.wrap_socket() instead of wrap_socket(). The top-level
function is limited and creates an insecure client socket without server
name indication or hostname matching [1].
Python 2.7 is now officially unmaintained, latest version of
python 2.7 is 2.7.18, py-amqp only support python versions who are compatible
with these changes [2].
These changes move away from `ssl.wrap_socket` by using
now `ssl.SSLContext.wrap_socket` [3].
[1] https://docs.python.org/3/library/ssl.html#ssl.wrap_socket
[2] https://github.com/celery/py-amqp/blob/master/setup.py#L24,L29
[3] https://docs.python.org/3/library/ssl.html#ssl.SSLContext.wrap_socket
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
| |
I have a microservice=y project where I'm using py-amqp extensively. In the development environment I would guesstimate that 90% of the debug logs from these services are from `amqp.connection.Connection.heartbeat_tick`.
I still want to see all the other debug output, but selectively filter out the heartbeat debug from my own code via
`logging.getLogger('amqp.connection.Connection.heartbeat_tick').setLevel(logging.INFO)`.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
In some possible case a connection can be closed (network issue, etc...) and
then channels reset to None, in this case if the client use
the on_inbound_method then we can facing a TypeError exception.
The `on_inbound_method` is not enough safer and then this method can
try to get channel from a none existing object.
In this case we need to raise a `RecoverableConnectionError` to allow client
to re-connect properly and re-init objects properly.
|
| |
|
|
| |
closing (#280)
|
| |
|
|
|
|
|
|
|
|
|
|
| |
* Don't revive channel when connection is closing
* When connection is closing dont raise error when Channel.Close method is received
* Added unitests
* Fix flake8
* Fix typo
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Handle negative acknowledgments sent by RMQ
* Make flake8 happy
* Update documentation
* Fix redundant parameter in _on_basic_nack + added unittests
* Increase coverage of unittests
* Move MessageNacked to exceptions.py
* Make flake8 happy
* Make flake8 happy
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
exception (#210)
* If there is an exception raised on Connection.connect or Connection.close,
ensure that the underlying transport socket is closed
* Added more informative message for exception
* Fix code style to satisfy travis checks
* Fix code style to satisfy travis checks
* Provided more informative exception message when remote unexpectedly hangs up
* Test the setting of SO_RCVTIMEO, SO_SNDTIMEO
* callback is soley invoked when connected
From the unit tests, I gleened that the callback should only be invoked
when Connection.connected is true
* Code style fixes
* Code style fixes
* Code style fixes
* Code fix, wrap line continuation differently
* Added three tests to improve coverage
Test to ensure connect is idempotent. Tests to confirm EOF behavior.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Added EXTERNAL SASL implementation.
* Added EXTERNAL to authentication methods.
* Adjusted tests.
* Consider login_method parameter, accept empty userid and password where inapplicable.
* Added test for login_method.
* Style fixes.
* Added SASL tests.
* More detailed connection tests.
* Inserted line breaks.
* Added one more login_method test.
* Added missing word in comment.
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
| |
* Convert mechanisms to bytes if it is a string
* Make linter happy.
* Fix apicheck while we're here.
|
| |
|
|
|
|
|
|
| |
* Drain events should read until message is ready
* return true if we're done with frame=1
* freeze pydocstyle at 1.1.1
|
| |
|
|
| |
avoid AttributeError if collect is called and no channels exist.
can occur if collect called twice.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Refactored to make authn modular; added GSSAPI
* Getting tests passing again
* Add missing __future__ import to new source file
* Made it more obvious that login_method/login_response not heeded
However, we could create a SASL subclass that provides the functionality
for backwards compatibility.
* Also try PLAIN if we're given a userid/password.
* Squashing flakes
* Reimplemented login_method/login_response; flake fixing
* An extra test; deflaking
* Remove a blank line to sate flake8. Great.
* SASL tests!
Also wrapped getting GSSAPI mech impl in a function, so we can test it
with and without a `gssapi` module present.
* Fixing tests
I'd misnamed my test class while debugging something, and not reverted
it. Now the new tests are being run, another mistake appeared, now
fixed.
* More tests for the coverage gods
* Attempt GSSAPI (but don't fail hard), and use userid
This adds fail_soft and client_name arguments to GSSAPI, so that:
* amqp.connection can add GSSAPI to its default list of auth mechanisms,
but not fail if the gssapi module isn't available, or if GSSAPI
credentials aren't available
* A user can use userid to specify which GSSAPI client credentials
should be used.
Authentication mechanisms can also now return NotImplemented if they
decline to do SASL negotiation at start() time.
* Added another test for GSSAPI client name explicitly specified
* Make pydocstyle happy.
* Improving test coverage
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* do not reconnect on collect
collect is called to cleanup when there is a connection error but
the backward compatibility code to connect when transport is called
gets triggered. this doesn't seem right as this should be handled by
ensure_connection.
* do not reconnect on collect
collect is called to cleanup when there is a connection error but
the backward compatibility code to connect when transport is called
gets triggered. this doesn't seem right as this should be handled by
ensure_connection.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |\ |
|
| | |
| |
| |
| |
| |
| |
| | |
This change allows to set the TCP options for the sockets used by
transport class. The socket options are passed as a dictionary where the
key is the name of the option and the value is set as option value. At
the moment we support just options for the TCP level.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
This change allows to set socket options.
It's up to the user to pass the options as tuple of tuples, where each
tuple is in the form of (family, option, value).
Please note that if the values passed in the tuple are not correct no
excetion are managed by the new code but every error is propagated to
the caller.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This change allows to set some TCP socket options during the creation of
the transport.
The parameters exposed are:
- TCP_KEEPIDLE
- TCP_KEEPINTVL
- TCP_KEEPCNT
Those values can be set passing a dictionray where the key is the name of
the parameter we want to set.
The names of the keys are the ones reported above.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
if the rabbitmq-server's host crush, the consumer will not receive
'socket close' until 7200 seconds elapsed (os default value), so the
consumer cann't receive any message while in 7200 seconds.
the patch add keealive options, so we can set short keepalive_idle to
avoid it.
|
| | | |
|