Skip to content

Commit d7aa3b5

Browse files
authored
Merge branch 'main' into pyrepl-import-completion-for-attributes
2 parents d57de37 + c64baff commit d7aa3b5

File tree

6 files changed

+15
-0
lines changed

6 files changed

+15
-0
lines changed

Doc/library/subprocess.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -627,6 +627,12 @@ functions.
627627
the value in ``pw_uid`` will be used. If the value is an integer, it will
628628
be passed verbatim. (POSIX only)
629629

630+
.. note::
631+
632+
Specifying *user* will not drop existing supplementary group memberships!
633+
The caller must also pass ``extra_groups=()`` to reduce the group membership
634+
of the child process for security purposes.
635+
630636
.. availability:: POSIX
631637
.. versionadded:: 3.9
632638

Lib/_pyrepl/_module_completer.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
# Standard library submodules that are not detected by pkgutil.iter_modules
2727
# but can be imported, so should be proposed in completion
2828
"collections": ["abc"],
29+
"math": ["integer"],
2930
"os": ["path"],
3031
"xml.parsers.expat": ["errors", "model"],
3132
}

Lib/test/test_pyrepl/test_pyrepl.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1202,6 +1202,7 @@ def test_hardcoded_stdlib_submodules(self):
12021202
cases = (
12031203
("import collections.\t\n", "import collections.abc"),
12041204
("import os.\t\n", "import os.path"),
1205+
("import math.\t\n", "import math.integer"),
12051206
("import xml.parsers.expat.\t\te\t\n\n", "import xml.parsers.expat.errors"),
12061207
("from xml.parsers.expat import \t\tm\t\n\n", "from xml.parsers.expat import model"),
12071208
)
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Add :mod:`math.integer` to :term:`REPL` auto-completion of imports.

Python/optimizer_bytecodes.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2124,18 +2124,21 @@ dummy_func(void) {
21242124
}
21252125

21262126
op(_GUARD_CODE_VERSION_RETURN_VALUE, (version/2 -- )) {
2127+
(void)version;
21272128
if (ctx->frame->caller) {
21282129
REPLACE_OP(this_instr, _NOP, 0, 0);
21292130
}
21302131
}
21312132

21322133
op(_GUARD_CODE_VERSION_YIELD_VALUE, (version/2 -- )) {
2134+
(void)version;
21332135
if (ctx->frame->caller) {
21342136
REPLACE_OP(this_instr, _NOP, 0, 0);
21352137
}
21362138
}
21372139

21382140
op(_GUARD_CODE_VERSION_RETURN_GENERATOR, (version/2 -- )) {
2141+
(void)version;
21392142
if (ctx->frame->caller) {
21402143
REPLACE_OP(this_instr, _NOP, 0, 0);
21412144
}

Python/optimizer_cases.c.h

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)