Commit Graph

1298 Commits (b7001f6e0b66c50f154fbe55f6e08b45e49148e9)
 

Author SHA1 Message Date
David Wilson b7001f6e0b docs: remove prerelease caution. 6 years ago
David Wilson 894926cf61 docs: add initial release notes. 6 years ago
David Wilson d493a3d7ca Merge branch 'python3'
Hooray \o/

Remaining issues:

- Two unit test races that appear related to our broken zombie process
  reaping, doesn't impact Ansible.

Closes #16.
6 years ago
David Wilson 0461738ca6 docs: small reference fixes. 6 years ago
David Wilson 692275064b parent: fix TtyLogger str/unicode crash on 3.x. 6 years ago
David Wilson 038f8d5dec master: fix another case where built-in module loader throws ImportError
requests/packages.py just imports urllib3 normally, then makes up new
names for it. pkgutil can't cope with that, and returns the loader
(builtin) for the requests package. The built-in loader obviously can't
find_module() for "requests/packages/urllib3/contrib/pyopenssl" because
it doesn't exist on disk.
6 years ago
David Wilson 3b7a1d4f36 ansible: fix 3.x dependency scanning on OS X
On OS X with case-insensitive filenames, resolving
'ansible.module_utils.facts.base.Hardware' finds
'ansible.module_utils.facts.hardware/__init__.py', because
module_finder's procedure is completely wrong for resolving child
modules. Patch over it for now since it otherwise works for Ansible.
6 years ago
David Wilson 3a8ea930d7 core: fix NameError in Latch.put(), FileService exception 6 years ago
David Wilson 5da371c5dd service: fix UnboundLocalError. 6 years ago
David Wilson 484d4fdb74 core: fix Latch socket sharing race.
If thread A is about to wake as thread B is about to sleep, and A loses
the GIL at an inopportune moment, it was possible for two latches to
share the same socketpair, causing wakeups routed to the wrong latch.

The pair was returned to the 'idle sockets' list before .recv() had been
called. This manifested as TimeoutError() thrown rarely with many active
threads and the host is heavily loaded (such as Travis CI).

Add more documentation and stop writing single wake bytes. Instead the
recipient's identity is written instead, making it simpler to detect
future bugs.
6 years ago
David Wilson a53f2e7137 Update trove classifiers. 6 years ago
David Wilson a74903d59a docs: update compatibility notice on main page. 6 years ago
David Wilson 18c9cd2365 docs: update supported Python version list. 6 years ago
David Wilson ea5a4ed385 tests: use Ansible 2.5.5 by default 6 years ago
David Wilson bd65e50b2f ansible: reduce() does not exist in 3.x. 6 years ago
David Wilson b92545e61a minify: avoid cStringIO use.
On 2.7 it was "accidentally fine" because the buffer object the StringIO
was initialized from happened to look like ASCII, but in 2.6 either
UCS-2 or UCS-4 is used for that buffer, and so the result was junk.

Just use the io module everywhere if we can, falling back to pure-Python
StringIO for Python<2.6.
6 years ago
David Wilson 29f15c236c core: remove needless size prefix from core_src_fd.
I think this is brainwrong held over from an early attempt to write the
duplicate copy of core_src on stdin.
6 years ago
David Wilson 3e73e6ae11 Reenable all Travis Jobs. 6 years ago
David Wilson b21d51be47 ansible: fix test for 3.x. 6 years ago
David Wilson 34751c38b0 ansible: cStringIO interprets unicode as a buffer obj on 2.x 6 years ago
David Wilson 04e138e060 core: fix serialization of empty bytes() on 3.x. 6 years ago
David Wilson dd62009f70 Record ulimit -a in run_test output. 6 years ago
David Wilson b4f4b66679 tests: make cpu_load.py more random. 6 years ago
David Wilson 46ec0ffcaf tests: log original traceback in assertRaises(). 6 years ago
David Wilson ff2f44b046 core: reduce chance of Latch.read()/write()/close() race.
Previously it was possible for a thread to call Waker.defer() after
Broker has torns its Waker down, and the underlying file descriptor
reallocated by the OS to some other component.

