In _safe_log it uses recursive closure. The gc can not free stack for
this recursive closure for cycle-reference. So cut down the cycle
to fix it.
Resolved-bug: #1365892
Change-Id: I05fbd7091b886344d76b172a5ad66d9225599d69
Instead of the lambda method _ the method should be imported
from oslo.messaging.openstack.common.gettextutils.
Change-Id: I373337cc1227b0d7b7bf93603b53a64de83721a9
There are files containing string format arguments inside
logging messages. Using logging function parameters should
be preferred.
Change-Id: I4a7ce6916aefb2f2d445f0ebd977c824b1c51e24
Partial-Bug: #1321274
This patch removes some common helper method/class.
Because they are not used anymore by current amqpdriver.
Change-Id: I183750e158e05cf1d0b5e37725676d4882e0c043
Follow oslo.config style guide for help strings better to create
consistent help strings:
* Capitalize first word of each help string
* Finish help strings with "."
Change-Id: Ia08fa09593661e6e5b834d98bbd92689c2674075
dict.iteritems() was replaced with dict.items() in Python 3. Use the
six.iteritems() function to get code compatible with Python 2 and Python 3.
Change-Id: I0c8ecc3ae540ffaf4c6b159e09ca16ccf365973d
Builtin exceptions are now in the builtins module, the exceptions module has
been removed.
Fix also the unit test for tracebacks, Unicode representation doesn't start
with "u" prefix anymore (u'...').
Change-Id: I422be457e23066699950c9a3999878ecf65f1b3f
In Python 3, some data structures' attribute is different in Python 2.
See http://pythonhosted.org/six/#object-model-compatibility
This is change mapping:
six Python 2 Python 3
six.next(it) it.next() next(it)
six.iterkeys(dict) dict.iterkeys() dict.keys()
six.itervalues(dict) dict.itervalues() dict.values()
Implements: blueprint make-python3-compatible
Change-Id: Ida48f39ff230860feee7305b93b134c625a21663
No need to set tabstop 189 times, this can be set in your vimrc file
instead. Also if set incorrectly gate (pep8 check) will catch your
mistakes.
Change-Id: Ic6f0c0ef94e8194a5c121598305d1ec3c74e4843
This removes a few import and global variables that are not used through
the code. That cleans things a little.
Change-Id: I7b30bb11e8ad3c2df01ca2107eff2444feed3fe2
Currently we have a allowed_rpc_exception_modules configuration variable
which we use to configure a per-project list of modules which we will
allow exceptions to be instantiated from when deserializing remote
errors.
It makes no sense for this to be user configurable, instead the list of
modules should be set when you create a transport.
Closes-Bug: #1031719
Change-Id: Ib40e92cb920996ec5e8f63d6f2cbd88fd01a90f2
If a remote endpoint raises an exception which the client is not allowed
to (or cannot) deserialize, then RPCClient.call() raises a RemoteError
exception instead.
Make this exception type part of the public API.
Change-Id: I70be0ab7d40af3224d93d6bd0522c1a82f6303c3
These are pretty comprehensive tests for the exception serialization
code. The code itself code do with a bunch of refactoring, but that will
come later.
The main TODO item is that we need a way for users of the API to
register the list of modules that it wants to allow exceptions to be
deserialized from. There is no need for this to be an end-user
configuration option, but we do need each service to be able to specify
its own list.
Change-Id: Ib2fc3f1ca5da708b41bdc00e8ac6ce0c92399ce8
We don't have any infrastructure for localizations in oslo.messaging
so using this is pointless right now. I'm also generally not convinced
we want to translate any of the strings in this library anyway.
For now, just add a dummy _() function. We can can unmark the strings
later.
Change-Id: I1b6a698ee5558c50dc5eafee1f5f05ee2570435e
This means we no longer set the request context for the current thread
so that it can be used in logging.
We do need to add this back later, but it might be in the form of a
get_current_context() method.
Change-Id: I3f08a85e2019affddec829e2ea008b5c10707660
I want to make it absolutely clear what changes we're making from the
original driver code, so let's start with a pristine copy.
Change-Id: I38507382b1ce68c7f8f697522f9a1bf00e76532d