Skip to content

Commit 1e24f80

Browse files
committed
Merge branch 'main' into gh-89812-add-lexicalpath
2 parents 45f6bd3 + d593074 commit 1e24f80

File tree

148 files changed

+2719
-4209
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

148 files changed

+2719
-4209
lines changed

.github/workflows/build.yml

Lines changed: 35 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ permissions:
2828
contents: read
2929

3030
concurrency:
31-
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
31+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}-reusable
3232
cancel-in-progress: true
3333

3434
jobs:
@@ -37,8 +37,10 @@ jobs:
3737
runs-on: ubuntu-latest
3838
timeout-minutes: 10
3939
outputs:
40+
run-docs: ${{ steps.docs-changes.outputs.run-docs || false }}
4041
run_tests: ${{ steps.check.outputs.run_tests }}
4142
run_hypothesis: ${{ steps.check.outputs.run_hypothesis }}
43+
config_hash: ${{ steps.config_hash.outputs.hash }}
4244
steps:
4345
- uses: actions/checkout@v3
4446
- name: Check for source changes
@@ -74,6 +76,32 @@ jobs:
7476
echo "Run hypothesis tests"
7577
echo "run_hypothesis=true" >> $GITHUB_OUTPUT
7678
fi
79+
- name: Compute hash for config cache key
80+
id: config_hash
81+
run: |
82+
echo "hash=${{ hashFiles('configure', 'configure.ac', '.github/workflows/build.yml') }}" >> $GITHUB_OUTPUT
83+
- name: Get a list of the changed documentation-related files
84+
if: github.event_name == 'pull_request'
85+
id: changed-docs-files
86+
uses: Ana06/get-changed-files@v2.2.0
87+
with:
88+
filter: |
89+
Doc/**
90+
Misc/**
91+
.github/workflows/reusable-docs.yml
92+
- name: Check for docs changes
93+
if: >-
94+
github.event_name == 'pull_request'
95+
&& steps.changed-docs-files.outputs.added_modified_renamed != ''
96+
id: docs-changes
97+
run: |
98+
echo "run-docs=true" >> "${GITHUB_OUTPUT}"
99+
100+
check-docs:
101+
name: Docs
102+
needs: check_source
103+
if: fromJSON(needs.check_source.outputs.run-docs)
104+
uses: ./.github/workflows/reusable-docs.yml
77105

78106
check_generated_files:
79107
name: 'Check if generated files are up to date'
@@ -87,7 +115,7 @@ jobs:
87115
uses: actions/cache@v3
88116
with:
89117
path: config.cache
90-
key: ${{ github.job }}-${{ runner.os }}-${{ hashFiles('configure', 'configure.ac', '.github/workflows/build.yml') }}
118+
key: ${{ github.job }}-${{ runner.os }}-${{ needs.check_source.outputs.config_hash }}
91119
- uses: actions/setup-python@v3
92120
- name: Install Dependencies
93121
run: sudo ./.github/workflows/posix-deps-apt.sh
@@ -189,7 +217,7 @@ jobs:
189217
uses: actions/cache@v3
190218
with:
191219
path: config.cache
192-
key: ${{ github.job }}-${{ runner.os }}-${{ hashFiles('configure', 'configure.ac', '.github/workflows/build.yml') }}
220+
key: ${{ github.job }}-${{ runner.os }}-${{ needs.check_source.outputs.config_hash }}
193221
- name: Install Homebrew dependencies
194222
run: brew install pkg-config openssl@1.1 xz gdbm tcl-tk
195223
- name: Configure CPython
@@ -255,7 +283,7 @@ jobs:
255283
uses: actions/cache@v3
256284
with:
257285
path: ${{ env.CPYTHON_BUILDDIR }}/config.cache
258-
key: ${{ github.job }}-${{ runner.os }}-${{ hashFiles('configure', 'configure.ac', '.github/workflows/build.yml') }}
286+
key: ${{ github.job }}-${{ runner.os }}-${{ needs.check_source.outputs.config_hash }}
259287
- name: Configure CPython out-of-tree
260288
working-directory: ${{ env.CPYTHON_BUILDDIR }}
261289
run: |
@@ -297,7 +325,7 @@ jobs:
297325
uses: actions/cache@v3
298326
with:
299327
path: config.cache
300-
key: ${{ github.job }}-${{ runner.os }}-${{ hashFiles('configure', 'configure.ac', '.github/workflows/build.yml') }}
328+
key: ${{ github.job }}-${{ runner.os }}-${{ needs.check_source.outputs.config_hash }}
301329
- name: Register gcc problem matcher
302330
run: echo "::add-matcher::.github/problem-matchers/gcc.json"
303331
- name: Install Dependencies
@@ -376,7 +404,7 @@ jobs:
376404
uses: actions/cache@v3
377405
with:
378406
path: ${{ env.CPYTHON_BUILDDIR }}/config.cache
379-
key: ${{ github.job }}-${{ runner.os }}-${{ hashFiles('configure', 'configure.ac', '.github/workflows/build.yml') }}
407+
key: ${{ github.job }}-${{ runner.os }}-${{ needs.check_source.outputs.config_hash }}
380408
- name: Configure CPython out-of-tree
381409
working-directory: ${{ env.CPYTHON_BUILDDIR }}
382410
run: |
@@ -455,7 +483,7 @@ jobs:
455483
uses: actions/cache@v3
456484
with:
457485
path: config.cache
458-
key: ${{ github.job }}-${{ runner.os }}-${{ hashFiles('configure', 'configure.ac', '.github/workflows/build.yml') }}
486+
key: ${{ github.job }}-${{ runner.os }}-${{ needs.check_source.outputs.config_hash }}
459487
- name: Register gcc problem matcher
460488
run: echo "::add-matcher::.github/problem-matchers/gcc.json"
461489
- name: Install Dependencies
Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,8 @@
11
name: Docs
22

33
on:
4+
workflow_call:
45
workflow_dispatch:
5-
#push:
6-
# branches:
7-
# - 'main'
8-
# - '3.12'
9-
# - '3.11'
10-
# - '3.10'
11-
# - '3.9'
12-
# - '3.8'
13-
# - '3.7'
14-
# paths:
15-
# - 'Doc/**'
16-
pull_request:
17-
branches:
18-
- 'main'
19-
- '3.12'
20-
- '3.11'
21-
- '3.10'
22-
- '3.9'
23-
- '3.8'
24-
- '3.7'
25-
paths:
26-
- 'Doc/**'
27-
- 'Misc/**'
28-
- '.github/workflows/doc.yml'
296

307
permissions:
318
contents: read

Doc/c-api/structures.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,7 @@ Accessing attributes of extension types
395395
396396
The string should be static, no copy is made of it.
397397
398-
.. c:member:: Py_ssize_t PyMemberDef.offset
398+
.. c:member:: Py_ssize_t offset
399399
400400
The offset in bytes that the member is located on the type’s object struct.
401401
@@ -625,23 +625,23 @@ Defining Getters and Setters
625625
Structure to define property-like access for a type. See also description of
626626
the :c:member:`PyTypeObject.tp_getset` slot.
627627
628-
.. c:member:: const char* PyGetSetDef.name
628+
.. c:member:: const char* name
629629
630630
attribute name
631631
632-
.. c:member:: getter PyGetSetDef.get
632+
.. c:member:: getter get
633633
634634
C function to get the attribute.
635635
636-
.. c:member:: setter PyGetSetDef.set
636+
.. c:member:: setter set
637637
638638
Optional C function to set or delete the attribute, if omitted the attribute is readonly.
639639
640-
.. c:member:: const char* PyGetSetDef.doc
640+
.. c:member:: const char* doc
641641
642642
optional docstring
643643
644-
.. c:member:: void* PyGetSetDef.closure
644+
.. c:member:: void* closure
645645
646646
Optional function pointer, providing additional data for getter and setter.
647647

Doc/c-api/type.rst

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -349,6 +349,15 @@ The following functions and structs are used to create
349349
:c:member:`~PyTypeObject.tp_new` is deprecated and in Python 3.14+ it
350350
will be no longer allowed.
351351
352+
.. raw:: html
353+
354+
<!-- Keep old URL fragments working (see gh-97908) -->
355+
<span id='c.PyType_Spec.PyType_Spec.name'></span>
356+
<span id='c.PyType_Spec.PyType_Spec.basicsize'></span>
357+
<span id='c.PyType_Spec.PyType_Spec.itemsize'></span>
358+
<span id='c.PyType_Spec.PyType_Spec.flags'></span>
359+
<span id='c.PyType_Spec.PyType_Spec.slots'></span>
360+
352361
.. c:type:: PyType_Spec
353362
354363
Structure defining a type's behavior.
@@ -410,12 +419,18 @@ The following functions and structs are used to create
410419
411420
Each slot ID should be specified at most once.
412421
422+
.. raw:: html
423+
424+
<!-- Keep old URL fragments working (see gh-97908) -->
425+
<span id='c.PyType_Slot.PyType_Slot.slot'></span>
426+
<span id='c.PyType_Slot.PyType_Slot.pfunc'></span>
427+
413428
.. c:type:: PyType_Slot
414429
415430
Structure defining optional functionality of a type, containing a slot ID
416431
and a value pointer.
417432
418-
.. c:member:: int PyType_Slot.slot
433+
.. c:member:: int slot
419434
420435
A slot ID.
421436
@@ -459,7 +474,7 @@ The following functions and structs are used to create
459474
:c:member:`~PyBufferProcs.bf_releasebuffer` are now available
460475
under the limited API.
461476
462-
.. c:member:: void *PyType_Slot.pfunc
477+
.. c:member:: void *pfunc
463478
464479
The desired value of the slot. In most cases, this is a pointer
465480
to a function.

Doc/conf.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,6 @@
235235
# match any of the following regexes (using re.match).
236236
coverage_ignore_modules = [
237237
r'[T|t][k|K]',
238-
r'Tix',
239238
]
240239

241240
coverage_ignore_functions = [

Doc/faq/gui.rst

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -46,15 +46,8 @@ One solution is to ship the application with the Tcl and Tk libraries, and point
4646
to them at run-time using the :envvar:`TCL_LIBRARY` and :envvar:`TK_LIBRARY`
4747
environment variables.
4848

49-
To get truly stand-alone applications, the Tcl scripts that form the library
50-
have to be integrated into the application as well. One tool supporting that is
51-
SAM (stand-alone modules), which is part of the Tix distribution
52-
(https://tix.sourceforge.net/).
53-
54-
Build Tix with SAM enabled, perform the appropriate call to
55-
:c:func:`Tclsam_init`, etc. inside Python's
56-
:file:`Modules/tkappinit.c`, and link with libtclsam and libtksam (you
57-
might include the Tix libraries as well).
49+
Various third-party freeze libraries such as py2exe and cx_Freeze have
50+
handling for Tkinter applications built-in.
5851

5952

6053
Can I have Tk events handled while waiting for I/O?

0 commit comments

Comments
 (0)