Commit Graph

1360 Commits

Author SHA1 Message Date
David Wilson 6b4e047017 tests: 3.x parent_test fixes. 2018-07-07 14:55:47 +01:00
David Wilson 6cbf34d5fe tests: another smattering of 3.x type/API fixes. 2018-07-07 14:55:47 +01:00
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.
2018-07-07 14:55:47 +01:00
David Wilson db529e8228 core: fix Receiver.__iter__ regression on EOF 2018-07-07 14:55:47 +01:00
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.
2018-07-07 14:55:47 +01:00
David Wilson 7697861011 tests: skip one test that triggers bug in ancient vendered six.py 2018-07-07 14:55:47 +01:00
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.
2018-07-07 14:55:47 +01:00
David Wilson b0404bef40 tests: fix get_module_via_* encoding issues 2018-07-07 14:55:47 +01:00
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
2018-07-07 14:55:47 +01:00
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.
2018-07-07 14:55:47 +01:00
David Wilson 826c477061 tests: built-in exceptions live in a different module in 3.x 2018-07-07 14:55:47 +01:00
David Wilson cbcd8267d1 tests: must decode() zlib result for 3.x. 2018-07-07 14:55:47 +01:00
David Wilson ec176bf1f8 tests: unittest2 import behaviour appears to differ between 2/3.
In 2 the module is loaded as __main__
In 3 it has its actual name.
2018-07-07 14:55:47 +01:00
David Wilson 410016ff47 Initial Python 3.x port work.
* ansible: use unicode_literals everywhere since it only needs to be
  compatible back to 2.6.
* compat/collections.py: delete this entirely and rip out the parts of
  functools that require it.
* Introduce serializable Kwargs dict subclass that translates keys to
  Unicode on instantiation.
