Skip to content

Commit 03c9c6b

Browse files
committed
PEP 676: Copyedit text for clarity, grammar, readibility and meaning
1 parent cd4e570 commit 03c9c6b

File tree

1 file changed

+40
-30
lines changed

1 file changed

+40
-30
lines changed

pep-0676.rst

Lines changed: 40 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,9 @@ to create a full local instance of the `python.org`_ website and run a number
5555
of disparate scripts, following `documentation`_ that lives outside of the
5656
`python/peps`_ repository.
5757

58-
The proposed implementation provides a single `Makefile`_ and a Python script
59-
to render all PEP files, with options to target a web server or local
60-
filesystem environment.
58+
By contrast, the proposed implementation provides a single `Makefile`_ and a
59+
Python script to render all PEP files, with options to target a web server or
60+
the local filesystem environment.
6161

6262
Using a single repository to host all tooling will clarify where to raise
6363
issues, reducing volunteer time spent in triage.
@@ -81,16 +81,17 @@ There are several requests for additional features in reading PEPs, such as:
8181

8282
These are "easy wins" from this proposal, and would serve to improve the
8383
quality-of-life for consumers of PEPs (including reviewers and writers). For
84-
example, the reference implementation no longer requires a scheduled render
84+
example, the new reference implementation no longer requires a scheduled render
8585
process to run, instead initiating rendering on every commit to the
8686
`python/peps`_ repository.
8787

88-
Equally, there are a small number of broken items, for example list styles not
89-
being respected or support for updating images being challenging with the
90-
system [7]_. These would be solved by default in the proposal.
88+
Equally, there are a number of broken items currently; for example, list styles
89+
are not respected, and support for updating images is challenging with the
90+
current system [7]_. These are solved by the reference implementation of
91+
this proposal.
9192

92-
Commercial providers such as `Read the Docs`_ can additionally enhance this
93-
experience, for example by providing rendered previews of changes in pull
93+
Third-party providers such as `Read the Docs`_ can additionally enhance this
94+
experience; for example, by providing rendered previews of changes in pull
9495
requests.
9596

9697

@@ -100,17 +101,19 @@ Specification
100101
The proposed specification for rendering the PEP files to HTML is as per the
101102
`reference implementation`_.
102103

103-
That the HTML files should be made available under ``peps.python.org``. The
104-
rendered files may be hosted just as static files, and behind a content
105-
delivery network (CDN).
104+
The HTML files SHOULD be made available under the ``peps.python.org`` domain.
105+
The rendered output SHOULD be hosted as static files, and MAY be behind a
106+
content delivery network (CDN).
106107

107-
The following redirect rules must be created from the `python.org`_ domain:
108+
The following redirect rules MUST be created from the `python.org`_ domain:
108109

109110
* ``/peps/`` -> https://peps.python.org/
110111
* ``/dev/peps/`` -> https://peps.python.org/
111112
* ``/peps/(.*)\.html`` -> https://peps.python.org/$1
112113
* ``/dev/peps/(.*)`` -> https://peps.python.org/$1
113114

115+
The following Nginx configuration would achieve this:
116+
114117
.. code-block:: nginx
115118
116119
location ~ ^/dev/peps/?(.*)$ {
@@ -125,53 +128,60 @@ The following redirect rules must be created from the `python.org`_ domain:
125128
return 308 https://peps.python.org/;
126129
}
127130
128-
Redirects must be implemented to preserve `URL fragments`_ for backward
131+
Redirects MUST be implemented to preserve `URL fragments`_ for backward
129132
compatibility purposes.
130133

131134

132135
Backwards Compatibility
133136
=======================
134137

135-
Due to server-side redirects to new canonical URLs, there are no backwards
136-
compatibility concerns. Links in previously published materials referring to
137-
any old URL scheme will be guaranteed to work.
138+
Due to server-side redirects to new canonical URLs, links in previously
139+
published materials referring to the old URL scheme will be guaranteed to work.
140+
Furthermore, aside from the resolved bugs and new implemented features, all
141+
existing PEPs will still render as they did before with the new backend.
142+
Therefore, this poses no major backwards compatibility concerns.
138143

139144

140145
Security Implications
141146
=====================
142147

143-
No security implications, and the main `python.org`_ website will no longer
144-
take raw HTML uploads, closing a potential threat vector.
148+
The main `python.org`_ website will no longer need to process raw HTML
149+
uploads, closing a potential threat vector, and the PEP building and
150+
deployment process will use modern, well maintained code and secure
151+
automated platforms, reducing likely potential attack surface. Therefore,
152+
there is no forseen negative security impact.
145153

146154

147155
How to Teach This
148156
=================
149157

150158
The new canonical URLs will be publicised in the documentation. However, this
151159
is mainly a backend infrastructure change, and there should be minimal
152-
end-user impact.
160+
end-user impact. PEP 1 and PEP 12 will be updated as needed to include and
161+
document any relevant new roles, directive, syntax and other constructs enabled
162+
by this change.
153163

154164

155165
Reference Implementation
156166
========================
157167

158168
The proposed implementation has been merged into the `python/peps`_ repository
159-
in a series of pull requests [8]_. This automatically renders all PEPs on every
160-
commit.
169+
in a series of pull requests [8]_. It currently automatically renders all
170+
PEPs on every commit.
161171

162172

163173
Rejected Ideas
164174
==============
165175

166-
It would likely be possible to amend the current (as of November 2021)
167-
rendering process to include a lot of the quality-of-life improvements and
168-
issue mitigations mentioned above. However, we do not believe that this would
176+
It would likely be possible to amend the current docutils-based manual
177+
rendering process to include many of the quality-of-life improvements and
178+
bug mitigations mentioned above. However, we do not believe that this would
169179
solve the distributed tooling issue.
170180

171181
It would be possible to use the output from the proposed rendering system and
172-
import it into `python.org`_. We would argue however that this would be the
173-
worst of both worlds, as a great deal of complexity is added, and none is
174-
removed.
182+
import it into the existing `python.org`_ domain. We would argue, however,
183+
that this would be the worst of both worlds, as a great deal of complexity
184+
is added, while none is removed.
175185

176186

177187
Open Issues
@@ -183,8 +193,8 @@ None.
183193
Acknowledgments
184194
===============
185195

186-
Thanks to Hugo van Kemenade, Pablo Galindo Salgado, and Éric Araujo for support
187-
since April 2020.
196+
Thanks to Hugo van Kemenade, Pablo Galindo Salgado and Éric Araujo for
197+
supporting this effort since April 2020.
188198

189199

190200
Footnotes

0 commit comments

Comments
 (0)