Compare commits
132 Commits
| Author | SHA1 | Date |
|---|---|---|
|
|
7be79d05e9 | 13 hours ago |
|
|
ccaaf4b7fe | 14 hours ago |
|
|
073fc48afc | 14 hours ago |
|
|
e0de4d3b8e | 1 day ago |
|
|
64a581b2ac | 1 day ago |
|
|
823d1d8b47 | 1 day ago |
|
|
9b46882478 | 1 day ago |
|
|
b105877f4d | 1 day ago |
|
|
fb9efb24ca | 3 days ago |
|
|
9ce6a43329 | 3 days ago |
|
|
4af6a75278 | 3 days ago |
|
|
be3d496110 | 3 days ago |
|
|
699a8ebfb5 | 5 days ago |
|
|
abb77e77e1 | 7 days ago |
|
|
19938ec05a | 7 days ago |
|
|
8e6a93dd0f | 7 days ago |
|
|
682faf85fc | 1 week ago |
|
|
83b6cdb616 | 1 week ago |
|
|
f191f050bf | 1 week ago |
|
|
f556ec12b1 | 1 week ago |
|
|
a208daa461 | 1 week ago |
|
|
14e8334705 | 1 week ago |
|
|
1fe55f1c67 | 1 week ago |
|
|
e0103eb66c | 1 week ago |
|
|
e044893a88 | 1 week ago |
|
|
1cbd1777bc | 1 week ago |
|
|
0bafbd501c | 1 week ago |
|
|
f0a83168bf | 1 week ago |
|
|
15b2619fb2 | 1 week ago |
|
|
5c9abeda94 | 1 week ago |
|
|
006d497c25 | 1 week ago |
|
|
9609437262 | 1 week ago |
|
|
7eabcc61c1 | 1 week ago |
|
|
017de4c8e1 | 1 week ago |
|
|
7996a03a37 | 1 week ago |
|
|
5b6b076c4e | 1 week ago |
|
|
4ecafc564d | 1 week ago |
|
|
56dce28906 | 1 week ago |
|
|
ff973775ce | 1 week ago |
|
|
5ffdbb5999 | 1 week ago |
|
|
01e24f9ddf | 1 week ago |
|
|
22e7046cf6 | 1 week ago |
|
|
cc8a39864d | 1 week ago |
|
|
40fbfe58fc | 1 week ago |
|
|
b353980699 | 1 week ago |
|
|
3fe9b9bd87 | 1 week ago |
|
|
cfbb7f884e | 1 week ago |
|
|
a1b5d4941e | 1 week ago |
|
|
e32c90a63e | 1 week ago |
|
|
a143787c02 | 1 week ago |
|
|
bcc726d3b7 | 1 week ago |
|
|
780f8af1a4 | 1 week ago |
|
|
d1c4217db0 | 1 week ago |
|
|
09b972e96e | 1 week ago |
|
|
509c572682 | 2 weeks ago |
|
|
c9eb6e54e2 | 2 weeks ago |
|
|
4a442f503e | 2 weeks ago |
|
|
e52132c89b | 2 weeks ago |
|
|
f966b3e5c6 | 2 weeks ago |
|
|
7c9c38325d | 2 weeks ago |
|
|
5da56f577c | 2 weeks ago |
|
|
734047e1cc | 2 weeks ago |
|
|
8b29846990 | 2 weeks ago |
|
|
61a7fa1fee | 2 weeks ago |
|
|
28ea4780db | 2 weeks ago |
|
|
36f7cee2d1 | 2 weeks ago |
|
|
9a2e600317 | 2 weeks ago |
|
|
2cc507a6de | 2 weeks ago |
|
|
db63dd1def | 3 weeks ago |
|
|
cab024a6fc | 3 weeks ago |
|
|
aea028f175 | 3 weeks ago |
|
|
df890459c5 | 3 weeks ago |
|
|
847f34c17d | 3 weeks ago |
|
|
83c5ab1900 | 4 weeks ago |
|
|
3b7a75dfaf | 4 weeks ago |
|
|
191abd492a | 4 weeks ago |
|
|
408946adbe | 4 weeks ago |
|
|
fdb5c62532 | 4 weeks ago |
|
|
e4e82f53a1 | 4 weeks ago |
|
|
77b7a31949 | 4 weeks ago |
|
|
69a5cdce1b | 4 weeks ago |
|
|
85069b28cd | 4 weeks ago |
|
|
2305446ab8 | 1 month ago |
|
|
c72acfd966 | 1 month ago |
|
|
1e90ff25ee | 1 month ago |
|
|
48243724a0 | 1 month ago |
|
|
24745183ed | 1 month ago |
|
|
dad28e8b4a | 1 month ago |
|
|
3c648f7df8 | 1 month ago |
|
|
01baec8347 | 1 month ago |
|
|
85f0c33dc5 | 1 month ago |
|
|
8f66aa5fcd | 1 month ago |
|
|
6145508312 | 1 month ago |
|
|
9701424be0 | 1 month ago |
|
|
7d5f63ccbf | 1 month ago |
|
|
3338a651a6 | 3 months ago |
|
|
6071fb58c9 | 3 months ago |
|
|
e670bf0ebd | 3 months ago |
|
|
f6451bf795 | 3 months ago |
|
|
090952a987 | 3 months ago |
|
|
d27275ad46 | 3 months ago |
|
|
1b00ca2581 | 3 months ago |
|
|
f4f646a00a | 3 months ago |
|
|
b03c1f3d87 | 3 months ago |
|
|
9f9b37d1ad | 3 months ago |
|
|
f6902dd05d | 3 months ago |
|
|
2736f38c4b | 3 months ago |
|
|
59d5d74abd | 3 months ago |
|
|
36569792bc | 4 months ago |
|
|
85d6046f2f | 4 months ago |
|
|
c508bfb58b | 4 months ago |
|
|
76f6eb741d | 4 months ago |
|
|
3dfaf83ce7 | 4 months ago |
|
|
936b08dd08 | 4 months ago |
|
|
30d8a38a3b | 4 months ago |
|
|
e4e2c6caaf | 4 months ago |
|
|
5abdde1117 | 4 months ago |
|
|
dc7fae973b | 4 months ago |
|
|
885c6de65e | 4 months ago |
|
|
07d1078010 | 4 months ago |
|
|
154331e455 | 4 months ago |
|
|
b8d3f86b12 | 4 months ago |
|
|
0e5f47f145 | 4 months ago |
|
|
3093d0bb2d | 4 months ago |
|
|
2fd88298ae | 4 months ago |
|
|
1386529493 | 4 months ago |
|
|
618eccc0f3 | 4 months ago |
|
|
9e3377c0a8 | 4 months ago |
|
|
e3241912f7 | 4 months ago |
|
|
9b6fc117f9 | 4 months ago |
|
|
4cad51a629 | 4 months ago |
|
|
7fb7567809 | 4 months ago |
@ -0,0 +1,13 @@
|
|||||||
|
# shellcheck shell=bash
|
||||||
|
|
||||||
|
# Tox environment name -> Python executable name (e.g. py312-m_mtg -> python3.12)
|
||||||
|
toxenv-python() {
|
||||||
|
local pattern='^py([23])([0-9]{1,2}).*'
|
||||||
|
if [[ $1 =~ $pattern ]]; then
|
||||||
|
echo "python${BASH_REMATCH[1]}.${BASH_REMATCH[2]}"
|
||||||
|
return
|
||||||
|
else
|
||||||
|
echo "${FUNCNAME[0]}: $1: environment name not recognised" >&2
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
}
|
||||||
@ -0,0 +1,33 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
set -o errexit -o nounset -o pipefail
|
||||||
|
|
||||||
|
INDENT=" "
|
||||||
|
POSSIBLE_PYTHONS=(
|
||||||
|
python
|
||||||
|
python2
|
||||||
|
python3
|
||||||
|
/usr/bin/python
|
||||||
|
/usr/bin/python2
|
||||||
|
/usr/bin/python3
|
||||||
|
# GitHub macOS 12 images: python2.7 is installed, but not on $PATH
|
||||||
|
/Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7
|
||||||
|
)
|
||||||
|
|
||||||
|
for p in "${POSSIBLE_PYTHONS[@]}"; do
|
||||||
|
echo "$p"
|
||||||
|
if [[ ${p:0:1} == "/" && -e $p ]]; then
|
||||||
|
:
|
||||||
|
elif type "$p" > /dev/null 2>&1; then
|
||||||
|
type "$p" 2>&1 | sed -e "s/^/${INDENT}type: /"
|
||||||
|
else
|
||||||
|
echo "${INDENT}Not present"
|
||||||
|
echo
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
|
||||||
|
$p -c "import sys; print('${INDENT}version: %d.%d.%d' % sys.version_info[:3])"
|
||||||
|
# macOS builders lack a realpath command
|
||||||
|
$p -c "import os.path; print('${INDENT}realpath: %s' % os.path.realpath('$(type -p "$p")'))"
|
||||||
|
$p -c "import sys; print('${INDENT}sys.executable: %s' % sys.executable)"
|
||||||
|
echo
|
||||||
|
done
|
||||||
@ -1,33 +0,0 @@
|
|||||||
---
|
|
||||||
name: Mitogen 0.2.x bug report
|
|
||||||
about: Report a bug in Mitogen 0.2.x (for Ansible 2.5, 2.6, 2.7, 2.8, or 2.9)
|
|
||||||
title: ''
|
|
||||||
labels: affects-0.2, bug
|
|
||||||
assignees: ''
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
Please drag-drop large logs as text file attachments.
|
|
||||||
|
|
||||||
Feel free to write an issue in your preferred format, however if in doubt, use
|
|
||||||
the following checklist as a guide for what to include.
|
|
||||||
|
|
||||||
* Which version of Ansible are you running?
|
|
||||||
* Is your version of Ansible patched in any way?
|
|
||||||
* Are you running with any custom modules, or `module_utils` loaded?
|
|
||||||
|
|
||||||
* Have you tried the latest master version from Git?
|
|
||||||
* Do you have some idea of what the underlying problem may be?
|
|
||||||
https://mitogen.networkgenomics.com/ansible_detailed.html#common-problems has
|
|
||||||
instructions to help figure out the likely cause and how to gather relevant
|
|
||||||
logs.
|
|
||||||
* Mention your host and target OS and versions
|
|
||||||
* Mention your host and target Python versions
|
|
||||||
* If reporting a performance issue, mention the number of targets and a rough
|
|
||||||
description of your workload (lots of copies, lots of tiny file edits, etc.)
|
|
||||||
* If reporting a crash or hang in Ansible, please rerun with -vvv and include
|
|
||||||
200 lines of output around the point of the error, along with a full copy of
|
|
||||||
any traceback or error text in the log. Beware "-vvv" may include secret
|
|
||||||
data! Edit as necessary before posting.
|
|
||||||
* If reporting any kind of problem with Ansible, please include the Ansible
|
|
||||||
version along with output of "ansible-config dump --only-changed".
|
|
||||||
@ -1,33 +0,0 @@
|
|||||||
---
|
|
||||||
name: Mitogen 0.3.x bug report
|
|
||||||
about: Report a bug in Mitogen 0.3.x (for Ansible 2.10.x)
|
|
||||||
title: ''
|
|
||||||
labels: affects-0.3, bug
|
|
||||||
assignees: ''
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
Please drag-drop large logs as text file attachments.
|
|
||||||
|
|
||||||
Feel free to write an issue in your preferred format, however if in doubt, use
|
|
||||||
the following checklist as a guide for what to include.
|
|
||||||
|
|
||||||
* Which version of Ansible are you running?
|
|
||||||
* Is your version of Ansible patched in any way?
|
|
||||||
* Are you running with any custom modules, or `module_utils` loaded?
|
|
||||||
|
|
||||||
* Have you tried the latest master version from Git?
|
|
||||||
* Do you have some idea of what the underlying problem may be?
|
|
||||||
https://mitogen.networkgenomics.com/ansible_detailed.html#common-problems has
|
|
||||||
instructions to help figure out the likely cause and how to gather relevant
|
|
||||||
logs.
|
|
||||||
* Mention your host and target OS and versions
|
|
||||||
* Mention your host and target Python versions
|
|
||||||
* If reporting a performance issue, mention the number of targets and a rough
|
|
||||||
description of your workload (lots of copies, lots of tiny file edits, etc.)
|
|
||||||
* If reporting a crash or hang in Ansible, please rerun with -vvv and include
|
|
||||||
200 lines of output around the point of the error, along with a full copy of
|
|
||||||
any traceback or error text in the log. Beware "-vvv" may include secret
|
|
||||||
data! Edit as necessary before posting.
|
|
||||||
* If reporting any kind of problem with Ansible, please include the Ansible
|
|
||||||
version along with output of "ansible-config dump --only-changed".
|
|
||||||
@ -0,0 +1,62 @@
|
|||||||
|
name: Bug report
|
||||||
|
description: Report a bug in Mitogen 0.3.x (for Ansible 2.10 and above)
|
||||||
|
labels:
|
||||||
|
- affects-0.3
|
||||||
|
type: bug
|
||||||
|
|
||||||
|
body:
|
||||||
|
- type: textarea
|
||||||
|
attributes:
|
||||||
|
label: Description
|
||||||
|
description: >
|
||||||
|
When does the problem occur?
|
||||||
|
What happens after?
|
||||||
|
How is this different?
|
||||||
|
Did it previously behave as expected?
|
||||||
|
placeholder: |
|
||||||
|
When I do X, Y happens, but I was expecting Z because ...
|
||||||
|
Before version 1.2.3 it worked as expected.
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
|
||||||
|
- type: input
|
||||||
|
attributes:
|
||||||
|
label: Mitogen version
|
||||||
|
placeholder: 0.3.31, 0.3.3-9+deb12u1
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
|
||||||
|
- type: input
|
||||||
|
attributes:
|
||||||
|
label: Ansible version (if applicable)
|
||||||
|
placeholder: 2.18.11
|
||||||
|
|
||||||
|
- type: textarea
|
||||||
|
attributes:
|
||||||
|
label: OS and environment
|
||||||
|
description: >
|
||||||
|
What operating system version(s), Python version(s), etc. are you using?
|
||||||
|
placeholder: |
|
||||||
|
Controller (master): Debian 13, Python 3.14
|
||||||
|
Targets (slaves): Ubuntu 20.04/Python 2.7, RHEL 10, ...
|
||||||
|
|
||||||
|
- type: textarea
|
||||||
|
attributes:
|
||||||
|
label: Steps to reproduce
|
||||||
|
description: >
|
||||||
|
Instructions, code, or playbook(s) recreate the beahviour
|
||||||
|
value: |
|
||||||
|
Steps:
|
||||||
|
1. Set config `foo = 42` in somefile.cfg
|
||||||
|
2. Run the following Python or Playbook with `cmd --option bar ...`
|
||||||
|
|
||||||
|
```
|
||||||
|
Code or playbook here
|
||||||
|
```
|
||||||
|
|
||||||
|
- type: textarea
|
||||||
|
attributes:
|
||||||
|
label: Anything else
|
||||||
|
description: >
|
||||||
|
Include any other details you think might be relevant or helpful.
|
||||||
|
Examples might include logs, unusual settings, environment variables, ...
|
||||||
@ -1,10 +0,0 @@
|
|||||||
path_classifiers:
|
|
||||||
library:
|
|
||||||
- "mitogen/compat"
|
|
||||||
- "ansible_mitogen/compat"
|
|
||||||
queries:
|
|
||||||
# Mitogen 2.4 compatibility trips this query everywhere, so just disable it
|
|
||||||
- exclude: py/unreachable-statement
|
|
||||||
- exclude: py/should-use-with
|
|
||||||
# mitogen.core.b() trips this query everywhere, so just disable it
|
|
||||||
- exclude: py/import-and-import-from
|
|
||||||
@ -0,0 +1,38 @@
|
|||||||
|
# SPDX-FileCopyrightText: 2025 Mitogen authors <https://github.com/mitogen-hq>
|
||||||
|
# SPDX-License-Identifier: BSD-3-Clause
|
||||||
|
# !mitogen: minify_safe
|
||||||
|
|
||||||
|
import sys
|
||||||
|
|
||||||
|
if sys.version_info >= (3, 14):
|
||||||
|
from mitogen.imports._py314 import _code_imports
|
||||||
|
elif sys.version_info >= (3, 6):
|
||||||
|
from mitogen.imports._py36 import _code_imports
|
||||||
|
elif sys.version_info >= (2, 5):
|
||||||
|
from mitogen.imports._py2 import _code_imports_py25 as _code_imports
|
||||||
|
else:
|
||||||
|
from mitogen.imports._py2 import _code_imports_py24 as _code_imports
|
||||||
|
|
||||||
|
|
||||||
|
def codeobj_imports(co):
|
||||||
|
"""
|
||||||
|
Yield (level, modname, names) tuples by scanning the code object `co`.
|
||||||
|
|
||||||
|
Top level `import mod` & `from mod import foo` statements are matched.
|
||||||
|
Those inside a `class ...` or `def ...` block are currently skipped.
|
||||||
|
|
||||||
|
>>> co = compile('import a, b; from c import d, e as f', '<str>', 'exec')
|
||||||
|
>>> list(codeobj_imports(co)) # doctest: +ELLIPSIS
|
||||||
|
[(..., 'a', ()), (..., 'b', ()), (..., 'c', ('d', 'e'))]
|
||||||
|
|
||||||
|
:return:
|
||||||
|
Generator producing `(level, modname, names)` tuples, where:
|
||||||
|
|
||||||
|
* `level`:
|
||||||
|
-1 implicit relative (Python 2.x default)
|
||||||
|
0 absolute (Python 3.x, `from __future__ import absolute_import`)
|
||||||
|
>0 explicit relative (`from . import a`, `from ..b, import c`)
|
||||||
|
* `modname`: Name of module to import, or to import `names` from.
|
||||||
|
* `names`: tuple of names in `from mod import ..`.
|
||||||
|
"""
|
||||||
|
return _code_imports(co.co_code, co.co_consts, co.co_names)
|
||||||
@ -0,0 +1,54 @@
|
|||||||
|
# SPDX-FileCopyrightText: 2025 Mitogen authors <https://github.com/mitogen-hq>
|
||||||
|
# SPDX-License-Identifier: BSD-3-Clause
|
||||||
|
# !mitogen: minify_safe
|
||||||
|
|
||||||
|
import array
|
||||||
|
import itertools
|
||||||
|
import opcode
|
||||||
|
|
||||||
|
|
||||||
|
IMPORT_NAME = opcode.opmap['IMPORT_NAME']
|
||||||
|
LOAD_CONST = opcode.opmap['LOAD_CONST']
|
||||||
|
|
||||||
|
|
||||||
|
def _opargs(code, _have_arg=opcode.HAVE_ARGUMENT):
|
||||||
|
it = iter(array.array('B', code))
|
||||||
|
nexti = it.next
|
||||||
|
for i in it:
|
||||||
|
if i >= _have_arg:
|
||||||
|
yield (i, nexti() | (nexti() << 8))
|
||||||
|
else:
|
||||||
|
yield (i, None)
|
||||||
|
|
||||||
|
|
||||||
|
def _code_imports_py25(code, consts, names):
|
||||||
|
it1, it2, it3 = itertools.tee(_opargs(code), 3)
|
||||||
|
try:
|
||||||
|
next(it2)
|
||||||
|
next(it3)
|
||||||
|
next(it3)
|
||||||
|
except StopIteration:
|
||||||
|
return
|
||||||
|
for oparg1, oparg2, (op3, arg3) in itertools.izip(it1, it2, it3):
|
||||||
|
if op3 != IMPORT_NAME:
|
||||||
|
continue
|
||||||
|
op1, arg1 = oparg1
|
||||||
|
op2, arg2 = oparg2
|
||||||
|
if op1 != LOAD_CONST or op2 != LOAD_CONST:
|
||||||
|
continue
|
||||||
|
yield (consts[arg1], names[arg3], consts[arg2] or ())
|
||||||
|
|
||||||
|
|
||||||
|
def _code_imports_py24(code, consts, names):
|
||||||
|
it1, it2 = itertools.tee(_opargs(code), 2)
|
||||||
|
try:
|
||||||
|
next(it2)
|
||||||
|
except StopIteration:
|
||||||
|
return
|
||||||
|
for oparg1, (op2, arg2) in itertools.izip(it1, it2):
|
||||||
|
if op2 != IMPORT_NAME:
|
||||||
|
continue
|
||||||
|
op1, arg1 = oparg1
|
||||||
|
if op1 != LOAD_CONST:
|
||||||
|
continue
|
||||||
|
yield (-1, names[arg2], consts[arg1] or ())
|
||||||
@ -0,0 +1,26 @@
|
|||||||
|
# SPDX-FileCopyrightText: 2025 Mitogen authors <https://github.com/mitogen-hq>
|
||||||
|
# SPDX-License-Identifier: BSD-3-Clause
|
||||||
|
# !mitogen: minify_safe
|
||||||
|
|
||||||
|
import opcode
|
||||||
|
|
||||||
|
IMPORT_NAME = opcode.opmap['IMPORT_NAME']
|
||||||
|
LOAD_CONST = opcode.opmap['LOAD_CONST']
|
||||||
|
LOAD_SMALL_INT = opcode.opmap['LOAD_SMALL_INT']
|
||||||
|
|
||||||
|
|
||||||
|
def _code_imports(code, consts, names):
|
||||||
|
start = 4
|
||||||
|
while True:
|
||||||
|
op3_idx = code.find(IMPORT_NAME, start, -1)
|
||||||
|
if op3_idx < 0:
|
||||||
|
return
|
||||||
|
if op3_idx % 2:
|
||||||
|
start = op3_idx + 1
|
||||||
|
continue
|
||||||
|
if code[op3_idx-4] != LOAD_SMALL_INT or code[op3_idx-2] != LOAD_CONST:
|
||||||
|
start = op3_idx + 2
|
||||||
|
continue
|
||||||
|
start = op3_idx + 6
|
||||||
|
arg1, arg2, arg3 = code[op3_idx-3], code[op3_idx-1], code[op3_idx+1]
|
||||||
|
yield (arg1, names[arg3], consts[arg2] or ())
|
||||||
@ -0,0 +1,25 @@
|
|||||||
|
# SPDX-FileCopyrightText: 2025 Mitogen authors <https://github.com/mitogen-hq>
|
||||||
|
# SPDX-License-Identifier: BSD-3-Clause
|
||||||
|
# !mitogen: minify_safe
|
||||||
|
|
||||||
|
import opcode
|
||||||
|
|
||||||
|
IMPORT_NAME = opcode.opmap['IMPORT_NAME']
|
||||||
|
LOAD_CONST = opcode.opmap['LOAD_CONST']
|
||||||
|
|
||||||
|
|
||||||
|
def _code_imports(code, consts, names):
|
||||||
|
start = 4
|
||||||
|
while True:
|
||||||
|
op3_idx = code.find(IMPORT_NAME, start, -1)
|
||||||
|
if op3_idx < 0:
|
||||||
|
return
|
||||||
|
if op3_idx % 2:
|
||||||
|
start = op3_idx + 1
|
||||||
|
continue
|
||||||
|
if code[op3_idx-4] != LOAD_CONST or code[op3_idx-2] != LOAD_CONST:
|
||||||
|
start = op3_idx + 2
|
||||||
|
continue
|
||||||
|
start = op3_idx + 6
|
||||||
|
arg1, arg2, arg3 = code[op3_idx-3], code[op3_idx-1], code[op3_idx+1]
|
||||||
|
yield (consts[arg1], names[arg3], consts[arg2] or ())
|
||||||
@ -0,0 +1,8 @@
|
|||||||
|
pkg_mgr_python_interpreter: python3
|
||||||
|
|
||||||
|
# Alma Linux 9, RHEL 9, etc. lack a virtualenv package
|
||||||
|
virtualenv_create_argv:
|
||||||
|
- "{{ virtualenv_python }}"
|
||||||
|
- -m
|
||||||
|
- venv
|
||||||
|
- "{{ virtualenv_path }}"
|
||||||
@ -0,0 +1,2 @@
|
|||||||
|
become_doas_available: true
|
||||||
|
pkg_mgr_python_interpreter: python3
|
||||||
@ -1,4 +1,6 @@
|
|||||||
package_manager_repos:
|
package_manager_repos:
|
||||||
- dest: /etc/apt/sources.list
|
- dest: /etc/apt/sources.list
|
||||||
content: |
|
content: |
|
||||||
deb http://archive.debian.org/debian stretch main contrib non-free
|
deb http://archive.debian.org/debian/ stretch main contrib non-free
|
||||||
|
deb http://archive.debian.org/debian/ stretch-proposed-updates main contrib non-free
|
||||||
|
deb http://archive.debian.org/debian-security stretch/updates main contrib non-free
|
||||||
|
|||||||
@ -0,0 +1,2 @@
|
|||||||
|
become_doas_available: true
|
||||||
|
pkg_mgr_python_interpreter: python3
|
||||||
@ -0,0 +1,2 @@
|
|||||||
|
become_doas_available: true
|
||||||
|
pkg_mgr_python_interpreter: python3
|
||||||
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,18 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -o errexit
|
||||||
|
set -o pipefail
|
||||||
|
set -o nounset
|
||||||
|
|
||||||
|
BENCH_FUNC="codeobj_imports"
|
||||||
|
BENCH_EXPR="deque($BENCH_FUNC(co), maxlen=0)"
|
||||||
|
BIG_MODULE_PATH="$(dirname -- "$0")/data/big_module.py"
|
||||||
|
IMPORTS="from collections import deque; from mitogen.imports import $BENCH_FUNC"
|
||||||
|
COMPILE="co=compile(open('$BIG_MODULE_PATH').read(), '$BIG_MODULE_PATH', 'exec')"
|
||||||
|
PYTHONS=(
|
||||||
|
python2.7 python3.{9..14}
|
||||||
|
)
|
||||||
|
for p in "${PYTHONS[@]}"; do
|
||||||
|
echo -e -n "$BENCH_FUNC $p "
|
||||||
|
$p -m timeit -s "$IMPORTS" -s "$COMPILE" "$BENCH_EXPR"
|
||||||
|
done
|
||||||
Binary file not shown.
@ -0,0 +1,11 @@
|
|||||||
|
# pyright: reportMissingImports=false
|
||||||
|
# ruff: noqa: E401 E702 F401 F403
|
||||||
|
|
||||||
|
import a
|
||||||
|
import a.b
|
||||||
|
import c as d
|
||||||
|
import e, e.f as g \
|
||||||
|
, h; import i
|
||||||
|
|
||||||
|
from j import k, l, m as n
|
||||||
|
from o import *
|
||||||
@ -0,0 +1,9 @@
|
|||||||
|
# pyright: reportMissingImports=false
|
||||||
|
# ruff: noqa: E401 E702 F401 F403
|
||||||
|
|
||||||
|
from . import a
|
||||||
|
from .b import c, d as e
|
||||||
|
from ... import (
|
||||||
|
f,
|
||||||
|
j as k,
|
||||||
|
)
|
||||||
@ -0,0 +1,13 @@
|
|||||||
|
# pyright: reportMissingImports=false
|
||||||
|
# ruff: noqa: E401 E702 F401 F403
|
||||||
|
|
||||||
|
from __future__ import absolute_import
|
||||||
|
|
||||||
|
import a
|
||||||
|
import a.b
|
||||||
|
import c as d
|
||||||
|
import e, e.f as g \
|
||||||
|
, h; import i
|
||||||
|
|
||||||
|
from j import k, l, m as n
|
||||||
|
from o import *
|
||||||
@ -0,0 +1,7 @@
|
|||||||
|
class C:
|
||||||
|
import in_class
|
||||||
|
from in_class import x as y
|
||||||
|
|
||||||
|
def m(self):
|
||||||
|
import in_method
|
||||||
|
from in_method import x as y, z
|
||||||
@ -0,0 +1,3 @@
|
|||||||
|
def f():
|
||||||
|
import in_func
|
||||||
|
from in_func import x as y, z
|
||||||
@ -0,0 +1,16 @@
|
|||||||
|
import sys
|
||||||
|
|
||||||
|
|
||||||
|
if True:
|
||||||
|
import in_if_always_true
|
||||||
|
from in_if_always_true import x as y, z
|
||||||
|
else:
|
||||||
|
import in_else_never_true
|
||||||
|
from in_else_never_true import x as y, z
|
||||||
|
|
||||||
|
if sys.version >= (3, 0):
|
||||||
|
import in_if_py3
|
||||||
|
from in_if_py3 import x as y, z
|
||||||
|
else:
|
||||||
|
import in_else_py2
|
||||||
|
from in_else_py2 import x as y, z
|
||||||
@ -0,0 +1,9 @@
|
|||||||
|
try:
|
||||||
|
import in_try
|
||||||
|
from in_try import x as y, z
|
||||||
|
except ImportError:
|
||||||
|
import in_except_importerror
|
||||||
|
from in_except_importerror import x as y, z
|
||||||
|
except Exception:
|
||||||
|
import in_except_exception
|
||||||
|
from in_except_exception import x as y, z
|
||||||
@ -0,0 +1,5 @@
|
|||||||
|
- name: Setup container host
|
||||||
|
hosts: localhost
|
||||||
|
become: true
|
||||||
|
roles:
|
||||||
|
- role: container_host
|
||||||
@ -1,12 +1,17 @@
|
|||||||
|
|
||||||
[defaults]
|
[defaults]
|
||||||
|
any_errors_fatal = true
|
||||||
|
# Ansible >= 6 (ansible-core >= 2.13)
|
||||||
|
callback_result_format = yaml
|
||||||
deprecation_warnings = false
|
deprecation_warnings = false
|
||||||
|
duplicate_dict_key = error
|
||||||
|
inventory = hosts.ini
|
||||||
strategy_plugins = ../../ansible_mitogen/plugins/strategy
|
strategy_plugins = ../../ansible_mitogen/plugins/strategy
|
||||||
retry_files_enabled = false
|
retry_files_enabled = false
|
||||||
display_args_to_stdout = True
|
|
||||||
no_target_syslog = True
|
no_target_syslog = True
|
||||||
host_key_checking = False
|
host_key_checking = False
|
||||||
stdout_callback = yaml
|
|
||||||
|
|
||||||
[inventory]
|
[inventory]
|
||||||
unparsed_is_fatal = true
|
any_unparsed_is_failed = true
|
||||||
|
host_pattern_mismatch = error
|
||||||
|
unparsed_is_failed = true
|
||||||
|
|||||||
@ -0,0 +1,33 @@
|
|||||||
|
DefaultRuntimeDir ${XDG_RUNTIME_DIR}
|
||||||
|
PidFile ${XDG_RUNTIME_DIR}/apache2.pid
|
||||||
|
|
||||||
|
LoadModule alias_module /usr/lib/apache2/modules/mod_alias.so
|
||||||
|
LoadModule authz_core_module /usr/lib/apache2/modules/mod_authz_core.so
|
||||||
|
LoadModule mpm_event_module /usr/lib/apache2/modules/mod_mpm_event.so
|
||||||
|
LoadModule proxy_module /usr/lib/apache2/modules/mod_proxy.so
|
||||||
|
LoadModule proxy_http_module /usr/lib/apache2/modules/mod_proxy_http.so
|
||||||
|
LoadModule rewrite_module /usr/lib/apache2/modules/mod_rewrite.so
|
||||||
|
LoadModule ssl_module /usr/lib/apache2/modules/mod_ssl.so
|
||||||
|
|
||||||
|
LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined
|
||||||
|
|
||||||
|
KeepAlive On
|
||||||
|
Listen 8090
|
||||||
|
|
||||||
|
<Directory />
|
||||||
|
Require all denied
|
||||||
|
AllowOverride None
|
||||||
|
</Directory>
|
||||||
|
|
||||||
|
<VirtualHost *:8090>
|
||||||
|
ServerName centos-vault-proxy
|
||||||
|
SSLProxyEngine On
|
||||||
|
CustomLog logs/access.log vhost_combined
|
||||||
|
ProxyPass "/" "https://vault.centos.org/"
|
||||||
|
ProxyPassReverse "https://vault.centos.org/" "/"
|
||||||
|
RedirectMatch "^/(.*)" "http://centos-vault-proxy:8090/$1"
|
||||||
|
</VirtualHost>
|
||||||
|
|
||||||
|
# /usr/sbin/apache2 -d . -f apache_proxy.conf -D FOREGROUND
|
||||||
|
|
||||||
|
# vim: syntax=apache
|
||||||
@ -0,0 +1,7 @@
|
|||||||
|
# Testing non-blocking stdio during bootstrap
|
||||||
|
# https://github.com/mitogen-hq/mitogen/issues/1306
|
||||||
|
Defaults log_output
|
||||||
|
|
||||||
|
Defaults>mitogen__pw_required targetpw
|
||||||
|
Defaults>mitogen__require_tty requiretty
|
||||||
|
Defaults>mitogen__require_tty_pw_required requiretty,targetpw
|
||||||
@ -1,16 +1,18 @@
|
|||||||
ansible_version_major_minor: "{{ ansible_version.major }}.{{ ansible_version.minor }}"
|
ansible_version_major_minor: "{{ ansible_version.major }}.{{ ansible_version.minor }}"
|
||||||
|
|
||||||
common_packages:
|
common_packages:
|
||||||
|
- acl
|
||||||
- openssh-server
|
- openssh-server
|
||||||
- rsync
|
- rsync
|
||||||
- strace
|
- strace
|
||||||
- sudo
|
- sudo
|
||||||
|
|
||||||
container_image_name: "{{ container_registry }}/{{ inventory_hostname }}-test"
|
container_image_name: "{{ container_registry }}/{{ inventory_hostname }}-test"
|
||||||
container_registry: public.ecr.aws/n5z0e8q9
|
container_registry: ghcr.io/mitogen-hq
|
||||||
|
|
||||||
sudo_group:
|
sudo_group:
|
||||||
MacOSX: admin
|
MacOSX: admin
|
||||||
Debian: sudo
|
Debian: sudo
|
||||||
Ubuntu: sudo
|
Ubuntu: sudo
|
||||||
CentOS: wheel
|
CentOS: wheel
|
||||||
|
AlmaLinux: wheel
|
||||||
|
|||||||
@ -0,0 +1,6 @@
|
|||||||
|
bootstrap_packages: [python3]
|
||||||
|
docker_base: almalinux:9
|
||||||
|
|
||||||
|
packages:
|
||||||
|
- perl-JSON
|
||||||
|
- procps-ng
|
||||||
@ -1,6 +1,36 @@
|
|||||||
bootstrap_packages: [python-simplejson]
|
bootstrap_packages: [python-simplejson]
|
||||||
|
|
||||||
docker_base: astj/centos5-vault
|
docker_base: centos:5
|
||||||
|
|
||||||
packages:
|
packages:
|
||||||
- perl
|
- perl
|
||||||
|
package_manager_repos:
|
||||||
|
- dest: /etc/yum.repos.d/CentOS-Base.repo
|
||||||
|
content: |
|
||||||
|
[base]
|
||||||
|
name=CentOS-$releasever - Base
|
||||||
|
baseurl=http://centos-vault-proxy:8090/5.11/os/$basearch/
|
||||||
|
gpgcheck=1
|
||||||
|
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
|
||||||
|
|
||||||
|
[updates]
|
||||||
|
name=CentOS-$releasever - Updates
|
||||||
|
baseurl=http://centos-vault-proxy:8090/5.11/updates/$basearch/
|
||||||
|
gpgcheck=1
|
||||||
|
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
|
||||||
|
|
||||||
|
[extras]
|
||||||
|
name=CentOS-$releasever - Extras
|
||||||
|
baseurl=http://centos-vault-proxy:8090/5.11/extras/$basearch/
|
||||||
|
gpgcheck=1
|
||||||
|
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
|
||||||
|
|
||||||
|
- dest: /etc/yum.repos.d/libselinux.repo
|
||||||
|
content: |
|
||||||
|
[libselinux]
|
||||||
|
name=CentOS-$releasever - libselinux
|
||||||
|
baseurl=http://centos-vault-proxy:8090/5.11/centosplus/$basearch/
|
||||||
|
gpgcheck=1
|
||||||
|
enabled=1
|
||||||
|
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
|
||||||
|
includepkgs=libselinux*
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue