◐ Shell
reader mode source ↗
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
File filter
Conversations
Jump to
Diff view
Apply and reload
Show whitespace
Diff view
Apply and reload
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

# 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 }}
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'
else
git fetch origin $GITHUB_BASE_REF --depth=1
# git diff "origin/$GITHUB_BASE_REF..." (3 dots) may be more
@@ -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
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: '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
- name: Configure CPython
run: ./configure --with-pydebug --with-openssl=$PWD/multissl/openssl/$OPENSSL_VER
- name: Build CPython
run: make -j4
- name: Display build info
run: make pythoninfo
- name: Tests
run: xvfb-run make buildbottest TESTOPTS="-j4 -uall,-cpu"
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
- 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 \
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"
- 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``.
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>`.

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>`.

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"``).

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).

Default: empty list.

.. c:member:: int write_bytecode
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.


.. _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('queue empty')
break
else:
print('Worker', threading.currentThread(), 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::

from bar import bar_var
foo_var = 1

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

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
@@ -46,7 +46,8 @@ or::
$ sudo apt-get install systemtap-sdt-dev


CPython must then be configured ``--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
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
libpython shared library, and the probe's dotted path needs to reflect this. For
example, this line from the above example:

Expand Down
Loading
Toggle all file notes Toggle all file annotations