Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
109 commits
Select commit Hold shift + click to select a range
1c983eb
wip
ethanfurman Mar 31, 2021
dc81732
wip
ethanfurman Apr 1, 2021
8d5a199
add simple_enum and test_simple_enum
ethanfurman Apr 8, 2021
84d2b26
raise TypeError from test_simple_enum
ethanfurman Apr 8, 2021
bed8851
changes:
ethanfurman Apr 11, 2021
dfb4532
bpo-43751: Fix anext() bug where it erroneously returned None (GH-25238)
sweeneyde Apr 11, 2021
79650d0
Fix description of behaviour of an exception class in 'from' clause (…
mdickinson Apr 11, 2021
63bf1ab
Fix typo in 3.10.0a7.rst (GH-25340)
skirpichev Apr 11, 2021
b38601d
bpo-42967: coerce bytes separator to string in urllib.parse_qs(l) (#2…
Fidget-Spinner Apr 11, 2021
53114ff
bpo-43770: Refactor PyType_Ready() function (GH-25336)
vstinner Apr 11, 2021
553ee27
bpo-43682: Make staticmethod objects callable (GH-25117)
vstinner Apr 11, 2021
cc2ffcd
bpo-43785: Improve BZ2File performance by removing RLock (GH-25299)
methane Apr 12, 2021
9825bdf
bpo-43723: Deprecate camelCase aliases from threading (GH-25174)
JelleZijlstra Apr 12, 2021
77d668b
bpo-43680: _pyio.open() becomes a static method (GH-25354)
vstinner Apr 12, 2021
06e971f
try and get a peak at mock-related PRs before they land (#25356)
cjw296 Apr 12, 2021
3447750
bpo-41561: Fix testing with OpenSSL 1.0.2 (GH-25355)
tiran Apr 12, 2021
95bbb33
bpo-43723: Fix deprecation error caused by thread.setDaemon() (GH-25361)
tiran Apr 12, 2021
e126547
bpo-34311: Add locale.localize (GH-15275)
cedk Apr 12, 2021
67c0b3d
bpo-41661: Document os.path.relpath() exception on Windows with diffe…
ZackerySpytz Apr 12, 2021
8c14f5a
bpo-42248: [Enum] ensure exceptions raised in ``_missing_`` are relea…
ethanfurman Apr 12, 2021
2459b92
bpo-43774: Remove --without-cycle-gc doc (GH-25364)
vstinner Apr 12, 2021
b86ed8e
bpo-43797: Improve syntax error for invalid comparisons (#25317)
pablogsal Apr 12, 2021
37a5e22
Use double quotes over single quotes for match statement grammar (GH-…
Fidget-Spinner Apr 12, 2021
852150d
bpo-42904: Fix get_type_hints for class local namespaces (GH-24201)
Fidget-Spinner Apr 12, 2021
a9cf69d
bpo-41515: Fix KeyError raised in get_type_hints (GH-25352)
tirkarthi Apr 12, 2021
20ac347
Fix Sphinx errors in the documentation and re-activate the suspicious…
pablogsal Apr 12, 2021
85918e4
bpo-43774: Add more links to configure options (GH-25363)
vstinner Apr 12, 2021
c1a66bd
Remove an unnecessary copy of the 'namespace' parameter to make_datac…
ericvsmith Apr 13, 2021
d9151cb
Ensure that early = are not matched by the parser as invalid comparis…
pablogsal Apr 13, 2021
d2a8e69
bpo-43787: Add __iter__ to GzipFile, BZ2File, and LZMAFile (GH-25353)
methane Apr 13, 2021
a483388
bpo-43799: OpenSSL 3.0.0: declare OPENSSL_API_COMPAT 1.1.1 (GH-25329)
tiran Apr 13, 2021
c2b7a66
bpo-43731: Add an `encoding` parameter to logging.fileConfig() (GH-25…
methane Apr 13, 2021
9e7b207
bpo-43760: Speed up check for tracing in interpreter dispatch (#25276)
markshannon Apr 13, 2021
54db51c
bpo-43816: Add extern "C" to Include/cpython/pyctype.h (GH-25365)
aytey Apr 13, 2021
65f058e
bpo-43770: Reorder type_ready() (GH-25373)
vstinner Apr 13, 2021
a328d73
bpo-43770: Cleanup type_ready() (GH-25388)
vstinner Apr 13, 2021
eb77133
bpo41515: Fix assert in test which throws SyntaxWarning. (#25379)
tirkarthi Apr 13, 2021
fd79af7
Doc: Try to enhance wording on circular imports. (GH-24705)
JulienPalard Apr 13, 2021
30ed93b
bpo-43797: Handle correctly invalid assignments inside function calls…
pablogsal Apr 13, 2021
8fa1489
bpo-43811: Test multiple OpenSSL versions on GHA (GH-25360)
tiran Apr 13, 2021
695d47b
bpo-43785: Update bz2 document (GH-25351)
methane Apr 13, 2021
11159d2
bpo-43080: pprint for dataclass instances (GH-24389)
LewisGaul Apr 13, 2021
3bc694d
bpo-43680: Deprecate io.OpenWrapper (GH-25357)
vstinner Apr 14, 2021
37494b4
bpo-38530: Offer suggestions on AttributeError (#16856)
pablogsal Apr 14, 2021
133705b
bpo-43777: Drop description of "pip search" command from tutorial (GH…
bkline Apr 14, 2021
333d10c
bpo-43712 : fileinput: Add encoding parameter (GH-25272)
methane Apr 14, 2021
6f1e8cc
bpo-43752: Fix sqlite3 regression for zero-sized blobs with converter…
Apr 14, 2021
b8509ff
bpo-43825: Fix deprecation warnings in test_cmd_line and test_collect…
tirkarthi Apr 14, 2021
c1ae741
bpo-43265: Improve sqlite3.Connection.backup error handling (GH-24586)
Apr 14, 2021
3386ca0
bpo-20364: Improve sqlite3 placeholder docs (GH-25003)
Apr 14, 2021
c4073a2
Fix typo in the What's New for 3.10 (GH-25396)
pablogsal Apr 14, 2021
5bf8bf2
bpo-38530: Offer suggestions on NameError (GH-25397)
pablogsal Apr 14, 2021
92eebf6
bpo-43795: Sort PC/python3dll.c (GH-25312)
encukou Apr 14, 2021
d9ba9de
bpo-41282: setup.py ignores distutils DeprecationWarning (GH-25405)
vstinner Apr 14, 2021
def9193
bpo-43505: Explicitly initialize and shutdown sqlite3 (GH-25404)
Apr 14, 2021
341e8a9
bpo-41282: (PEP 632) Load install schemes from sysconfig (GH-24549)
frenzymadness Apr 14, 2021
0c4c436
Fix typo in 3.10's What's New documentation (GH-25409)
ZackerySpytz Apr 14, 2021
e07f4ab
bpo-38530: Make sure that failing to generate suggestions on failure …
pablogsal Apr 14, 2021
5cb601f
bpo-43296: Handle sqlite3_value_blob() errors (GH-24674)
Apr 14, 2021
3fc65b9
bpo-38530: Optimize the calculation of string sizes when offering sug…
pablogsal Apr 14, 2021
23acadc
bpo-37741: make importlib.metadata docs discoverable through a module…
jaraco Apr 15, 2021
da74350
bpo-43823: Improve syntax errors for invalid dictionary literals (GH-…
pablogsal Apr 15, 2021
11e0b29
bpo-43846: Use less stack for large literals and calls (GH-25403)
markshannon Apr 15, 2021
0dca5eb
[Enum] fix doc string (GH-25376)
ethanfurman Apr 15, 2021
ec09973
bpo-43744: [Enum] fix ``_is_private`` (GH-25349)
ethanfurman Apr 15, 2021
e692f55
Update ACKS (GH-25423)
ethanfurman Apr 15, 2021
b280248
bpo-43822: Improve syntax errors for missing commas (GH-25377)
pablogsal Apr 15, 2021
b5b98bd
bpo-43823: Fix location of one of the errors for invalid dictionary l…
pablogsal Apr 15, 2021
ff3d9c0
Improve the section with SyntaxError message improvements to the What…
pablogsal Apr 16, 2021
8a232c7
bpo-41323: compiler: Reuse tuple in constant tuple folding (GH-25419)
methane Apr 16, 2021
a6a5c91
bpo-40443: Remove unused imports (GH-25429)
vstinner Apr 16, 2021
69ca32e
bpo-41282: Fix distutils.utils.byte_compile() DeprecationWarning (GH-…
vstinner Apr 16, 2021
471870f
bpo-43844: Fix PendingDeprecationWarning in test_lib2to3 (GH-25407)
vstinner Apr 16, 2021
75ec103
bpo-43842: Fix race condition in test_logging SMTP test (GH-25436)
vstinner Apr 16, 2021
b136b1a
bpo-43843: libregrtest uses threading.excepthook (GH-25400)
vstinner Apr 16, 2021
3b82cae
bpo-38530: Properly extend UnboundLocalError from NameError (GH-25444)
pablogsal Apr 16, 2021
0ad81d4
bpo-38530: Match exactly AttributeError and NameError when offering s…
pablogsal Apr 16, 2021
62ec638
bpo-43862: Enhance -W cmdline option documentation (GH-25439)
vstinner Apr 16, 2021
7c29ae1
bpo-43867: multiprocessing Server catchs SystemExit (GH-25441)
vstinner Apr 16, 2021
adf24bd
bpo-43856: Add a versionadded directive to the importlib.metadata doc…
ZackerySpytz Apr 16, 2021
cfaa2d3
Fix typo in exceptions.rst (GH-25434)
eltociear Apr 17, 2021
b467d9a
bpo-43522: Fix SSLContext.hostname_checks_common_name (GH-24899)
tiran Apr 17, 2021
39258d3
bpo-43669: PEP 644: Require OpenSSL 1.1.1 or newer (GH-23014)
tiran Apr 17, 2021
ea39f82
Fix a typo in subprocess documentation (GH-25426)
akulakov Apr 17, 2021
b8d0fa0
bpo-43669: Remove OpenSSL 0.9 to 1.1.0 specific documentation (GH-25453)
tiran Apr 17, 2021
76beadb
Fix typo in a dataclasses comment. (GH-25454)
ericvsmith Apr 17, 2021
7f1305e
bpo-42333: Port _ssl extension to multiphase initialization (PEP 489)…
tiran Apr 17, 2021
3ab4bea
bpo-38530: Include builtins in NameError suggestions (GH-25460)
pablogsal Apr 17, 2021
6857198
bpo-37630: Do not skip the sha3 tests in case of missing builtin sha3…
stratakis Apr 17, 2021
8bf274a
Small changes to the section about SyntaxErrors in the 3.10 What's Ne…
pablogsal Apr 17, 2021
0b1c169
bpo-38530: Cover more error paths in error suggestion functions (GH-2…
pablogsal Apr 17, 2021
f5c5c0c
Fix type group capture in the PEG highlight tool (GH-25464)
pablogsal Apr 17, 2021
aa6da32
bpo-43362: Fix invalid free and return check in _sha3 module (GH-25463)
tiran Apr 18, 2021
2798f24
bpo-43641: Stop stating that TLS 1.2 is the most modern version in do…
illia-v Apr 18, 2021
49fdf11
bpo-36076: Add SNI support to ssl.get_server_certificate. (GH-16820)
juhovh Apr 18, 2021
89d1550
bpo-42854: Use SSL_read/write_ex() (GH-25468)
tiran Apr 19, 2021
2875c60
bpo-43880: Show DeprecationWarnings for deprecated ssl module feature…
tiran Apr 19, 2021
d37b74f
bpo-43669: More test_ssl cleanups (GH-25470)
tiran Apr 19, 2021
64d9752
bpo-40849: Expose X509_V_FLAG_PARTIAL_CHAIN ssl flag (GH-20463)
l0x-c0d3z Apr 19, 2021
68ba0c6
bpo-43837: Reverse order of precedence table to show tightly binding …
ammaraskar Apr 19, 2021
4f9ffa8
Add doctests (GH-25474)
rhettinger Apr 19, 2021
7a04116
bpo-25460: Surround suggestions by quotes (GH-25473)
pablogsal Apr 19, 2021
28e48fe
wip
ethanfurman Mar 31, 2021
528d022
wip
ethanfurman Apr 1, 2021
f317185
add simple_enum and test_simple_enum
ethanfurman Apr 8, 2021
47c1196
raise TypeError from test_simple_enum
ethanfurman Apr 8, 2021
79a12e8
changes:
ethanfurman Apr 11, 2021
af77e46
update after rebase
ethanfurman Apr 19, 2021
b48e643
merge
ethanfurman Apr 19, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,10 @@ Parser/asdl.py @isidentical
Parser/asdl_c.py @isidentical
Lib/ast.py @isidentical

# Mock
/Lib/unittest/mock.py @cjw296
/Lib/unittest/test/testmock/* @cjw296

# SQLite 3
**/*sqlite* @berkerpeksag

Expand Down
65 changes: 63 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,15 @@ jobs:
runs-on: ubuntu-latest
outputs:
run_tests: ${{ steps.check.outputs.run_tests }}
run_ssl_tests: ${{ steps.check.outputs.run_ssl_tests }}
steps:
- uses: actions/checkout@v2
- name: Check for source changes
id: check
run: |
if [ -z "$GITHUB_BASE_REF" ]; then
echo '::set-output name=run_tests::true'
echo '::set-output name=run_ssl_tests::true'
else
git fetch origin $GITHUB_BASE_REF --depth=1
# git diff "origin/$GITHUB_BASE_REF..." (3 dots) may be more
Expand All @@ -46,6 +48,7 @@ jobs:
#
# https://github.com/python/core-workflow/issues/373
git diff --name-only origin/$GITHUB_BASE_REF.. | grep -qvE '(\.rst$|^Doc|^Misc)' && echo '::set-output name=run_tests::true' || true
git diff --name-only origin/$GITHUB_BASE_REF.. | grep -qE '(ssl|hashlib|hmac|^.github)' && echo '::set-output name=run_ssl_tests::true' || true
fi

check_generated_files:
Expand Down Expand Up @@ -138,6 +141,11 @@ jobs:
run: echo "::add-matcher::.github/problem-matchers/gcc.json"
- name: Install Dependencies
run: sudo ./.github/workflows/posix-deps-apt.sh
- name: Configure OpenSSL env vars
run: |
echo "MULTISSL_DIR=${GITHUB_WORKSPACE}/multissl" >> $GITHUB_ENV
echo "OPENSSL_DIR=${GITHUB_WORKSPACE}/multissl/openssl/${OPENSSL_VER}" >> $GITHUB_ENV
echo "LD_LIBRARY_PATH=${GITHUB_WORKSPACE}/multissl/openssl/${OPENSSL_VER}/lib" >> $GITHUB_ENV
- name: 'Restore OpenSSL build'
id: cache-openssl
uses: actions/cache@v2.1.4
Expand All @@ -146,12 +154,65 @@ jobs:
key: ${{ runner.os }}-multissl-openssl-${{ env.OPENSSL_VER }}
- name: Install OpenSSL
if: steps.cache-openssl.outputs.cache-hit != 'true'
run: python3 Tools/ssl/multissltests.py --steps=library --base-directory $PWD/multissl --openssl $OPENSSL_VER --system Linux
run: python3 Tools/ssl/multissltests.py --steps=library --base-directory $MULTISSL_DIR --openssl $OPENSSL_VER --system Linux
- name: Add ccache to PATH
run: |
echo "PATH=/usr/lib/ccache:$PATH" >> $GITHUB_ENV
- name: Configure ccache action
uses: hendrikmuhs/ccache-action@v1
- name: Configure CPython
run: ./configure --with-pydebug --with-openssl=$PWD/multissl/openssl/$OPENSSL_VER
run: ./configure --with-pydebug --with-openssl=$OPENSSL_DIR
- name: Build CPython
run: make -j4
- name: Display build info
run: make pythoninfo
- name: Tests
run: xvfb-run make buildbottest TESTOPTS="-j4 -uall,-cpu"

build_ubuntu_ssltests:
name: 'Ubuntu SSL tests with OpenSSL ${{ matrix.openssl_ver }}'
runs-on: ubuntu-20.04
needs: check_source
if: needs.check_source.outputs.run_tests == 'true' && needs.check_source.outputs.run_ssl_tests == 'true'
strategy:
fail-fast: false
matrix:
openssl_ver: [1.1.1k, 3.0.0-alpha14]
env:
OPENSSL_VER: ${{ matrix.openssl_ver }}
MULTISSL_DIR: ${{ github.workspace }}/multissl
OPENSSL_DIR: ${{ github.workspace }}/multissl/openssl/${{ matrix.openssl_ver }}
LD_LIBRARY_PATH: ${{ github.workspace }}/multissl/openssl/${{ matrix.openssl_ver }}/lib
steps:
- uses: actions/checkout@v2
- name: Register gcc problem matcher
run: echo "::add-matcher::.github/problem-matchers/gcc.json"
- name: Install Dependencies
run: sudo ./.github/workflows/posix-deps-apt.sh
- name: Configure OpenSSL env vars
run: |
echo "MULTISSL_DIR=${GITHUB_WORKSPACE}/multissl" >> $GITHUB_ENV
echo "OPENSSL_DIR=${GITHUB_WORKSPACE}/multissl/openssl/${OPENSSL_VER}" >> $GITHUB_ENV
echo "LD_LIBRARY_PATH=${GITHUB_WORKSPACE}/multissl/openssl/${OPENSSL_VER}/lib" >> $GITHUB_ENV
- name: 'Restore OpenSSL build'
id: cache-openssl
uses: actions/cache@v2.1.4
with:
path: ./multissl/openssl/${{ env.OPENSSL_VER }}
key: ${{ runner.os }}-multissl-openssl-${{ env.OPENSSL_VER }}
- name: Install OpenSSL
if: steps.cache-openssl.outputs.cache-hit != 'true'
run: python3 Tools/ssl/multissltests.py --steps=library --base-directory $MULTISSL_DIR --openssl $OPENSSL_VER --system Linux
- name: Add ccache to PATH
run: |
echo "PATH=/usr/lib/ccache:$PATH" >> $GITHUB_ENV
- name: Configure ccache action
uses: hendrikmuhs/ccache-action@v1
- name: Configure CPython
run: ./configure --with-pydebug --with-openssl=$OPENSSL_DIR
- name: Build CPython
run: make -j4
- name: Display build info
run: make pythoninfo
- name: SSL tests
run: ./python Lib/test/ssltests.py
2 changes: 1 addition & 1 deletion .github/workflows/doc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
- name: 'Install build dependencies'
run: make -C Doc/ PYTHON=../python venv
- name: 'Build documentation'
run: xvfb-run make -C Doc/ PYTHON=../python SPHINXOPTS="-q -W --keep-going -j4" doctest html
run: xvfb-run make -C Doc/ PYTHON=../python SPHINXOPTS="-q -W --keep-going -j4" doctest html suspicious
- name: 'Upload'
uses: actions/upload-artifact@v2.2.2
with:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/posix-deps-apt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ apt-get update

apt-get -yq install \
build-essential \
ccache \
gdb \
lcov \
libbz2-dev \
Expand Down
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ matrix:
- cd Doc
- make venv PYTHON=python
script:
- make check html SPHINXOPTS="-q -W -j4"
- make check html suspicious SPHINXOPTS="-q -W -j4"
- name: "Documentation tests"
os: linux
language: c
Expand Down
2 changes: 1 addition & 1 deletion Doc/c-api/exceptions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,7 @@ Signal Handling
and if so, invokes the corresponding signal handler. If the :mod:`signal`
module is supported, this can invoke a signal handler written in Python.

The function attemps to handle all pending signals, and then returns ``0``.
The function attempts to handle all pending signals, and then returns ``0``.
However, if a Python signal handler raises an exception, the error
indicator is set and the function returns ``-1`` immediately (such that
other pending signals may not have been handled yet: they will be on the
Expand Down
15 changes: 11 additions & 4 deletions Doc/c-api/init_config.rst
Original file line number Diff line number Diff line change
Expand Up @@ -638,7 +638,7 @@ PyConfig
Set to ``1`` by the :envvar:`PYTHONDUMPREFS` environment variable.

Need a special build of Python with the ``Py_TRACE_REFS`` macro defined:
see :option:`configure --with-trace-refs <--with-trace-refs>`.
see the :option:`configure --with-trace-refs option <--with-trace-refs>`.

Default: ``0``.

Expand Down Expand Up @@ -820,7 +820,7 @@ PyConfig
Set to ``1`` by the :envvar:`PYTHONMALLOCSTATS` environment variable.

The option is ignored if Python is :option:`configured using
--without-pymalloc <--without-pymalloc>`.
the --without-pymalloc option <--without-pymalloc>`.

Default: ``0``.

Expand All @@ -831,8 +831,8 @@ PyConfig
Set by the :envvar:`PYTHONPLATLIBDIR` environment variable.

Default: value of the ``PLATLIBDIR`` macro which is set by the
:option`configure --with-platlibdir option <--with-platlibdir>` (default:
``"lib"``).
:option:`configure --with-platlibdir option <--with-platlibdir>`
(default: ``"lib"``).

Part of the :ref:`Python Path Configuration <init-path-config>` input.

Expand Down Expand Up @@ -1135,6 +1135,13 @@ PyConfig
item of :data:`warnings.filters` which is checked first (highest
priority).

The :option:`-W` command line options adds its value to
:c:member:`~PyConfig.warnoptions`, it can be used multiple times.

The :envvar:`PYTHONWARNINGS` environment variable can also be used to add
warning options. Multiple options can be specified, separated by commas
(``,``).

Default: empty list.

.. c:member:: int write_bytecode
Expand Down
7 changes: 1 addition & 6 deletions Doc/extending/extending.rst
Original file line number Diff line number Diff line change
Expand Up @@ -911,12 +911,7 @@ the cycle itself.
The cycle detector is able to detect garbage cycles and can reclaim them.
The :mod:`gc` module exposes a way to run the detector (the
:func:`~gc.collect` function), as well as configuration
interfaces and the ability to disable the detector at runtime. The cycle
detector is considered an optional component; though it is included by default,
it can be disabled at build time using the :option:`!--without-cycle-gc` option
to the :program:`configure` script on Unix platforms (including Mac OS X). If
the cycle detector is disabled in this way, the :mod:`gc` module will not be
available.
interfaces and the ability to disable the detector at runtime.


.. _refcountsinpython:
Expand Down
4 changes: 2 additions & 2 deletions Doc/faq/library.rst
Original file line number Diff line number Diff line change
Expand Up @@ -319,11 +319,11 @@ Here's a trivial example::
try:
arg = q.get(block=False)
except queue.Empty:
print('Worker', threading.currentThread(), end=' ')
print('Worker', threading.current_thread(), end=' ')
print('queue empty')
break
else:
print('Worker', threading.currentThread(), end=' ')
print('Worker', threading.current_thread(), end=' ')
print('running with argument', arg)
time.sleep(0.5)

Expand Down
20 changes: 10 additions & 10 deletions Doc/faq/programming.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1898,26 +1898,26 @@ How can I have modules that mutually import each other?

Suppose you have the following modules:

foo.py::
:file:`foo.py`::

from bar import bar_var
foo_var = 1

bar.py::
:file:`bar.py`::

from foo import foo_var
bar_var = 2

The problem is that the interpreter will perform the following steps:

* main imports foo
* Empty globals for foo are created
* foo is compiled and starts executing
* foo imports bar
* Empty globals for bar are created
* bar is compiled and starts executing
* bar imports foo (which is a no-op since there already is a module named foo)
* bar.foo_var = foo.foo_var
* main imports ``foo``
* Empty globals for ``foo`` are created
* ``foo`` is compiled and starts executing
* ``foo`` imports ``bar``
* Empty globals for ``bar`` are created
* ``bar`` is compiled and starts executing
* ``bar`` imports ``foo`` (which is a no-op since there already is a module named ``foo``)
* The import mechanism tries to read ``foo_var`` from ``foo`` globals, to set ``bar.foo_var = foo.foo_var``

The last step fails, because Python isn't done with interpreting ``foo`` yet and
the global symbol dictionary for ``foo`` is still empty.
Expand Down
8 changes: 5 additions & 3 deletions Doc/howto/instrumentation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ or::
$ sudo apt-get install systemtap-sdt-dev


CPython must then be configured ``--with-dtrace``:
CPython must then be :option:`configured with the --with-dtrace option
<--with-dtrace>`:

.. code-block:: none

Expand Down Expand Up @@ -77,7 +78,8 @@ the built binary by seeing if it contains a ".note.stapsdt" section.
$ readelf -S ./python | grep .note.stapsdt
[30] .note.stapsdt NOTE 0000000000000000 00308d78

If you've built Python as a shared library (with --enable-shared), you
If you've built Python as a shared library
(with the :option:`--enable-shared` configure option), you
need to look instead within the shared library. For example::

$ readelf -S libpython3.3dm.so.1.0 | grep .note.stapsdt
Expand Down Expand Up @@ -252,7 +254,7 @@ where the columns are:

and the remainder indicates the call/return hierarchy as the script executes.

For a `--enable-shared` build of CPython, the markers are contained within the
For a :option:`--enable-shared` build of CPython, the markers are contained within the
libpython shared library, and the probe's dotted path needs to reflect this. For
example, this line from the above example:

Expand Down
Loading