This manifested as latches of a subsequent test invocation receiving the
waker byte (' ') rather than their expected byte '\x7f'.

This doesn't fix the problem, it just significantly reduces the chance
of it occurring. In future Side.write()/read()/close() must be
synchronized with a lock.

Previously the problem could be reliably triggered with:

    while :; do
        python tests/call_function_test.py -vf CallFunctionTest.{test_aborted_on_local_broker_shutdown,test_aborted_on_local_context_disconnect}
    done
6 years ago
David Wilson 3e48f95439 tests: import cpu_load.py. 6 years ago
David Wilson e24eddb1ce core: move Latch docs back inline. 6 years ago
David Wilson 7ff9d573b6 tests: remove stray enable_debug() 6 years ago
David Wilson 42276f158b core: log the data received on the latch file handle. 6 years ago
David Wilson 970f54de85 service: remove stray debug 6 years ago
David Wilson caa648b1ea utils: handle duplicate log_to_file() calls. 6 years ago
David Wilson 8791d40081 parent: tidy up call_async() logging. 6 years ago
David Wilson 1f6c47554a examples: update mitogen-fuse.py for 3.x. 6 years ago
David Wilson 4ff47d6a93 parent: more 2/3x format fixes 6 years ago
David Wilson a52064a24f core: reordered find_module() test was broken (again)
e81b3bd0652b5eb125eb224ceca281b9d540dd5e

The whitelist check must happen /after/ the other checks, otherwise we
unconditionally retunr self for crap like 'ansible.module_utils.json'.
6 years ago
David Wilson 24ecfb3b13 Fix setns.py syntax for 3.x 6 years ago
David Wilson 90f2f823db tests: remove stray hard-coded interpreter. 6 years ago
David Wilson 9e3e02fb65 tokenize must parse under 3.x even if it won't run there
To support 3.x parent 2.x child
6 years ago
David Wilson 6b4e047017 tests: 3.x parent_test fixes. 6 years ago
David Wilson 6cbf34d5fe tests: another smattering of 3.x type/API fixes. 6 years ago
David Wilson 0422a8c263 parent: python_path setting depends on local or remote
For local, we want to default to the same Python version as the current
process. For remote, we want whatever is on offer.
6 years ago
David Wilson db529e8228 core: fix Receiver.__iter__ regression on EOF 6 years ago
David Wilson 0eb77b5f7c utils: always enable microsecond logging.
It's too useful, and the logs are fairly out of control already, may as
well just capture everything in the first pass.
6 years ago
David Wilson 7697861011 tests: skip one test that triggers bug in ancient vendered six.py 6 years ago
David Wilson c141dd10ec master: fix resolve_relpath()
looks like this was just as broken on 2.x, and suddenly we're
finding a bunch more legit Django deps. It seems anywhere
absolute_import appeared in 2.x, we skipped some imports.
6 years ago
David Wilson b0404bef40 tests: fix get_module_via_* encoding issues 6 years ago
David Wilson 9903692811 master: update scan_code_imports to cope with wordcode
Constant-sized opcodes were introduced as an optimization in Python 3.6.
See https://bugs.python.org/issue26647
6 years ago
David Wilson 9fb2371d64 importer: reorder/tweak find_module() tests to cope with six.moves
The old hack on the master side we had is broken for some reason on 3.x.
Instead tweak the client to be more selective: if a request is for a
module within a package, the package must be loaded (in sys.modules),
and its __loader__ must be us. Previously if the module didn't exist in
sys.modules, we'd still try to fetch from the master, which doesn't
appear to ever make sense.
6 years ago
David Wilson 826c477061 tests: built-in exceptions live in a different module in 3.x 6 years ago
David Wilson cbcd8267d1 tests: must decode() zlib result for 3.x. 6 years ago