Skip to content

Commit

Permalink
Merge branch 'main' into pythongh-89812-add-lexicalpath
Browse files Browse the repository at this point in the history
  • Loading branch information
barneygale committed May 29, 2023
2 parents 45f6bd3 + d593074 commit 1e24f80
Show file tree
Hide file tree
Showing 148 changed files with 2,719 additions and 4,209 deletions.
42 changes: 35 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}-reusable
cancel-in-progress: true

jobs:
Expand All @@ -37,8 +37,10 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 10
outputs:
run-docs: ${{ steps.docs-changes.outputs.run-docs || false }}
run_tests: ${{ steps.check.outputs.run_tests }}
run_hypothesis: ${{ steps.check.outputs.run_hypothesis }}
config_hash: ${{ steps.config_hash.outputs.hash }}
steps:
- uses: actions/checkout@v3
- name: Check for source changes
Expand Down Expand Up @@ -74,6 +76,32 @@ jobs:
echo "Run hypothesis tests"
echo "run_hypothesis=true" >> $GITHUB_OUTPUT
fi
- name: Compute hash for config cache key
id: config_hash
run: |
echo "hash=${{ hashFiles('configure', 'configure.ac', '.github/workflows/build.yml') }}" >> $GITHUB_OUTPUT
- name: Get a list of the changed documentation-related files
if: github.event_name == 'pull_request'
id: changed-docs-files
uses: Ana06/[email protected]
with:
filter: |
Doc/**
Misc/**
.github/workflows/reusable-docs.yml
- name: Check for docs changes
if: >-
github.event_name == 'pull_request'
&& steps.changed-docs-files.outputs.added_modified_renamed != ''
id: docs-changes
run: |
echo "run-docs=true" >> "${GITHUB_OUTPUT}"
check-docs:
name: Docs
needs: check_source
if: fromJSON(needs.check_source.outputs.run-docs)
uses: ./.github/workflows/reusable-docs.yml

check_generated_files:
name: 'Check if generated files are up to date'
Expand All @@ -87,7 +115,7 @@ jobs:
uses: actions/cache@v3
with:
path: config.cache
key: ${{ github.job }}-${{ runner.os }}-${{ hashFiles('configure', 'configure.ac', '.github/workflows/build.yml') }}
key: ${{ github.job }}-${{ runner.os }}-${{ needs.check_source.outputs.config_hash }}
- uses: actions/setup-python@v3
- name: Install Dependencies
run: sudo ./.github/workflows/posix-deps-apt.sh
Expand Down Expand Up @@ -189,7 +217,7 @@ jobs:
uses: actions/cache@v3
with:
path: config.cache
key: ${{ github.job }}-${{ runner.os }}-${{ hashFiles('configure', 'configure.ac', '.github/workflows/build.yml') }}
key: ${{ github.job }}-${{ runner.os }}-${{ needs.check_source.outputs.config_hash }}
- name: Install Homebrew dependencies
run: brew install pkg-config [email protected] xz gdbm tcl-tk
- name: Configure CPython
Expand Down Expand Up @@ -255,7 +283,7 @@ jobs:
uses: actions/cache@v3
with:
path: ${{ env.CPYTHON_BUILDDIR }}/config.cache
key: ${{ github.job }}-${{ runner.os }}-${{ hashFiles('configure', 'configure.ac', '.github/workflows/build.yml') }}
key: ${{ github.job }}-${{ runner.os }}-${{ needs.check_source.outputs.config_hash }}
- name: Configure CPython out-of-tree
working-directory: ${{ env.CPYTHON_BUILDDIR }}
run: |
Expand Down Expand Up @@ -297,7 +325,7 @@ jobs:
uses: actions/cache@v3
with:
path: config.cache
key: ${{ github.job }}-${{ runner.os }}-${{ hashFiles('configure', 'configure.ac', '.github/workflows/build.yml') }}
key: ${{ github.job }}-${{ runner.os }}-${{ needs.check_source.outputs.config_hash }}
- name: Register gcc problem matcher
run: echo "::add-matcher::.github/problem-matchers/gcc.json"
- name: Install Dependencies
Expand Down Expand Up @@ -376,7 +404,7 @@ jobs:
uses: actions/cache@v3
with:
path: ${{ env.CPYTHON_BUILDDIR }}/config.cache
key: ${{ github.job }}-${{ runner.os }}-${{ hashFiles('configure', 'configure.ac', '.github/workflows/build.yml') }}
key: ${{ github.job }}-${{ runner.os }}-${{ needs.check_source.outputs.config_hash }}
- name: Configure CPython out-of-tree
working-directory: ${{ env.CPYTHON_BUILDDIR }}
run: |
Expand Down Expand Up @@ -455,7 +483,7 @@ jobs:
uses: actions/cache@v3
with:
path: config.cache
key: ${{ github.job }}-${{ runner.os }}-${{ hashFiles('configure', 'configure.ac', '.github/workflows/build.yml') }}
key: ${{ github.job }}-${{ runner.os }}-${{ needs.check_source.outputs.config_hash }}
- name: Register gcc problem matcher
run: echo "::add-matcher::.github/problem-matchers/gcc.json"
- name: Install Dependencies
Expand Down
Original file line number Diff line number Diff line change
@@ -1,31 +1,8 @@
name: Docs

on:
workflow_call:
workflow_dispatch:
#push:
# branches:
# - 'main'
# - '3.12'
# - '3.11'
# - '3.10'
# - '3.9'
# - '3.8'
# - '3.7'
# paths:
# - 'Doc/**'
pull_request:
branches:
- 'main'
- '3.12'
- '3.11'
- '3.10'
- '3.9'
- '3.8'
- '3.7'
paths:
- 'Doc/**'
- 'Misc/**'
- '.github/workflows/doc.yml'

permissions:
contents: read
Expand Down
12 changes: 6 additions & 6 deletions Doc/c-api/structures.rst
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ Accessing attributes of extension types
The string should be static, no copy is made of it.
.. c:member:: Py_ssize_t PyMemberDef.offset
.. c:member:: Py_ssize_t offset
The offset in bytes that the member is located on the type’s object struct.
Expand Down Expand Up @@ -625,23 +625,23 @@ Defining Getters and Setters
Structure to define property-like access for a type. See also description of
the :c:member:`PyTypeObject.tp_getset` slot.
.. c:member:: const char* PyGetSetDef.name
.. c:member:: const char* name
attribute name
.. c:member:: getter PyGetSetDef.get
.. c:member:: getter get
C function to get the attribute.
.. c:member:: setter PyGetSetDef.set
.. c:member:: setter set
Optional C function to set or delete the attribute, if omitted the attribute is readonly.
.. c:member:: const char* PyGetSetDef.doc
.. c:member:: const char* doc
optional docstring
.. c:member:: void* PyGetSetDef.closure
.. c:member:: void* closure
Optional function pointer, providing additional data for getter and setter.
Expand Down
19 changes: 17 additions & 2 deletions Doc/c-api/type.rst
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,15 @@ The following functions and structs are used to create
:c:member:`~PyTypeObject.tp_new` is deprecated and in Python 3.14+ it
will be no longer allowed.
.. raw:: html
<!-- Keep old URL fragments working (see gh-97908) -->
<span id='c.PyType_Spec.PyType_Spec.name'></span>
<span id='c.PyType_Spec.PyType_Spec.basicsize'></span>
<span id='c.PyType_Spec.PyType_Spec.itemsize'></span>
<span id='c.PyType_Spec.PyType_Spec.flags'></span>
<span id='c.PyType_Spec.PyType_Spec.slots'></span>
.. c:type:: PyType_Spec
Structure defining a type's behavior.
Expand Down Expand Up @@ -410,12 +419,18 @@ The following functions and structs are used to create
Each slot ID should be specified at most once.
.. raw:: html
<!-- Keep old URL fragments working (see gh-97908) -->
<span id='c.PyType_Slot.PyType_Slot.slot'></span>
<span id='c.PyType_Slot.PyType_Slot.pfunc'></span>
.. c:type:: PyType_Slot
Structure defining optional functionality of a type, containing a slot ID
and a value pointer.
.. c:member:: int PyType_Slot.slot
.. c:member:: int slot
A slot ID.
Expand Down Expand Up @@ -459,7 +474,7 @@ The following functions and structs are used to create
:c:member:`~PyBufferProcs.bf_releasebuffer` are now available
under the limited API.
.. c:member:: void *PyType_Slot.pfunc
.. c:member:: void *pfunc
The desired value of the slot. In most cases, this is a pointer
to a function.
Expand Down
1 change: 0 additions & 1 deletion Doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,6 @@
# match any of the following regexes (using re.match).
coverage_ignore_modules = [
r'[T|t][k|K]',
r'Tix',
]

coverage_ignore_functions = [
Expand Down
11 changes: 2 additions & 9 deletions Doc/faq/gui.rst
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,8 @@ One solution is to ship the application with the Tcl and Tk libraries, and point
to them at run-time using the :envvar:`TCL_LIBRARY` and :envvar:`TK_LIBRARY`
environment variables.

To get truly stand-alone applications, the Tcl scripts that form the library
have to be integrated into the application as well. One tool supporting that is
SAM (stand-alone modules), which is part of the Tix distribution
(https://tix.sourceforge.net/).

Build Tix with SAM enabled, perform the appropriate call to
:c:func:`Tclsam_init`, etc. inside Python's
:file:`Modules/tkappinit.c`, and link with libtclsam and libtksam (you
might include the Tix libraries as well).
Various third-party freeze libraries such as py2exe and cx_Freeze have
handling for Tkinter applications built-in.


Can I have Tk events handled while waiting for I/O?
Expand Down
Loading

0 comments on commit 1e24f80

Please sign in to comment.