Skip to content

Commit ab63fe4

Browse files
authored
Merge branch 'main' into pep639
2 parents 0fba2a9 + c6a3722 commit ab63fe4

File tree

5 files changed

+63
-1
lines changed

5 files changed

+63
-1
lines changed

.github/workflows/zizmor.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# From https://woodruffw.github.io/zizmor/usage/#use-in-github-actions
2+
3+
name: GitHub Actions Security Analysis with zizmor 🌈
4+
5+
on:
6+
push:
7+
branches: ["main"]
8+
pull_request:
9+
branches: ["**"]
10+
11+
jobs:
12+
zizmor:
13+
name: zizmor latest via PyPI
14+
runs-on: ubuntu-latest
15+
permissions:
16+
security-events: write
17+
# required for workflows in private repositories
18+
contents: read
19+
actions: read
20+
steps:
21+
- name: Checkout repository
22+
uses: actions/checkout@v4
23+
with:
24+
persist-credentials: false
25+
26+
- name: Install the latest version of uv
27+
uses: astral-sh/setup-uv@v5
28+
29+
- name: Run zizmor 🌈
30+
run: uvx zizmor --format sarif source/guides/github-actions-ci-cd-sample/* > results.sarif
31+
env:
32+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
33+
34+
- name: Upload SARIF file
35+
uses: github/codeql-action/upload-sarif@v3
36+
with:
37+
sarif_file: results.sarif
38+
category: zizmor

source/guides/writing-pyproject-toml.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ To install a command as part of your package, declare it in the
236236
237237
In this example, after installing your project, a ``spam-cli`` command
238238
will be available. Executing this command will do the equivalent of
239-
``from spam import main_cli; main_cli()``.
239+
``import sys; from spam import main_cli; sys.exit(main_cli())``.
240240

241241
On Windows, scripts packaged this way need a terminal, so if you launch
242242
them from within a graphical application, they will make a terminal pop

source/specifications/dependency-specifiers.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,8 @@ Whitespace
128128
Non line-breaking whitespace is mostly optional with no semantic meaning. The
129129
sole exception is detecting the end of a URL requirement.
130130

131+
.. _dependency-specifiers-names:
132+
131133
Names
132134
-----
133135

@@ -142,6 +144,8 @@ with re.IGNORECASE) is::
142144

143145
^([A-Z0-9]|[A-Z0-9][A-Z0-9._-]*[A-Z0-9])$
144146

147+
.. _dependency-specifiers-extras:
148+
145149
Extras
146150
------
147151

@@ -159,6 +163,8 @@ are listed in the "security" extra of requests.
159163

160164
If multiple extras are listed, all the dependencies are unioned together.
161165

166+
.. _dependency-specifiers-versions:
167+
162168
Versions
163169
--------
164170

@@ -170,6 +176,8 @@ via a URL. Version comparison are also used in the markers feature. The
170176
optional brackets around a version are present for compatibility with
171177
:pep:`345` but should not be generated, only accepted.
172178

179+
.. _dependency-specifiers-environment-markers:
180+
173181
Environment Markers
174182
-------------------
175183

@@ -294,6 +302,8 @@ The ``implementation_version`` marker variable is derived from
294302
This environment markers section, initially defined through :pep:`508`, supersedes the environment markers
295303
section in :pep:`345`.
296304

305+
.. _dependency-specifiers-grammar:
306+
297307
Complete Grammar
298308
================
299309

source/specifications/direct-url-data-structure.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ Additionally, the user:password section of the URL MAY be a
4949
well-known, non security sensitive string. A typical example is ``git``
5050
in the case of a URL such as ``ssh://[email protected]/user/repo``.
5151

52+
.. _direct-url-data-structure-vcs:
53+
5254
VCS URLs
5355
--------
5456

@@ -72,6 +74,8 @@ as a dictionary with the following keys:
7274
``commit_id`` in order to reference an immutable
7375
version of the source code.
7476

77+
.. _direct-url-data-structure-archive:
78+
7579
Archive URLs
7680
------------
7781

@@ -104,6 +108,8 @@ When both the ``hash`` and ``hashes`` keys are present, the hash represented in
104108
``hash`` key MUST also be present in the ``hashes`` dictionary, so consumers can
105109
consider the ``hashes`` key only if it is present, and fall back to ``hash`` otherwise.
106110

111+
.. _direct-url-data-structure-local-directory:
112+
107113
Local directories
108114
-----------------
109115

@@ -118,13 +124,17 @@ be compliant with :rfc:`8089`. In
118124
particular, the path component must be absolute. Symbolic links SHOULD be
119125
preserved when making relative paths absolute.
120126

127+
.. _direct-url-data-structure-subdirectories:
128+
121129
Projects in subdirectories
122130
--------------------------
123131

124132
A top-level ``subdirectory`` field MAY be present containing a directory path,
125133
relative to the root of the VCS repository, source archive or local directory,
126134
to specify where ``pyproject.toml`` or ``setup.py`` is located.
127135

136+
.. _direct-url-data-structure-registered-vcs:
137+
128138
Registered VCS
129139
==============
130140

source/specifications/source-distribution-format.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ specification.
2020

2121
Source distributions are also known as *sdists* for short.
2222

23+
.. _source-distribution-format-source-tree:
24+
2325
Source trees
2426
============
2527

@@ -30,6 +32,8 @@ directories. :pep:`517` and :pep:`518` specify what is required to meet the
3032
definition of what :file:`pyproject.toml` must contain for something to be
3133
deemed a source tree.
3234

35+
.. _source-distribution-format-sdist:
36+
3337
Source distribution file name
3438
=============================
3539

0 commit comments

Comments
 (0)