Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
7 changes: 3 additions & 4 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -171,9 +171,6 @@ Mac/ @python/macos-team
Lib/_osx_support.py @python/macos-team
Lib/test/test__osx_support.py @python/macos-team

# WebAssembly
Tools/wasm/README.md @brettcannon @freakboy3742 @emmatyping

# WebAssembly (Emscripten)
Platforms/emscripten @freakboy3742 @emmatyping
Tools/wasm/emscripten @freakboy3742 @emmatyping
Expand Down Expand Up @@ -335,7 +332,6 @@ Modules/_remote_debugging/ @pablogsal

# Sub-Interpreters
**/*crossinterp* @ericsnowcurrently
**/*interpreteridobject.* @ericsnowcurrently
Doc/library/concurrent.interpreters.rst @ericsnowcurrently
Lib/concurrent/futures/interpreter.py @ericsnowcurrently
Lib/concurrent/interpreters/ @ericsnowcurrently
Expand Down Expand Up @@ -646,3 +642,6 @@ Modules/**/clinic/
Objects/**/clinic/
PC/**/clinic/
Python/**/clinic/

# Exclude HTML IDs list
Doc/tools/removed-ids.txt
8 changes: 4 additions & 4 deletions .github/workflows/reusable-san.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
SAN_LOG_OPTION: log_path=${{ github.workspace }}/san_log
SUPPRESSIONS_SUFFIX: >-
${{
fromJSON(inputs.free-threading)
inputs.free-threading
&& '_free_threading'
|| ''
}}
Expand Down Expand Up @@ -101,7 +101,7 @@ jobs:
}}
--with-pydebug
${{ inputs.sanitizer == 'TSan' && '--with-openssl="$OPENSSL_DIR" --with-openssl-rpath=auto' || '' }}
${{ fromJSON(inputs.free-threading) && '--disable-gil' || '' }}
${{ inputs.free-threading && '--disable-gil' || '' }}
- name: Build CPython
run: make -j4
- name: Display build info
Expand All @@ -114,7 +114,7 @@ jobs:
- name: Parallel tests
if: >-
inputs.sanitizer == 'TSan'
&& fromJSON(inputs.free-threading)
&& inputs.free-threading
run: ./python -m test --tsan-parallel --parallel-threads=4 -j4 -W --timeout=600 --slowest
- name: Display logs
if: always()
Expand All @@ -125,7 +125,7 @@ jobs:
with:
name: >-
${{ inputs.sanitizer }}-logs-${{
fromJSON(inputs.free-threading)
inputs.free-threading
&& 'free-threading'
|| 'default'
}}
Expand Down
22 changes: 11 additions & 11 deletions .github/workflows/reusable-ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ on:
type: boolean
default: false
os:
description: OS to run the job
required: true
type: string
description: OS to run the job
required: true
type: string
test-opts:
description: Extra options to pass to the test runner via TESTOPTS
required: false
type: string
default: ''
description: Extra options to pass to the test runner via TESTOPTS
required: false
type: string
default: ''

permissions:
contents: read
Expand All @@ -47,7 +47,7 @@ jobs:
- name: Install dependencies
run: sudo ./.github/workflows/posix-deps-apt.sh
- name: Install Clang and BOLT
if: ${{ fromJSON(inputs.bolt-optimizations) }}
if: inputs.bolt-optimizations
run: |
# On ubuntu-26.04 image, LLVM is LLVM-21 by default
sudo apt-get install --no-install-recommends bolt-21
Expand Down Expand Up @@ -88,10 +88,10 @@ jobs:
--enable-slower-safety
--enable-safety
--with-openssl="$OPENSSL_DIR"
${{ fromJSON(inputs.free-threading) && '--disable-gil' || '' }}
${{ fromJSON(inputs.bolt-optimizations) && '--enable-bolt' || '' }}
${{ inputs.free-threading && '--disable-gil' || '' }}
${{ inputs.bolt-optimizations && '--enable-bolt' || '' }}
- name: Build CPython out-of-tree
if: ${{ inputs.free-threading }}
if: inputs.free-threading
working-directory: ${{ env.CPYTHON_BUILDDIR }}
run: make -j
- name: Build CPython out-of-tree (for compiler warning check)
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/reusable-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
-e -v
${{ inputs.interpreter == 'switch-case' && '-d' || '--tail-call-interp -c Release' }}
-p "${ARCH}"
${{ fromJSON(inputs.free-threading) && '--disable-gil' || '' }}
${{ inputs.free-threading && '--disable-gil' || '' }}
shell: bash
- name: Display build info
run: .\\python.bat -m test.pythoninfo
Expand All @@ -55,5 +55,5 @@ jobs:
-p "${ARCH}"
-q --fast-ci
${{ inputs.interpreter == 'switch-case' && '-d' || '' }}
${{ fromJSON(inputs.free-threading) && '--disable-gil' || '' }}
${{ inputs.free-threading && '--disable-gil' || '' }}
shell: bash
9 changes: 9 additions & 0 deletions Doc/library/collections.rst
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,15 @@ For example::
>>> c['sausage'] = 0 # counter entry with a zero count
>>> del c['sausage'] # del actually removes the entry

Counters maintain insertion order internally but display from most common to
least common when possible:

>>> c = Counter(a=1, b=2, c=3)
>>> c # display most common to least
Counter({'c': 3, 'b': 2, 'a': 1})
>>> list(c.items()) # original insertion order
[('a', 1), ('b', 2), ('c', 3)]

.. versionadded:: 3.1

.. versionchanged:: 3.7 As a :class:`dict` subclass, :class:`Counter`
Expand Down
3 changes: 2 additions & 1 deletion Doc/library/tempfile.rst
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,8 @@ The module defines the following user-callable items:
The file descriptor is :ref:`not inherited by child processes <fd_inheritance>`.

Unlike :func:`TemporaryFile`, the user of :func:`mkstemp` is responsible
for deleting the temporary file when done with it.
for closing the file descriptor (for example, using :func:`os.close`) and
deleting the temporary file (for example, using :func:`os.remove`).

If *suffix* is not ``None``, the file name will end with that suffix,
otherwise there will be no suffix. :func:`mkstemp` does not put a dot
Expand Down
1 change: 0 additions & 1 deletion Doc/tools/.nitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,3 @@ Doc/library/xml.sax.reader.rst
Doc/library/xml.sax.rst
Doc/library/xmlrpc.client.rst
Doc/library/xmlrpc.server.rst
Doc/whatsnew/2.6.rst
1 change: 1 addition & 0 deletions Doc/using/mac.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.. highlight:: none

.. _using-on-mac:

Expand Down
Loading
Loading