Alex Willmer
75b9c7255b
Merge pull request #1418 from moreati/msg-repr
...
mitogen: Format Message src & dst as `<context>:<handle>`
2 days ago
Alex Willmer
2403d4570b
mitogen: Format Message src & dst of as <context>:<handle>
...
The notation is inspired by host:port notation in a URL. In Mitogen context id
and handles fill roughly the same role as IP and port in TCP or UDP.
2 days ago
Alex Willmer
ba6e612ec4
mitogen: Fix docstring typo
2 days ago
Alex Willmer
3badddc908
Merge pull request #1415 from moreati/import-diet
...
mitogen: Put fallbacks & polyfills with `if sys.version_info` blocks
4 days ago
Alex Willmer
4d372cb160
mitogen: Last few `except ImportError` -> `if sys.version_info ...`
4 days ago
Alex Willmer
0447950acd
mitogen: Replace uses mitogen.core.{PY24,PY3} with sys.version_info
...
Helps static analysis by type checkers, LSPs, etc.
4 days ago
Alex Willmer
52ec693ef7
mitogen: Provide mitogen.core exception fallbacks based on sys.version_info
...
Simplify work of static type checkers, LSPs, etc.
4 days ago
Alex Willmer
08a3f271f3
mitogen: Provide mitogen.core.{all,any} based on sys.version_info
...
Simplify work of static type checkers, LSPs, etc.
4 days ago
Alex Willmer
9bede962b3
mitogen: Provide mitogen.core.threading* based on sys.version_info
...
Simplify work of static type checkers, LSPs, etc.
4 days ago
Alex Willmer
55bd5fd7a4
mitogen: Provide mitogen.core.next based on sys.version_info
...
Simplify work of static type checkers, LSPs, etc.
4 days ago
Alex Willmer
d1ee8c788f
mitogen: Configure mitogen.core.str_partition etc. based on sys.version_info
...
Simplify work of static type checkers, LSPs, etc.
4 days ago
Alex Willmer
67264ed174
mitogen: Configure mitogen.core.now based on sys.version_info
...
Simplify work of static type checkers, LSPs, etc.
4 days ago
Alex Willmer
94b2f5d8d6
mitogen: Guard importlib imports with sys.version_info
...
Reduce number of doomed mitogen.core.Importer GET_MODULE requests from e.g.
Python 2.x contexts. Simplify work of static type checkers, LSPs, etc.
4 days ago
Alex Willmer
cd58b7eac1
mitogen: Avoid import of linecache on Python >= 2.5
...
It's only needed for a workaround on Python 2.4.
4 days ago
Alex Willmer
384d37f630
mitogen: Use built-in _codecs, eliminate direct import of encodings package
...
The package will still get imported indirectly by _something_, but every
little helps.
4 days ago
Alex Willmer
5011263bf0
mitogen: Use built-in _codecs module to encode latin1
...
Streamlines initilialzation slightly. Next commit will do the same for utf-8.
4 days ago
Alex Willmer
c6d6ea8432
Merge pull request #1411 from moreati/pre-0.3.37
...
Prepare 0.3.37
1 week ago
Alex Willmer
1c5a1a3d72
Begin 0.3.38dev
1 week ago
Alex Willmer
abe3671c7b
Prepare v0.3.37
1 week ago
Alex Willmer
34fddee719
Merge pull request #1410 from moreati/issue1407
...
mitogen: Fix AttributeError in mitogen.profiler
1 week ago
Alex Willmer
0e2da7deb5
mitogen: Fix AttributeError in mitogen.profiler
1 week ago
Alex Willmer
6c81a1b550
Merge pull request #1403 from moreati/issue1398-poc
...
mitogen: Add initial importlib ResourceReader support
1 week ago
Alex Willmer
b7eddf2cdb
mitogen: Add initial support for importlib ResourceReader
...
The new classes are modelled closely on their existing Module* counterparts.
For now I've duplicated the code, once it's bedded in I may refactor it. I
didn't replicate the FORWARD_MODULE plumbing, it didn't seem to be necessary
and may be dead code.
2 weeks ago
Alex Willmer
73f60a3123
Merge pull request #1399 from palfrey/ssl-discovery-with-builtin
...
tests: Handle builtin _ssl module on Linux
3 weeks ago
Tom Parker-Shemilt
4251991c3a
tests: Handle builtin _ssl module on Linux
3 weeks ago
Alex Willmer
492bd2fa1f
Merge pull request #1396 from moreati/prepare-v0.3.36
...
Prepare v0.3.36
4 weeks ago
Alex Willmer
1d62a51810
Begin 0.3.37dev
4 weeks ago
Alex Willmer
4111224161
Prepare v0.3.36
4 weeks ago
Alex Willmer
4952c5635c
Merge pull request #1389 from mhartmay/possible-fix
...
mitogen: first_stage: Break the while loop in case of EOF
4 weeks ago
Marc Hartmayer
8807cd53be
mitogen: first_stage: Break the while loop in case of EOF
...
The current implementation can cause an infinite loop, leading to a process that
hangs and consumes 100% CPU. This occurs because the EOF condition is not
handled properly, resulting in repeated select(...) and read(...) calls.
The fix is to properly handle the EOF condition and break out of the loop when
it occurs.
-SSH command size: 822
+SSH command size: 838
Preamble (mitogen.core + econtext) size: 18226 (17.80KiB)
-mitogen.parent 99062 96.7KiB 51235 50.0KiB 51.7% 12936 12.6KiB 13.1%
+mitogen.parent 99240 96.9KiB 51244 50.0KiB 51.6% 12956 12.7KiB 13.1%
Fixes: https://github.com/mitogen-hq/mitogen/issues/1348
Signed-off-by: Marc Hartmayer <mhartmay@linux.ibm.com>
4 weeks ago
Marc Hartmayer
f5195edf08
first_stage_test: Add more tests
...
+ test_non_blocking_stdin
+ test_blocking_stdin
+ test_premature_eof
+ test_broker_connect_eof_error
+ test_broker_connect_timeout_because_blocking_read(self):
Signed-off-by: Marc Hartmayer <mhartmay@linux.ibm.com>
4 weeks ago
Marc Hartmayer
f7ca6af62d
first_stage_test: Open /dev/zero in binary mode
...
Signed-off-by: Marc Hartmayer <mhartmay@linux.ibm.com>
1 month ago
Marc Hartmayer
0ab5b425d8
first_stage_test: Refactor the test
...
Use testlib.subprocess instead of subprocess and make the test description a
docstring that can be used by the test runner.
Signed-off-by: Marc Hartmayer <mhartmay@linux.ibm.com>
1 month ago
Marc Hartmayer
2d9e90acf9
parent_test: Refactor `wait_for_child`
...
Signed-off-by: Marc Hartmayer <mhartmay@linux.ibm.com>
1 month ago
Marc Hartmayer
fdaf09c4d6
mitogen/parent: Fix typo
...
Signed-off-by: Marc Hartmayer <mhartmay@linux.ibm.com>
1 month ago
Alex Willmer
2398df1159
Merge pull request #1393 from moreati/firststage-linecomments
...
mitogen: Line comments in first stage
1 month ago
Alex Willmer
606a21fb27
mitogen: Add first line comments to _first_stage()
1 month ago
Alex Willmer
733f4bca81
mitogen: Allow line comments in first stage, strip them.
1 month ago
Alex Willmer
9c71a158e7
Merge pull request #1390 from mhartmay/fix-hanging-tests
...
testlib: Fix hanging tests
1 month ago
Marc Hartmayer
0a559ec8d8
testlib: Fix hanging tests
...
When I run
$ MITOGEN_LOG_LEVEL=debug SKIP_ANSIBLE=1 ./run_tests -v -k first_stage_test.CommandLineTest
in a interactive Shell (with a tty), it ends in a hanging process as the
`have_python2` and `have_python3` ends up ends up in an interactive Python
shell. Therefore check the Python version instead.
Signed-off-by: Marc Hartmayer <mhartmay@linux.ibm.com>
1 month ago
Alex Willmer
7be79d05e9
Merge pull request #1013 from moreati/issue1011-blacklist-msg
...
mitogen: Clarify blacklisted import error message
2 months ago
Alex Willmer
ccaaf4b7fe
mitogen: Clarify blacklisted ModuleNotFoundError message
...
Previous phrasing was misleading - it implied a given module was explicitly on
the blacklist, even if it was due to a restrictive whitelist and the blacklist
was empty.
Arguably the blacklist/whitelist semantics are themselves misleading. A
redesign is tempting.
2 months ago
Alex Willmer
073fc48afc
tests: Remove BlacklistTest stubs (covered by ImporterBlacklistTest)
2 months ago
Alex Willmer
e0de4d3b8e
Merge pull request #1386 from moreati/issue1237
...
Tidy ups
2 months ago
Alex Willmer
64a581b2ac
tests: Add Ubuntu 16.04 to image_prep inventory
...
I missed this when committing what built 2025.02 iamges
2 months ago
Alex Willmer
823d1d8b47
docs: Document Ansible 13 (ansible-core 2.20) support
2 months ago
Alex Willmer
9b46882478
ansible_mitogen: Remove a use of ansible.module_utils.six
2 months ago
Alex Willmer
b105877f4d
mitogen: Re-declare Python 2.4 compatibility
...
With CentOS 5 now covered by the Mitogen unit tests I'm content to
reverse/clarify 104865e866
2 months ago
Alex Willmer
fb9efb24ca
Merge pull request #1383 from moreati/prepare-v0.3.35
...
Prepare v0.3.35
2 months ago
Alex Willmer
9ce6a43329
Begin 0.3.36dev
2 months ago