| Commit message (Collapse) | Author | Age | Files | Lines |
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The method assertEquals has been deprecated since python 2.7.
http://docs.python.org/2/library/unittest.html#deprecated-aliases
Also in Python 3, a deprecated warning is raised when using assertEquals
therefore we should use assertEqual instead.
Change-Id: Ic99ea3f57bb6fd986ce2626e800e3d310a2e3df7
Closes-Bug: #1218185
|
| |
| |
| |
| |
| |
| |
| | |
These classes will provide a smoother path from python2 -> python3 when
using gear, as it will relieve the need for encoding/decoding.
Change-Id: I93bfe33f898294f30a82c0a24a18a081f9752354
|
|/
|
|
|
|
|
| |
This breaks the API in subtle ways, but only really for people who want
to use Python 3 and/or not utf-8 function names.
Change-Id: If6bfc35d916cfb84d630af59f4fde4ccae5187d4
|
|
|
|
|
|
|
|
|
|
|
|
| |
The line in tox.ini "select=H231" did not add H231 to the list of flake8
checks. It made us only run H231.
Remove the H231 line and then fix the flake8 issues. The most
substantial of these was the shadowing of the queue module with local
variables named queue. Made that one import queue as queue_mod because
changing the variable names in the code was yuckier to look at.
Change-Id: I4a26a20889132f7f4525b17392088dda6bd5bbd2
|
|\ |
|
| |
| |
| |
| | |
Change-Id: I614de364a668b1ae01ad361254fd4afcdfe48051
|
| |
| |
| |
| | |
Change-Id: I16fd6b6debc3171ec9a346be079c32018e5b5f64
|
|\ \ |
|
| |/
| |
| |
| |
| |
| |
| |
| | |
This was an attempt to find a code path that could cause
stopWaitingForJobs to raise an exception. So far, that has failed,
but add this test anyway to exercise some of that code.
Change-Id: I39955fc7250af9b93f336c7c3e0315528bd8d4a9
|
|/
|
|
|
|
|
| |
If we have already performed a shutdown we can prevent exploding when
writing to self.wake_write if we short circuit.
Change-Id: If5352a373d5fa61dd1ee661f4a37976b3447dd9d
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Under python3.4, "" or 'misc' is not a bytearray anymore. Tests for this
type would fail in python3.4, even though the arguments are explicitly
called out as "bytes".
Several test failures in python3.4 are related to byte strings returning
ints and default strings no longer counting as byte strings.
In python3, sort does not take a cmp function but a key function. Also
dict.items() returns a dict_items object which cannot be sorted, but can
be converted into a list().
Also in python3 the crypto.dump_ methods return bytes instead of
strings.
Change-Id: I36fde6475f6cc517c1a9c3c135c28d3ea61e6a4a
|
|
|
|
| |
Change-Id: Ia78a5ba94349830b5e7e9a48dd8eee081fe458ea
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When an SSL socket is in non-blocking mode, EAGAIN is essentially
masked by WANT_READ or WANT_WRITE. So treat EAGAIN, WANT_READ,
and WANT_WRITE as equivalent. The reason for treating them as
equivalent in non-blocking mode is that the following cases can
happen:
While reading, we might get:
SSL_WANT_READ:
This is the same as EAGAIN.
SSL_WANT_WRITE:
We need to wait until the edge poll triggers with POLLOUT
signalling that we can write again. When that happens,
we should retry this read call.
While writing, we might get:
SSL_WANT_READ:
We need to wait until the edge poll triggers with POLLIN
signalling that we can read again. When that happens,
we should retry this write call.
SSL_WANT_WRITE:
This is the same as EAGAIN.
This suggests that any time we receive either of the SSL_WANT
responses, we should wait until either IN or OUT is edge-triggered,
and always attempt to both read and write every time IN or OUT
is triggered.
To do this, mask WANT_READ, WANT_WRITE, and EAGAIN with a new
exception that simply indicates internally to gear to retry the
IO operation after the next poll trigger.
Change-Id: Ib2be2fc97f13a95b4d082a54222013be4ecd4384
|
|
|
|
|
|
|
| |
Exercises the typical lifecycle of a job with a client, worker,
and server.
Change-Id: I2ac80d7a772ab9fe80e1883810d8ab273d4958ee
|
|
|
|
| |
Change-Id: I0ed501df1fa40f481519fe3421eeff5b07afff62
|
|
|
|
|
|
|
| |
recv is updated to correct a bug when transitioning across packets
when in blocking mode, as well as to have more consistent code.
Change-Id: Id1c0e8178e6d79d1bf7972c9dfe18673fd6a033c
|
|
|
|
|
|
| |
Add a unit test for readPacket as used by ServerConnection.
Change-Id: I8117152b2429407b9d41d146facb63fb70a185f7
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The gear server is modified to check an access control list for
certain actions if SSL and ACLs are enabled. Clients and workers
can be granted permission to register and invoke only functions
matching certain regexes, as well as the ability to grant ACLs to
other connections. A connection can always revoke its own access.
ACL entries are checked based on the subject name in the SSL
certificate (which is trustworthy because only certificates signed
by the supplied CA are accepted).
The submitJob method is updated to give up sooner if it is unable
to submit a job to any connected servers (older behavior would busy
loop trying to submit it, but since there are now more scenarios
where a functioning gear server might reject a job, that behavior
seems less desirable).
Docs and tests are updated for the new feature.
Change-Id: I07edfb964bf716df08be86f844061bdad29b9728
|
|
|
|
|
|
|
|
| |
In Client.handleStatusRes the known and complete arguments in STATUS_RES
packets were being compared to integers, they should be compared to
strings.
Change-Id: I170ee12955263065a4adff4221e5bc60015cae70
|
|
|
|
| |
Change-Id: Ifbc78187e29e7befefcfff47b803ff20c86f6e75
|
|
Change-Id: I4fdbc8d6c3073b7edfdc8bf486575820088faa72
|