* enable_debug_logging() must set _v/_vv globals.
* cStringIO does not exist in 3.x.
* Treat IOLogger and LogForwarder input as latin-1.
* Avoid ResourceWarnings in first stage by explicitly closing fps.
* Fix preamble_size.py syntax errors.
2018-07-07 14:55:47 +01:00
David Wilson 0aba88dd8b docs: promote contributors.rst 2018-07-06 00:29:23 +01:00
dw fca14339bd
Merge pull request #293 from dw/dmw2
docs: update & link in contributors page.
2018-07-06 00:20:40 +01:00
David Wilson e26f3d7907 docs: update & link in contributors page. 2018-07-06 00:18:58 +01:00
dw 87d309c6f1
Merge pull request #292 from dw/dmw2
docs: change install docs to point at stable branch.
2018-07-06 00:08:48 +01:00
David Wilson 6632f682da docs: change install docs to point at stable branch. 2018-07-06 00:08:10 +01:00
David Wilson cb595b30d4 issue #16: rearrange Travis matrix and add Python 3.6 target for core tests 2018-06-25 02:40:01 +01:00
dw 906bc91fab
Merge pull request #287 from dw/issue275
Issue275
2018-06-25 01:37:35 +01:00
David Wilson 8b398e797e issue #275: bump ansible to 2.5.5 2018-06-25 01:36:55 +01:00
David Wilson 3a304b2458 issue #275: su: add CentOS 6 style su failure 2018-06-25 01:36:53 +01:00
David Wilson fb8bad934b issue #275: Don't use -U in ansible_tests.sh -- forces paramiko upgrade 2018-06-25 01:36:50 +01:00
David Wilson 4f57c59b7e issue #275: Don't run virtualnv test on 2.6. 2018-06-25 01:36:48 +01:00
David Wilson b7eb96d116 issue #275: tests: don't explicitly specify interpreter path. 2018-06-25 01:36:46 +01:00
David Wilson 1cb084061c issue #275: Pin paramiko to a v2.6-compatible version. 2018-06-25 01:36:44 +01:00
David Wilson cec564654e issue #275: tests: fix module_finder_test for 2.6. 2018-06-25 01:36:41 +01:00
David Wilson 4be8afa3d3 issue #275: tests: fix test_simple for 2.6. 2018-06-25 01:36:39 +01:00
David Wilson 7b84a2c2e4 issue #275: tests: use same EC0_MARKER as parent.py 2018-06-25 01:36:36 +01:00
David Wilson 6e0883f369 issue #275: tests: fix bug in 2.6 compat check_output(), ignore it for >2.6. 2018-06-25 01:36:33 +01:00
David Wilson d6126a9516 issue #275: parent/ssh: centralize EC0_MARKER and change it for ssh.py.
Must maintain a minimum buffer length prior to deciding whether we have
an interesting token, and 'EC0' is too short for that.
2018-06-25 01:36:31 +01:00
David Wilson 84fa3ff024 issue #275: ssh: state machine-ish filter_debug() 2018-06-25 01:36:28 +01:00
David Wilson fbd5837cf2 issue #275: parent: use TIOCSCTTY on Linux too.
This appears to be harmless, except for Python 2.6 on Linux/Travis,
where for some reason (some stdlib change?) simply opening the TTY is
insufficient.
2018-06-25 01:36:24 +01:00
David Wilson 83617ad192 issue #275: tests: cache virtualenvs too 2018-06-25 01:36:19 +01:00
David Wilson e5d02b948b issue #275: travis: run_tests with -vvv 2018-06-25 01:36:11 +01:00
David Wilson 60ad75f436 issue #275: Tidier SSH debug logging. 2018-06-25 01:36:08 +01:00
David Wilson 3b1cc3676c issue #275: ssh_debug_level=3 for tests 2018-06-25 01:36:04 +01:00
David Wilson 6d618593f3 issue #275: Python 2.6 reports linux as 'linux3'. 2018-06-25 01:35:49 +01:00
David Wilson e0c116a29f issue #275: logging package uses classic classes in 2.6. 2018-06-25 01:35:46 +01:00
David Wilson 1d04a99adb issue #275: missing check_output() call 2018-06-25 01:35:36 +01:00
David Wilson 4649e11da3 issue #275: Travis build matrix from hell.
dev_requirements.txt:
- drop debops, it's not available for Python2.6
2018-06-25 01:35:14 +01:00
David Wilson cfd2887292 issue #275: default to 'python' for default remote interpreter.
So we get 2.4/2.5/2.6/2.7/3.x.
2018-06-24 21:12:34 +01:00
David Wilson 38d69a6ecd issue #275: tests: drop docker client dep, doesn't run on 2.6. 2018-06-24 21:12:34 +01:00
David Wilson b38318dfec issue #275: build for centos 6 too (python2.6) 2018-06-24 21:12:34 +01:00
dw 58335ab48e
Merge pull request #285 from dw/issue272
issue #272: add a blacklist for noisy target loggers
2018-06-23 20:53:01 +01:00
David Wilson 6025412050 issue #272: add a blacklist for noisy target loggers 2018-06-23 20:11:22 +01:00
dw 0cb9335cde
Merge pull request #284 from dw/issue277
issue #277: core: move Darwin versioner check into first stage
2018-06-23 20:06:04 +01:00
David Wilson 884a72ee86 issue #277: core: move Darwin versioner check into first stage
The 'versioner.c' dodging check added in 0ef23d86 was wrong, since the
check occurred on the host machine, when the fix actually needs to apply
to the Darwin target.

Fixes ability to target OS X from a Red Hat controller, manifesting as
an error like:

    D mitogen: mitogen.parent.TtyLogStream('local.2472'):  'python(mitogen:dmw@localhost.localdomain:2449): realpath couldn\'t resolve "/usr/bin/python(mitogen:dmw@localhost.localdomain:2449)"'

The "realpath couldn't resolve" error comes from versioner.c:

    https://opensource.apple.com/source/perl/perl-104/versioner/versioner.c
2018-06-23 19:54:44 +01:00
dw c1d70b6ea9
Merge pull request #283 from dw/recv-race
core: race during Receiver construction.
2018-06-23 19:30:42 +01:00